# Holds

> Reserve a bookable slot while your patient finishes booking, then book it with the Jump EHR Appointments API.

Source: https://docs.usejump.co.uk/api-reference/holds

A hold reserves one slot from the [Availability API](https://docs.usejump.co.uk/api-reference/availability) for a few minutes, so nobody else can book it while your patient enters their details or pays. When they are done, book it with `POST /holds/{id}/confirm`, or with `POST /appointments` and the hold's `id` as `hold_id`. The two do the same thing.

  Holds are the same reservations Jump's own online booking uses: a held slot disappears from `GET /availability` and from the practice's online booking until the hold is used, released or expires.

  ## The booking flow

  1. `GET /availability` to list slots.
  2. `POST /holds` naming the slot, either as `appointment_type_id`, `clinician_id`, `date` and `start_time` (`HH:MM`, the slot's local time), or by echoing the slot's `appointment_template_id`, `clinician_profile_id` and `start_time` **exactly as availability returned them**.
  3. Create or update the patient with `POST /patients` or `PATCH /patients/{id}`. To record their NHS GP, send a `gp_registration` block, naming the practice by `gp_practice_ods_code` (see [Patients](https://docs.usejump.co.uk/api-reference/patients)).
  4. `POST /holds/{id}/confirm` with `patient_id` (or `POST /appointments` with `hold_id` and `patient_id`). The time, clinician, template and location come from the hold.

  If the patient abandons the flow, `DELETE /holds/{id}` frees the slot straight away.

  <Callout type="info">
    Holds last **15 minutes** by default. Set `hold_minutes` between 5 and 35 when you need longer (for example while a payment page is open). A hold cannot be extended; if it lapses, hold the slot again.
  </Callout>

  ## Errors to handle

  | Code                                     | Status | Meaning                                                           | What to do                                                              |
  | ---------------------------------------- | ------ | ----------------------------------------------------------------- | ----------------------------------------------------------------------- |
  | `SLOT_UNAVAILABLE`                       | 409    | The slot was booked or held by someone else, or the diary changed | Query `GET /availability` again and offer another slot                  |
  | `HOLD_EXPIRED`                           | 410    | The hold ran out before booking                                   | Hold the slot again (it may have gone)                                  |
  | `HOLD_RELEASED`                          | 410    | The hold was released                                             | Hold the slot again                                                     |
  | `HOLD_ALREADY_USED`                      | 409    | The hold already became an appointment                            | Look up the appointment; do not book twice                              |
  | `VALIDATION_ERROR` (`TIMEZONE_REQUIRED`) | 422    | `start_time` had no `Z` and no UTC offset                         | Send the slot's `start_time` exactly as `GET /availability` returned it |

  `GET /holds/{id}` returns expired and released holds with that `status` rather than a 404, and `DELETE /holds/{id}` on a hold that is already inactive succeeds without changing it.

  Holds use the `write_appointments` scope to create and release, and `read_appointments` to read.
## Hold a slot

`POST /holds`

API-key scope: `write_appointments`

Reserves a slot returned by `GET /availability` so nobody else can take it
while your patient finishes your flow (details, payment). Book it with
`POST /holds/{id}/confirm`, or `POST /appointments` with `hold_id`.

- Name the slot either way:
  - `appointment_type_id`, `clinician_id`, `date` (YYYY-MM-DD) and
    `start_time` (HH:MM, the slot's local time), or
  - `appointment_template_id`, `clinician_profile_id` and `start_time`
    **exactly as `GET /availability` returned it**.
- The slot must still be on offer; if it has been booked or held since,
  the response is `409 SLOT_UNAVAILABLE`.
- A held slot is withdrawn from `GET /availability` (and from Jump's own
  online booking) until the hold is used, released or expires.
- Holds last `hold_minutes` (default **15**, 5-35) and then expire on their
  own. There is no renewal; hold again if one lapses.
- `patient_id` is optional here. If you send it, the patient's eligibility
  for member-only appointment types is checked now; otherwise it is checked
  when you book.
- The returned `start_time` / `end_time` are UTC instants: the time the
  appointment will be booked at.

Requires the `write_appointments` scope. Supports `Idempotency-Key`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string (uuid) | no | Optional UUID for request deduplication. Same key + same body returns the cached response. Same key + different body returns 409 CONFLICT. Keys are scoped to your organisation and endpoint, and expire after 24 hours. |

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `appointment_type_id` | string | no | The appointment template. Same as `appointment_template_id`. |
| `appointment_template_id` | string | no | The appointment template. Same as `appointment_type_id`. |
| `clinician_id` | string (uuid) | no | The clinician profile. Same as `clinician_profile_id`. |
| `clinician_profile_id` | string (uuid) | no | The clinician profile. Same as `clinician_id`. |
| `date` | string (date) | no | The slot's date. When sent, `start_time` is the slot's local time as HH:MM. |
| `start_time` | string | yes | With `date`: the slot's local start time, `HH:MM`. Without `date`: the slot's start as an instant with a UTC offset or `Z`, e.g. exactly as `GET /availability` returned it (`2026-10-05T09:00:00+01:00`, or the same instant as `2026-10-05T08:00:00Z`). Since 2026-10-10 it is read as an instant; before, only its date and clock digits were read, so a `Z` value held the slot an hour early in summer. A value with no offset is `422 TIMEZONE_REQUIRED`. |
| `location_id` | string (uuid) | no | Narrows the match when the clinician works at more than one location. |
| `is_remote` | boolean | no | Hold the remote (true) or in-person (false) slot. Omit to accept whichever /availability offered. |
| `remote_channel` | string | no | One of: `video`, `phone`. |
| `patient_id` | string (uuid) | no | Optional. When sent, the hold is tied to this patient (booking it for anyone else is refused) and member-only eligibility is checked now. |
| `hold_minutes` | integer | no | How long the hold lasts before it expires on its own. |

### Responses

- `201` Slot held
- `401` Missing or invalid API key
- `409` The slot is no longer available to hold (booked, held by someone else, or blocked)
- `422` Request body failed validation
- `500` Unexpected server error

## Get a hold

`GET /holds/{id}`

API-key scope: `read_appointments`

Returns a hold created through the API, with its current `status`:
`active`, `expired`, `released`, or `confirmed` (then `appointment_id`
names the appointment it became). An expired or released hold is still
returned (with that status) rather than a 404. Requires
`read_appointments`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |

### Responses

- `200` Hold found
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)

## Release a hold

`DELETE /holds/{id}`

API-key scope: `write_appointments`

Releases the slot straight away instead of waiting for the hold to
expire. Idempotent: an already released or expired hold is returned
unchanged. A hold already used to book an appointment returns
`409 HOLD_ALREADY_USED`; cancel the appointment instead. Requires
`write_appointments`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |

### Responses

- `200` Hold released (or already inactive)
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)
- `409` The hold has already been converted into an appointment

## Confirm a hold

`POST /holds/{id}/confirm`

API-key scope: `write_appointments`

Books the held slot and returns the appointment. The time, clinician,
appointment template and location come from the hold. This is the same
operation as `POST /appointments` with `hold_id`, with the same checks
and error codes.

- `patient_id` is required. If the hold was taken for a patient, it
  must be the same one.
- `notes` is stored as the appointment's `description`.
- `attendee_phone` is accepted but not stored; record the phone number
  on the patient instead.
- An expired hold returns `410 HOLD_EXPIRED`, a released one
  `410 HOLD_RELEASED`, one already used `409 HOLD_ALREADY_USED`, and a
  hold whose slot a diary booking has since taken `409 SLOT_UNAVAILABLE`.

Requires `write_appointments`. Supports `Idempotency-Key`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string (uuid) | no | Optional UUID for request deduplication. Same key + same body returns the cached response. Same key + different body returns 409 CONFLICT. Keys are scoped to your organisation and endpoint, and expire after 24 hours. |

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `patient_id` | string (uuid) | yes |  |
| `attendee_name` | string | no |  |
| `attendee_email` | string (email) | no |  |
| `attendee_phone` | string | no | Accepted for compatibility but not stored. Put the phone number on the patient. |
| `notes` | string | no | Stored as the appointment's description. |
| `title` | string | no | Defaults to the appointment template's name. |
| `status` | string | no | Defaults to confirmed. One of: `pending_approval`, `confirmed`, `pending`, `scheduled`. |
| `notify_patient` | boolean | no | Message the patient about this booking, as an in-app booking does: the booking confirmation, plus the appointment type's reminders and follow-ups. Defaults to true. Send false to send nothing at all. Applies to a `confirmed` or `scheduled` booking with a patient and an appointment type. |
| `send_confirmation` | boolean | no | Send the immediate booking confirmation. Defaults to true. Send false if your own system already confirms the booking: reminders and follow-ups are still queued. Has no effect when `notify_patient` is false. |

### Responses

- `200` Appointment created from the hold
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)
- `409` The hold was already used (`HOLD_ALREADY_USED`) or its slot has been taken (`SLOT_UNAVAILABLE`)
- `410` The hold expired (`HOLD_EXPIRED`) or was released (`HOLD_RELEASED`)
- `422` Request body failed validation
- `500` Unexpected server error
