---
title: "Appointment data model"
url: "https://docs.unified.to/healthcare/appointment/model"
description: "The Appointment data model object in Unified's Appointment API: 16 fields, including created_at, updated_at and patient_id, with types and enum values."
---
# Appointment data model

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/healthcare/integrations.md) page. 

| Field                      | Type                                                                                                 | Required | Description                                                                                                                                          |
| -------------------------- | ---------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                         | string                                                                                               | No       | Unique identifier for the appointment                                                                                                                |
| created\_at                | string (date-time)                                                                                   | No       | When the appointment was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                            |
| updated\_at                | string (date-time)                                                                                   | No       | When the appointment was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                       |
| patient\_id                | string                                                                                               | No       | The patient attending the appointment                                                                                                                |
| practitioner\_ids          | string\[\]                                                                                           | No       | The practitioners participating in the appointment                                                                                                   |
| location\_id               | string                                                                                               | No       | Where the appointment takes place                                                                                                                    |
| slot\_ids                  | string\[\]                                                                                           | No       | The schedule slots this appointment occupies                                                                                                         |
| status                     | enum                                                                                                 | No       | Status of the appointment Values: PROPOSED, PENDING, BOOKED, ARRIVED, CHECKED\_IN, FULFILLED, CANCELLED, NOSHOW, WAITLIST, ENTERED\_IN\_ERROR, OTHER |
| start\_at                  | string (date-time)                                                                                   | No       | When the appointment starts (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                 |
| end\_at                    | string (date-time)                                                                                   | No       | When the appointment ends (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                   |
| description                | string                                                                                               | No       | Short description shown on the appointment                                                                                                           |
| service\_types             | [HealthcareCode](https://docs.unified.to/healthcare/appointment/model.md#HealthcareCode)\[\]         | No       | Codings for the service/visit type being booked                                                                                                      |
| service\_types\[\].system  | string                                                                                               | No       | The code system URI (e.g. http://loinc.org, http://snomed.info/sct)                                                                                  |
| service\_types\[\].code    | string                                                                                               | No       | The code within the system                                                                                                                           |
| service\_types\[\].display | string                                                                                               | No       | Human-readable display text for the code                                                                                                             |
| reasons                    | [HealthcareCode](https://docs.unified.to/healthcare/appointment/model.md#HealthcareCode)\[\]         | No       | Codings for the reason for the visit                                                                                                                 |
| reasons\[\].system         | string                                                                                               | No       | The code system URI (e.g. http://loinc.org, http://snomed.info/sct)                                                                                  |
| reasons\[\].code           | string                                                                                               | No       | The code within the system                                                                                                                           |
| reasons\[\].display        | string                                                                                               | No       | Human-readable display text for the code                                                                                                             |
| cancellation\_reason       | string                                                                                               | No       | Why the appointment was cancelled                                                                                                                    |
| notes                      | string                                                                                               | No       | Free-text notes or comments                                                                                                                          |
| metadata                   | [HealthcareMetadata](https://docs.unified.to/healthcare/appointment/model.md#HealthcareMetadata)\[\] | No       |                                                                                                                                                      |
| metadata\[\].id            | string                                                                                               | No       |                                                                                                                                                      |
| metadata\[\].value         | object                                                                                               | No       |                                                                                                                                                      |
| metadata\[\].namespace     | string                                                                                               | No       |                                                                                                                                                      |
| metadata\[\].format        | enum                                                                                                 | No       | Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT                                                                                                   |
| metadata\[\].extra\_data   | object                                                                                               | No       |                                                                                                                                                      |
| metadata\[\].slug          | string                                                                                               | No       |                                                                                                                                                      |

## TypeScript

```typescript
export type HealthcareAppointment = {
	id?: string; // Unique identifier for the appointment
	created_at?: string-time; // When the appointment was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the appointment was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	patient_id?: string; // The patient attending the appointment
	practitioner_ids?: string[]; // The practitioners participating in the appointment
	location_id?: string; // Where the appointment takes place
	slot_ids?: string[]; // The schedule slots this appointment occupies
	status?: 'PROPOSED' | 'PENDING' | 'BOOKED' | 'ARRIVED' | 'CHECKED_IN' | 'FULFILLED' | 'CANCELLED' | 'NOSHOW' | 'WAITLIST' | 'ENTERED_IN_ERROR' | 'OTHER'; // Status of the appointment
	start_at?: string-time; // When the appointment starts (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at?: string-time; // When the appointment ends (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	description?: string; // Short description shown on the appointment
	service_types?: []; // Codings for the service/visit type being booked
	reasons?: []; // Codings for the reason for the visit
	cancellation_reason?: string; // Why the appointment was cancelled
	notes?: string; // Free-text notes or comments
	metadata?: [];
	raw?: any; // Raw data from integration
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodHealthcareAppointment = z.object({
	id: z.string().optional().describe("Unique identifier for the appointment"),
	created_at: z.string-time().optional().describe("When the appointment was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the appointment was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	patient_id: z.string().optional().describe("The patient attending the appointment"),
	practitioner_ids: z.array().optional().describe("The practitioners participating in the appointment"),
	location_id: z.string().optional().describe("Where the appointment takes place"),
	slot_ids: z.array().optional().describe("The schedule slots this appointment occupies"),
	status: z.enum("PROPOSED", "PENDING", "BOOKED", "ARRIVED", "CHECKED_IN", "FULFILLED", "CANCELLED", "NOSHOW", "WAITLIST", "ENTERED_IN_ERROR", "OTHER").optional().describe("Status of the appointment"),
	start_at: z.string-time().optional().describe("When the appointment starts (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().optional().describe("When the appointment ends (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	description: z.string().optional().describe("Short description shown on the appointment"),
	service_types: z.array().optional().describe("Codings for the service/visit type being booked"),
	reasons: z.array().optional().describe("Codings for the reason for the visit"),
	cancellation_reason: z.string().optional().describe("Why the appointment was cancelled"),
	notes: z.string().optional().describe("Free-text notes or comments"),
	metadata: z.array().optional(),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class HealthcareAppointmentStatus(str, Enum):
	PROPOSED = 'PROPOSED'
	PENDING = 'PENDING'
	BOOKED = 'BOOKED'
	ARRIVED = 'ARRIVED'
	CHECKED_IN = 'CHECKED_IN'
	FULFILLED = 'FULFILLED'
	CANCELLED = 'CANCELLED'
	NOSHOW = 'NOSHOW'
	WAITLIST = 'WAITLIST'
	ENTERED_IN_ERROR = 'ENTERED_IN_ERROR'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareAppointment:
	"""Unique identifier for the appointment"""
	id: Optional[str]
	"""When the appointment was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the appointment was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The patient attending the appointment"""
	patient_id: Optional[str]
	"""The practitioners participating in the appointment"""
	practitioner_ids: Optional[List[List[str]]]
	"""Where the appointment takes place"""
	location_id: Optional[str]
	"""The schedule slots this appointment occupies"""
	slot_ids: Optional[List[List[str]]]
	"""Status of the appointment"""
	status: Optional[HealthcareAppointmentStatus]
	"""When the appointment starts (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""When the appointment ends (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: Optional[str]
	"""Short description shown on the appointment"""
	description: Optional[str]
	"""Codings for the service/visit type being booked"""
	service_types: Optional[PropertyHealthcareAppointmentService_types]
	"""Codings for the reason for the visit"""
	reasons: Optional[PropertyHealthcareAppointmentReasons]
	"""Why the appointment was cancelled"""
	cancellation_reason: Optional[str]
	"""Free-text notes or comments"""
	notes: Optional[str]
	metadata: Optional[PropertyHealthcareAppointmentMetadata]

```
