live_help Notes

assignment This action requires one of theses roles: Advanced staff, Advanced tutor

settings Params

Param name Description
user_id optional . Must be String

The user id or slug

id required . Must be String

The requested id

user_candidature optional , nil allowed . Must be a Hash
user_candidature[id] optional , nil allowed . Must be Fixnum

The id.

user_candidature[user_id] optional , nil allowed . Must be Fixnum

The user id.

user_candidature[birth_date] optional , nil allowed . Must be String

The birth date.

user_candidature[gender] optional , nil allowed . Must be String

The gender.

user_candidature[zip_code] optional , nil allowed . Must be String

The zip code.

user_candidature[country] optional , nil allowed . Must be String

The country.

user_candidature[birth_city] optional , nil allowed . Must be String

The birth city.

user_candidature[birth_country] optional , nil allowed . Must be String

The birth country.

user_candidature[postal_street] optional , nil allowed . Must be String

The postal street.

user_candidature[postal_complement] optional , nil allowed . Must be String

The postal complement.

user_candidature[postal_city] optional , nil allowed . Must be String

The postal city.

user_candidature[postal_zip_code] optional , nil allowed . Must be String

The postal zip code.

user_candidature[email] optional , nil allowed . Must be String

The email.

user_candidature[postal_country] optional , nil allowed . Must be String

The postal country.

user_candidature[contact_affiliation] optional , nil allowed . Must be String

The contact affiliation.

user_candidature[contact_last_name] optional , nil allowed . Must be String

The contact last name.

user_candidature[contact_first_name] optional , nil allowed . Must be String

The contact first name.

user_candidature[contact_phone1] optional , nil allowed . Must be String

The contact phone1.

user_candidature[contact_phone2] optional , nil allowed . Must be String

The contact phone2.

user_candidature[max_level_memory] optional , nil allowed . Must be Fixnum

The max level memory.

user_candidature[max_level_logic] optional , nil allowed . Must be Fixnum

The max level logic.

user_candidature[other_information] optional , nil allowed . Must be String

The other information.

user_candidature[language] optional , nil allowed . Must be String

The language.

user_candidature[meeting_date] optional , nil allowed . Must be DateTime

The meeting date.

user_candidature[piscine_date] optional , nil allowed . Must be String

The piscine date.

user_candidature[pin] optional , nil allowed . Must be String

The pin.

user_candidature[phone] optional , nil allowed . Must be String

The phone.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/user_candidatures/23
{
  "user_candidature": {
    "birth_city": "Port Gonzalo",
    "birth_country": "Iceland",
    "birth_date": "1992-02-29",
    "contact_affiliation": "parent",
    "contact_first_name": "Lily",
    "contact_last_name": "Buckridge",
    "contact_phone1": "0695847362",
    "contact_phone2": "0491314200",
    "country": "Antarctica (the territory South of 60 deg S)",
    "gender": "female",
    "language": "",
    "max_level_logic": "2",
    "max_level_memory": "1",
    "meeting_date": "2017-01-06",
    "other_information": "3",
    "pin": "4242",
    "piscine_date": "2017-11-06",
    "postal_city": "Lake Montana",
    "postal_complement": "",
    "postal_country": "Lao People's Democratic Republic",
    "postal_street": "7646 Constantin Green",
    "postal_zip_code": "19921",
    "user_id": "46",
    "zip_code": "91297"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"user_candidature":{"birth_city":"Port Gonzalo","birth_country":"Iceland","birth_date":"1992-02-29","contact_affiliation":"parent","contact_first_name":"Lily","contact_last_name":"Buckridge","contact_phone1":"0695847362","contact_phone2":"0491314200","country":"Antarctica (the territory South of 60 deg S)","gender":"female","language":"","max_level_logic":"2","max_level_memory":"1","meeting_date":"2017-01-06","other_information":"3","pin":"4242","piscine_date":"2017-11-06","postal_city":"Lake Montana","postal_complement":"","postal_country":"Lao People's Democratic Republic","postal_street":"7646 Constantin Green","postal_zip_code":"19921","user_id":"46","zip_code":"91297"}}' "https://api.intra.42.fr/v2/user_candidatures/23"
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

params = {user_candidature: {birth_city: "Port Gonzalo", birth_country: "Iceland", birth_date: "1992-02-29", contact_affiliation: "parent", contact_first_name: "Lily", contact_last_name: "Buckridge", contact_phone1: "0695847362", contact_phone2: "0491314200", country: "Antarctica (the territory South of 60 deg S)", gender: "female", language: "", max_level_logic: "2", max_level_memory: "1", meeting_date: "2017-01-06", other_information: "3", pin: "4242", piscine_date: "2017-11-06", postal_city: "Lake Montana", postal_complement: "", postal_country: "Lao People's Democratic Republic", postal_street: "7646 Constantin Green", postal_zip_code: "19921", user_id: "46", zip_code: "91297"}}
response = token.put("/v2/user_candidatures/23", params: params)
response.status
# => 204
response.parsed
# =>