Settings and ref-data
Settings and ref-data describe the account: how booking is configured, and which services and resources can be booked. Load both when your booking UI starts and cache them for the session. They change rarely.
Fetch settings
GET /settings/
Returns the booking configuration for the account.
{
"currencyCode": "SEK",
"preferredE164CountryCode": "46",
"features": {
"EnableDiscountVouchers": true,
"EnableEcomPayments": true,
"EnableCompanyBooking": true,
"EnableVehicleBooking": true
},
"customTexts": { "customer.name": "Namn" },
"prefs": {
"timeZone": "Europe/Stockholm",
"locale": "sv_SE",
"web_companyName": "Beauty Parlour STHLM",
"web_addressLine1": "Regeringsgatan 67",
"web_area": "Stockholm",
"web_bookingMaxDaysInAdvance": "90",
"web_minTimeBeforeBooking": 1,
"web_bookingInterval": 15,
"web_useSmsVerification": false,
"web_requireEmail": false,
"web_requirePNo": false,
"web_requireVehicleRegNo": false,
"web_allowMultipleServices": false,
"web_resourceLabel": "Person"
}
}
The example is shortened. prefs contains many more keys. The most useful ones
for a custom client:
| Preference | Meaning |
|---|---|
web_bookingMaxDaysInAdvance | How many days ahead booking is open |
web_minTimeBeforeBooking | Minimum hours between now and the slot |
web_useSmsVerification | Bookings are confirmed with an SMS PIN code |
web_requireEmail, web_requirePNo, web_requireVehicleRegNo, web_requireOrgNo | Which customer fields are required |
web_allowMultipleServices | The customer may pick more than one service |
web_resourceLabel | What the account calls its resources, for example "Person" |
The features object tells you which account features are active, for example
company booking (organization fields) and vehicle booking (registration number
field).
Fetch ref-data
GET /ref-data/
Returns the bookable services and resources.
{
"services": [
{
"serviceId": 46368,
"name": "Dry Haircut",
"group": "Hair",
"description": "",
"minDuration": 30,
"maxDuration": 30,
"minPrice": 500.0,
"maxPrice": 500.0,
"priceFrom": false,
"addon": false,
"bookingType": "SimpleBooking",
"prefs": { "web_paymentRequired": false },
"attributes": {},
"classBooking": false
}
],
"resources": [
{
"id": 8274,
"name": "Alice",
"group": "Stockholm",
"title": null,
"presentation": null,
"prefs": { "web_paymentEnabled": true },
"attributes": {},
"hashId": "QPEGJ3"
}
],
"resourceMappings": {
"8274:46368": {
"serviceId": 46368,
"serviceDuration": 30,
"afterTime": 0,
"price": 500.0,
"priceEvening": 500.0,
"priceHoliday": 500.0,
"customValues": false,
"webShowInBooking": true,
"webAllowBooking": true,
"webShowDuration": true,
"addon": false
}
},
"addonMappings": [
{ "srvId": 46367, "addonSrvIds": [46376, 46377] }
]
}
The example is shortened to one entry per list.
Services are what the customer books. Services with addon set to true
cannot be booked on their own, they are added on top of another service.
minDuration, maxDuration, minPrice and maxPrice can be null when the
duration or price is set per resource in the resource mappings instead.
Resources are who or what performs the service. The hashId is used in the
slots and custom fields endpoints.
Resource mappings connect the two. The key is {resourceId}:{serviceId}.
A resource can perform a service when a mapping exists with webAllowBooking
set to true. Use webShowInBooking to decide if the combination should be
visible in your UI. The mapping can override the duration and price of the
service for that specific resource.
Addon mappings list which addon services (addonSrvIds) can be added to a
main service (srvId).
Fetch custom fields
GET /custom-fields/resource/{resourceHashId}?srvIds={serviceIds}
Some accounts collect extra information in the booking form. Fetch the custom
fields for the selected resource and services before you show your customer
form. srvIds is a comma separated list of service ids.
{ "customFields": [] }
An empty list means there are no extra fields. When fields exist, each entry looks like this (example derived from the API schema):
{
"customFields": [
{
"key": "cf_1",
"label": "Allergies",
"type": "text",
"required": false,
"placeholder": "",
"helpText": "",
"options": []
}
]
}
Send the customer's answers in the customFields list of the
customer call.