---
title: "Register a patient"
description: "Register a patient in the clinic's SIIPS at one of its cost centres, then read the record back to prove it saved. A patient SIIPS already has is answered with alreadyExisted:true and nothing written. PATIENT_NOT_SAVED: SIIPS answered but a fresh read did not show the record; read before trying again. A registration whose outcome is unknown answers OUTCOME_UNKNOWN and is never repeated automatically.\n\n- **Scope:** `visoft: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 64 KB, response up to 1 MB\n- **CLI:** `arbol visoft patients create` · **MCP tool:** `visoft_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: Visoft API › Patients

`POST /v1/visoft/patients`

Register a patient in the clinic's SIIPS at one of its cost centres, then read the record back to prove it saved. A patient SIIPS already has is answered with alreadyExisted:true and nothing written. PATIENT_NOT_SAVED: SIIPS answered but a fresh read did not show the record; read before trying again. A registration whose outcome is unknown answers OUTCOME_UNKNOWN and is never repeated automatically.

- **Scope:** `visoft: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 64 KB, response up to 1 MB
- **CLI:** `arbol visoft patients create` · **MCP tool:** `visoft_patients_create`

## Authentication

Requires one of the following:

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

## Request body

_Required._

- `documentType` (`visoft.patients.create.documentType`; string, required) — The document's type, as SIIPS codes it: CC (Cédula de Ciudadanía), TI (Tarjeta de Identidad), RC (Registro Civil), AS (Adulto sin Identificación), CD (Carné Diplomático), CE (Cédula de Extranjería), DE (Documento de Extranjero), CN (Certificado de Nacido Vivo), MS (Menor sin Identificación), SC (Salvoconducto), PE (Permiso Especial de Permanencia), PT (Permiso de Protección Temporal), SI (Sin Identificación), PA (Pasaporte).
  - one of `"CC"`, `"TI"`, `"RC"`, `"AS"`, `"CD"`, `"CE"`, `"DE"`, `"CN"`, `"MS"`, `"SC"`, `"PE"`, `"PT"`, `"SI"`, `"PA"`
- `documentNumber` (`visoft.patients.create.documentNumber`; string, required) — The patient's document number: letters and digits only, without dots, spaces or hyphens.
  - pattern `^[A-Za-z0-9]{1,20}$`
- `firstName1` (`visoft.patients.create.firstName1`; string, required) — First given name.
  - minLength 1; maxLength 60
- `lastName1` (`visoft.patients.create.lastName1`; string, required) — First surname.
  - minLength 1; maxLength 60
- `birthDate` (`visoft.patients.create.birthDate`; string, required) — Birth date, YYYY-MM-DD.
  - pattern `^\d{4}-\d{2}-\d{2}$`
- `sex` (`visoft.patients.create.sex`; string, required) — Sex at birth: M or F.
  - one of `"M"`, `"F"`
- `address` (`visoft.patients.create.address`; string, required) — Home address.
  - minLength 1; maxLength 200; pattern `\S`
- `country` (`visoft.patients.create.country`; string, required) — Country of residence, ISO 3166 alpha-3 (COL).
  - pattern `^[A-Z]{3}$`
- `departmentCode` (`visoft.patients.create.departmentCode`; string, required) — DANE department code of residence.
  - pattern `^\d{1,2}$`
- `municipalityCode` (`visoft.patients.create.municipalityCode`; string, required) — DANE municipality code of residence.
  - pattern `^\d{3,5}$`
- `connectionId` (`visoft.patients.create.connectionId`; string, optional) — The connection to run on. Optional when the organization has one Visoft connection; required when it has several. Another organization's connection is CONNECTION_NOT_FOUND.
  - minLength 5; maxLength 68; pattern `^con_[0-9A-Za-z]+$`
- `agencyCode` (`visoft.patients.create.agencyCode`; string, optional) — One of the clinic's cost centres, as visoft.clinic.get lists them. Optional when the clinic has a default one.
  - pattern `^\d{3}$`
- `firstName2` (`visoft.patients.create.firstName2`; string, optional) — Second given name.
  - maxLength 60
- `lastName2` (`visoft.patients.create.lastName2`; string, optional) — Second surname.
  - maxLength 60
- `phoneMobile` (`visoft.patients.create.phoneMobile`; string, optional) — Mobile phone.
  - maxLength 30
- `phoneOffice` (`visoft.patients.create.phoneOffice`; string, optional) — Office phone.
  - maxLength 30
- `email` (`visoft.patients.create.email`; string, optional) — Email address.
  - maxLength 120
- `affiliateType` (`visoft.patients.create.affiliateType`; string, optional) — Affiliation type; C (cotizante) by default.
  - maxLength 2
- `maritalStatus` (`visoft.patients.create.maritalStatus`; string, optional) — Marital status; Soltero by default.
  - maxLength 30
- `zone` (`visoft.patients.create.zone`; string, optional) — U (urban, the default) or R.
  - one of `"U"`, `"R"`
- `stratum` (`visoft.patients.create.stratum`; string, optional) — Socioeconomic stratum; 1 by default.
  - maxLength 2
- `status` (`visoft.patients.create.status`; string, optional) — Vital status; Vivo by default.
  - maxLength 20
- `educationCode` (`visoft.patients.create.educationCode`; string, optional) — Education code; 01 by default.
  - maxLength 4
- `populationCode` (`visoft.patients.create.populationCode`; string, optional) — Population code; 06 by default.
  - maxLength 4
- `populationGroupCode` (`visoft.patients.create.populationGroupCode`; string, optional) — Population group code; 99 by default.
  - maxLength 4
- `professionCode` (`visoft.patients.create.professionCode`; string, optional) — Profession code.
  - maxLength 10
- `occupation` (`visoft.patients.create.occupation`; string, optional) — Occupation.
  - maxLength 100
- `neighborhoodCode` (`visoft.patients.create.neighborhoodCode`; string, optional) — Neighborhood code; 0 by default.
  - maxLength 10
- `genderIdentity` (`visoft.patients.create.genderIdentity`; string, optional) — Gender identity; SinDatos by default.
  - maxLength 30
- `sexualOrientation` (`visoft.patients.create.sexualOrientation`; string, optional) — Sexual orientation; SinDatos by default.
  - maxLength 30
- `chronicDiabetes` (`visoft.patients.create.chronicDiabetes`; boolean, optional) — Whether the patient has diabetes.
- `chronicHypertension` (`visoft.patients.create.chronicHypertension`; boolean, optional) — Whether the patient has hypertension.
- `chronicRenal` (`visoft.patients.create.chronicRenal`; boolean, optional) — Whether the patient has chronic kidney disease.
- `disabilityMental` (`visoft.patients.create.disabilityMental`; boolean, optional) — Whether the patient has a mental disability.
- `disabilityPhysical` (`visoft.patients.create.disabilityPhysical`; boolean, optional) — Whether the patient has a physical disability.
- `disabilityPsychiatric` (`visoft.patients.create.disabilityPsychiatric`; boolean, optional) — Whether the patient has a psychiatric disability.

## Example request

```json
{
  "connectionId": "string",
  "agencyCode": "string",
  "documentType": "CC",
  "documentNumber": "string",
  "firstName1": "string",
  "firstName2": "string",
  "lastName1": "string",
  "lastName2": "string",
  "birthDate": "string",
  "sex": "M",
  "address": "string",
  "country": "string",
  "departmentCode": "string",
  "municipalityCode": "string",
  "phoneMobile": "string",
  "phoneOffice": "string",
  "email": "string",
  "affiliateType": "st",
  "maritalStatus": "string",
  "zone": "U",
  "stratum": "st",
  "status": "string",
  "educationCode": "stri",
  "populationCode": "stri",
  "populationGroupCode": "stri",
  "professionCode": "string",
  "occupation": "string",
  "neighborhoodCode": "string",
  "genderIdentity": "string",
  "sexualOrientation": "string",
  "chronicDiabetes": true,
  "chronicHypertension": true,
  "chronicRenal": true,
  "disabilityMental": true,
  "disabilityPhysical": true,
  "disabilityPsychiatric": true
}
```

## Code samples

### cURL

```bash
curl https://api.getarbol.com/v1/visoft/patients \
  --request POST \
  --header "Authorization: Bearer $ARBOL_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "documentType": "CC",
  "documentNumber": "<documentNumber>",
  "firstName1": "<firstName1>",
  "lastName1": "<lastName1>",
  "birthDate": "<birthDate>",
  "sex": "M",
  "address": "<address>",
  "country": "<country>",
  "departmentCode": "<departmentCode>",
  "municipalityCode": "<municipalityCode>"
}'
```

### 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.visoft.patients.create({
  documentType: "CC",
  documentNumber: "<documentNumber>",
  firstName1: "<firstName1>",
  lastName1: "<lastName1>",
  birthDate: "<birthDate>",
  sex: "M",
  address: "<address>",
  country: "<country>",
  departmentCode: "<departmentCode>",
  municipalityCode: "<municipalityCode>",
});
```

