Services and Specialists
Create and change the services you sell and the people who perform them
Seven tools let an agent manage the services and specialists that bookings use. They change the same Library your team edits in the app, with the same rules.
Every tool takes an optional orgId. Leave it out unless your key acts on other organisations. An id outside the target organisation behaves exactly like a missing one.
Services and Specialists - 7
| Tool | Scope | Does |
|---|---|---|
create_service | SERVICES_WRITE | Create a bookable service. |
update_service | SERVICES_WRITE | Change a service. |
delete_service | SERVICES_WRITE | Delete a service. |
set_service_specialists | SERVICES_WRITE | Replace who performs a service. |
create_specialist | SERVICES_WRITE | Create a specialist. |
update_specialist | SERVICES_WRITE | Change a specialist. |
delete_specialist | SERVICES_WRITE | Delete a specialist. |
To read services and specialists, use list_services and list_specialists with SERVICES_READ. See Bookings. SERVICES_READ does not let a key write.
Services
create_service needs name and durationMinutes. It returns the service, and its id is the serviceRef that list_services and find_slots use. update_service takes serviceId and the fields to change.
| Field | Type | Limit |
|---|---|---|
name | string | 1 to 80 characters |
description | string | Up to 1000 characters |
durationMinutes | number | 5 to 480 |
bufferMinutes | number | 0 to 240 |
minNoticeMinutes | number | 0 to 43200 |
price | number | Minor units (cents), 0 to 1000000000 |
currency | string | ISO 4217 code in capitals, such as EUR |
availability | object | { tz, schedule: [{ days, start, end }] }. days are 0 (Sunday) to 6 (Saturday), times are HH:MM. Replaces the whole schedule. |
blackouts | array | { startDate, endDate, reason? } as YYYY-MM-DD, end inclusive. Replaces the whole list. |
specialistIds | string[] | Who performs it. [] means nobody in particular: the shared business agenda. |
parallel | boolean | Whether bookings can overlap. |
capacity | number | 1 to 500 people per start. |
maxSeatsPerBooking | number | 1 to 50. |
active | boolean | Whether the service is offered. |
bookable | boolean | Whether it can be booked. |
On update_service, a field you leave out stays as it is. Send null to clear description, price, currency or availability.
set_service_specialists takes serviceId and specialistIds and replaces the list exactly.
Specialists
create_specialist needs name. It returns the specialist, and its id is the specialistId of find_slots and create_booking. update_specialist takes specialistId and the fields to change.
| Field | Type | Limit |
|---|---|---|
name | string | 1 to 80 characters |
title | string | Up to 80 characters |
description | string | Up to 1000 characters |
color | string | #RRGGBB |
availability | object | As on services. |
blackouts | array | As on services. |
active | boolean | Whether the person is offered. |
Linking calendars to a specialist is done in the app by owners and admins, not through these tools. See Services and specialists.
On update_specialist, a field you leave out stays as it is. Send null to clear title, description, color or availability.
Deleting
delete_service and delete_specialist delete softly: past bookings keep their reference.
A delete is refused while the service or specialist has upcoming confirmed or pending bookings. Repeat the call with force: true to delete anyway. The bookings stay in place and are not cancelled.
The result is { deleted: true, upcomingBookingsLeft }. delete_specialist also returns servicesLeftWithoutSpecialist, the services that lost their last performer. Those book on the shared business agenda.
Related
- Bookings - find slots and book, move and cancel.
- Services and specialists in the app - the same Library, in the dashboard.