> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.joincandidhealth.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.joincandidhealth.com/_mcp/server.

# Create With Mrn

POST https://pre-api.joincandidhealth.com/patients/v1/with_mrn
Content-Type: application/json

Adds a patient and hydrates their MRN with a pre-existing MRN.  Once this patient is created their MRN will not be editable. BadRequestError is returned when the MRN is greater than 20 characters. VersionConflictError is returned when the patient's external ID is already in use.

Reference: https://docs.joincandidhealth.com/api-reference/pre-encounter/patients/v-1/create-with-mrn

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://pre-api.joincandidhealth.com` (Production, default)
- `https://pre-api-staging.joincandidhealth.com` (Staging)
- `https://sandbox-pre-api.joincandidhealth.com` (CandidSandbox)
- `https://staging-pre-api.joincandidhealth.com` (CandidStaging)
- `http://localhost:4000` (Local)

## Request

### Query parameters

- `skip_duplicate_check` (boolean, optional)

### Body (application/json)

This endpoint expects a MutablePatientWithMrn.

- `biological_sex` (enum, required) — The biological sex of the patient. This corresponds to the HL7 AdministrativeGender https://www.hl7.org/fhir/valueset-administrative-gender.html
  - Allowed values: `FEMALE`, `MALE`, `UNKNOWN`, `REFUSED`
- `birth_date` (date, required)
- `contacts` (list of Contact, required) — Contacts for the patient.
- `filing_order` (FilingOrder, required) — The patient's active coverages, in order of primary, secondary, etc.
- `general_practitioners` (list of ExternalProvider, required)
- `mrn` (string, required) — The medical record number for the patient.
- `name` (HumanName, required)
- `other_addresses` (list of Address, required) — Other addresses for the patient.
- `other_names` (list of HumanName, required) — Other names for the patient.
- `other_telecoms` (list of ContactPoint, required) — Other phone numbers for the patient.
- `primary_address` (Address, required) — The primary address for the patient.
- `advanced_directives` (list of enum, optional)
  - Allowed values: `NONE`, `DURABLE_POWER_OF_ATTORNEY`, `LIVING_WILL`, `DO_NOT_RESUSCITATE`, `STANDARD_PRECAUTIONS`, `FALL_RISK`
- `authorizations` (list of Authorization, optional)
- `coverages_for_related_causes` (CoveragesForRelatedCauses, optional) — Additional coverages for the patient applicable to related causes such as Auto or Workers Comp
- `custom_metadata` (list of CustomMetadataEntry, optional) — Custom key/value metadata attached to this patient, grouped by the MetadataSchema that defines the keys' types. Configure schemas via the metadata-schemas API. Values are validated against the referenced schema on write.
- `deceased` (datetime, optional) — Time of death for the patient. Leave unset if the patient is not deceased.
- `disability_status` (enum, optional)
  - Allowed values: `DISABLED`, `NON_DISABLED`
- `do_not_invoice_reason` (enum, optional) — If this value is defined, the customer will not be invoiced.
  - Allowed values: `BANKRUPTCY`, `DECEASED`, `HARDSHIP`, `OTHER`, `COLLECTIONS`, `BAD_ADDRESS`, `PROFESSIONAL_COURTESY`
- `electronic_communication_consent` (ElectronicCommunicationConsent, optional) — Granular consent for electronic communication channels.
- `email` (string, optional)
- `ethnicity` (enum, optional)
  - Allowed values: `HISPANIC_OR_LATINO`, `NOT_HISPANIC_OR_LATINO`, `UNKNOWN`, `REFUSED`
- `external_provenance` (ExternalProvenance, optional) — Information about the upstream system that owns this patient data. Leave unset if Candid owns patient data.
- `gender` (enum, optional)
  - Allowed values: `MAN`, `WOMAN`, `NON_BINARY`, `TWO_SPIRIT`, `FEMALE_TO_MALE`, `MALE_TO_FEMALE`, `OTHER`, `UNKNOWN`, `REFUSED`
- `guarantor` (Guarantor, optional)
- `hipaa_code` (string, optional)
- `inferred_patient_metadata` (InferredPatientMetadata, optional) — Metadata for the patient used for patient inference from encounters.
- `language` (string, optional)
- `marital_status` (enum, optional)
  - Allowed values: `ANNULLED`, `DIVORCED`, `INTERLOCUTORY`, `SEPARATED`, `MARRIED`, `COMMON_LAW`, `POLYGAMOUS`, `DOMESTIC_PARTNER`, `UNMARRIED`, `NEVER_MARRIED`, `WIDOWED`, `UNKNOWN`
- `multiple_birth` (integer, optional) — The number of siblings the patient was born with. Leave unset if the patient was not part of a multiple birth.
- `non_insurance_payer_associations` (list of CanonicalNonInsurancePayerAssociation, optional)
- `note_ids` (list of string, optional)
- `orcon` (boolean, optional) — ORCON (Originator Controlled) - When set to true, the Candid system will hide this patient from downstream integrations. Updates made in the Candid UI will unset this flag. Defaults to false.
- `origination_detail` (OriginationDetail, optional) — Information about the patient source, if applicable.
- `other_identifiers` (list of ExternalIdentifier, optional) — Other identifiers for the patient.
- `photo` (string, optional)
- `primary_service_facility_id` (string, optional)
- `primary_telecom` (ContactPoint, optional) — The primary phone number for the patient.
- `pronouns` (list of string, optional) — The pronouns of the patient.
- `race` (enum, optional)
  - Allowed values: `AMERICAN_INDIAN_OR_ALASKA_NATIVE`, `WHITE`, `BLACK`, `ASIAN`, `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER`, `MIDDLE_EASTERN_OR_NORTH_AFRICAN`, `OTHER`, `UNKNOWN`, `REFUSED`
- `referrals` (list of Referral, optional)
- `self_pay` (boolean, optional)
- `service_facilities` (list of PatientServiceFacility, optional) — Associated service facilities for this patient.
- `sexual_orientation` (enum, optional) — The sexual orientation of the patient.
  - Allowed values: `HETEROSEXUAL`, `HOMOSEXUAL`, `BISEXUAL`, `TWO_SPIRIT`, `OTHER`, `UNKNOWN`, `REFUSED`
- `social_security_number` (string, optional)
- `tag_ids` (list of string, optional)
- `electronic_communication_opt_in` (boolean, optional, deprecated) — Use electronic_communication_consent for granular channel-level consent. This field is kept in sync automatically but should not be used for new integrations.
- `non_insurance_payers` (list of string, optional, deprecated)

## Response

### 200

- `biological_sex` (enum, required) — The biological sex of the patient. This corresponds to the HL7 AdministrativeGender https://www.hl7.org/fhir/valueset-administrative-gender.html
  - Allowed values: `FEMALE`, `MALE`, `UNKNOWN`, `REFUSED`
