Skip to main content
POST
/
appointments
/
{appointment}
cURL
curl --request POST \
  --url https://api.caspen.com/v1/appointments/{appointment} \
  --header 'Content-Type: application/json' \
  --data '
{
  "location_id": 123,
  "practitioner_id": 123,
  "service_id": 123,
  "client_id": 123,
  "client_package_id": 123,
  "case_id": 123,
  "starts_at": "2023-11-07T05:31:56Z",
  "ends_at": "2023-11-07T05:31:56Z",
  "note": "<string>",
  "confirmed": true,
  "room_id": 123,
  "vehicle_id": 123,
  "resource_ids": [
    123
  ]
}
'
{
  "id": "<string>",
  "location_id": "<string>",
  "practitioner_id": "<string>",
  "service_id": "<string>",
  "client_id": "<string>",
  "client_package_id": "<string>",
  "case_id": "<string>",
  "starts_at": "<string>",
  "ends_at": "<string>",
  "duration": 123,
  "status": "<string>",
  "confirmed": true,
  "confirmed_at": "<string>",
  "room_id": "<string>",
  "vehicle_id": "<string>",
  "resource_ids": [
    "<string>"
  ],
  "note": "<string>",
  "cancellation_reason_id": "<string>",
  "cancellation_note": "<string>",
  "cancelled_at": "<string>",
  "created_at": "<string>"
}

Path Parameters

appointment
string
required

The appointment ID

Body

application/json
location_id
integer
practitioner_id
integer
service_id
integer
client_id
integer
client_package_id
integer | null
case_id
integer | null
starts_at
string<date-time>
ends_at
string<date-time>
note
string | null
Maximum string length: 255
confirmed
boolean
room_id
integer | null
vehicle_id
integer | null
resource_ids
integer[]

Response

AppointmentResource

id
string

The appointment's unique identifier.

Example:

"app_01HQFQ9QWTNNPY58FZ8CB3FWWK"

location_id
string

The location identifier where the appointment takes place.

Example:

"loc_01HQFQ9QWTNNPY58FZ8CB3FWWK"

practitioner_id
string

The practitioner identifier who provides the service.

Example:

"pra_01HQFQ9QWTNNPY58FZ8CB3FWWK"

service_id
string

The service identifier being provided.

Example:

"ser_01HQFQ9QWTNNPY58FZ8CB3FWWK"

client_id
string

The client identifier who has the appointment.

Example:

"cli_01HQFQ9QWTNNPY58FZ8CB3FWWK"

client_package_id
string | null

The client package identifier if this appointment uses a package.

Example:

"cpk_01HQFQ9QWTNNPY58FZ8CB3FWWK"

case_id
string | null

The case identifier if this appointment is part of a case.

Example:

"cas_01HQFQ9QWTNNPY58FZ8CB3FWWK"

starts_at
string

The appointment start time (ISO 8601).

Example:

"2024-01-01T10:00:00Z"

ends_at
string

The appointment end time (ISO 8601).

Example:

"2024-01-01T11:00:00Z"

duration
integer

The appointment duration in minutes.

Example:

60

status
string

The appointment status.

Example:

"pending"

confirmed
boolean | null

Whether the appointment is confirmed.

Example:

true

confirmed_at
string | null

When the appointment was confirmed (ISO 8601).

Example:

"2024-01-01T09:30:00Z"

room_id
string | null

The room identifier where the appointment takes place.

Example:

"rom_01HQFQ9QWTNNPY58FZ8CB3FWWK"

vehicle_id
string | null

The vehicle identifier if transportation is involved.

Example:

"veh_01HQFQ9QWTNNPY58FZ8CB3FWWK"

resource_ids
string[]

The IDs of resources required for this appointment.

Example:
[
"res_01HYHYQHA682J0K1RW7B2HVA9F",
"res_01HYHYW37MTYJPMT5JV4RN99GK"
]
note
string | null

The appointment note.

Example:

"Client requested morning appointment."

cancellation_reason_id
string | null

The cancellation reason identifier if cancelled.

Example:

"cnr_01HQFQ9QWTNNPY58FZ8CB3FWWK"

cancellation_note
string | null

The cancellation note if cancelled.

Example:

"Client had to travel unexpectedly."

cancelled_at
string | null

When the appointment was cancelled (ISO 8601).

Example:

"2024-01-01T08:00:00Z"

created_at
string

The timestamp when the appointment was created (ISO 8601).

Example:

"2024-01-01T12:00:00Z"