# Appointment Templates

> Manage appointment type templates with the Jump EHR API. Define bookable service types with pricing and duration.

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

Appointment templates define the types of appointments your organisation offers — their names, durations, pricing, and configuration. Templates are configuration objects that change rarely.

  <Callout type="warning">
    Templates that have appointments booked against them cannot be modified. Create a new version instead.
  </Callout>
## List appointment templates

`GET /appointment-templates`

API-key scope: `read_appointment_templates`

Returns a paginated list of appointment type configurations.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `status` | query | string | no | One of: `draft`, `active`, `archived`. |
| `status_in` | query | string | no |  |
| `is_active` | query | boolean | no |  |
| `created_at_gte` | query | string (date-time) | no |  |
| `created_at_lte` | query | string (date-time) | no |  |

### Responses

- `200` Paginated list of templates
- `401` Missing or invalid API key
- `500` Unexpected server error

## Create an appointment template

`POST /appointment-templates`

API-key scope: `write_appointment_templates`

Creates a new appointment template. `version` is automatically set to `1` and `status`
to `"draft"` regardless of request body values — these are not user-settable on creation.

### 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 |
| --- | --- | --- | --- |
| `name` | string | yes |  |
| `description` | string | no |  |
| `duration` | integer | no | Duration in minutes (default 30) |
| `buffer_before` | integer | no |  |
| `buffer_after` | integer | no |  |
| `color` | string | no |  |
| `price` | number | no |  |
| `currency` | string | no |  |
| `pricing_type` | string | no | One of: `free`, `stripe`, `xero`. |
| `is_active` | boolean | no |  |
| `available_remote` | boolean | no |  |
| `available_in_person` | boolean | no |  |
| `available_remote_video` | boolean | no |  |
| `available_remote_phone` | boolean | no |  |
| `requires_approval` | boolean | no |  |
| `require_online_payment` | boolean | no |  |

### Responses

- `201` Template created
- `401` Missing or invalid API key
- `409` Idempotency key reused with different request body
- `422` Request body failed validation
- `500` Unexpected server error

## Get an appointment template

`GET /appointment-templates/{id}`

API-key scope: `read_appointment_templates`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Text ID (e.g. apt_type_xxx) |

### Responses

- `200` Template found
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)
- `500` Unexpected server error

## Update an appointment template

`PATCH /appointment-templates/{id}`

API-key scope: `write_appointment_templates`

Partially updates an appointment template. Before applying any update, the API checks
whether this template has any appointments against it. If so, returns `INVALID_STATE_TRANSITION`.

`version` and `status` are excluded from the update whitelist — lifecycle changes will
use dedicated action endpoints.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Text ID (e.g. apt_type_xxx) |

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no |  |
| `description` | string | no |  |
| `duration` | integer | no |  |
| `buffer_before` | integer | no |  |
| `buffer_after` | integer | no |  |
| `color` | string | no |  |
| `price` | number | no |  |
| `currency` | string | no |  |
| `pricing_type` | string | no | One of: `free`, `stripe`, `xero`. |
| `is_active` | boolean | no |  |
| `available_remote` | boolean | no |  |
| `available_in_person` | boolean | no |  |
| `available_remote_video` | boolean | no |  |
| `available_remote_phone` | boolean | no |  |
| `requires_approval` | boolean | no |  |
| `require_online_payment` | boolean | no |  |

### Responses

- `200` Template updated
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)
- `422` Template is in use or validation failed
- `500` Unexpected server error