- `birth_date` (date, required)
- `contacts` (list of Contact, required) — Contacts for the patient.
- `deactivated` (boolean, required) — True if the object is deactivated. Deactivated objects are not returned in search results but are returned in all other endpoints including scan.
- `filing_order` (FilingOrder, required) — The patient's active coverages, in order of primary, secondary, etc.
- `general_practitioners` (list of ExternalProvider, required)
- `id` (string, required) — The unique UUID identifier for a Patient. Patient ID is used in machine contexts.
- `mrn` (string, required) — The medical record number for the patient. Human-friendly Candid generated MRNs are of the form "YYMMDDXXXX", where "YYMMDD" is the date of patient creation and "XXXX" is a zero-padded incrementing integer.
- `name` (HumanName, required)
- `organization_id` (string, required) — The organization that owns this object.
- `other_addresses` (list of Address, required) — Other addresses for the patient.
- `other_names` (list of HumanName, required) — Other names for the patient.
- `other_telecoms` (list of ContactPoint, required) — Other phone numbers for the patient.
- `primary_address` (Address, required) — The primary address for the patient.
- `updated_at` (datetime, required)
- `updating_user_id` (string, required) — The user ID of the user who last updated the object.
- `version` (integer, required) — The version of the object. Any update to any property of an object object will create a new version.
- `advanced_directives` (list of enum, optional)
  - Allowed values: `NONE`, `DURABLE_POWER_OF_ATTORNEY`, `LIVING_WILL`, `DO_NOT_RESUSCITATE`, `STANDARD_PRECAUTIONS`, `FALL_RISK`
- `authorizations` (list of Authorization, optional)
- `coverages_for_related_causes` (CoveragesForRelatedCauses, optional) — Additional coverages for the patient applicable to related causes such as Auto or Workers Comp
- `custom_metadata` (list of CustomMetadataEntry, optional) — Custom key/value metadata attached to this patient, grouped by the MetadataSchema that defines the keys' types. Configure schemas via the metadata-schemas API. Values are validated against the referenced schema on write.
- `deceased` (datetime, optional) — Time of death for the patient. Leave unset if the patient is not deceased.
- `disability_status` (enum, optional)
  - Allowed values: `DISABLED`, `NON_DISABLED`
- `do_not_invoice_reason` (enum, optional) — If this value is defined, the customer will not be invoiced.
  - Allowed values: `BANKRUPTCY`, `DECEASED`, `HARDSHIP`, `OTHER`, `COLLECTIONS`, `BAD_ADDRESS`, `PROFESSIONAL_COURTESY`
- `electronic_communication_consent` (ElectronicCommunicationConsent, optional) — Granular consent for electronic communication channels.
- `email` (string, optional)
- `ethnicity` (enum, optional)
  - Allowed values: `HISPANIC_OR_LATINO`, `NOT_HISPANIC_OR_LATINO`, `UNKNOWN`, `REFUSED`
- `external_provenance` (ExternalProvenance, optional) — Information about the upstream system that owns this patient data. Leave unset if Candid owns patient data.
- `gender` (enum, optional)
  - Allowed values: `MAN`, `WOMAN`, `NON_BINARY`, `TWO_SPIRIT`, `FEMALE_TO_MALE`, `MALE_TO_FEMALE`, `OTHER`, `UNKNOWN`, `REFUSED`
- `guarantor` (Guarantor, optional)
- `hipaa_code` (string, optional)
- `inferred_patient_metadata` (InferredPatientMetadata, optional) — Metadata for the patient used for patient inference from encounters.
- `language` (string, optional)
- `marital_status` (enum, optional)
  - Allowed values: `ANNULLED`, `DIVORCED`, `INTERLOCUTORY`, `SEPARATED`, `MARRIED`, `COMMON_LAW`, `POLYGAMOUS`, `DOMESTIC_PARTNER`, `UNMARRIED`, `NEVER_MARRIED`, `WIDOWED`, `UNKNOWN`
- `multiple_birth` (integer, optional) — The number of siblings the patient was born with. Leave unset if the patient was not part of a multiple birth.
- `non_insurance_payer_associations` (list of CanonicalNonInsurancePayerAssociation, optional)
- `note_ids` (list of string, optional)
- `orcon` (boolean, optional) — ORCON (Originator Controlled) - When set to true, the Candid system will hide this patient from downstream integrations. Updates made in the Candid UI will unset this flag. Defaults to false.
- `origination_detail` (OriginationDetail, optional) — Information about the patient source, if applicable.
- `other_identifiers` (list of ExternalIdentifier, optional) — Other identifiers for the patient.
- `photo` (string, optional)
- `primary_service_facility_id` (string, optional)
- `primary_telecom` (ContactPoint, optional) — The primary phone number for the patient.
- `pronouns` (list of string, optional) — The pronouns of the patient.
- `race` (enum, optional)
  - Allowed values: `AMERICAN_INDIAN_OR_ALASKA_NATIVE`, `WHITE`, `BLACK`, `ASIAN`, `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER`, `MIDDLE_EASTERN_OR_NORTH_AFRICAN`, `OTHER`, `UNKNOWN`, `REFUSED`
- `referrals` (list of Referral, optional)
- `self_pay` (boolean, optional)
- `service_facilities` (list of PatientServiceFacility, optional) — Associated service facilities for this patient.
- `sexual_orientation` (enum, optional) — The sexual orientation of the patient.
  - Allowed values: `HETEROSEXUAL`, `HOMOSEXUAL`, `BISEXUAL`, `TWO_SPIRIT`, `OTHER`, `UNKNOWN`, `REFUSED`
- `social_security_number` (string, optional)
- `tag_ids` (list of string, optional)
- `electronic_communication_opt_in` (boolean, optional, deprecated) — Use electronic_communication_consent for granular channel-level consent. This field is kept in sync automatically but should not be used for new integrations.
- `non_insurance_payers` (list of string, optional, deprecated)

## Errors

### 409 Version Conflict Error

- `errorName` ("VersionConflictError", required)
- `content` (VersionConflictErrorBody, required)

### 400 Bad Request Error

- `errorName` ("BadRequestError", required)
- `content` (ErrorBase4xx, required)

## Types

### Contact

- `relationship` (list of enum, required)
  - Allowed values: `SELF`, `SPOUSE`, `CHILD`, `COMMON_LAW_SPOUSE`, `OTHER`
- `name` (HumanName, required)
- `telecoms` (list of ContactPoint, required)
- `addresses` (list of Address, required)
- `period` (Period, optional)
- `hipaa_authorization` (boolean, optional)

### FilingOrder

The patient's active coverages, in order of primary, secondary, etc.

- `coverages` (list of UUID, required)

### ExternalProvider

- `name` (HumanName, required)
- `telecoms` (list of ContactPoint, required)
- `type` (enum, optional) — Defaults to ATTENDING.
  - Allowed values: `PRIMARY`, `REFERRING`, `ATTENDING`
- `npi` (string, optional)
- `addresses` (list of Address, optional)
- `period` (Period, optional)
- `canonical_id` (string, optional) — The unique identifier for a provider configured in the Candid system
- `fax` (string, optional)
- `other_fax_numbers` (list of string, optional)
- `emails` (list of string, optional)
- `service_facilities` (list of PatientServiceFacility, optional) — Associated service facilities for this provider.

### HumanName

- `family` (string, required)
- `given` (list of string, required)
- `use` (enum, required)
  - Allowed values: `USUAL`, `OFFICIAL`, `TEMP`, `NICKNAME`, `ANONYMOUS`, `OLD`, `MAIDEN`
