---
title: "Create patient"
description: "Use the organization gMedic account. No automatic write retries; reconcile an unknown outcome before repeating.\n\n- **Scope:** `gmedic:patients:write`\n- **Credentials:** an API key, a client-credentials token or a person's access token\n- **Effect:** writes; not idempotent: check the outcome before you retry\n- **Limits:** request body up to 32 KB, response up to 256 KB\n- **CLI:** `arbol gmedic patients create` · **MCP tool:** `gmedic_patients_create`"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.getarbol.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: gMedic API › Patients

`POST /v1/gmedic/patients`

Use the organization gMedic account. No automatic write retries; reconcile an unknown outcome before repeating.

- **Scope:** `gmedic:patients:write`
- **Credentials:** an API key, a client-credentials token or a person's access token
- **Effect:** writes; not idempotent: check the outcome before you retry
- **Limits:** request body up to 32 KB, response up to 256 KB
- **CLI:** `arbol gmedic patients create` · **MCP tool:** `gmedic_patients_create`

## Authentication

Requires one of the following:

- `arbolHuman`, oauth2, scopes: `gmedic:patients:write`
- `arbolMachine`, oauth2, scopes: `gmedic:patients:write`
- `arbolApiKey`, http, header `Authorization`

## Request body

_Required._

- `data` (`gmedic.patients.create.data`; object, required)
  - `documentNumber` (`gmedic.patients.create.data.documentNumber`; string, required)
    - maxLength 255
  - `documentTypeId` (`gmedic.patients.create.data.documentTypeId`; string, required)
    - pattern `^[1-9][0-9]{0,14}$`
  - `sourceCountryCode` (`gmedic.patients.create.data.sourceCountryCode`; string, optional)
    - minLength 3; maxLength 3
  - `expeditionPlaceCode` (`gmedic.patients.create.data.expeditionPlaceCode`; string, optional)
    - minLength 5; maxLength 5
  - `givenName` (`gmedic.patients.create.data.givenName`; string, optional)
    - maxLength 255
  - `familyName` (`gmedic.patients.create.data.familyName`; string, optional)
    - maxLength 255
  - `email` (`gmedic.patients.create.data.email`; string, optional)
    - maxLength 255
  - `phone` (`gmedic.patients.create.data.phone`; string, optional)
    - maxLength 255
  - `mobilePhone` (`gmedic.patients.create.data.mobilePhone`; string, optional)
    - maxLength 255
  - `genderId` (`gmedic.patients.create.data.genderId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `birthDate` (`gmedic.patients.create.data.birthDate`; string, optional)
    - maxLength 20000; pattern `^[0-9]{8}$`
  - `address` (`gmedic.patients.create.data.address`; string, optional)
    - maxLength 255
  - `countryCode` (`gmedic.patients.create.data.countryCode`; string, optional)
    - minLength 3; maxLength 3
  - `locationCode` (`gmedic.patients.create.data.locationCode`; string, optional)
    - minLength 5; maxLength 5
  - `locationZoneTypeId` (`gmedic.patients.create.data.locationZoneTypeId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `educationLevelId` (`gmedic.patients.create.data.educationLevelId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `profession` (`gmedic.patients.create.data.profession`; string, optional)
    - maxLength 255
  - `maritalStatusId` (`gmedic.patients.create.data.maritalStatusId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `occupationId` (`gmedic.patients.create.data.occupationId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `ethnicityId` (`gmedic.patients.create.data.ethnicityId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `disabilityCategoryId` (`gmedic.patients.create.data.disabilityCategoryId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `householdCompositionTypeId` (`gmedic.patients.create.data.householdCompositionTypeId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `householdSize` (`gmedic.patients.create.data.householdSize`; integer, optional)
    - min 0; max 9007199254740991
  - `childrenCount` (`gmedic.patients.create.data.childrenCount`; integer, optional)
    - min 0; max 9007199254740991
  - `dependentsCount` (`gmedic.patients.create.data.dependentsCount`; integer, optional)
    - min 0; max 9007199254740991
  - `socioeconomicStratum` (`gmedic.patients.create.data.socioeconomicStratum`; integer, optional)
    - min 0; max 9007199254740991
  - `epsId` (`gmedic.patients.create.data.epsId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `arlId` (`gmedic.patients.create.data.arlId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `afpId` (`gmedic.patients.create.data.afpId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `bloodTypeId` (`gmedic.patients.create.data.bloodTypeId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `healthRegimeId` (`gmedic.patients.create.data.healthRegimeId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `healthPartnerId` (`gmedic.patients.create.data.healthPartnerId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `healthPartnerIdNumber` (`gmedic.patients.create.data.healthPartnerIdNumber`; string, optional)
    - maxLength 255
  - `referredByTypeId` (`gmedic.patients.create.data.referredByTypeId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `referredByName` (`gmedic.patients.create.data.referredByName`; string, optional)
    - maxLength 255
  - `contactPerson` (`gmedic.patients.create.data.contactPerson`; string, optional)
    - maxLength 255
  - `contactPersonPhone` (`gmedic.patients.create.data.contactPersonPhone`; string, optional)
    - maxLength 255
  - `responsible` (`gmedic.patients.create.data.responsible`; string, optional)
    - maxLength 255
  - `responsiblePhone` (`gmedic.patients.create.data.responsiblePhone`; string, optional)
    - maxLength 255
  - `responsibleRelationship` (`gmedic.patients.create.data.responsibleRelationship`; string, optional)
    - maxLength 255
  - `properties` (`gmedic.patients.create.data.properties`; map<string>, optional)
  - `firstName` (`gmedic.patients.create.data.firstName`; string, optional, deprecated) — Deprecated: use `givenName`. Answered until 2027-01-28.
    - maxLength 255
  - `lastName` (`gmedic.patients.create.data.lastName`; string, optional, deprecated) — Deprecated: use `familyName`. Answered until 2027-01-28.
    - maxLength 255
  - `mobile` (`gmedic.patients.create.data.mobile`; string, optional, deprecated) — Deprecated: use `mobilePhone`. Answered until 2027-01-28.
    - maxLength 255
- `connectionId` (`gmedic.patients.create.connectionId`; string, optional)
  - pattern `^con_[0-9A-Za-z]{26}$`

## Example request

```json
{
  "data": {
    "documentNumber": "string",
    "documentTypeId": "string",
    "sourceCountryCode": "str",
    "expeditionPlaceCode": "strin",
    "givenName": "string",
    "familyName": "string",
    "email": "string",
    "phone": "string",
    "mobilePhone": "string",
    "genderId": "string",
    "birthDate": "string",
    "address": "string",
    "countryCode": "str",
    "locationCode": "strin",
    "locationZoneTypeId": "string",
    "educationLevelId": "string",
    "profession": "string",
    "maritalStatusId": "string",
    "occupationId": "string",
    "ethnicityId": "string",
    "disabilityCategoryId": "string",
    "householdCompositionTypeId": "string",
    "householdSize": 0,
    "childrenCount": 0,
    "dependentsCount": 0,
    "socioeconomicStratum": 0,
    "epsId": "string",
    "arlId": "string",
    "afpId": "string",
    "bloodTypeId": "string",
    "healthRegimeId": "string",
    "healthPartnerId": "string",
    "healthPartnerIdNumber": "string",
    "referredByTypeId": "string",
    "referredByName": "string",
    "contactPerson": "string",
    "contactPersonPhone": "string",
    "responsible": "string",
    "responsiblePhone": "string",
    "responsibleRelationship": "string",
    "properties": {
      "property1": "string",
      "property2": "string"
    },
    "firstName": "string",
    "lastName": "string",
    "mobile": "string"
  },
  "connectionId": "string"
}
```

## Code samples

### cURL

```bash
curl https://api.getarbol.com/v1/gmedic/patients \
  --request POST \
  --header "Authorization: Bearer $ARBOL_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "data": {
    "documentNumber": "<documentNumber>",
    "documentTypeId": "<documentTypeId>"
  }
}'
```

### TypeScript

```typescript
import { createClient } from "@arbol-ai/sdk";

const arbol = createClient({
  baseUrl: "https://api.getarbol.com",
  token: process.env.ARBOL_API_KEY!,
});

const { data } = await arbol.gmedic.patients.create({
  data: {
    documentNumber: "<documentNumber>",
    documentTypeId: "<documentTypeId>",
  },
});
```

### Rust

```rust
use arbol_sdk::{types, Client, Credential};

let arbol = Client::new(Credential::ApiKey(std::env::var("ARBOL_API_KEY")?))?;

let data = arbol
    .gmedic()
    .patients()
    .create(&types::GmedicPatientsCreateInput {
        data: types::GmedicPatientsCreateInputData {
            document_number: "<documentNumber>".into(),
            document_type_id: "<documentTypeId>".into(),
            source_country_code: None,
            expedition_place_code: None,
            given_name: None,
            family_name: None,
            email: None,
            phone: None,
            mobile_phone: None,
            gender_id: None,
            birth_date: None,
            address: None,
            country_code: None,
            location_code: None,
            location_zone_type_id: None,
            education_level_id: None,
            profession: None,
            marital_status_id: None,
            occupation_id: None,
            ethnicity_id: None,
            disability_category_id: None,
            household_composition_type_id: None,
            household_size: None,
            children_count: None,
            dependents_count: None,
            socioeconomic_stratum: None,
            eps_id: None,
            arl_id: None,
            afp_id: None,
            blood_type_id: None,
            health_regime_id: None,
            health_partner_id: None,
            health_partner_id_number: None,
            referred_by_type_id: None,
            referred_by_name: None,
            contact_person: None,
            contact_person_phone: None,
            responsible: None,
            responsible_phone: None,
            responsible_relationship: None,
            properties: None,
            first_name: None,
            last_name: None,
            mobile: None,
        },
        connection_id: None,
    })
    .await?;
```

### CLI

```bash
arbol gmedic patients create --input - <<'JSON'
{
  "data": {
    "documentNumber": "<documentNumber>",
    "documentTypeId": "<documentTypeId>"
  }
}
JSON
```

### MCP

```json
{
  "name": "gmedic_patients_create",
  "arguments": {
    "data": {
      "documentNumber": "<documentNumber>",
      "documentTypeId": "<documentTypeId>"
    }
  }
}
```

## Responses

### 200

Successful operation.

#### Example

```json
{
  "success": true,
  "data": {
    "id": "string",
    "key": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "documentNumber": "string",
    "documentType": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "givenName": "string",
    "familyName": "string",
    "healthCompanyName": "string",
    "birthDate": "string",
    "ageInYears": 0,
    "ageMonths": 0,
    "birthdayDays": 0,
    "email": "string",
    "phone": "string",
    "mobilePhone": "string",
    "address": "string",
    "location": "string",
    "gender": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "genderIdentity": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "contactPerson": "string",
    "contactPersonPhone": "string",
    "responsible": "string",
    "responsiblePhone": "string",
    "responsibleRelationship": "string",
    "healthRegime": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "jobCompany": "string",
    "referredBy": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "referredByName": "string",
    "status": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "category": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "patientType": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "educationLevel": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "profession": "string",
    "occupation": "string",
    "maritalStatus": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "ethnicity": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "disabilityCategory": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "householdCompositionType": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "householdSize": 0,
    "childrenCount": 0,
    "dependentsCount": 0,
    "socioeconomicStratum": 0,
    "eps": "string",
    "arl": "string",
    "afp": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "properties": {},
    "creationDate": "string",
    "modificationDate": "string",
    "firstName": "string",
    "lastName": "string",
    "mobile": "string",
    "state": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    }
  },
  "error": null,
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.200.success`; boolean, required)
  - one of `true`
- `data` (`gmedic.patients.create.response.200.data`; object, required)
  - `id` (`gmedic.patients.create.response.200.data.id`; string, required)
    - pattern `^[1-9][0-9]{0,14}$`
  - `key` (`gmedic.patients.create.response.200.data.key`; string | null, optional)
    - maxLength 20000
  - `createdAt` (`gmedic.patients.create.response.200.data.createdAt`; string | null, optional)
    - maxLength 20000
  - `updatedAt` (`gmedic.patients.create.response.200.data.updatedAt`; string | null, optional)
    - maxLength 20000
  - `documentNumber` (`gmedic.patients.create.response.200.data.documentNumber`; string | null, optional)
    - maxLength 20000
  - `documentType` (`gmedic.patients.create.response.200.data.documentType`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.documentType.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.documentType.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.documentType.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.documentType.value`; string | null, optional)
      - maxLength 20000
  - `givenName` (`gmedic.patients.create.response.200.data.givenName`; string | null, optional)
    - maxLength 20000
  - `familyName` (`gmedic.patients.create.response.200.data.familyName`; string | null, optional)
    - maxLength 20000
  - `healthCompanyName` (`gmedic.patients.create.response.200.data.healthCompanyName`; string | null, optional)
    - maxLength 20000
  - `birthDate` (`gmedic.patients.create.response.200.data.birthDate`; string | null, optional)
    - maxLength 20000
  - `ageInYears` (`gmedic.patients.create.response.200.data.ageInYears`; integer | null, optional)
    - min 0; max 9007199254740991
  - `ageMonths` (`gmedic.patients.create.response.200.data.ageMonths`; integer | null, optional)
    - min 0; max 9007199254740991
  - `birthdayDays` (`gmedic.patients.create.response.200.data.birthdayDays`; integer | null, optional)
    - min 0; max 9007199254740991
  - `email` (`gmedic.patients.create.response.200.data.email`; string | null, optional)
    - maxLength 20000
  - `phone` (`gmedic.patients.create.response.200.data.phone`; string | null, optional)
    - maxLength 20000
  - `mobilePhone` (`gmedic.patients.create.response.200.data.mobilePhone`; string | null, optional)
    - maxLength 20000
  - `address` (`gmedic.patients.create.response.200.data.address`; string | null, optional)
    - maxLength 20000
  - `location` (`gmedic.patients.create.response.200.data.location`; string | null, optional)
    - maxLength 20000
  - `gender` (`gmedic.patients.create.response.200.data.gender`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.gender.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.gender.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.gender.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.gender.value`; string | null, optional)
      - maxLength 20000
  - `genderIdentity` (`gmedic.patients.create.response.200.data.genderIdentity`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.genderIdentity.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.genderIdentity.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.genderIdentity.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.genderIdentity.value`; string | null, optional)
      - maxLength 20000
  - `contactPerson` (`gmedic.patients.create.response.200.data.contactPerson`; string | null, optional)
    - maxLength 20000
  - `contactPersonPhone` (`gmedic.patients.create.response.200.data.contactPersonPhone`; string | null, optional)
    - maxLength 20000
  - `responsible` (`gmedic.patients.create.response.200.data.responsible`; string | null, optional)
    - maxLength 20000
  - `responsiblePhone` (`gmedic.patients.create.response.200.data.responsiblePhone`; string | null, optional)
    - maxLength 20000
  - `responsibleRelationship` (`gmedic.patients.create.response.200.data.responsibleRelationship`; string | null, optional)
    - maxLength 20000
  - `healthRegime` (`gmedic.patients.create.response.200.data.healthRegime`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.healthRegime.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.healthRegime.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.healthRegime.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.healthRegime.value`; string | null, optional)
      - maxLength 20000
  - `jobCompany` (`gmedic.patients.create.response.200.data.jobCompany`; string | null, optional)
    - maxLength 20000
  - `referredBy` (`gmedic.patients.create.response.200.data.referredBy`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.referredBy.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.referredBy.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.referredBy.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.referredBy.value`; string | null, optional)
      - maxLength 20000
  - `referredByName` (`gmedic.patients.create.response.200.data.referredByName`; string | null, optional)
    - maxLength 20000
  - `status` (`gmedic.patients.create.response.200.data.status`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.status.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.status.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.status.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.status.value`; string | null, optional)
      - maxLength 20000
  - `category` (`gmedic.patients.create.response.200.data.category`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.category.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.category.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.category.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.category.value`; string | null, optional)
      - maxLength 20000
  - `patientType` (`gmedic.patients.create.response.200.data.patientType`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.patientType.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.patientType.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.patientType.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.patientType.value`; string | null, optional)
      - maxLength 20000
  - `educationLevel` (`gmedic.patients.create.response.200.data.educationLevel`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.educationLevel.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.educationLevel.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.educationLevel.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.educationLevel.value`; string | null, optional)
      - maxLength 20000
  - `profession` (`gmedic.patients.create.response.200.data.profession`; string | null, optional)
    - maxLength 20000
  - `occupation` (`gmedic.patients.create.response.200.data.occupation`; string | null, optional)
    - maxLength 20000
  - `maritalStatus` (`gmedic.patients.create.response.200.data.maritalStatus`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.maritalStatus.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.maritalStatus.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.maritalStatus.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.maritalStatus.value`; string | null, optional)
      - maxLength 20000
  - `ethnicity` (`gmedic.patients.create.response.200.data.ethnicity`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.ethnicity.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.ethnicity.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.ethnicity.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.ethnicity.value`; string | null, optional)
      - maxLength 20000
  - `disabilityCategory` (`gmedic.patients.create.response.200.data.disabilityCategory`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.disabilityCategory.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.disabilityCategory.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.disabilityCategory.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.disabilityCategory.value`; string | null, optional)
      - maxLength 20000
  - `householdCompositionType` (`gmedic.patients.create.response.200.data.householdCompositionType`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.householdCompositionType.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.householdCompositionType.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.householdCompositionType.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.householdCompositionType.value`; string | null, optional)
      - maxLength 20000
  - `householdSize` (`gmedic.patients.create.response.200.data.householdSize`; integer | null, optional)
    - min 0; max 9007199254740991
  - `childrenCount` (`gmedic.patients.create.response.200.data.childrenCount`; integer | null, optional)
    - min 0; max 9007199254740991
  - `dependentsCount` (`gmedic.patients.create.response.200.data.dependentsCount`; integer | null, optional)
    - min 0; max 9007199254740991
  - `socioeconomicStratum` (`gmedic.patients.create.response.200.data.socioeconomicStratum`; integer | null, optional)
    - min 0; max 9007199254740991
  - `eps` (`gmedic.patients.create.response.200.data.eps`; string | null, optional)
    - maxLength 20000
  - `arl` (`gmedic.patients.create.response.200.data.arl`; string | null, optional)
    - maxLength 20000
  - `afp` (`gmedic.patients.create.response.200.data.afp`; object | null, optional)
    - `id` (`gmedic.patients.create.response.200.data.afp.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.afp.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.afp.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.afp.value`; string | null, optional)
      - maxLength 20000
  - `properties` (`gmedic.patients.create.response.200.data.properties`; object | null, optional)
  - `creationDate` (`gmedic.patients.create.response.200.data.creationDate`; string | null, optional, deprecated) — Deprecated: use `createdAt`. Answered until 2027-01-28.
    - maxLength 20000
  - `modificationDate` (`gmedic.patients.create.response.200.data.modificationDate`; string | null, optional, deprecated) — Deprecated: use `updatedAt`. Answered until 2027-01-28.
    - maxLength 20000
  - `firstName` (`gmedic.patients.create.response.200.data.firstName`; string | null, optional, deprecated) — Deprecated: use `givenName`. Answered until 2027-01-28.
    - maxLength 20000
  - `lastName` (`gmedic.patients.create.response.200.data.lastName`; string | null, optional, deprecated) — Deprecated: use `familyName`. Answered until 2027-01-28.
    - maxLength 20000
  - `mobile` (`gmedic.patients.create.response.200.data.mobile`; string | null, optional, deprecated) — Deprecated: use `mobilePhone`. Answered until 2027-01-28.
    - maxLength 20000
  - `state` (`gmedic.patients.create.response.200.data.state`; object | null, optional, deprecated) — Deprecated: use `status`. Answered until 2027-01-28.
    - `id` (`gmedic.patients.create.response.200.data.state.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.patients.create.response.200.data.state.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.patients.create.response.200.data.state.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.patients.create.response.200.data.state.value`; string | null, optional)
      - maxLength 20000
- `error` (`gmedic.patients.create.response.200.error`; unknown, required)
- `metadata` (`gmedic.patients.create.response.200.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.200.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 400

`INVALID_INPUT`: The request does not match the published schema.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "INVALID_INPUT",
    "message": "string",
    "retryable": false,
    "data": {
      "issues": [
        {
          "path": "string",
          "message": "string"
        }
      ]
    }
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.400.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.400.data`; unknown, required)
- `error` (`gmedic.patients.create.response.400.error`; object, required) — The request does not match the published schema.
  - `code` (`gmedic.patients.create.response.400.error.code`; string, required) — The failure code, stable across releases.
    - one of `"INVALID_INPUT"`
  - `message` (`gmedic.patients.create.response.400.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.400.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.patients.create.response.400.error.data`; object, required)
    - `issues` (`gmedic.patients.create.response.400.error.data.issues`; array<object>, optional)
      - `path` (`gmedic.patients.create.response.400.error.data.issues.path`; string, required) — RFC 6901 JSON Pointer to the refused field; empty for the whole input.
        - maxLength 256
      - `message` (`gmedic.patients.create.response.400.error.data.issues.message`; string, required)
        - maxLength 256
- `metadata` (`gmedic.patients.create.response.400.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.400.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 401

`UNAUTHORIZED`: A valid access token is required.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.401.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.401.data`; unknown, required)
- `error` (`gmedic.patients.create.response.401.error`; object, required) — A valid access token is required.
  - `code` (`gmedic.patients.create.response.401.error.code`; string, required) — The failure code, stable across releases.
    - one of `"UNAUTHORIZED"`
  - `message` (`gmedic.patients.create.response.401.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.401.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.patients.create.response.401.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.401.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.401.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 403

`FORBIDDEN`: The token does not authorize this operation.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "FORBIDDEN",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.403.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.403.data`; unknown, required)
- `error` (`gmedic.patients.create.response.403.error`; object, required) — The token does not authorize this operation.
  - `code` (`gmedic.patients.create.response.403.error.code`; string, required) — The failure code, stable across releases.
    - one of `"FORBIDDEN"`
  - `message` (`gmedic.patients.create.response.403.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.403.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.patients.create.response.403.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.403.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.403.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 404

- `CONNECTION_NOT_FOUND`: This organization has no gMedic connection with this id.
- `RECORD_NOT_FOUND`: gMedic has no record with one of the ids sent.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "CONNECTION_NOT_FOUND",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.404.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.404.data`; unknown, required)
- `error` (`gmedic.patients.create.response.404.error`; one of, required)
  - one of: `GmedicConnectionNotFoundFailure`, `GmedicRecordNotFoundFailure`
  - discriminator: `code`
- `metadata` (`gmedic.patients.create.response.404.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.404.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 409

`NOT_CONFIGURED`: This organization has no verified gMedic connection.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "NOT_CONFIGURED",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.409.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.409.data`; unknown, required)
- `error` (`gmedic.patients.create.response.409.error`; object, required) — This organization has no verified gMedic connection.
  - `code` (`gmedic.patients.create.response.409.error.code`; string, required) — The failure code, stable across releases.
    - one of `"NOT_CONFIGURED"`
  - `message` (`gmedic.patients.create.response.409.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.409.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.patients.create.response.409.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.409.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.409.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 413

`REQUEST_TOO_LARGE`: The request exceeds the allowed size.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "REQUEST_TOO_LARGE",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.413.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.413.data`; unknown, required)
- `error` (`gmedic.patients.create.response.413.error`; object, required) — The request exceeds the allowed size.
  - `code` (`gmedic.patients.create.response.413.error.code`; string, required) — The failure code, stable across releases.
    - one of `"REQUEST_TOO_LARGE"`
  - `message` (`gmedic.patients.create.response.413.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.413.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.patients.create.response.413.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.413.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.413.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 415

`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "UNSUPPORTED_MEDIA_TYPE",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.415.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.415.data`; unknown, required)
- `error` (`gmedic.patients.create.response.415.error`; object, required) — The request content type is not supported.
  - `code` (`gmedic.patients.create.response.415.error.code`; string, required) — The failure code, stable across releases.
    - one of `"UNSUPPORTED_MEDIA_TYPE"`
  - `message` (`gmedic.patients.create.response.415.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.415.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.patients.create.response.415.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.415.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.415.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 422

`PROVIDER_INPUT_REJECTED`: gMedic rejected the supplied fields.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "PROVIDER_INPUT_REJECTED",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.422.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.422.data`; unknown, required)
- `error` (`gmedic.patients.create.response.422.error`; object, required) — gMedic rejected the supplied fields.
  - `code` (`gmedic.patients.create.response.422.error.code`; string, required) — The failure code, stable across releases.
    - one of `"PROVIDER_INPUT_REJECTED"`
  - `message` (`gmedic.patients.create.response.422.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.422.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.patients.create.response.422.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.422.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.422.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 429

`RATE_LIMITED`: The request rate limit was exceeded. Try again later.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "RATE_LIMITED",
    "message": "string",
    "retryable": true,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.429.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.429.data`; unknown, required)
- `error` (`gmedic.patients.create.response.429.error`; object, required) — The request rate limit was exceeded. Try again later.
  - `code` (`gmedic.patients.create.response.429.error.code`; string, required) — The failure code, stable across releases.
    - one of `"RATE_LIMITED"`
  - `message` (`gmedic.patients.create.response.429.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.429.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `true`
  - `data` (`gmedic.patients.create.response.429.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.429.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.429.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 500

`INTERNAL_ERROR`: The service could not complete the operation.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.500.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.500.data`; unknown, required)
- `error` (`gmedic.patients.create.response.500.error`; object, required) — The service could not complete the operation.
  - `code` (`gmedic.patients.create.response.500.error.code`; string, required) — The failure code, stable across releases.
    - one of `"INTERNAL_ERROR"`
  - `message` (`gmedic.patients.create.response.500.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.500.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.patients.create.response.500.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.500.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.500.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 502

- `OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.
- `PROVIDER_ACCESS_REJECTED`: The configured gMedic account did not authorize this operation.
- `PROVIDER_RESPONSE_INVALID`: gMedic returned an unexpected response.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "OUTCOME_UNKNOWN",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.502.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.502.data`; unknown, required)
- `error` (`gmedic.patients.create.response.502.error`; one of, required)
  - one of: `OutcomeUnknownFailure`, `GmedicProviderAccessRejectedFailure`, `GmedicProviderResponseInvalidFailure`
  - discriminator: `code`
- `metadata` (`gmedic.patients.create.response.502.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.502.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 503

- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.
- `CATALOG_SEARCH_INCOMPLETE`: The service catalog search could not be completed within its limits. Service absence cannot be concluded.
- `PROVIDER_UNAVAILABLE`: gMedic is temporarily unavailable.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "UPSTREAM_UNAVAILABLE",
    "message": "string",
    "retryable": true,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.503.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.503.data`; unknown, required)
- `error` (`gmedic.patients.create.response.503.error`; one of, required)
  - one of: `UpstreamUnavailableFailure`, `GmedicCatalogSearchIncompleteFailure`, `GmedicProviderUnavailableFailure`
  - discriminator: `code`
- `metadata` (`gmedic.patients.create.response.503.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.503.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 504

`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "UPSTREAM_TIMEOUT",
    "message": "string",
    "retryable": true,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.patients.create.response.504.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.patients.create.response.504.data`; unknown, required)
- `error` (`gmedic.patients.create.response.504.error`; object, required) — The upstream service did not respond before its deadline.
  - `code` (`gmedic.patients.create.response.504.error.code`; string, required) — The failure code, stable across releases.
    - one of `"UPSTREAM_TIMEOUT"`
  - `message` (`gmedic.patients.create.response.504.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.patients.create.response.504.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `true`
  - `data` (`gmedic.patients.create.response.504.error.data`; object, required) — No fields.
- `metadata` (`gmedic.patients.create.response.504.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.patients.create.response.504.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.


Source: https://docs.getarbol.com/api/gmedic/patients/create/index.md
