Book an appointment with multiple services
Use Case Description
The “Service combinations” feature needs to be enabled for the possibility of booking an appointment with several services inside via API. (Accounts & Systems - System Settings - Service combinations toggle). Otherwise, the system will not accept appointments with more than one service selected.
Service combinations need to be configured before using the endpoints, otherwise endpoints will return an error. Please follow the User Guide for the details.
To book an appointment with multiple services the API client needs to perform multiple interactions with the API. Most of the interactions are similar to “Book an appointment“, but /external/v1/serviceCombination/
API calls should be used. In general, the flow consists of the following steps:
Retrieve the list of combinable, uncombinable, and combined services for each branch.
Please, note! Service combinations are configured on the branch level so there is no possibility of retrieving the list of combinations without specifying the Branch ID.
Retrieve the list of available service combinations (combinable, uncombinable, combined) for the specific branch ID
Get time slots for the combined services and branch ID
Reserve a time slot for the appointment with more than 1 service included
Confirm a booking with multiple services
API endpoints
Get Service Combinations
GET /external/v1/serviceCombination/branch
Allows to retrieve the list of combinable, uncombinable services and combined services grouped by service type for each branch.
Combinable services - the services that can theoretically be combined but were not configured so an attempt to book an appointment with these services will return an error. Configurations should be changed to enable making appointments with these services combined.
Uncombinable services - the services that cannot be combined within one single appointment.
Combined Services - the services are configured as combined so can be selected and booked in one single appointment.
Attributes
Name | Type | Required | Description |
---|---|---|---|
X-TENANT-ID | string | yes | The tenant id to use for this operation. The tenant id must be the same as an existing system Id. |
Response schema
[
{
"branchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"serviceCombinations": [
{
"resourceTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"combinableServices": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"unCombinableServices": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"combinedServices": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}
]
}
]
Get Service combinations for Branch ID
Allows to retrieve the list of combinable, uncombinable and combined services for the specific Branch.
Listing
GET /external/v1/serviceCombination/branch/{branchId}
Response schema
Note! It is impossible to get the list of combinable services without the Branch ID specified since combinations can differ depending on the branch.
Attributes
Name | Type | Required | Description |
---|---|---|---|
Branch ID | string | yes | The Branch id (GUID), ex. |
X-TENANT-ID | string | yes | The tenant id to use for this operation. The tenant id must be the same as an existing system Id. |
Listing
GET /external/v1/serviceCombination/branch/{branchId}
Response schema
[
{
"resourceTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
],
"combinedServices": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}
]
where
"combinedServices"
the service IDs that are marked as “combinable“ in Configurations, so can be combined within one appointment.
Get Timeslots for several services selected
GET /external/v1/serviceCombination/branch/{serviceId}/timeslots
Allows retrieving the timeslots for service combinations (combined services) according to service combination configurations in the case when the feature is enabled.
Attributes
Name | Type | Required | Description |
---|---|---|---|
Service IDs | strings | yes | The service ID to get the list of timeslots. Several “combined” service IDs can be specified |
Branch ID | string | yes | The Branch id, ex. |
requestedResourceID | string | no | The resource ID for the services selected |
numberofReservations | integer | no | The total number of reservations (people, times) for all services selected (for instance, if the number for service 1 is 1 but for service 2 is specified as 2 then the value that should be specified is 3) The default value is 1. |
X-TENANT-ID | string | yes | The tenant id to use for this operation. The tenant id must be the same as an existing system Id. |
Listing
GET /external/v1/serviceCombination/branch/{serviceId}/timeslots
Response schema
{
"serviceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"branchId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timeSlots": [
{
"startTime": "2022-03-03T09:00:00+01:00",
"endTime": "2022-03-03T09:00:00+01:00"
}
]
}
Create a new Reservation with multiple services
POST /external/v1/serviceCombination/reservations
Allows to create a new reservation with several combined services in one appointment.
Attributes
Name | Type | Required | Description |
---|---|---|---|
Accept - Language | string | yes | Requested language for service names. The system will support languages depending on Tenant Localization settings (possible values are: en_US, en_UK, fr_FR, nl_NL, de_DE, it_IT, ES_es ) |
X-TENANT-ID | string | yes | The tenant id to use for this operation. The tenant id must be the same as an existing system Id. |
Request Body
Several service IDs can be passed, but the services should be “combined“. “Requested resource“ parameter is optional.
“nrOfReservations” number of people/services selected for the appointment. Should be specified for each service included in the appointment. The value should be valid for the service specified according to configurations.
Listing
POST /external/v1/serviceCombination/reservations
Response
Confirm an Appointment with multiple services
PUT /external/v1/serviceCombination/reservations/{reservationId}
Allows to confirm a reservation created with several combined services.
Attributes
Name | Type | Required | Description |
---|---|---|---|
Accept - Language | string | yes | Requested language for service names. The system will support languages depending on Tenant Localization settings (possible values are: en_US, en_UK, fr_FR, nl_NL, de_DE, it_IT, ES_es ) |
X-TENANT-ID | string | yes | The tenant id to use for this operation. The tenant id must be the same as an existing system Id. |
reservationID | string | yes | Reservation ID to be confirmed by customer’s data |
Request Body
where
“PersonalIdentifier“ is the external customer’s identifier.
Must contain 10-48 char and must match A-Za-z0-9
Response Body