---
title: "Search Appointments"
description: "Search appointments by patient name or document (q), or within the requested window and filters, using stable keyset pagination.\n\n- **Scopes:** any one of `agenda:appointments:read`, `agenda:appointments:write`\n- **Credentials:** an API key, a client-credentials token or a person's access token\n- **Effect:** read-only; safe to retry\n- **Limits:** request body up to 256 KB, response up to 8 MB\n- **CLI:** `arbol agenda appointments search` · **MCP tool:** `agenda_appointments_search`"
---

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

Path: Agenda API › Appointments

`POST /v1/agenda/appointments/search`

Search appointments by patient name or document (q), or within the requested window and filters, using stable keyset pagination.

- **Scopes:** any one of `agenda:appointments:read`, `agenda:appointments:write`
- **Credentials:** an API key, a client-credentials token or a person's access token
- **Effect:** read-only; safe to retry
- **Limits:** request body up to 256 KB, response up to 8 MB
- **CLI:** `arbol agenda appointments search` · **MCP tool:** `agenda_appointments_search`

## Authentication

Requires one of the following:

- `arbolHuman`, oauth2, scopes: `agenda:appointments:read`
- `arbolHuman`, oauth2, scopes: `agenda:appointments:write`
- `arbolMachine`, oauth2, scopes: `agenda:appointments:read`
- `arbolMachine`, oauth2, scopes: `agenda:appointments:write`
- `arbolApiKey`, http, header `Authorization`

## Request body

_Required._

- `cursor` (`agenda.appointments.search.cursor`; string, optional) — Opaque cursor returned by pageInfo; omit it to request the first page.
- `direction` (`agenda.appointments.search.direction`; string, optional) — Direction to traverse the stable keyset ordering from the supplied cursor.
  - one of `"forward"`, `"backward"`; default `"forward"`
- `limit` (`agenda.appointments.search.limit`; integer, optional) — Maximum number of appointment records returned by one page; defaults to 25 and cannot exceed 500.
  - min 1; max 500; default `25`
- `bookingChannel` (`agenda.appointments.search.bookingChannel`; string | null, optional) — Filter the recorded booking channel; null selects appointments whose channel was never recorded.
- `createdBy` (`agenda.appointments.search.createdBy`; string | null, optional) — Principal reference of whoever booked it.
- `createdAfter` (`agenda.appointments.search.createdAfter`; string, optional) — Inclusive creation instant, independent of the appointment date. Pair with createdBefore; at most 93 days.
  - format `date-time`
- `createdBefore` (`agenda.appointments.search.createdBefore`; string, optional) — Exclusive creation instant. Use for appointments generated during a period, including future appointments.
  - format `date-time`
- `from` (`agenda.appointments.search.from`; string, optional) — Beginning of the appointment range; must be paired with to unless a patient search is supplied.
  - format `date-time`
- `locationId` (`agenda.appointments.search.locationId`; string, optional) — Held on an agenda of this site, like `appointmentReport`.
  - pattern `^loc_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
- `order` (`agenda.appointments.search.order`; string, optional) — Ascending or descending order within the selected appointment sort key.
  - one of `"desc"`, `"asc"`; default `"desc"`
- `payer` (`agenda.appointments.search.payer`; string | null, optional) — The payer's name as recorded in the intake.
- `priority` (`agenda.appointments.search.priority`; string, optional) — Only appointments marked priority ("urgent"), or only the rest.
  - one of `"normal"`, `"urgent"`
- `reason` (`agenda.appointments.search.reason`; string | null, optional) — The reason given for a cancellation or no-show.
- `resourceId` (`agenda.appointments.search.resourceId`; string, optional) — Only appointments assigned to this agenda in the authenticated organization.
  - pattern `^srs_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
- `resourceIds` (`agenda.appointments.search.resourceIds`; array<string>, optional) — Held on any of these agendas (at most 200).
  - pattern `^srs_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
- `serviceId` (`agenda.appointments.search.serviceId`; string, optional) — Service identifier within the authenticated organization.
  - pattern `^svc_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
- `sort` (`agenda.appointments.search.sort`; string, optional) — createdAt uses agenda overlap semantics; startsAt selects appointments beginning inside the report window.
  - one of `"createdAt"`, `"startsAt"`; default `"createdAt"`
