> 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.

# Get Visits

GET https://pre-api.joincandidhealth.com/appointments/v1/visits

Gets all Visits within a given time range. The return list is ordered by start_time ascending.

**IMPORTANT:** This endpoint requires a date filter on `appointment.startTimestamp` to ensure acceptable query performance.
Without date filtering, the query can take 50+ seconds on large datasets due to grouping and aggregation operations.

Example filters:
- `appointment.startTimestamp|gt|2024-01-01` - appointments after January 1, 2024
- `appointment.startTimestamp|eq|2024-12-08` - appointments on December 8, 2024
- `appointment.startTimestamp|lt|2024-12-31` - appointments before December 31, 2024

You can combine the date filter with other filters using commas:
- `appointment.startTimestamp|gt|2024-01-01,appointment.status|eq|PENDING`

Reference: https://docs.joincandidhealth.com/api-reference/pre-encounter/appointments/v-1/get-visits

## 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

- `page_token` (string, optional) — A token that can be used to retrieve the next or previous page of results
- `limit` (integer, optional)
- `sort_field` (string, optional) — Defaults to appointment.start_time.
- `sort_direction` (enum, optional) — Defaults to ascending.
  - Allowed values: `asc`, `desc`
- `filters` (string, optional) — **Required:** Must include a date filter on appointment.startTimestamp (using gt, lt, or eq operators). Example: appointment.startTimestamp|gt|2024-01-01

## Response

### 200

- `items` (list of Visit, required)
- `total` (integer, required)
- `next_page_token` (string, optional) — A token that can be used to retrieve the next or previous page of results
- `prev_page_token` (string, optional) — A token that can be used to retrieve the next or previous page of results

## Errors

### 400 Bad Request Error

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

## Types

### Visit

A visit is a collection of appointments that occur on the same day.

- `patient_id` (string, required) — The unique identifier for a Patient
- `organization_id` (string, required) — The unique identifier for an Organization in the database
- `patient` (MutablePatientWithMrn, required)
- `start_time` (datetime, required)
- `status` (enum, required)
  - Allowed values: `PENDING`, `NOT_READY`, `READY`, `CHECKED_IN`, `CHECKED_OUT`, `NO_SHOW`
- `primary_coverage_status` (enum, optional) — enum to represent the statuses defined at https://build.fhir.org/valueset-fm-status.html
  - Allowed values: `ACTIVE`, `CANCELLED`, `DRAFT`, `ENTERED_IN_ERROR`
- `secondary_coverage_status` (enum, optional) — enum to represent the statuses defined at https://build.fhir.org/valueset-fm-status.html
  - Allowed values: `ACTIVE`, `CANCELLED`, `DRAFT`, `ENTERED_IN_ERROR`
- `primary_payer_name` (string, optional)
- `primary_payer_plan_group_id` (UUID, optional) — The unique identifier for a PayerPlanGroup in the database
- `secondary_payer_name` (string, optional)
- `secondary_payer_plan_group_id` (UUID, optional) — The unique identifier for a PayerPlanGroup in the database

### ErrorBase4xx

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

### 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)

### 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

### 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

**Response**

