POST · GET · PUT  secure.medicapp.ids.host/cloud/partner/v5
Créer un compte développeur →
POST GET PUT /cloud/partner/v5/patients

Patients

Créer un patient dans un espace de confiance, le retrouver par NIR + rang bénéficiaire ou externalId, et mettre à jour ses données administratives.

Créer ou retrouver un patient
ℹ️
Cet endpoint est idempotent : si le patient existe déjà (NIR+rang ou externalId), il retourne le patient existant avec created: false.
Champ Type Requis Description
trustSpaceUuidstringOuiUUID de l'espace de confiance auquel rattacher le patient
firstNamestringOui
lastNamestringOui
birthDatedateOuiYYYY-MM-DD
genderenumOuiM / F / U
emailstringNonRequis pour envoi par email
phonestringNonE.164 — requis pour envoi par SMS
externalIdstringNonIdentifiant dans votre système. Unique par espace de confiance.
identificationKeyobjectNonClé NIR SESAM-Vitale. Voir ci-dessous.
identificationKey.nirstringNon13 chiffres INSEE (sans clé de contrôle) ou 15 avec
identificationKey.rangstringNonRang bénéficiaire : 01 = assuré, 02–99 = ayants droit
⚠️
Priorité de déduplication : 1) NIR + rang → 2) externalId → 3) nom + prénom + DOB (fallback avec warning)
curl Créer un patient (NIR)
curl -X POST https://secure.medicapp.ids.host/cloud/partner/v5/patients \
  -H "Authorization: Bearer sk_test_VOTRE_CLE" \
  -H "Content-Type: application/json" \
  -d '{
    "trustSpaceUuid": "ts_xxxxxxxxxxxx",
    "firstName": "Sophie", "lastName": "Bernard",
    "birthDate": "1988-11-03", "gender": "F",
    "phone": "+33612345678",
    "externalId": "EMP-4821",
    "identificationKey": { "nir": "1881103750016", "rang": "01" }
  }'
json 201 Created
{
  "patientUuid": "pat_xxxxxxxxxxx",
  "created": true,
  "externalId": "EMP-4821",
  "identificationKey": { "nir": "1881103750016", "rang": "01" },
  "warning": null
}
Mettre à jour un patient
ℹ️
Seuls email, phone, externalId et identificationKey sont modifiables. Les données d'identité civile sont verrouillées.
curl
curl -X PUT https://secure.medicapp.ids.host/cloud/partner/v5/patients/{patientUuid} \
  -H "Authorization: Bearer sk_test_VOTRE_CLE" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "+33698765432", "email": "new@email.fr" }'
Tester en live

POST /patients Sandbox prête