- `status` (`agenda.appointments.search.status`; any of, optional) — One status, or any of several.
  - any of: `string`, `array<string>`
- `statusChangedBy` (`agenda.appointments.search.statusChangedBy`; string | null, optional) — Principal reference of whoever made the latest status change.
- `to` (`agenda.appointments.search.to`; string, optional) — End of the appointment range; must be paired with from.
  - format `date-time`
- `q` (`agenda.appointments.search.q`; string, optional) — Patient name or document search text; provide this or a complete instant range.
- `query` (`agenda.appointments.search.query`; string, optional, deprecated) — Deprecated: use `q`. Answered until 2027-01-28.

## Example request

```json
{
  "cursor": "string",
  "direction": "forward",
  "limit": 25,
  "bookingChannel": "string",
  "createdBy": "string",
  "createdAfter": "2019-08-24T14:15:22Z",
  "createdBefore": "2019-08-24T14:15:22Z",
  "from": "2019-08-24T14:15:22Z",
  "locationId": "string",
  "order": "desc",
  "payer": "string",
  "priority": "normal",
  "reason": "string",
  "resourceId": "string",
  "resourceIds": [
    "string"
  ],
  "serviceId": "string",
  "sort": "createdAt",
  "status": "tentative",
  "statusChangedBy": "string",
  "to": "2019-08-24T14:15:22Z",
  "q": "string",
  "query": "string"
}
```

## Code samples

### cURL

```bash
curl https://api.getarbol.com/v1/agenda/appointments/search \
  --request POST \
  --header "Authorization: Bearer $ARBOL_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{}'
```

### TypeScript

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

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

const { data } = await arbol.agenda.appointments.search();
```

### Rust

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

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

let data = arbol
    .agenda()
    .appointments()
    .search(&types::AgendaAppointmentsSearchInput::default())
    .await?;
```

### CLI

```bash
arbol agenda appointments search
```

### MCP

```json
{
  "name": "agenda_appointments_search",
  "arguments": {}
}
```

## Responses

### 200

Successful operation.

#### Example

