# Reserve Appointment This endpoint is used to reserve a spot in the appointment book before applying an appointment_type_id, etc. After this you then call Finalise Appointment to apply the rest of the fields. The exception is when you pass rule_out: true. Then you don't need to call finalise Endpoint: POST /reserve_appointment Version: v1 Security: x-api-key, A-api-key ## Request fields (application/json): - `app_time` (string, required) Required. ISO datetime in the tenant's timezone. Format: yyyy-MM-dd'T'HH:mm:ss Example: "2025-01-01T12:00:00" - `practitioner_business_id` (integer, required) - `duration` (integer, required) Must be between 5 and 1440 and divisible by 5. - `column` (integer) - `width` (integer) ## Response 201 fields (application/json): - `appointment_id` (integer, required) - `app_time` (string, required) Example: "2025-01-01T12:00:00" - `practitioner_id` (integer, required) - `business_id` (integer, required) - `practitioner_business_id` (integer) - `duration` (integer, required) Must be between 5 and 1440 and divisible by 5. - `column` (integer) - `width` (integer) - `category` (integer) Reserved = 0, Patient = 1, Note = 2, Group = 3, Ruleout = 4 Enum: 0, 1, 2, 3, 4 ## Response 401 fields (application/json): - `error` (object, required) - `error.status` (integer, required) Example: 403 - `error.code` (string, required) Example: "UNAUTHORIZED" - `error.title` (string, required) Example: "Unauthorised" - `error.detail` (string) Human readable explanation of the error Example: "Access could not be verified for this request." - `request_id` (string, required) Example: "00000000-0000-0000-0000-000000000000" ## Response 403 fields (application/json): - `error` (object, required) - `error.status` (integer, required) Example: 403 - `error.code` (string, required) Example: "MISSING_AUTHENTICATION_TOKEN" - `error.title` (string, required) Example: "Unauthorised" - `error.detail` (string) Human readable explanation of the error Example: "Authentication token is missing or the requested endpoint does not exist" - `request_id` (string, required) Example: "00000000-0000-0000-0000-000000000000" ## Response 409 fields (application/json): - `error` (object, required) - `error.status` (integer, required) Example: 409 - `error.code` (string, required) Example: "RESERVE_APPOINTMENT_CONFLICT" - `error.title` (string, required) Example: "Unable to reserve the appointment" - `error.detail` (string, required) Human readable explanation of the error Example: "This appointment slot is taken." - `request_id` (string, required) Example: "00000000-0000-0000-0000-000000000000" ## Response 422 fields (application/json): - `error` (object, required) - `error.status` (integer, required) Example: 422 - `error.code` (string, required) Example: "INVALID_BODY" - `error.title` (string, required) Example: "Invalid Body" - `error.detail` (string, required) Human readable explanation of the error Example: "There are some issues with the request body." - `error.validation` (array, required) List of validation errors for specific fields - `error.validation.field` (string, required) Example: "surname" - `error.validation.message` (string, required) Example: "The surname field is required." - `request_id` (string, required) Example: "00000000-0000-0000-0000-000000000000" ## Response 500 fields (application/json): - `error` (object, required) - `error.status` (integer, required) Example: 500 - `error.code` (string, required) Example: "SERVER_ERROR" - `error.title` (string, required) Example: "Server Error" - `error.detail` (string) Human readable explanation of the error Example: "An unexpected error occurred while processing your request. Please try again in a few minutes. If it keeps happening, contact support with Request ID: 00000000-0000-0000-0000-000000000000." - `request_id` (string, required) Example: "00000000-0000-0000-0000-000000000000"