### Rust

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

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

let data = arbol
    .visoft()
    .patients()
    .create(&types::VisoftPatientsCreateInput {
        document_type: types::VisoftPatientsCreateInputDocumentType::CC,
        document_number: "<documentNumber>".into(),
        first_name1: "<firstName1>".into(),
        last_name1: "<lastName1>".into(),
        birth_date: "<birthDate>".into(),
        sex: types::VisoftPatientsCreateInputSex::M,
        address: "<address>".into(),
        country: "<country>".into(),
        department_code: "<departmentCode>".into(),
        municipality_code: "<municipalityCode>".into(),
        connection_id: None,
        agency_code: None,
        first_name2: None,
        last_name2: None,
        phone_mobile: None,
        phone_office: None,
        email: None,
        affiliate_type: None,
        marital_status: None,
        zone: None,
        stratum: None,
        status: None,
        education_code: None,
        population_code: None,
        population_group_code: None,
        profession_code: None,
        occupation: None,
        neighborhood_code: None,
        gender_identity: None,
        sexual_orientation: None,
        chronic_diabetes: None,
        chronic_hypertension: None,
        chronic_renal: None,
        disability_mental: None,
        disability_physical: None,
        disability_psychiatric: None,
    })
    .await?;
```

### CLI

```bash
arbol visoft patients create --document-type CC --document-number '<documentNumber>' --first-name1 '<firstName1>' --last-name1 '<lastName1>' --birth-date '<birthDate>' --sex M --address '<address>' --country '<country>' --department-code '<departmentCode>' --municipality-code '<municipalityCode>'
```

### MCP

```json
{
  "name": "visoft_patients_create",
  "arguments": {
    "documentType": "CC",
    "documentNumber": "<documentNumber>",
    "firstName1": "<firstName1>",
    "lastName1": "<lastName1>",
    "birthDate": "<birthDate>",
    "sex": "M",
    "address": "<address>",
    "country": "<country>",
    "departmentCode": "<departmentCode>",
    "municipalityCode": "<municipalityCode>"
  }
}
```

## Responses

### 201

Successful operation.

#### Example

```json
{
  "success": true,
  "data": {
    "created": true,
    "alreadyExisted": true,
    "patient": {
      "documentType": "string",
      "documentNumber": "string",
      "firstName1": "string",
      "firstName2": "string",
      "lastName1": "string",
      "lastName2": "string",
      "fullName": "string",
      "birthDate": "string",
      "sex": "string",
      "genderIdentity": "string",
      "sexualOrientation": "string",
      "maritalStatus": "string",
      "phoneMobile": "string",
      "phoneOffice": "string",
      "email": "string",
      "address": "string",
      "zone": "string",
      "country": "string",
      "departmentCode": "string",
      "departmentName": "string",
      "municipalityCode": "string",
      "cityName": "string",
      "neighborhoodCode": "string",
      "affiliateType": "string",
      "stratum": "string",
      "status": "string",
      "populationCode": "string",
      "populationGroupCode": "string",
      "professionCode": "string",
      "educationCode": "string",
      "occupation": "string",
      "ethnicity": "string",
      "disabilityPhysical": "string",
      "disabilityMental": "string",
      "disabilityPsychiatric": "string",
      "chronicHypertension": "string",
      "chronicHypertensionSince": "string",
      "chronicDiabetes": "string",
      "chronicDiabetesSince": "string",
      "chronicRenal": "string",
      "chronicRenalSince": "string",
      "latitude": "string",
      "longitude": "string",
      "providerMessage": "string"
    }
  },
  "error": null,
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`visoft.patients.create.response.201.success`; boolean, required)
  - one of `true`
