Créer ou retrouver un compte apprenant par API
POST/students
Créer ou retrouver un apprenant. Crée un compte ou réutilise un compte unique de même email ET même nom normalisés. Aucun rattachement à une session ni aucune pré-inscription. Les champs facultatifs sont des données de création : une réutilisation ne met pas à jour les coordonnées. company_id exige le statut Employé et une entreprise de votre organisme.
Permission : students:create. Les deux jetons restent obligatoires.
Champs de la requête
| Champ | Obligatoire | Null autorisé | Type, limites, valeurs et défaut |
|---|---|---|---|
name |
Oui | Non | string ; 255 caractères max. ; 1020 octets max. |
email |
Oui | Non | string / email ; 255 caractères max. ; 1020 octets max. |
phone |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
address |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
birth |
Non | Oui | string / date ; 10 caractères max. |
city_of_birth |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
country_of_birth |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
department_of_birth |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
gender |
Non | Oui | string ; 255 caractères max. ; Male, Female, Other |
description |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. |
status |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. ; Employé, Non salarié, Indépendant, Particulier |
company_id |
Non | Oui | string / id ; 19 caractères max. |
function |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. |
profession |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. |
raison_sociale |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. |
vat_number |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
siret |
Non | Oui | string / siret ; 255 caractères max. ; 1020 octets max. |
social_security |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
socio_prof |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. |
contract_nature |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. |
salary |
Non | Oui | string / decimal ; 11 caractères max. |
handicap |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. ; Oui, Non |
profession_single |
Non | Oui | string ; 16000 caractères max. ; 64000 octets max. |
external_id |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
city |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
code_postal |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
street |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
country_code |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
nom_naissance |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
numero_rpps |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
numero_ordinal |
Non | Oui | string ; 255 caractères max. ; 1020 octets max. |
Exemple de requête JSON
{
"name": "Élodie Exemple",
"email": "elodie@example.com",
"numero_rpps": "00012345",
"numero_ordinal": "001"
}
Exemple de réponse
{
"success": true,
"request_id": "req_0123456789abcdef0123456789abcdef",
"data": {
"student_id": "201",
"student_status": "created"
}
}