---
title: "Edit appointment type (beta)"
method: PATCH
path: "/appointment_types/{id}"
tags: ["Appointment Types"]
---

# Edit appointment type (beta)

`PATCH /appointment_types/{id}`

## Request

- Base URL: `https://nexhealth.info`
- URL: `https://nexhealth.info/appointment_types/{id}`
- Auth: API key in header `Authorization`

> 🚧 Beta
>
> Send `Nex-Api-Version: v3.1.0` to use this endpoint. It is still changing, and access is limited to approved partner institutions. Contact NexHealth before you build on it.

> **Changed from v3.0.0:** Adds request fields `appointment_type.display_name`, `appointment_type.ehr_appt_descriptor_ids`; removes request field `appointment_type.emr_appt_descriptor_ids`; adds response `422`; adds response fields `data.active`, `data.data_source_id`, `data.display_name`, `data.foreign_id` (+2 more).

This endpoint updates an existing appointment type's attributes such as `name`, `minutes`, and `bookable_online`. On an appointment type synced from the EHR only `display_name` and `bookable_online` can change; any other field returns 422.

## Path parameters

- `id` integer, required

## Query parameters

- `subdomain` string, required

## Headers

- `Nex-Api-Version` string, required

## Request body

- PatchAppointmentTypesId: Edit appointment type
  - `location_id` integer: ID of the associated location, required when appointment types are location specific
  - `appointment_type` object, required
    - `name` string: Appointment type name. Unique string identifier
    - `display_name` string: Patient-facing name shown instead of `name` when present
    - `minutes` integer: The length of time this appointment type takes up, increments of 5 minutes recommended
    - `parent_type` 'Institution' | 'Location': Whether the appointment type belongs to the whole Institution or to one Location. Set by NexHealth on create; on update it moves the appointment type
    - `parent_id` integer: ID of the location the appointment type belongs to. Ignored on create; on update, the location when parent_type is Location
    - `bookable_online` boolean: Set to True if this appointment type should be bookable via the NexHealth online booking page
    - `ehr_appt_descriptor_ids` integer[]: Array of EHR appointment descriptor IDs

## Response `200`

Successful

- APIV31EntitiesAppointmentTypeBasicResponse: API_V31_Entities_AppointmentTypeBasic_Response model
  - `code` boolean: Indicates the success or failure of the request
  - `description` string: Additional context on the request to help with debugging.
  - `error` string[]: Any errors that occur during the execution of the request.
  - `data` APIV31EntitiesAppointmentTypeBasic
    - `id` integer: Appointment type ID
    - `name` string: Appointment type name. Unique string identifier
    - `parent_type` string: Parent type for appointment type. Defines the belongs to relationship with either Institution or Location
    - `parent_id` integer: Identifies the specific resource the appointment type belongs to (see parent_type)
    - `minutes` integer: Default duration of appointments of this appointment type
    - `bookable_online` boolean: True if this appointment type should be bookable via the NexHealth online booking page
    - `display_name` string, nullable: Patient-facing name shown instead of `name` when present
    - `source` 'manual' | 'synced': Where the appointment type is managed: `manual` in NexHealth, `synced` in the EHR
    - `active` boolean: False when the EHR has deactivated a synced appointment type
    - `foreign_id` string, nullable: Identifier NexHealth uses to uniquely match this record to its counterpart in the integrated EHR. How it is derived differs between EHRs and may change; treat it as an opaque string and do not parse it.
    - `data_source_id` integer, nullable: The NexHealth ID of the data source a synced appointment type came from, null for manual appointment types
    - `working_hour_ids` integer[]: The NexHealth IDs of the active working hours whose EHR restrictions allow this appointment type, limited to `location_id` when given; on the list endpoint only present with `include[]=working_hour_ids`
  - `count` integer: Number of total objects, in case of collection.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta.md) - [All operations](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta/revisions/93cb4af790a5?raw)