- `data` (`visoft.patients.create.response.201.data`; object, required)
  - `created` (`visoft.patients.create.response.201.data.created`; boolean, required) — Whether this call registered the patient.
  - `alreadyExisted` (`visoft.patients.create.response.201.data.alreadyExisted`; boolean, required) — Whether SIIPS already had the patient: nothing was written, and the stored record answers.
  - `patient` (`visoft.patients.create.response.201.data.patient`; object, required)
    - `documentType` (`visoft.patients.create.response.201.data.patient.documentType`; string, required) — The document's type, as SIIPS codes it (CC, TI, RC…). Empty when SIIPS holds none.
    - `documentNumber` (`visoft.patients.create.response.201.data.patient.documentNumber`; string, required) — The patient's document number.
    - `firstName1` (`visoft.patients.create.response.201.data.patient.firstName1`; string, required) — First given name. Empty when SIIPS holds none.
    - `firstName2` (`visoft.patients.create.response.201.data.patient.firstName2`; string, required) — Second given name. Empty when SIIPS holds none.
    - `lastName1` (`visoft.patients.create.response.201.data.patient.lastName1`; string, required) — First surname. Empty when SIIPS holds none.
    - `lastName2` (`visoft.patients.create.response.201.data.patient.lastName2`; string, required) — Second surname. Empty when SIIPS holds none.
    - `fullName` (`visoft.patients.create.response.201.data.patient.fullName`; string, required) — Given names and surnames, in that order, as SIIPS spells them.
    - `birthDate` (`visoft.patients.create.response.201.data.patient.birthDate`; string, required) — Birth date. YYYY-MM-DD, or empty.
      - pattern `^(\d{4}-\d{2}-\d{2})?$`
    - `sex` (`visoft.patients.create.response.201.data.patient.sex`; string, required) — Sex at birth: M or F. Empty when SIIPS holds none.
    - `genderIdentity` (`visoft.patients.create.response.201.data.patient.genderIdentity`; string, required) — Gender identity. Empty when SIIPS holds none.
    - `sexualOrientation` (`visoft.patients.create.response.201.data.patient.sexualOrientation`; string, required) — Sexual orientation. Empty when SIIPS holds none.
    - `maritalStatus` (`visoft.patients.create.response.201.data.patient.maritalStatus`; string, required) — Marital status. Empty when SIIPS holds none.
    - `phoneMobile` (`visoft.patients.create.response.201.data.patient.phoneMobile`; string, required) — Mobile phone. Empty when SIIPS holds none.
    - `phoneOffice` (`visoft.patients.create.response.201.data.patient.phoneOffice`; string, required) — Office phone. Empty when SIIPS holds none.
    - `email` (`visoft.patients.create.response.201.data.patient.email`; string, required) — Email address. Empty when SIIPS holds none.
    - `address` (`visoft.patients.create.response.201.data.patient.address`; string, required) — Home address. Empty when SIIPS holds none.
    - `zone` (`visoft.patients.create.response.201.data.patient.zone`; string, required) — U (urban) or R (rural). Empty when SIIPS holds none.
    - `country` (`visoft.patients.create.response.201.data.patient.country`; string, required) — Country of residence (COL…). Empty when SIIPS holds none.
    - `departmentCode` (`visoft.patients.create.response.201.data.patient.departmentCode`; string, required) — DANE department code of residence. Empty when SIIPS holds none.
    - `departmentName` (`visoft.patients.create.response.201.data.patient.departmentName`; string, required) — Department of residence. Empty when SIIPS holds none.
    - `municipalityCode` (`visoft.patients.create.response.201.data.patient.municipalityCode`; string, required) — DANE municipality code of residence. Empty when SIIPS holds none.
    - `cityName` (`visoft.patients.create.response.201.data.patient.cityName`; string, required) — City of residence. Empty when SIIPS holds none.
    - `neighborhoodCode` (`visoft.patients.create.response.201.data.patient.neighborhoodCode`; string, required) — Neighborhood code. Empty when SIIPS holds none.
    - `affiliateType` (`visoft.patients.create.response.201.data.patient.affiliateType`; string, required) — Affiliation type (C: cotizante…). Empty when SIIPS holds none.
    - `stratum` (`visoft.patients.create.response.201.data.patient.stratum`; string, required) — Socioeconomic stratum, 1 to 6. Empty when SIIPS holds none.
    - `status` (`visoft.patients.create.response.201.data.patient.status`; string, required) — Vital status (Vivo…). Empty when SIIPS holds none.
    - `populationCode` (`visoft.patients.create.response.201.data.patient.populationCode`; string, required) — Population code. Empty when SIIPS holds none.
    - `populationGroupCode` (`visoft.patients.create.response.201.data.patient.populationGroupCode`; string, required) — Population group code. Empty when SIIPS holds none.
    - `professionCode` (`visoft.patients.create.response.201.data.patient.professionCode`; string, required) — Profession code. Empty when SIIPS holds none.
    - `educationCode` (`visoft.patients.create.response.201.data.patient.educationCode`; string, required) — Education code. Empty when SIIPS holds none.
    - `occupation` (`visoft.patients.create.response.201.data.patient.occupation`; string, required) — Occupation. Empty when SIIPS holds none.
    - `ethnicity` (`visoft.patients.create.response.201.data.patient.ethnicity`; string, required) — Ethnicity. Empty when SIIPS holds none.
    - `disabilityPhysical` (`visoft.patients.create.response.201.data.patient.disabilityPhysical`; string, required) — S when SIIPS records a physical disability. Empty when SIIPS holds none.
    - `disabilityMental` (`visoft.patients.create.response.201.data.patient.disabilityMental`; string, required) — S when SIIPS records a mental disability. Empty when SIIPS holds none.
    - `disabilityPsychiatric` (`visoft.patients.create.response.201.data.patient.disabilityPsychiatric`; string, required) — S when SIIPS records a psychiatric disability. Empty when SIIPS holds none.
    - `chronicHypertension` (`visoft.patients.create.response.201.data.patient.chronicHypertension`; string, required) — S when SIIPS records hypertension. Empty when SIIPS holds none.
    - `chronicHypertensionSince` (`visoft.patients.create.response.201.data.patient.chronicHypertensionSince`; string, required) — Since when. Empty when SIIPS holds none.
    - `chronicDiabetes` (`visoft.patients.create.response.201.data.patient.chronicDiabetes`; string, required) — S when SIIPS records diabetes. Empty when SIIPS holds none.
    - `chronicDiabetesSince` (`visoft.patients.create.response.201.data.patient.chronicDiabetesSince`; string, required) — Since when. Empty when SIIPS holds none.
    - `chronicRenal` (`visoft.patients.create.response.201.data.patient.chronicRenal`; string, required) — S when SIIPS records chronic kidney disease. Empty when SIIPS holds none.
    - `chronicRenalSince` (`visoft.patients.create.response.201.data.patient.chronicRenalSince`; string, required) — Since when. Empty when SIIPS holds none.
    - `latitude` (`visoft.patients.create.response.201.data.patient.latitude`; string, required) — Latitude of the address. Empty when SIIPS holds none.
    - `longitude` (`visoft.patients.create.response.201.data.patient.longitude`; string, required) — Longitude of the address. Empty when SIIPS holds none.
    - `providerMessage` (`visoft.patients.create.response.201.data.patient.providerMessage`; string, required) — SIIPS's own note on the record. Empty when SIIPS holds none.