- `period` (Period, optional)
- `suffix` (string, optional)

### Address

- `use` (enum, required)
  - Allowed values: `HOME`, `WORK`, `TEMP`, `OLD`, `BILLING`
- `line` (list of string, required)
- `city` (string, required)
- `state` (string, required)
- `postal_code` (string, required)
- `country` (string, required)
- `administrative_area` (string, optional) — The top-level administrative subdivision of the country for addresses outside the US — for example a Canadian province, a UK county, or a Japanese prefecture. Only permitted on international addresses: `country` must be present and non-US, and `state` must be "FC" (the X12 foreign-country sentinel). For US addresses use `state` instead.
- `county` (string, optional)
- `period` (Period, optional)

### ContactPoint

- `value` (string, required)
- `use` (enum, required)
  - Allowed values: `HOME`, `WORK`, `TEMP`, `OLD`, `MOBILE`
- `period` (Period, optional)

### Authorization

- `payer_id` (string, required) — The unique identifier for a Payer in the database
- `payer_name` (string, required)
- `authorization_number` (string, required)
- `cpt_code` (string, required)
- `units` (enum, required)
  - Allowed values: `VISIT`, `UNIT`
- `additional_payer_information` (AdditionalPayerInformation, optional)
- `apply_for_all_cpt_codes` (boolean, optional) — If true, then the authorization will apply for all claims for the payer that fall in range the `period`.
- `no_prior_authorization_required` (boolean, optional) — If true, indicates that prior authorization is not required and prior authorization number will not be set on the claim for this authorization.
- `quantity` (integer, optional)
- `period` (Period, optional)
- `notes` (string, optional)
- `billing_provider_npi` (string, optional) — The NPI of the billing provider for which this authorization applies.
- `service_facility` (PatientServiceFacility, optional) — When set, specifies the service facility for which this authorization applies.
- `dx_codes` (list of string, optional) — When set, the authorization will only apply when at least one of these diagnosis codes is found on the claim/service lines (in addition to other criteria).

### CoveragesForRelatedCauses

Additional coverages for the patient applicable to related causes such as Auto or Workers Comp

- `coverages` (list of UUID, required)

### CustomMetadataEntry

A set of custom key/value pairs validated against a single MetadataSchema.

- `metadata_schema_id` (UUID, required) — The unique identifier for a custom MetadataSchema.
- `key_value_pairs` (map from string to any, required) — The custom values. Each key must be a field defined on the referenced MetadataSchema and each value must match that field's declared type.

### ElectronicCommunicationConsent

Granular consent for electronic communication channels.

- `text_communication_consent` (boolean, optional) — Consent for text/SMS communication.
- `email_communication_consent` (boolean, optional) — Consent for email communication.

### ExternalProvenance

Information about the upstream system that owns this patient data.

- `external_id` (string, required)
- `system_name` (string, required)

### Guarantor

- `name` (HumanName, required)
- `address` (Address, required)
- `telecom` (ContactPoint, optional)
- `email` (string, optional)
- `birth_date` (date, optional)

### InferredPatientMetadata

- `inferred_encounter_id` (string, required)
- `inferred_encounter_latest_date_of_service` (date, required)

### CanonicalNonInsurancePayerAssociation

- `id` (string, required) — The unique identifier for a non-insurance payer configured in the Candid system
- `member_id` (string, optional)
- `period` (Period, optional)
- `clinical_trial_info` (list of CanonicalClinicalTrialAssociation, optional) — A patient cannot be associated with a given trial more than once

### OriginationDetail

- `referral_source` (enum, required)
  - Allowed values: `HOSPITAL`, `REFERRING_MD`, `SELF`, `OTHER`
- `referring_provider` (ExternalProvider, optional)
- `specialization_categories` (list of enum, optional)
  - Allowed values: `BEHAVIORAL_HEALTH_THERAPY`, `CARDIOLOGY`, `DERMATOLOGY`, `ENDOCRINOLOGY`, `ENT`, `GASTROENTEROLOGY`, `GENERAL_SURGERY`, `GENETICS`, `HEMATOLOGY`, `INFECTIOUS_DISEASE`, `NEUROLOGY`, `NUTRITIONAL_THERAPY`, `OB_GYN`, `ONCOLOGY`, `OPHTHALMOLOGY`, `ORTHOPEDICS`, `PAIN_MANAGEMENT`, `PEDIATRICS`, `PHYSICAL_THERAPY`, `PODIATRY`, `PRIMARY_CARE`, `PSYCHIATRY`, `PULMONOLOGY`, `RADIOLOGY`, `RHEUMATOLOGY`, `SCREENING`, `UROLOGY`, `OTHER`
- `referral_type` (enum, optional)
  - Allowed values: `DIRECTED`, `ROTATION`, `OVERNIGHT`

### ExternalIdentifier

An external identifier for a patient

- `value` (string, required)
- `system` (string, required)
- `period` (Period, optional)

### Referral

- `provider` (ExternalProvider, required)
- `referral_number` (string, required)
- `period` (Period, optional)
- `notes` (string, optional)
- `serviceFacility` (PatientServiceFacility, optional) — Represents a canonical service facility attached to a patient or patient dependent object
- `units` (enum, optional)
  - Allowed values: `VISIT`, `UNIT`
- `quantity` (integer, optional)
- `cptCodes` (list of string, optional)
- `applyForAllCptCodes` (boolean, optional)

### PatientServiceFacility

Represents a canonical service facility attached to a patient or patient dependent object

- `service_facility_id` (string, required) — The unique identifier for a service facility configured in the Candid system

### VersionConflictErrorBody

- `message` (string, required)
- `data` (any, optional)
- `latest_version` (integer, optional)

### ErrorBase4xx

- `message` (string, required)
- `data` (any, optional)

### Period

- `start` (date, optional)
- `end` (date, optional)

### AdditionalPayerInformation

- `availity_eligibility_id` (string, optional)
- `availity_payer_id` (string, optional)
- `availity_payer_name` (string, optional)
- `availity_remittance_payer_id` (string, optional)

### CanonicalClinicalTrialAssociation

- `id` (string, required) — The unique identifier for a clinical trial configured in the Candid system
- `clinical_trial_arm` (string, optional)
- `period` (Period, optional)

## Examples

**Request**

