VisioFormation · APIConnecter vos outils, conserver le contrôle

Préinscrire une entreprise et ses apprenants par API

POST/preinscriptions/companies

Préinscrire une entreprise et ses apprenants. Crée uniquement une demande entreprise et ses demandes apprenants en attente, sans créer de comptes ni d’inscriptions immédiates. L’entreprise nécessite name, siret, address, postal_code, city, email et representant, et au moins un apprenant. Les règles des informations complémentaires des apprenants sont les mêmes que pour un particulier. Les identifiants retournés sont ceux des demandes en attente, pas ceux de comptes entreprise/apprenant.

Permission : preinscriptions:companies:create. Les deux jetons restent obligatoires.

Champs de la requête

Champ Obligatoire Null autorisé Type, limites, valeurs et défaut
course_id Oui Non string / id ; 19 caractères max.
library_id Oui Non string / id ; 19 caractères max.
company Oui Non object
company.name Oui Non string ; 255 caractères max. ; 1020 octets max.
company.siret Oui Non string / siret ; 255 caractères max. ; 1020 octets max.
company.address Oui Non string ; 255 caractères max. ; 1020 octets max.
company.postal_code Oui Non string ; 255 caractères max. ; 1020 octets max.
company.city Oui Non string ; 255 caractères max. ; 1020 octets max.
company.email Oui Non string / email ; 255 caractères max. ; 1020 octets max.
company.representant Oui Non string ; 255 caractères max. ; 1020 octets max.
company.phone Non Oui string ; 255 caractères max. ; 1020 octets max.
company.vat_number Non Oui string ; 255 caractères max. ; 1020 octets max.
company.function_represented_by Non Oui string ; 255 caractères max. ; 1020 octets max.
students Oui Non array ; 1–100 objets
students[].name Oui Non string ; 255 caractères max. ; 1020 octets max.
students[].email Oui Non string / email ; 255 caractères max. ; 1020 octets max.
students[].phone Oui Non string ; 255 caractères max. ; 1020 octets max.
students[].address Oui Non string ; 255 caractères max. ; 1020 octets max.
students[].profession Oui Non string ; 255 caractères max. ; 1020 octets max.
students[].postal_code Selon paramétrage organisme Oui string ; 255 caractères max. ; 1020 octets max.
students[].city Selon paramétrage organisme Oui string ; 255 caractères max. ; 1020 octets max.
students[].dob Selon paramétrage organisme Oui string / date ; 10 caractères max.
students[].nom_naissance Non Oui string ; 255 caractères max. ; 1020 octets max.
students[].social_security Non Oui string ; 255 caractères max. ; 1020 octets max.
students[].financeur Non Oui string ; 255 caractères max. ; 1020 octets max.
students[].handicap Non Oui string ; 255 caractères max. ; 1020 octets max. ; Oui, Non
students[].gender Non Oui string ; 255 caractères max. ; Male, Female, Other
students[].department_of_birth Non Oui string ; 255 caractères max. ; 1020 octets max.
students[].city_of_birth Selon paramétrage organisme Oui string ; 255 caractères max. ; 1020 octets max.
students[].message Non Oui string ; 16000 caractères max. ; 64000 octets max.

Exemple de requête JSON

{
  "course_id": "1",
  "library_id": "1",
  "company": {
    "name": "Entreprise Exemple",
    "email": "office@example.com",
    "address": "10 rue Exemple",
    "siret": "12345678900010",
    "postal_code": "75000",
    "city": "Paris",
    "representant": "Alex"
  },
  "students": [
    {
      "name": "Pending Exemple",
      "email": "pending@example.com",
      "phone": "0123456789",
      "address": "12 rue Exemple",
      "profession": "Technicien"
    }
  ]
}

Exemple de réponse

{
  "success": true,
  "request_id": "req_0123456789abcdef0123456789abcdef",
  "data": {
    "pre_inscription_company_id": "701",
    "pre_inscription_ids": [
      "602"
    ],
    "state": "pending_validation"
  }
}