```json
{
  "success": true,
  "data": {
    "data": [
      {
        "bookingChannel": "string",
        "configurationVersionId": "string",
        "contactId": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "createdBy": null,
        "endsAt": "2019-08-24T14:15:22Z",
        "id": "string",
        "intake": null,
        "object": "scheduling.appointment",
        "occupationMinutes": null,
        "offeringId": "string",
        "origin": "native",
        "overbooked": false,
        "patient": null,
        "patientId": null,
        "resourceIds": [
          "string"
        ],
        "schemaVersion": 1,
        "startsAt": "2019-08-24T14:15:22Z",
        "status": "tentative",
        "statusChange": null,
        "timezone": "string",
        "title": "string",
        "updatedAt": "2019-08-24T14:15:22Z",
        "version": 1
      }
    ],
    "object": "list",
    "pageInfo": {
      "hasNextPage": true,
      "hasPreviousPage": true,
      "nextCursor": "string",
      "previousCursor": "string"
    }
  },
  "error": null,
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`agenda.appointments.search.response.200.success`; boolean, required)
- `data` (`agenda.appointments.search.response.200.data`; object, required)
  - `data` (`agenda.appointments.search.response.200.data.data`; array<object>, required) — Items admitted by this resource contract within the verified organization.
    - `bookingChannel` (`agenda.appointments.search.response.200.data.data.bookingChannel`; string | null, required) — Booking source recorded on the appointment; null when no channel was recorded.
    - `configurationVersionId` (`agenda.appointments.search.response.200.data.data.configurationVersionId`; string | null, required) — Immutable operating profile version captured when the appointment was booked; null when none applied.
      - pattern `^spv_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
    - `contactId` (`agenda.appointments.search.response.200.data.data.contactId`; string | null, required) — External contact reference associated with this booking; null when it has no external contact.
      - pattern `^cnt_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
    - `createdAt` (`agenda.appointments.search.response.200.data.data.createdAt`; string, required) — Instant when the scheduling record was first created.
      - format `date-time`
    - `createdBy` (`agenda.appointments.search.response.200.data.data.createdBy`; string | null, required) — Principal reference of whoever booked it; compare with the session's subject.
      - default `null`
    - `endsAt` (`agenda.appointments.search.response.200.data.data.endsAt`; string, required) — Exclusive end of the visible appointment or slot, before allocation buffers are added.
      - format `date-time`
    - `id` (`agenda.appointments.search.response.200.data.data.id`; string, required) — Organization-owned appointment identifier.
      - pattern `^eng_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
    - `intake` (`agenda.appointments.search.response.200.data.data.intake`; any of, required) — Appointment-specific contact, payer, authorization and custom-field values; null when no intake was recorded.
      - default `null`
      - any of: `AgendaAppointmentIntake`, `null`
    - `object` (`agenda.appointments.search.response.200.data.data.object`; string, required) — scheduling.appointment identifies this appointment.
    - `occupationMinutes` (`agenda.appointments.search.response.200.data.data.occupationMinutes`; integer | null, required) — Study length in minutes the desk chose when booking (6, 8 or 12 hours of a sleep study); its agendas stay held that long from the start. Null: the service’s usual length.
      - min 1; default `null`
    - `offeringId` (`agenda.appointments.search.response.200.data.data.offeringId`; string | null, required) — Offering recorded on the appointment; null when the appointment has no linked offering.
      - pattern `^off_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
    - `origin` (`agenda.appointments.search.response.200.data.data.origin`; string, required) — Whether the appointment originated in Scheduling or an imported provider record.
      - one of `"native"`, `"provider"`
    - `overbooked` (`agenda.appointments.search.response.200.data.data.overbooked`; boolean, required) — A sobrecupo: the desk added it at a full time or outside hours; it never takes capacity. A move into a free slot makes it a regular appointment.
      - default `false`
    - `patient` (`agenda.appointments.search.response.200.data.data.patient`; any of, required) — Patient identity copied into the booking; null when no patient identity was supplied.
      - default `null`
      - any of: `AgendaPatientIdentity`, `null`
    - `patientId` (`agenda.appointments.search.response.200.data.data.patientId`; string | null, required) — The patient record this booking created or updated; null without a patient.
      - pattern `^pat_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`; default `null`
    - `resourceIds` (`agenda.appointments.search.response.200.data.data.resourceIds`; array<string>, required) — Agendas assigned to the appointment or slot, including required professionals, rooms and equipment.
      - pattern `^srs_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
    - `schemaVersion` (`agenda.appointments.search.response.200.data.data.schemaVersion`; number, required) — Revision of the public record shape; separate from the record version used for concurrency control.
    - `startsAt` (`agenda.appointments.search.response.200.data.data.startsAt`; string, required) — Visible appointment or slot start instant, including an explicit timezone offset.
      - format `date-time`
    - `status` (`agenda.appointments.search.response.200.data.data.status`; string, required) — Current appointment lifecycle state; cancelled and completed appointments cannot regain capacity through a status change.
      - one of `"tentative"`, `"scheduled"`, `"confirmed"`, `"checked_in"`, `"completed"`, `"cancelled"`, `"no_show"`, `"unknown"`
    - `statusChange` (`agenda.appointments.search.response.200.data.data.statusChange`; any of, required) — The latest status change: when, by whom, and the reason given.
      - default `null`
      - any of: `AgendaAppointmentStatusChange`, `null`
    - `timezone` (`agenda.appointments.search.response.200.data.data.timezone`; string, required) — IANA timezone used to interpret local dates and agenda working hours.
      - minLength 1; maxLength 120
    - `title` (`agenda.appointments.search.response.200.data.data.title`; string | null, required) — Desk-authored appointment title; null permits the service name to supply the display title.
    - `updatedAt` (`agenda.appointments.search.response.200.data.data.updatedAt`; string, required) — Instant of the latest change to this scheduling record.
      - format `date-time`
    - `version` (`agenda.appointments.search.response.200.data.data.version`; integer, required) — Current record revision; pass it unchanged as expectedVersion for a guarded mutation.
  - `object` (`agenda.appointments.search.response.200.data.object`; string, required) — Discriminator for a resource list response.
  - `pageInfo` (`agenda.appointments.search.response.200.data.pageInfo`; object, required) — Opaque navigation cursors for this page’s stable keyset order.
    - `hasNextPage` (`agenda.appointments.search.response.200.data.pageInfo.hasNextPage`; boolean, required) — Whether a later page exists in the current ordering.
    - `hasPreviousPage` (`agenda.appointments.search.response.200.data.pageInfo.hasPreviousPage`; boolean, required) — Whether an earlier page exists in the current ordering.
    - `nextCursor` (`agenda.appointments.search.response.200.data.pageInfo.nextCursor`; string | null, required) — Opaque cursor for the next page, or null when there is none.
    - `previousCursor` (`agenda.appointments.search.response.200.data.pageInfo.previousCursor`; string | null, required) — Opaque cursor for the previous page, or null when there is none.