```json
{
  "biological_sex": "FEMALE",
  "birth_date": "2023-01-15",
  "contacts": [
    {
      "relationship": [
        "SELF",
        "SELF"
      ],
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME"
        },
        {
          "value": "value",
          "use": "HOME"
        }
      ],
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        }
      ]
    },
    {
      "relationship": [
        "SELF",
        "SELF"
      ],
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME"
        },
        {
          "value": "value",
          "use": "HOME"
        }
      ],
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        }
      ]
    }
  ],
  "filing_order": {
    "coverages": [
      "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
    ]
  },
  "general_practitioners": [
    {
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME"
        },
        {
          "value": "value",
          "use": "HOME"
        }
      ]
    },
    {
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME"
        },
        {
          "value": "value",
          "use": "HOME"
        }
      ]
    }
  ],
  "mrn": "mrn",
  "name": {
    "family": "family",
    "given": [
      "given",
      "given"
    ],
    "use": "USUAL"
  },
  "other_addresses": [
    {
      "use": "HOME",
      "line": [
        "line",
        "line"
      ],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country"
    },
    {
      "use": "HOME",
      "line": [
        "line",
        "line"
      ],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country"
    }
  ],
  "other_names": [
    {
      "family": "family",
      "given": [
        "given",
        "given"
      ],
      "use": "USUAL"
    },
    {
      "family": "family",
      "given": [
        "given",
        "given"
      ],
      "use": "USUAL"
    }
  ],
  "other_telecoms": [
    {
      "value": "value",
      "use": "HOME"
    },
    {
      "value": "value",
      "use": "HOME"
    }
  ],
  "primary_address": {
    "use": "HOME",
    "line": [
      "line",
      "line"
    ],
    "city": "city",
    "state": "state",
    "postal_code": "postal_code",
    "country": "country"
  }
}
```

**Response**