```json
{
  "items": [
    {
      "patient_id": "patient_id",
      "organization_id": "organization_id",
      "patient": {
        "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": {}
              },
              {
                "value": "value",
                "use": "HOME",
                "period": {}
              }
            ],
            "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"
            },
            "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": {}
              },
              {
                "value": "value",
                "use": "HOME",
                "period": {}
              }
            ],
            "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"
            },
            "hipaa_authorization": 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": {}
              },
              {
                "value": "value",
                "use": "HOME",
                "period": {}
              }
            ],
            "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"
              }
            ]
          },
          {
            "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": {}
              },
              {
                "value": "value",
                "use": "HOME",
                "period": {}
              }
            ],
            "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"
              }
            ]
          }
        ],
        "mrn": "mrn",
        "name": {
          "family": "family",
          "given": [
            "given",
            "given"
          ],
          "use": "USUAL",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          },
          "suffix": "suffix"
        },
        "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"
          }
        },
        "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": {}
          },
          "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"
              },
              {
                "id": "id"
              }
            ]
          },
          {
            "id": "id",
            "member_id": "member_id",
            "period": {
              "start": "2023-01-15",
              "end": "2023-01-15"
            },
            "clinical_trial_info": [
              {
                "id": "id"
              },
              {
                "id": "id"
              }
            ]
          }
        ],
        "note_ids": [
          "note_ids",
          "note_ids"
        ],
        "orcon": true,
        "origination_detail": {
          "referral_source": "HOSPITAL",
          "referring_provider": {
            "name": {
              "family": "family",
              "given": [
                "given",
                "given"
              ],
              "use": "USUAL",
              "period": {},
              "suffix": "suffix"
            },
            "telecoms": [
              {
                "value": "value",
                "use": "HOME"
              },
              {
                "value": "value",
                "use": "HOME"
              }
            ],
            "type": "PRIMARY",
            "npi": "npi",
            "addresses": [],
            "period": {},
            "canonical_id": "canonical_id",
            "fax": "fax",
            "other_fax_numbers": [
              "other_fax_numbers",
              "other_fax_numbers"
            ],
            "emails": [
              "emails",
              "emails"
            ],
            "service_facilities": []
          },
          "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": {},
                "suffix": "suffix"
              },
              "telecoms": [
                {
                  "value": "value",
                  "use": "HOME"
                },
                {
                  "value": "value",
                  "use": "HOME"
                }
              ],
              "type": "PRIMARY",
              "npi": "npi",
              "addresses": [],
              "period": {},
              "canonical_id": "canonical_id",
              "fax": "fax",
              "other_fax_numbers": [
                "other_fax_numbers",
                "other_fax_numbers"
              ],
              "emails": [
                "emails",
                "emails"
              ],
              "service_facilities": []
            },
            "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": {},
                "suffix": "suffix"
              },
              "telecoms": [
                {
                  "value": "value",
                  "use": "HOME"
                },
                {
                  "value": "value",
                  "use": "HOME"
                }
              ],
              "type": "PRIMARY",
              "npi": "npi",
              "addresses": [],
              "period": {},
              "canonical_id": "canonical_id",
              "fax": "fax",
              "other_fax_numbers": [
                "other_fax_numbers",
                "other_fax_numbers"
              ],
              "emails": [
                "emails",
                "emails"
              ],
              "service_facilities": []
            },
            "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"
        ]
      },
      "start_time": "2024-01-15T09:30:00Z",
      "status": "PENDING",
      "primary_coverage_status": "ACTIVE",
      "secondary_coverage_status": "ACTIVE",
      "primary_payer_name": "primary_payer_name",
      "primary_payer_plan_group_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "secondary_payer_name": "secondary_payer_name",
      "secondary_payer_plan_group_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
    },
    {
      "patient_id": "patient_id",
      "organization_id": "organization_id",
      "patient": {
        "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": {}
              },
              {
                "value": "value",
                "use": "HOME",
                "period": {}
              }
            ],
            "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"
            },
            "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": {}
              },
              {
                "value": "value",
                "use": "HOME",
                "period": {}
              }
            ],
            "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"
            },
            "hipaa_authorization": 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": {}
              },
              {
                "value": "value",
                "use": "HOME",
                "period": {}
              }
            ],
            "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"
              }
            ]
          },
          {
            "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": {}
              },
              {
                "value": "value",
                "use": "HOME",
                "period": {}
              }
            ],
            "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"
              }
            ]
          }
        ],
        "mrn": "mrn",
        "name": {
          "family": "family",
          "given": [
            "given",
            "given"
          ],
          "use": "USUAL",
          "period": {
            "start": "2023-01-15",
            "end": "2023-01-15"
          },
          "suffix": "suffix"
        },
        "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"
          }
        },
        "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": {}
          },
          "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"
              },
              {
                "id": "id"
              }
            ]
          },
          {
            "id": "id",
            "member_id": "member_id",
            "period": {
              "start": "2023-01-15",
              "end": "2023-01-15"
            },
            "clinical_trial_info": [
              {
                "id": "id"
              },
              {
                "id": "id"
              }
            ]
          }
        ],
        "note_ids": [
          "note_ids",
          "note_ids"
        ],
        "orcon": true,
        "origination_detail": {
          "referral_source": "HOSPITAL",
          "referring_provider": {
            "name": {
              "family": "family",
              "given": [
                "given",
                "given"
              ],
              "use": "USUAL",
              "period": {},
              "suffix": "suffix"
            },
            "telecoms": [
              {
                "value": "value",
                "use": "HOME"
              },
              {
                "value": "value",
                "use": "HOME"
              }
            ],
            "type": "PRIMARY",
            "npi": "npi",
            "addresses": [],
            "period": {},
            "canonical_id": "canonical_id",
            "fax": "fax",
            "other_fax_numbers": [
              "other_fax_numbers",
              "other_fax_numbers"
            ],
            "emails": [
              "emails",
              "emails"
            ],
            "service_facilities": []
          },
          "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": {},
                "suffix": "suffix"
              },
              "telecoms": [
                {
                  "value": "value",
                  "use": "HOME"
                },
                {
                  "value": "value",
                  "use": "HOME"
                }
              ],
              "type": "PRIMARY",
              "npi": "npi",
              "addresses": [],
              "period": {},
              "canonical_id": "canonical_id",
              "fax": "fax",
              "other_fax_numbers": [
                "other_fax_numbers",
                "other_fax_numbers"
              ],
              "emails": [
                "emails",
                "emails"
              ],
              "service_facilities": []
            },
            "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": {},
                "suffix": "suffix"
              },
              "telecoms": [
                {
                  "value": "value",
                  "use": "HOME"
                },
                {
                  "value": "value",
                  "use": "HOME"
                }
              ],
              "type": "PRIMARY",
              "npi": "npi",
              "addresses": [],
              "period": {},
              "canonical_id": "canonical_id",
              "fax": "fax",
              "other_fax_numbers": [
                "other_fax_numbers",
                "other_fax_numbers"
              ],
              "emails": [
                "emails",
                "emails"
              ],
              "service_facilities": []
            },
            "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"
        ]
      },
      "start_time": "2024-01-15T09:30:00Z",
      "status": "PENDING",
      "primary_coverage_status": "ACTIVE",
      "secondary_coverage_status": "ACTIVE",
      "primary_payer_name": "primary_payer_name",
      "primary_payer_plan_group_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
      "secondary_payer_name": "secondary_payer_name",
      "secondary_payer_plan_group_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
    }
  ],
  "total": 1,
  "next_page_token": "next_page_token",
  "prev_page_token": "prev_page_token"
}
```

**SDK Code**

```python
import requests

url = "https://pre-api.joincandidhealth.com/appointments/v1/visits"

headers = {"Authorization": "<token>."}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://pre-api.joincandidhealth.com/appointments/v1/visits';
const options = {method: 'GET', headers: {Authorization: '<token>.'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://pre-api.joincandidhealth.com/appointments/v1/visits"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<token>.")

	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/appointments/v1/visits")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<token>.'

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.get("https://pre-api.joincandidhealth.com/appointments/v1/visits")
  .header("Authorization", "<token>.")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://pre-api.joincandidhealth.com/appointments/v1/visits', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://pre-api.joincandidhealth.com/appointments/v1/visits");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<token>."]

let request = NSMutableURLRequest(url: NSURL(string: "https://pre-api.joincandidhealth.com/appointments/v1/visits")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```