- `error` (`agenda.appointments.search.response.200.error`; null, required)
- `metadata` (`agenda.appointments.search.response.200.metadata`; object, required)
  - `requestId` (`agenda.appointments.search.response.200.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 400

- `INVALID_INPUT`: The request does not match the published schema.
- `INVALID_APPOINTMENT_INTAKE`: Correct the indicated patient or intake fields before booking.
- `INVALID_PATIENT_FIELDS`: Correct the indicated patient fields before saving.
- `DURATION_CHANGE_OFF`: This service does not allow changing appointment duration.
- `DURATION_NOT_ALLOWED`: Select a duration allowed by this service.
- `STUDY_LENGTH_NOT_OFFERED`: Select one of the study lengths this agenda offers.
- `INVALID_FILE_KIND`: Select a supported attachment kind.
- `INVALID_FILE_NAME`: Provide a valid attachment filename.
- `INVALID_ID_TOKEN`: Provide a valid identity token.
- `INVALID_JSON`: Send a valid JSON document.
- `INVALID_WINDOW`: Provide a positive time window within the supported range.
- `UNEXPECTED_QUERY_PARAMETERS`: Remove query parameters not declared by this operation.
- `INVALID_BODY`: The request body could not be read. Send valid uncompressed JSON.

#### Example

```json
{
  "error": {
    "code": "INVALID_INPUT"
  }
}
```

- `error` (`agenda.appointments.search.response.400.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 401

`UNAUTHORIZED`: A valid access token is required.

#### Example

```json
{
  "error": {
    "code": "UNAUTHORIZED"
  }
}
```

- `error` (`agenda.appointments.search.response.401.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 403

- `FORBIDDEN`: The token does not authorize this operation.
- `ID_TOKEN_MISMATCH`: The identity token does not match the authenticated user.
- `NOT_FILE_UPLOADER`: Only the uploader may delete this attachment.
- `NOT_NOTE_AUTHOR`: Only the author may edit or delete this note.
- `ORIGIN_NOT_ALLOWED`: This request origin is not allowed.

#### Example

```json
{
  "error": {
    "code": "FORBIDDEN"
  }
}
```

- `error` (`agenda.appointments.search.response.403.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 404

`NOT_FOUND`: The requested resource does not exist.

#### Example

```json
{
  "error": {
    "code": "NOT_FOUND"
  }
}
```

- `error` (`agenda.appointments.search.response.404.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 405

`HTTP_METHOD_NOT_ALLOWED`: The HTTP method is not supported for this resource.

#### Example

```json
{
  "error": {
    "code": "HTTP_METHOD_NOT_ALLOWED"
  }
}
```

- `error` (`agenda.appointments.search.response.405.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 409

- `PAYER_STAFF_ONLY`: This payer requires booking by the organization team. Add the patient to the waitlist for review.
- `APPOINTMENT_NOT_REMINDABLE`: Only an open future appointment with a patient email can receive a reminder.
- `APPOINTMENT_WITHOUT_PATIENT`: Link a patient to this appointment before performing this action.
- `ARBOL_CATALOG_TOO_LARGE`: The integration catalog exceeds the supported size. Narrow the catalog before retrying.
- `ARBOL_CONFIGURATION_REQUIRED`: Configure the organization integration before using it.
- `NOTIFICATIONS_NOT_SET_UP`: Patient emails need the notifications module turned on.
- `SAME_OFFERING`: An agenda cannot take its own appointments.
- `SAME_SERVICE`: A service cannot be merged into itself.
- `INVALID_HOLD_PAYLOAD`: The held slot is malformed.
- `HOLD_NOT_ACTIVE`: The hold is no longer active.
- `APPOINTMENT_CLOSED`: A cancelled appointment cannot be edited.
- `APPOINTMENT_VERSION_MISMATCH`: The appointment changed after it was loaded.
- `APPOINTMENT_NOT_MOVABLE`: A closed appointment cannot be moved.
- `SERVICE_CHANGED`: The new slot belongs to another service.
- `SCHEDULE_CHANGED`: The selected time no longer matches the current schedule.
- `INVALID_AVAILABILITY_WINDOW`: Availability windows must be positive and at most 31 days.
- `SERVICE_CAPACITY_EXCEEDED`: This service already has as many appointments as it can run at once at that time.
- `RESOURCE_CAPACITY_EXCEEDED`: The selected time is no longer available.
- `OVERBOOK_OUT_OF_RANGE`: An overbooked appointment must start between yesterday and the booking horizon.
- `OVERBOOK_UNAVAILABLE`: No active agenda can take this appointment.
- `STUDY_OVERBOOKING_NOT_ALLOWED`: This study has an explicit capacity limit and requires an available ordinary slot.
- `INVALID_SLOT_TOKEN`: Request a fresh available slot before booking.
- `BIRTH_DATE_REQUIRED`: This service has an age rule: the patient's date of birth is required.
- `AGE_NOT_ELIGIBLE`: The patient's age on that day is outside this service's age rule.
- `INTAKE_SETTINGS_VERSION_MISMATCH`: Intake settings changed; reload before saving.
- `PAYER_NAME_TAKEN`: Another payer already has that name.
- `PAYER_VERSION_MISMATCH`: The payer changed; reload before saving.
- `LOCATION_VERSION_MISMATCH`: The site changed after it was loaded.
- `PROFILE_VERSION_MISMATCH`: The profile changed after it was loaded.
- `PROVIDER_DISABLED`: Enable the provider integration before using it.
- `BINDING_VERSION_MISMATCH`: Connection changed or is synchronizing; refresh and retry.
- `RESOURCE_VERSION_MISMATCH`: The resource changed after it was loaded.
- `SCHEDULE_RULE_AGENDA_MISMATCH`: The schedule rule belongs to another agenda.
- `SCHEDULE_RULE_EXPECTED_VERSION_REQUIRED`: Expected version is required for an update.
- `SCHEDULE_RULE_VERSION_MISMATCH`: The schedule rule changed after it was loaded.
- `SCHEDULE_RULES_CHANGED`: The schedule changed after it was loaded.
- `SERVICE_VERSION_MISMATCH`: The service changed after it was loaded.
- `OFFERING_VERSION_MISMATCH`: The offering changed after it was loaded.
- `SAME_RESOURCE`: An agenda cannot take its own appointments.
- `TARGET_INACTIVE`: An archived agenda takes no appointments.
- `SLOT_REQUIRED`: A hold or slot token is required.
- `ARBOL_SETTINGS_VERSION_MISMATCH`: Arbol settings changed.
- `NOTIFICATION_SETTINGS_VERSION_MISMATCH`: Notification settings changed; reload before saving.
- `ORGANIZATION_VERSION_MISMATCH`: The organization changed; reload before saving.
- `PATIENT_DOCUMENT_TAKEN`: Another patient has that document.
- `PATIENT_VERSION_MISMATCH`: The patient changed after it was loaded.
- `DAILY_REPORT_TOO_LARGE`: Daily report exceeds the supported size; no partial report was generated.
- `REPORT_SETTINGS_VERSION_MISMATCH`: Report settings changed; reload before saving.
- `REPORT_NOTIFICATIONS_DISABLED`: Enable the notifications module before sending a daily agenda.
- `REPORT_RECIPIENTS_REQUIRED`: No eligible organization owner or additional delivery address is available for this agenda.
- `WAITLIST_ENTRY_VERSION_MISMATCH`: The waitlist entry changed; reload before saving.
- `REMOVAL_JOB_CONFLICT`: A removal is already active, or this idempotency key belongs to another decision.
- `FOLLOWUP_SETTINGS_VERSION_MISMATCH`: Follow-up email settings changed; reload before saving.
- `FOLLOWUP_DISABLED`: Turn this follow-up email on in the notification settings first.
- `FOLLOWUP_CONSENT_REQUIRED`: The patient has not consented to this follow-up email for their current address.
- `PATIENT_EMAIL_REQUIRED`: Record the patient's email before this action.
- `PATIENT_ARCHIVED`: Restore the patient before this action.
- `RECALL_ALREADY_ACTIVE`: The patient already has an active recall for this service.
- `RECALL_MONTH_PASSED`: The recall's month has already passed.
- `RECALL_VISIT_REQUIRED`: Enter the last visit: there is no attended appointment of this service for the patient.
- `RECALL_VISIT_IN_FUTURE`: The last visit must be a past date.
- `RECALL_VERSION_MISMATCH`: The recall changed after it was loaded.
- `SLOT_OFFER_NOT_ALLOWED`: Only an open waiting-list entry of a registered patient can receive a slot offer.
- `SLOT_OFFER_MISMATCH`: The slot belongs to another service or agenda than the entry asks for.
- `SLOT_OFFER_TOO_SOON`: The slot starts too soon to hold it for the patient; offer a later one.
- `SLOT_OFFER_ALREADY_OPEN`: This waiting-list entry already has an open slot offer.
- `SLOT_OFFER_CLOSED`: The slot offer is no longer open.

#### Example

```json
{
  "error": {
    "code": "PAYER_STAFF_ONLY"
  }
}
```

- `error` (`agenda.appointments.search.response.409.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 413

`REQUEST_TOO_LARGE`: The request exceeds the allowed size.

#### Example

```json
{
  "error": {
    "code": "REQUEST_TOO_LARGE"
  }
}
```

- `error` (`agenda.appointments.search.response.413.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 415

- `UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.
- `APPLICATION_JSON_REQUIRED`: Send the request as application/json.
- `FILE_CONTENT_MISMATCH`: The uploaded content does not match its declared file type.
- `UNSUPPORTED_CONTENT_ENCODING`: Send an uncompressed request body.
- `UNSUPPORTED_FILE_TYPE`: Select a supported attachment file type.

#### Example

```json
{
  "error": {
    "code": "UNSUPPORTED_MEDIA_TYPE"
  }
}
```

- `error` (`agenda.appointments.search.response.415.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 426

`UPGRADE_REQUIRED`: Open the live channel with a WebSocket upgrade.

#### Example

```json
{
  "error": {
    "code": "UPGRADE_REQUIRED"
  }
}
```

- `error` (`agenda.appointments.search.response.426.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 429

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

#### Example

```json
{
  "error": {
    "code": "RATE_LIMITED"
  }
}
```

- `error` (`agenda.appointments.search.response.429.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 500

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

#### Example

```json
{
  "error": {
    "code": "INTERNAL_ERROR"
  }
}
```

- `error` (`agenda.appointments.search.response.500.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 502

`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.

#### Example

```json
{
  "error": {
    "code": "OUTCOME_UNKNOWN"
  }
}
```

- `error` (`agenda.appointments.search.response.502.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 503

- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.
- `ARBOL_RESPONSE_TOO_LARGE`: The integration response exceeds the supported size.
- `ARBOL_UNAVAILABLE`: The integration service is temporarily unavailable. Retry later.
- `REMOVAL_WORKFLOW_UNAVAILABLE`: Durable removal is unavailable here; use the bounded manual removal operations.
- `ARBOL_REFUSED`: The integration service rejected this request. Review its configuration.

#### Example

```json
{
  "error": {
    "code": "UPSTREAM_UNAVAILABLE"
  }
}
```

- `error` (`agenda.appointments.search.response.503.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`

### 504

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

#### Example

```json
{
  "error": {
    "code": "UPSTREAM_TIMEOUT"
  }
}
```

- `error` (`agenda.appointments.search.response.504.error`; object, required)
  - any of: `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`


Source: https://docs.getarbol.com/api/agenda/appointments/search/index.md