```json
{
  "biological_sex": "FEMALE",
  "birth_date": "2023-01-15",
  "contacts": [
    {
      "relationship": [
        "SELF",
        "SELF"
      ],
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL",
        "period": {
          "start": "2023-01-15",
          "end": "2023-01-15"
        },
        "suffix": "suffix"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "hipaa_authorization": true
    },
    {
      "relationship": [
        "SELF",
        "SELF"
      ],
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL",
        "period": {
          "start": "2023-01-15",
          "end": "2023-01-15"
        },
        "suffix": "suffix"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "hipaa_authorization": true
    }
  ],
  "deactivated": true,
  "filing_order": {
    "coverages": [
      "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
    ]
  },
  "general_practitioners": [
    {
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL",
        "period": {
          "start": "2023-01-15",
          "end": "2023-01-15"
        },
        "suffix": "suffix"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "type": "PRIMARY",
      "npi": "npi",
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "canonical_id": "canonical_id",
      "fax": "fax",
      "other_fax_numbers": [
        "other_fax_numbers",
        "other_fax_numbers"
      ],
      "emails": [
        "emails",
        "emails"
      ],
      "service_facilities": [
        {
          "service_facility_id": "service_facility_id"
        },
        {
          "service_facility_id": "service_facility_id"
        }
      ]
    },
    {
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL",
        "period": {
          "start": "2023-01-15",
          "end": "2023-01-15"
        },
        "suffix": "suffix"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "type": "PRIMARY",
      "npi": "npi",
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "canonical_id": "canonical_id",
      "fax": "fax",
      "other_fax_numbers": [
        "other_fax_numbers",
        "other_fax_numbers"
      ],
      "emails": [
        "emails",
        "emails"
      ],
      "service_facilities": [
        {
          "service_facility_id": "service_facility_id"
        },
        {
          "service_facility_id": "service_facility_id"
        }
      ]
    }
  ],
  "id": "id",
  "mrn": "mrn",
  "name": {
    "family": "family",
    "given": [
      "given",
      "given"
    ],
    "use": "USUAL",
    "period": {
      "start": "2023-01-15",
      "end": "2023-01-15"
    },
    "suffix": "suffix"
  },
  "organization_id": "organization_id",
  "other_addresses": [
    {
      "use": "HOME",
      "line": [
        "line",
        "line"
      ],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country",
      "administrative_area": "administrative_area",
      "county": "county",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      }
    },
    {
      "use": "HOME",
      "line": [
        "line",
        "line"
      ],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country",
      "administrative_area": "administrative_area",
      "county": "county",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      }
    }
  ],
  "other_names": [
    {
      "family": "family",
      "given": [
        "given",
        "given"
      ],
      "use": "USUAL",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "suffix": "suffix"
    },
    {
      "family": "family",
      "given": [
        "given",
        "given"
      ],
      "use": "USUAL",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "suffix": "suffix"
    }
  ],
  "other_telecoms": [
    {
      "value": "value",
      "use": "HOME",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      }
    },
    {
      "value": "value",
      "use": "HOME",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      }
    }
  ],
  "primary_address": {
    "use": "HOME",
    "line": [
      "line",
      "line"
    ],
    "city": "city",
    "state": "state",
    "postal_code": "postal_code",
    "country": "country",
    "administrative_area": "administrative_area",
    "county": "county",
    "period": {
      "start": "2023-01-15",
      "end": "2023-01-15"
    }
  },
  "updated_at": "2024-01-15T09:30:00Z",
  "updating_user_id": "updating_user_id",
  "version": 1,
  "advanced_directives": [
    "NONE",
    "NONE"
  ],
  "authorizations": [
    {
      "payer_id": "payer_id",
      "payer_name": "payer_name",
      "authorization_number": "authorization_number",
      "cpt_code": "cpt_code",
      "units": "VISIT",
      "additional_payer_information": {
        "availity_eligibility_id": "availity_eligibility_id",
        "availity_payer_id": "availity_payer_id",
        "availity_payer_name": "availity_payer_name",
        "availity_remittance_payer_id": "availity_remittance_payer_id"
      },
      "apply_for_all_cpt_codes": true,
      "no_prior_authorization_required": true,
      "quantity": 1,
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "notes": "notes",
      "billing_provider_npi": "billing_provider_npi",
      "service_facility": {
        "service_facility_id": "service_facility_id"
      },
      "dx_codes": [
        "dx_codes",
        "dx_codes"
      ]
    },
    {
      "payer_id": "payer_id",
      "payer_name": "payer_name",
      "authorization_number": "authorization_number",
      "cpt_code": "cpt_code",
      "units": "VISIT",
      "additional_payer_information": {
        "availity_eligibility_id": "availity_eligibility_id",
        "availity_payer_id": "availity_payer_id",
        "availity_payer_name": "availity_payer_name",
        "availity_remittance_payer_id": "availity_remittance_payer_id"
      },
      "apply_for_all_cpt_codes": true,
      "no_prior_authorization_required": true,
      "quantity": 1,
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "notes": "notes",
      "billing_provider_npi": "billing_provider_npi",
      "service_facility": {
        "service_facility_id": "service_facility_id"
      },
      "dx_codes": [
        "dx_codes",
        "dx_codes"
      ]
    }
  ],
  "coverages_for_related_causes": {
    "coverages": [
      "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
    ]
  },
  "custom_metadata": [
    {
      "metadata_schema_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "key_value_pairs": {
        "key_value_pairs": {
          "key": "value"
        }
      }
    },
    {
      "metadata_schema_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "key_value_pairs": {
        "key_value_pairs": {
          "key": "value"
        }
      }
    }
  ],
  "deceased": "2024-01-15T09:30:00Z",
  "disability_status": "DISABLED",
  "do_not_invoice_reason": "BANKRUPTCY",
  "electronic_communication_consent": {
    "text_communication_consent": true,
    "email_communication_consent": true
  },
  "email": "email",
  "ethnicity": "HISPANIC_OR_LATINO",
  "external_provenance": {
    "external_id": "external_id",
    "system_name": "system_name"
  },
  "gender": "MAN",
  "guarantor": {
    "name": {
      "family": "family",
      "given": [
        "given",
        "given"
      ],
      "use": "USUAL",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "suffix": "suffix"
    },
    "address": {
      "use": "HOME",
      "line": [
        "line",
        "line"
      ],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country",
      "administrative_area": "administrative_area",
      "county": "county",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      }
    },
    "telecom": {
      "value": "value",
      "use": "HOME",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      }
    },
    "email": "email",
    "birth_date": "2023-01-15"
  },
  "hipaa_code": "hipaa_code",
  "inferred_patient_metadata": {
    "inferred_encounter_id": "inferred_encounter_id",
    "inferred_encounter_latest_date_of_service": "2023-01-15"
  },
  "language": "language",
  "marital_status": "ANNULLED",
  "multiple_birth": 1,
  "non_insurance_payer_associations": [
    {
      "id": "id",
      "member_id": "member_id",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "clinical_trial_info": [
        {
          "id": "id",
          "clinical_trial_arm": "clinical_trial_arm",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "id": "id",
          "clinical_trial_arm": "clinical_trial_arm",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ]
    },
    {
      "id": "id",
      "member_id": "member_id",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "clinical_trial_info": [
        {
          "id": "id",
          "clinical_trial_arm": "clinical_trial_arm",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "id": "id",
          "clinical_trial_arm": "clinical_trial_arm",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ]
    }
  ],
  "note_ids": [
    "note_ids",
    "note_ids"
  ],
  "orcon": true,
  "origination_detail": {
    "referral_source": "HOSPITAL",
    "referring_provider": {
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL",
        "period": {
          "start": "2023-01-15",
          "end": "2023-01-15"
        },
        "suffix": "suffix"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        },
        {
          "value": "value",
          "use": "HOME",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          }
        }
      ],
      "type": "PRIMARY",
      "npi": "npi",
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {}
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country",
          "administrative_area": "administrative_area",
          "county": "county",
          "period": {}
        }
      ],
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "canonical_id": "canonical_id",
      "fax": "fax",
      "other_fax_numbers": [
        "other_fax_numbers",
        "other_fax_numbers"
      ],
      "emails": [
        "emails",
        "emails"
      ],
      "service_facilities": [
        {
          "service_facility_id": "service_facility_id"
        },
        {
          "service_facility_id": "service_facility_id"
        }
      ]
    },
    "specialization_categories": [
      "BEHAVIORAL_HEALTH_THERAPY",
      "BEHAVIORAL_HEALTH_THERAPY"
    ],
    "referral_type": "DIRECTED"
  },
  "other_identifiers": [
    {
      "value": "value",
      "system": "system",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      }
    },
    {
      "value": "value",
      "system": "system",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      }
    }
  ],
  "photo": "photo",
  "primary_service_facility_id": "primary_service_facility_id",
  "primary_telecom": {
    "value": "value",
    "use": "HOME",
    "period": {
      "start": "2023-01-15",
      "end": "2023-01-15"
    }
  },
  "pronouns": [
    "pronouns",
    "pronouns"
  ],
  "race": "AMERICAN_INDIAN_OR_ALASKA_NATIVE",
  "referrals": [
    {
      "provider": {
        "name": {
          "family": "family",
          "given": [
            "given",
            "given"
          ],
          "use": "USUAL",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          },
          "suffix": "suffix"
        },
        "telecoms": [
          {
            "value": "value",
            "use": "HOME",
            "period": {
              "start": "2023-01-15",
              "end": "2023-01-15"
            }
          },
          {
            "value": "value",
            "use": "HOME",
            "period": {
              "start": "2023-01-15",
              "end": "2023-01-15"
            }
          }
        ],
        "type": "PRIMARY",
        "npi": "npi",
        "addresses": [
          {
            "use": "HOME",
            "line": [
              "line",
              "line"
            ],
            "city": "city",
            "state": "state",
            "postal_code": "postal_code",
            "country": "country",
            "administrative_area": "administrative_area",
            "county": "county",
            "period": {}
          },
          {
            "use": "HOME",
            "line": [
              "line",
              "line"
            ],
            "city": "city",
            "state": "state",
            "postal_code": "postal_code",
            "country": "country",
            "administrative_area": "administrative_area",
            "county": "county",
            "period": {}
          }
        ],
        "period": {
          "start": "2023-01-15",
          "end": "2023-01-15"
        },
        "canonical_id": "canonical_id",
        "fax": "fax",
        "other_fax_numbers": [
          "other_fax_numbers",
          "other_fax_numbers"
        ],
        "emails": [
          "emails",
          "emails"
        ],
        "service_facilities": [
          {
            "service_facility_id": "service_facility_id"
          },
          {
            "service_facility_id": "service_facility_id"
          }
        ]
      },
      "referral_number": "referral_number",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "notes": "notes",
      "serviceFacility": {
        "service_facility_id": "service_facility_id"
      },
      "units": "VISIT",
      "quantity": 1,
      "cptCodes": [
        "cptCodes",
        "cptCodes"
      ],
      "applyForAllCptCodes": true
    },
    {
      "provider": {
        "name": {
          "family": "family",
          "given": [
            "given",
            "given"
          ],
          "use": "USUAL",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          },
          "suffix": "suffix"
        },
        "telecoms": [
          {
            "value": "value",
            "use": "HOME",
            "period": {
              "start": "2023-01-15",
              "end": "2023-01-15"
            }
          },
          {
            "value": "value",
            "use": "HOME",
            "period": {
              "start": "2023-01-15",
              "end": "2023-01-15"
            }
          }
        ],
        "type": "PRIMARY",
        "npi": "npi",
        "addresses": [
          {
            "use": "HOME",
            "line": [
              "line",
              "line"
            ],
            "city": "city",
            "state": "state",
            "postal_code": "postal_code",
            "country": "country",
            "administrative_area": "administrative_area",
            "county": "county",
            "period": {}
          },
          {
            "use": "HOME",
            "line": [
              "line",
              "line"
            ],
            "city": "city",
            "state": "state",
            "postal_code": "postal_code",
            "country": "country",
            "administrative_area": "administrative_area",
            "county": "county",
            "period": {}
          }
        ],
        "period": {
          "start": "2023-01-15",
          "end": "2023-01-15"
        },
        "canonical_id": "canonical_id",
        "fax": "fax",
        "other_fax_numbers": [
          "other_fax_numbers",
          "other_fax_numbers"
        ],
        "emails": [
          "emails",
          "emails"
        ],
        "service_facilities": [
          {
            "service_facility_id": "service_facility_id"
          },
          {
            "service_facility_id": "service_facility_id"
          }
        ]
      },
      "referral_number": "referral_number",
      "period": {
        "start": "2023-01-15",
        "end": "2023-01-15"
      },
      "notes": "notes",
      "serviceFacility": {
        "service_facility_id": "service_facility_id"
      },
      "units": "VISIT",
      "quantity": 1,
      "cptCodes": [
        "cptCodes",
        "cptCodes"
      ],
      "applyForAllCptCodes": true
    }
  ],
  "self_pay": true,
  "service_facilities": [
    {
      "service_facility_id": "service_facility_id"
    },
    {
      "service_facility_id": "service_facility_id"
    }
  ],
  "sexual_orientation": "HETEROSEXUAL",
  "social_security_number": "social_security_number",
  "tag_ids": [
    "tag_ids",
    "tag_ids"
  ],
  "electronic_communication_opt_in": true,
  "non_insurance_payers": [
    "non_insurance_payers",
    "non_insurance_payers"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://pre-api.joincandidhealth.com/patients/v1/with_mrn"

payload = {
    "biological_sex": "FEMALE",
    "birth_date": "2023-01-15",
    "contacts": [
        {
            "relationship": ["SELF", "SELF"],
            "name": {
                "family": "family",
                "given": ["given", "given"],
                "use": "USUAL"
            },
            "telecoms": [
                {
                    "value": "value",
                    "use": "HOME"
                },
                {
                    "value": "value",
                    "use": "HOME"
                }
            ],
            "addresses": [
                {
                    "use": "HOME",
                    "line": ["line", "line"],
                    "city": "city",
                    "state": "state",
                    "postal_code": "postal_code",
                    "country": "country"
                },
                {
                    "use": "HOME",
                    "line": ["line", "line"],
                    "city": "city",
                    "state": "state",
                    "postal_code": "postal_code",
                    "country": "country"
                }
            ]
        },
        {
            "relationship": ["SELF", "SELF"],
            "name": {
                "family": "family",
                "given": ["given", "given"],
                "use": "USUAL"
            },
            "telecoms": [
                {
                    "value": "value",
                    "use": "HOME"
                },
                {
                    "value": "value",
                    "use": "HOME"
                }
            ],
            "addresses": [
                {
                    "use": "HOME",
                    "line": ["line", "line"],
                    "city": "city",
                    "state": "state",
                    "postal_code": "postal_code",
                    "country": "country"
                },
                {
                    "use": "HOME",
                    "line": ["line", "line"],
                    "city": "city",
                    "state": "state",
                    "postal_code": "postal_code",
                    "country": "country"
                }
            ]
        }
    ],
    "filing_order": { "coverages": ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] },
    "general_practitioners": [
        {
            "name": {
                "family": "family",
                "given": ["given", "given"],
                "use": "USUAL"
            },
            "telecoms": [
                {
                    "value": "value",
                    "use": "HOME"
                },
                {
                    "value": "value",
                    "use": "HOME"
                }
            ]
        },
        {
            "name": {
                "family": "family",
                "given": ["given", "given"],
                "use": "USUAL"
            },
            "telecoms": [
                {
                    "value": "value",
                    "use": "HOME"
                },
                {
                    "value": "value",
                    "use": "HOME"
                }
            ]
        }
    ],
    "mrn": "mrn",
    "name": {
        "family": "family",
        "given": ["given", "given"],
        "use": "USUAL"
    },
    "other_addresses": [
        {
            "use": "HOME",
            "line": ["line", "line"],
            "city": "city",
            "state": "state",
            "postal_code": "postal_code",
            "country": "country"
        },
        {
            "use": "HOME",
            "line": ["line", "line"],
            "city": "city",
            "state": "state",
            "postal_code": "postal_code",
            "country": "country"
        }
    ],
    "other_names": [
        {
            "family": "family",
            "given": ["given", "given"],
            "use": "USUAL"
        },
        {
            "family": "family",
            "given": ["given", "given"],
            "use": "USUAL"
        }
    ],
    "other_telecoms": [
        {
            "value": "value",
            "use": "HOME"
        },
        {
            "value": "value",
            "use": "HOME"
        }
    ],
    "primary_address": {
        "use": "HOME",
        "line": ["line", "line"],
        "city": "city",
        "state": "state",
        "postal_code": "postal_code",
        "country": "country"
    }
}
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://pre-api.joincandidhealth.com/patients/v1/with_mrn';
const options = {
  method: 'POST',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"biological_sex":"FEMALE","birth_date":"2023-01-15","contacts":[{"relationship":["SELF","SELF"],"name":{"family":"family","given":["given","given"],"use":"USUAL"},"telecoms":[{"value":"value","use":"HOME"},{"value":"value","use":"HOME"}],"addresses":[{"use":"HOME","line":["line","line"],"city":"city","state":"state","postal_code":"postal_code","country":"country"},{"use":"HOME","line":["line","line"],"city":"city","state":"state","postal_code":"postal_code","country":"country"}]},{"relationship":["SELF","SELF"],"name":{"family":"family","given":["given","given"],"use":"USUAL"},"telecoms":[{"value":"value","use":"HOME"},{"value":"value","use":"HOME"}],"addresses":[{"use":"HOME","line":["line","line"],"city":"city","state":"state","postal_code":"postal_code","country":"country"},{"use":"HOME","line":["line","line"],"city":"city","state":"state","postal_code":"postal_code","country":"country"}]}],"filing_order":{"coverages":["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32","d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"]},"general_practitioners":[{"name":{"family":"family","given":["given","given"],"use":"USUAL"},"telecoms":[{"value":"value","use":"HOME"},{"value":"value","use":"HOME"}]},{"name":{"family":"family","given":["given","given"],"use":"USUAL"},"telecoms":[{"value":"value","use":"HOME"},{"value":"value","use":"HOME"}]}],"mrn":"mrn","name":{"family":"family","given":["given","given"],"use":"USUAL"},"other_addresses":[{"use":"HOME","line":["line","line"],"city":"city","state":"state","postal_code":"postal_code","country":"country"},{"use":"HOME","line":["line","line"],"city":"city","state":"state","postal_code":"postal_code","country":"country"}],"other_names":[{"family":"family","given":["given","given"],"use":"USUAL"},{"family":"family","given":["given","given"],"use":"USUAL"}],"other_telecoms":[{"value":"value","use":"HOME"},{"value":"value","use":"HOME"}],"primary_address":{"use":"HOME","line":["line","line"],"city":"city","state":"state","postal_code":"postal_code","country":"country"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://pre-api.joincandidhealth.com/patients/v1/with_mrn"

	payload := strings.NewReader("{\n  \"biological_sex\": \"FEMALE\",\n  \"birth_date\": \"2023-01-15\",\n  \"contacts\": [\n    {\n      \"relationship\": [\n        \"SELF\",\n        \"SELF\"\n      ],\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ],\n      \"addresses\": [\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        },\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        }\n      ]\n    },\n    {\n      \"relationship\": [\n        \"SELF\",\n        \"SELF\"\n      ],\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ],\n      \"addresses\": [\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        },\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        }\n      ]\n    }\n  ],\n  \"filing_order\": {\n    \"coverages\": [\n      \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"\n    ]\n  },\n  \"general_practitioners\": [\n    {\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ]\n    },\n    {\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ]\n    }\n  ],\n  \"mrn\": \"mrn\",\n  \"name\": {\n    \"family\": \"family\",\n    \"given\": [\n      \"given\",\n      \"given\"\n    ],\n    \"use\": \"USUAL\"\n  },\n  \"other_addresses\": [\n    {\n      \"use\": \"HOME\",\n      \"line\": [\n        \"line\",\n        \"line\"\n      ],\n      \"city\": \"city\",\n      \"state\": \"state\",\n      \"postal_code\": \"postal_code\",\n      \"country\": \"country\"\n    },\n    {\n      \"use\": \"HOME\",\n      \"line\": [\n        \"line\",\n        \"line\"\n      ],\n      \"city\": \"city\",\n      \"state\": \"state\",\n      \"postal_code\": \"postal_code\",\n      \"country\": \"country\"\n    }\n  ],\n  \"other_names\": [\n    {\n      \"family\": \"family\",\n      \"given\": [\n        \"given\",\n        \"given\"\n      ],\n      \"use\": \"USUAL\"\n    },\n    {\n      \"family\": \"family\",\n      \"given\": [\n        \"given\",\n        \"given\"\n      ],\n      \"use\": \"USUAL\"\n    }\n  ],\n  \"other_telecoms\": [\n    {\n      \"value\": \"value\",\n      \"use\": \"HOME\"\n    },\n    {\n      \"value\": \"value\",\n      \"use\": \"HOME\"\n    }\n  ],\n  \"primary_address\": {\n    \"use\": \"HOME\",\n    \"line\": [\n      \"line\",\n      \"line\"\n    ],\n    \"city\": \"city\",\n    \"state\": \"state\",\n    \"postal_code\": \"postal_code\",\n    \"country\": \"country\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<token>.")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://pre-api.joincandidhealth.com/patients/v1/with_mrn")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"biological_sex\": \"FEMALE\",\n  \"birth_date\": \"2023-01-15\",\n  \"contacts\": [\n    {\n      \"relationship\": [\n        \"SELF\",\n        \"SELF\"\n      ],\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ],\n      \"addresses\": [\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        },\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        }\n      ]\n    },\n    {\n      \"relationship\": [\n        \"SELF\",\n        \"SELF\"\n      ],\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ],\n      \"addresses\": [\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        },\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        }\n      ]\n    }\n  ],\n  \"filing_order\": {\n    \"coverages\": [\n      \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"\n    ]\n  },\n  \"general_practitioners\": [\n    {\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ]\n    },\n    {\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ]\n    }\n  ],\n  \"mrn\": \"mrn\",\n  \"name\": {\n    \"family\": \"family\",\n    \"given\": [\n      \"given\",\n      \"given\"\n    ],\n    \"use\": \"USUAL\"\n  },\n  \"other_addresses\": [\n    {\n      \"use\": \"HOME\",\n      \"line\": [\n        \"line\",\n        \"line\"\n      ],\n      \"city\": \"city\",\n      \"state\": \"state\",\n      \"postal_code\": \"postal_code\",\n      \"country\": \"country\"\n    },\n    {\n      \"use\": \"HOME\",\n      \"line\": [\n        \"line\",\n        \"line\"\n      ],\n      \"city\": \"city\",\n      \"state\": \"state\",\n      \"postal_code\": \"postal_code\",\n      \"country\": \"country\"\n    }\n  ],\n  \"other_names\": [\n    {\n      \"family\": \"family\",\n      \"given\": [\n        \"given\",\n        \"given\"\n      ],\n      \"use\": \"USUAL\"\n    },\n    {\n      \"family\": \"family\",\n      \"given\": [\n        \"given\",\n        \"given\"\n      ],\n      \"use\": \"USUAL\"\n    }\n  ],\n  \"other_telecoms\": [\n    {\n      \"value\": \"value\",\n      \"use\": \"HOME\"\n    },\n    {\n      \"value\": \"value\",\n      \"use\": \"HOME\"\n    }\n  ],\n  \"primary_address\": {\n    \"use\": \"HOME\",\n    \"line\": [\n      \"line\",\n      \"line\"\n    ],\n    \"city\": \"city\",\n    \"state\": \"state\",\n    \"postal_code\": \"postal_code\",\n    \"country\": \"country\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://pre-api.joincandidhealth.com/patients/v1/with_mrn")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"biological_sex\": \"FEMALE\",\n  \"birth_date\": \"2023-01-15\",\n  \"contacts\": [\n    {\n      \"relationship\": [\n        \"SELF\",\n        \"SELF\"\n      ],\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ],\n      \"addresses\": [\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        },\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        }\n      ]\n    },\n    {\n      \"relationship\": [\n        \"SELF\",\n        \"SELF\"\n      ],\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ],\n      \"addresses\": [\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        },\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        }\n      ]\n    }\n  ],\n  \"filing_order\": {\n    \"coverages\": [\n      \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"\n    ]\n  },\n  \"general_practitioners\": [\n    {\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ]\n    },\n    {\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ]\n    }\n  ],\n  \"mrn\": \"mrn\",\n  \"name\": {\n    \"family\": \"family\",\n    \"given\": [\n      \"given\",\n      \"given\"\n    ],\n    \"use\": \"USUAL\"\n  },\n  \"other_addresses\": [\n    {\n      \"use\": \"HOME\",\n      \"line\": [\n        \"line\",\n        \"line\"\n      ],\n      \"city\": \"city\",\n      \"state\": \"state\",\n      \"postal_code\": \"postal_code\",\n      \"country\": \"country\"\n    },\n    {\n      \"use\": \"HOME\",\n      \"line\": [\n        \"line\",\n        \"line\"\n      ],\n      \"city\": \"city\",\n      \"state\": \"state\",\n      \"postal_code\": \"postal_code\",\n      \"country\": \"country\"\n    }\n  ],\n  \"other_names\": [\n    {\n      \"family\": \"family\",\n      \"given\": [\n        \"given\",\n        \"given\"\n      ],\n      \"use\": \"USUAL\"\n    },\n    {\n      \"family\": \"family\",\n      \"given\": [\n        \"given\",\n        \"given\"\n      ],\n      \"use\": \"USUAL\"\n    }\n  ],\n  \"other_telecoms\": [\n    {\n      \"value\": \"value\",\n      \"use\": \"HOME\"\n    },\n    {\n      \"value\": \"value\",\n      \"use\": \"HOME\"\n    }\n  ],\n  \"primary_address\": {\n    \"use\": \"HOME\",\n    \"line\": [\n      \"line\",\n      \"line\"\n    ],\n    \"city\": \"city\",\n    \"state\": \"state\",\n    \"postal_code\": \"postal_code\",\n    \"country\": \"country\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://pre-api.joincandidhealth.com/patients/v1/with_mrn', [
  'body' => '{
  "biological_sex": "FEMALE",
  "birth_date": "2023-01-15",
  "contacts": [
    {
      "relationship": [
        "SELF",
        "SELF"
      ],
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME"
        },
        {
          "value": "value",
          "use": "HOME"
        }
      ],
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        }
      ]
    },
    {
      "relationship": [
        "SELF",
        "SELF"
      ],
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME"
        },
        {
          "value": "value",
          "use": "HOME"
        }
      ],
      "addresses": [
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        },
        {
          "use": "HOME",
          "line": [
            "line",
            "line"
          ],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        }
      ]
    }
  ],
  "filing_order": {
    "coverages": [
      "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
    ]
  },
  "general_practitioners": [
    {
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME"
        },
        {
          "value": "value",
          "use": "HOME"
        }
      ]
    },
    {
      "name": {
        "family": "family",
        "given": [
          "given",
          "given"
        ],
        "use": "USUAL"
      },
      "telecoms": [
        {
          "value": "value",
          "use": "HOME"
        },
        {
          "value": "value",
          "use": "HOME"
        }
      ]
    }
  ],
  "mrn": "mrn",
  "name": {
    "family": "family",
    "given": [
      "given",
      "given"
    ],
    "use": "USUAL"
  },
  "other_addresses": [
    {
      "use": "HOME",
      "line": [
        "line",
        "line"
      ],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country"
    },
    {
      "use": "HOME",
      "line": [
        "line",
        "line"
      ],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country"
    }
  ],
  "other_names": [
    {
      "family": "family",
      "given": [
        "given",
        "given"
      ],
      "use": "USUAL"
    },
    {
      "family": "family",
      "given": [
        "given",
        "given"
      ],
      "use": "USUAL"
    }
  ],
  "other_telecoms": [
    {
      "value": "value",
      "use": "HOME"
    },
    {
      "value": "value",
      "use": "HOME"
    }
  ],
  "primary_address": {
    "use": "HOME",
    "line": [
      "line",
      "line"
    ],
    "city": "city",
    "state": "state",
    "postal_code": "postal_code",
    "country": "country"
  }
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://pre-api.joincandidhealth.com/patients/v1/with_mrn");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"biological_sex\": \"FEMALE\",\n  \"birth_date\": \"2023-01-15\",\n  \"contacts\": [\n    {\n      \"relationship\": [\n        \"SELF\",\n        \"SELF\"\n      ],\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ],\n      \"addresses\": [\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        },\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        }\n      ]\n    },\n    {\n      \"relationship\": [\n        \"SELF\",\n        \"SELF\"\n      ],\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ],\n      \"addresses\": [\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        },\n        {\n          \"use\": \"HOME\",\n          \"line\": [\n            \"line\",\n            \"line\"\n          ],\n          \"city\": \"city\",\n          \"state\": \"state\",\n          \"postal_code\": \"postal_code\",\n          \"country\": \"country\"\n        }\n      ]\n    }\n  ],\n  \"filing_order\": {\n    \"coverages\": [\n      \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n      \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"\n    ]\n  },\n  \"general_practitioners\": [\n    {\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ]\n    },\n    {\n      \"name\": {\n        \"family\": \"family\",\n        \"given\": [\n          \"given\",\n          \"given\"\n        ],\n        \"use\": \"USUAL\"\n      },\n      \"telecoms\": [\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        },\n        {\n          \"value\": \"value\",\n          \"use\": \"HOME\"\n        }\n      ]\n    }\n  ],\n  \"mrn\": \"mrn\",\n  \"name\": {\n    \"family\": \"family\",\n    \"given\": [\n      \"given\",\n      \"given\"\n    ],\n    \"use\": \"USUAL\"\n  },\n  \"other_addresses\": [\n    {\n      \"use\": \"HOME\",\n      \"line\": [\n        \"line\",\n        \"line\"\n      ],\n      \"city\": \"city\",\n      \"state\": \"state\",\n      \"postal_code\": \"postal_code\",\n      \"country\": \"country\"\n    },\n    {\n      \"use\": \"HOME\",\n      \"line\": [\n        \"line\",\n        \"line\"\n      ],\n      \"city\": \"city\",\n      \"state\": \"state\",\n      \"postal_code\": \"postal_code\",\n      \"country\": \"country\"\n    }\n  ],\n  \"other_names\": [\n    {\n      \"family\": \"family\",\n      \"given\": [\n        \"given\",\n        \"given\"\n      ],\n      \"use\": \"USUAL\"\n    },\n    {\n      \"family\": \"family\",\n      \"given\": [\n        \"given\",\n        \"given\"\n      ],\n      \"use\": \"USUAL\"\n    }\n  ],\n  \"other_telecoms\": [\n    {\n      \"value\": \"value\",\n      \"use\": \"HOME\"\n    },\n    {\n      \"value\": \"value\",\n      \"use\": \"HOME\"\n    }\n  ],\n  \"primary_address\": {\n    \"use\": \"HOME\",\n    \"line\": [\n      \"line\",\n      \"line\"\n    ],\n    \"city\": \"city\",\n    \"state\": \"state\",\n    \"postal_code\": \"postal_code\",\n    \"country\": \"country\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = [
  "biological_sex": "FEMALE",
  "birth_date": "2023-01-15",
  "contacts": [
    [
      "relationship": ["SELF", "SELF"],
      "name": [
        "family": "family",
        "given": ["given", "given"],
        "use": "USUAL"
      ],
      "telecoms": [
        [
          "value": "value",
          "use": "HOME"
        ],
        [
          "value": "value",
          "use": "HOME"
        ]
      ],
      "addresses": [
        [
          "use": "HOME",
          "line": ["line", "line"],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        ],
        [
          "use": "HOME",
          "line": ["line", "line"],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        ]
      ]
    ],
    [
      "relationship": ["SELF", "SELF"],
      "name": [
        "family": "family",
        "given": ["given", "given"],
        "use": "USUAL"
      ],
      "telecoms": [
        [
          "value": "value",
          "use": "HOME"
        ],
        [
          "value": "value",
          "use": "HOME"
        ]
      ],
      "addresses": [
        [
          "use": "HOME",
          "line": ["line", "line"],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        ],
        [
          "use": "HOME",
          "line": ["line", "line"],
          "city": "city",
          "state": "state",
          "postal_code": "postal_code",
          "country": "country"
        ]
      ]
    ]
  ],
  "filing_order": ["coverages": ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"]],
  "general_practitioners": [
    [
      "name": [
        "family": "family",
        "given": ["given", "given"],
        "use": "USUAL"
      ],
      "telecoms": [
        [
          "value": "value",
          "use": "HOME"
        ],
        [
          "value": "value",
          "use": "HOME"
        ]
      ]
    ],
    [
      "name": [
        "family": "family",
        "given": ["given", "given"],
        "use": "USUAL"
      ],
      "telecoms": [
        [
          "value": "value",
          "use": "HOME"
        ],
        [
          "value": "value",
          "use": "HOME"
        ]
      ]
    ]
  ],
  "mrn": "mrn",
  "name": [
    "family": "family",
    "given": ["given", "given"],
    "use": "USUAL"
  ],
  "other_addresses": [
    [
      "use": "HOME",
      "line": ["line", "line"],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country"
    ],
    [
      "use": "HOME",
      "line": ["line", "line"],
      "city": "city",
      "state": "state",
      "postal_code": "postal_code",
      "country": "country"
    ]
  ],
  "other_names": [
    [
      "family": "family",
      "given": ["given", "given"],
      "use": "USUAL"
    ],
    [
      "family": "family",
      "given": ["given", "given"],
      "use": "USUAL"
    ]
  ],
  "other_telecoms": [
    [
      "value": "value",
      "use": "HOME"
    ],
    [
      "value": "value",
      "use": "HOME"
    ]
  ],
  "primary_address": [
    "use": "HOME",
    "line": ["line", "line"],
    "city": "city",
    "state": "state",
    "postal_code": "postal_code",
    "country": "country"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://pre-api.joincandidhealth.com/patients/v1/with_mrn")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```