- `error` (`visoft.patients.create.response.201.error`; unknown, required)
- `metadata` (`visoft.patients.create.response.201.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.patients.create.response.201.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` (`visoft.patients.create.response.400.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.400.data`; unknown, required)
- `error` (`visoft.patients.create.response.400.error`; object, required) — The request does not match the published schema.
  - `code` (`visoft.patients.create.response.400.error.code`; string, required) — The failure code, stable across releases.
    - one of `"INVALID_INPUT"`
  - `message` (`visoft.patients.create.response.400.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`visoft.patients.create.response.400.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`visoft.patients.create.response.400.error.data`; object, required)
    - `issues` (`visoft.patients.create.response.400.error.data.issues`; array<object>, optional)
      - `path` (`visoft.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` (`visoft.patients.create.response.400.error.data.issues.message`; string, required)
        - maxLength 256
- `metadata` (`visoft.patients.create.response.400.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.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` (`visoft.patients.create.response.401.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.401.data`; unknown, required)
- `error` (`visoft.patients.create.response.401.error`; object, required) — A valid access token is required.
  - `code` (`visoft.patients.create.response.401.error.code`; string, required) — The failure code, stable across releases.
    - one of `"UNAUTHORIZED"`
  - `message` (`visoft.patients.create.response.401.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`visoft.patients.create.response.401.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`visoft.patients.create.response.401.error.data`; object, required) — No fields.
- `metadata` (`visoft.patients.create.response.401.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.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` (`visoft.patients.create.response.403.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.403.data`; unknown, required)
- `error` (`visoft.patients.create.response.403.error`; object, required) — The token does not authorize this operation.
  - `code` (`visoft.patients.create.response.403.error.code`; string, required) — The failure code, stable across releases.
    - one of `"FORBIDDEN"`
  - `message` (`visoft.patients.create.response.403.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`visoft.patients.create.response.403.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`visoft.patients.create.response.403.error.data`; object, required) — No fields.
- `metadata` (`visoft.patients.create.response.403.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.patients.create.response.403.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 404

`CONNECTION_NOT_FOUND`: The organization has no such connection.

#### Example

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

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

### 409

`CONNECTION_NOT_CONFIGURED`: The organization has no active Visoft connection for this call; an administrator connects Visoft in Account.

#### Example

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

- `success` (`visoft.patients.create.response.409.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.409.data`; unknown, required)
- `error` (`visoft.patients.create.response.409.error`; object, required) — The organization has no active Visoft connection for this call; an administrator connects Visoft in Account.
  - `code` (`visoft.patients.create.response.409.error.code`; string, required) — The failure code, stable across releases.
    - one of `"CONNECTION_NOT_CONFIGURED"`
  - `message` (`visoft.patients.create.response.409.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`visoft.patients.create.response.409.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`visoft.patients.create.response.409.error.data`; object, required) — No fields.
- `metadata` (`visoft.patients.create.response.409.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.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` (`visoft.patients.create.response.413.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.413.data`; unknown, required)
- `error` (`visoft.patients.create.response.413.error`; object, required) — The request exceeds the allowed size.
  - `code` (`visoft.patients.create.response.413.error.code`; string, required) — The failure code, stable across releases.
    - one of `"REQUEST_TOO_LARGE"`
  - `message` (`visoft.patients.create.response.413.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`visoft.patients.create.response.413.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`visoft.patients.create.response.413.error.data`; object, required) — No fields.
- `metadata` (`visoft.patients.create.response.413.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.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` (`visoft.patients.create.response.415.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.415.data`; unknown, required)
- `error` (`visoft.patients.create.response.415.error`; object, required) — The request content type is not supported.
  - `code` (`visoft.patients.create.response.415.error.code`; string, required) — The failure code, stable across releases.
    - one of `"UNSUPPORTED_MEDIA_TYPE"`
  - `message` (`visoft.patients.create.response.415.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`visoft.patients.create.response.415.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`visoft.patients.create.response.415.error.data`; object, required) — No fields.
- `metadata` (`visoft.patients.create.response.415.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.patients.create.response.415.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 422

- `CREDENTIALS_REJECTED`: The organization's connection to this integration couldn't complete the request. Don't retry it automatically; if it keeps happening, contact your Arbol team.
- `AGENCY_NOT_SERVED`: The cost centre is not one of the connection's clinic: use one visoft.clinic.get lists.

#### Example

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

- `success` (`visoft.patients.create.response.422.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.422.data`; unknown, required)
- `error` (`visoft.patients.create.response.422.error`; one of, required)
  - one of: `VisoftCredentialsRejectedFailure`, `VisoftAgencyNotServedFailure`
  - discriminator: `code`
- `metadata` (`visoft.patients.create.response.422.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.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` (`visoft.patients.create.response.429.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.429.data`; unknown, required)
- `error` (`visoft.patients.create.response.429.error`; object, required) — The request rate limit was exceeded. Try again later.
  - `code` (`visoft.patients.create.response.429.error.code`; string, required) — The failure code, stable across releases.
    - one of `"RATE_LIMITED"`
  - `message` (`visoft.patients.create.response.429.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`visoft.patients.create.response.429.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `true`
  - `data` (`visoft.patients.create.response.429.error.data`; object, required) — No fields.
- `metadata` (`visoft.patients.create.response.429.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.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` (`visoft.patients.create.response.500.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.500.data`; unknown, required)
- `error` (`visoft.patients.create.response.500.error`; object, required) — The service could not complete the operation.
  - `code` (`visoft.patients.create.response.500.error.code`; string, required) — The failure code, stable across releases.
    - one of `"INTERNAL_ERROR"`
  - `message` (`visoft.patients.create.response.500.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`visoft.patients.create.response.500.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`visoft.patients.create.response.500.error.data`; object, required) — No fields.
- `metadata` (`visoft.patients.create.response.500.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.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_UNAVAILABLE`: The clinical system did not answer or could not complete the request.
- `PATIENT_NOT_SAVED`: SIIPS answered the registration or correction, but a fresh read did not show it saved. Nothing is retried; read the patient before trying again.

#### Example

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

- `success` (`visoft.patients.create.response.502.success`; boolean, required)
  - one of `false`
- `data` (`visoft.patients.create.response.502.data`; unknown, required)
- `error` (`visoft.patients.create.response.502.error`; one of, required)
  - one of: `OutcomeUnknownFailure`, `VisoftProviderUnavailableFailure`, `VisoftPatientNotSavedFailure`
  - discriminator: `code`
- `metadata` (`visoft.patients.create.response.502.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`visoft.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.

#### Example

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

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


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