API v5 · api.medicappconnect.com/v5
GET /v5/patients

Retourne la liste paginée des patients de votre espace. Filtrable par date de création ou de modification.

Paramètres query

ParamètreTypeDescription
page integer optionnel Numéro de page (défaut: 1)
per_page integer optionnel Résultats par page (défaut: 20, max: 100)
created_after ISO 8601 optionnel Patients créés après cette date
modified_after ISO 8601 optionnel Patients modifiés après cette date
template string optionnel Format de réponse : FHIR (V6, fin 2026)
curl Requête
curl https://api.medicappconnect.com/v5/patients?page=1&per_page=20 \
  -H "Authorization: Bearer YOUR_API_KEY"
200 OK
json Réponse
{
  "data": [
    {
      "id": "pat_d4e5f6a7",
      "firstName": "Jean",
      "lastName": "Dupont",
      "birthDate": "1985-03-15",
      "gender": "M",
      "email": "jean.dupont@email.fr",
      "phone": "+33612345678",
      "externalId": "IPP-2024-0042",
      "recordsCount": 3,
      "createdAt": "2024-01-15T09:30:00Z",
      "modifiedAt": "2025-03-20T14:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "perPage": 20,
    "total": 847,
    "totalPages": 43
  }
}
GET /v5/patients/{patient_id}

Récupère un patient par son identifiant Medicapp. Inclut les métadonnées et le nombre de dossiers rattachés.

Paramètres path

ParamètreTypeDescription
patient_id string requis Identifiant Medicapp du patient (ex: pat_d4e5f6a7)
curl Requête
curl https://api.medicappconnect.com/v5/patients/pat_d4e5f6a7 \
  -H "Authorization: Bearer YOUR_API_KEY"
200 OK
json Réponse
{
  "id": "pat_d4e5f6a7",
  "firstName": "Jean",
  "lastName": "Dupont",
  "birthDate": "1985-03-15",
  "gender": "M",
  "email": "jean.dupont@email.fr",
  "phone": "+33612345678",
  "externalId": "IPP-2024-0042",
  "address": {
    "street": "12 rue de la Paix",
    "city": "Paris",
    "postalCode": "75002",
    "country": "FR"
  },
  "recordsCount": 3,
  "records": [
    { "id": "rec_8f3a2b1c", "status": "completed", "createdAt": "2025-03-20T14:00:00Z" }
  ],
  "createdAt": "2024-01-15T09:30:00Z",
  "modifiedAt": "2025-03-20T14:00:00Z"
}
POST /v5/patients

Crée un nouveau patient dans votre espace Medicapp Pro.

Corps de la requête (JSON)

ChampTypeDescription
firstNamestringrequisPrénom
lastNamestringrequisNom de famille
birthDateYYYY-MM-DDrequisDate de naissance
genderstringoptionnelM, F ou O
emailstringoptionnelEmail du patient (utilisé pour l'envoi de questionnaires)
phonestringoptionnelTéléphone au format E.164 (+33...)
externalIdstringoptionnelIdentifiant dans votre système (IPP, numéro dossier)
addressobjectoptionnelObjet : street, city, postalCode, country
curlRequête
curl -X POST https://api.medicappconnect.com/v5/patients \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Marie",
    "lastName": "Martin",
    "birthDate": "1990-07-22",
    "gender": "F",
    "email": "marie.martin@email.fr",
    "phone": "+33698765432",
    "externalId": "IPP-2025-0108"
  }'
201 Created
jsonRéponse
{
  "id": "pat_b2c3d4e5",
  "firstName": "Marie",
  "lastName": "Martin",
  "birthDate": "1990-07-22",
  "gender": "F",
  "email": "marie.martin@email.fr",
  "phone": "+33698765432",
  "externalId": "IPP-2025-0108",
  "recordsCount": 0,
  "createdAt": "2025-03-20T16:45:00Z",
  "modifiedAt": "2025-03-20T16:45:00Z"
}
⚠️
Le champ externalId doit être unique dans votre espace. Si un patient avec le même externalId existe déjà, l'API retourne une erreur 409 Conflict.
PUT /v5/patients/{patient_id}

Met à jour les informations d'un patient existant. Seuls les champs envoyés sont modifiés (merge partiel).

curlRequête — modifier l'email
curl -X PUT https://api.medicappconnect.com/v5/patients/pat_d4e5f6a7 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "nouveau@email.fr" }'
200 OK — retourne le patient mis à jour.
DEL /v5/patients/{patient_id}

Supprime un patient et tous ses dossiers associés. Cette action est irréversible.

⚠️
Attention RGPD — La suppression d'un patient entraîne la suppression de toutes ses données (dossiers, questionnaires, documents). Un enregistrement d'audit est conservé conformément aux obligations légales. Voir politique de rétention →
curlRequête
curl -X DELETE https://api.medicappconnect.com/v5/patients/pat_d4e5f6a7 \
  -H "Authorization: Bearer YOUR_API_KEY"
200 OK
jsonRéponse
{ "deleted": true, "id": "pat_d4e5f6a7" }
CodeSignificationCause fréquente
400Bad RequestChamp requis manquant, format de date invalide
401UnauthorizedAPI key manquante ou invalide
404Not FoundPatient inexistant ou appartenant à un autre espace
409ConflictexternalId déjà utilisé par un autre patient
429Too Many RequestsRate limit dépassé (voir Authentification)
jsonFormat d'erreur standard
{
  "error": {
    "code": "PATIENT_NOT_FOUND",
    "status": 404,
    "message": "Patient pat_d4e5f6a7 not found in your space",
    "requestId": "req_abc123def456"
  }
}