The DigitalBooker API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. All responses from the API will be encoded as JSON.
Our API is divided into two main parts, the Public API and the Admin API. The DigitalBooker Public API can be used to access publicly available data, while the DigitalBooker Admin API allows fetching the system's internal data.
DigitalBooker supports multiple languages. Just change the language identifier in the API endpoint URL to get the responses in your selected language. Please note that almost all localized strings in the system are user generated. If a localization is not provided by the system administrator, the API will fallback to any defined localization.
Authentication is required by the DigitalBooker Admin API as it opens access to some of the system's internal information, like bookings. You authenticate to the Admin API through HTTP Basic Auth by providing one of your API keys in the request. Provide the ID of the API key as the username and its password as the password. Note that there may be key-specific privileges affecting which API methods can be used with the given API key.
Your API keys carry many privileges, so remember: Keep them secret, keep them safe!
In case you fear an API key has gone into wrong hands, just delete the key and generate a new one. Multiple API keys is allowed so you can for example have separate keys for each integration partner.
All API requests must be made over HTTPS. Note that all requests do NOT require autentication.
API keys can be taken into use through the DigitalBooker App Store.
DigitalBooker uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing.), and codes in the 5xx range indicate an error with the's servers.
stringError code |
|
| If set |
stringHuman readable error message. |
| If set |
listA list of errors, usually for which parameters were invalid, plus possible explanations. |
The APIs list methods are used to fetch mulitple objects of any given resource. All list objects share the same structure. DigitalBooker utilizes cursor based pagination.
intNumber of objects being returned. Range 1 to 100. |
|
intA cursor to define from where in the list to start. |
stringValue is 'list'. |
|
arrayArray of response objects. |
|
boolDefines if there is more objects to fetch. |
|
intHolds the total count of the complete result set. |
stringString is 'booking'. |
|
intBooking ID. |
|
stringBooking type. |
|
stringThe title of the booking. |
|
intThe ID of the location of the booking. |
|
dateThe date of the booking. |
|
timeBooking start time. |
|
timeBooking end time. |
|
| If set |
intThe service ID if the booking is of type 'service'. |
| If set |
intThe class ID if the booking is of type 'class'. |
| If set |
int listThe IDs of the resources of the booking. |
| If set |
floatBooking price (including tax). |
| If set |
floatBooking tax. |
| If set |
boolTells if the booking has payments so that is considered fully paid. |
| If set |
objectThe user to which the booking has been made. |
| If set |
stringNotes about the booking. |
| If set |
boolTells if the booking has been marked as confirmed. |
| If set |
stringCampaign code reference if available and AD tracking is enabled. |
intUser interface where booking is created. (1 = admin, 2 = www) |
|
datetimeThe date and time when the booking was created. |
|
| If set |
datetimeThe date and time when the booking was modified. Included only if the booking has been modified. |
| If set |
intBooking start offset time in minutes. |
| If set |
intBooking end offset time in minutes. |
| Required |
intID of the booking. |
Returns booking object on success, or an error on failure.
Lists bookings for a specific date or a date range according to the given arguments. The default is the current date.
| Optional |
intList bookings for the location with this ID. |
| Optional |
int listList bookings with resources matching these IDs |
| Optional |
dateList bookings for this date. If this and from_date are omitted, the current date is used as default. |
| Optional |
dateList bookings from this date. |
| Optional |
dateList bookings to this date. |
| Optional |
datetimeInclude only bookings that have changed since this date and time. Includes both creates and modifications. |
| Optional |
boolIf true only confirmed bookings are included. |
| Optional |
intNumber of objects being returned. |
| Optional |
intA cursor to define from where in the list to start. |
Returns list of booking objects, plus has_more to indicate if more objects exists, or an error on failure.
Lists IDs of bookings that have been deleted on a specific date or during a date range. The default is the current date.
| Optional |
dateList IDs of bookings deleted this date. If this and from_date are omitted, the current date is used as default. |
| Optional |
dateList IDs of bookings deleted after this date. |
| Optional |
dateList IDs of bookings deleted before this date. |
| Optional |
intNumber of objects being returned. |
| Optional |
intA cursor to define from where in the list to start. |
| Required |
intBooking location ID. |
| Required |
intBooking service ID. |
| Required |
dateBooking date. |
| Required |
timeBooking start time. |
| Required |
int listIDs of resources assigned to the booking. Set to 'null' to unset. |
| Optional |
int listIDs of selected extra services. Set to 'null' to unset. |
| Optional |
int listIDs of selected service alternatives. Set to 'null' to unset. |
| Required |
intCustomers user ID. |
| Optional |
objectExtra info for booking. |
| Required |
intBooking location ID. |
| Required |
dateBooking date. |
| Required |
timeBooking start time. |
| Required |
timeBooking duration. |
| Required |
int listIDs of resources assigned to the booking. |
| Required |
intCustomers user ID. |
| Optional |
objectExtra information for the booking. |
stringString is 'user'. |
|
intThe ID of the user. |
|
stringThe full name of the user. |
|
|
The email address of the user. |
|
| If set |
phoneThe user's phone number. |
stringUser type. |
|
| If set |
stringThe user's street address. |
| If set |
zip_codeThe user's address ZIP code. |
| If set |
stringThe user's city. |
| If set |
intThe user's birth year. |
| If set |
stringThe user's gender. |
| Required |
intID of the user. |
Returns user object on success, or an error on failure.
Lists registered users, optionally limiting to those belonging to a specific user group. Does not include temporary users
| Optional |
intNumber of objects being returned. |
| Optional |
intA cursor to define from where in the list to start. |
| Optional |
intInclude only users belonging to the group with the given ID. |
Returns list of user objects, plus has_more to indicate if more objects exists, or an error on failure.
| Optional |
stringUser type. |
| Required |
stringThe user's first name. |
| Required |
stringThe user's last name. |
| Optional |
The user's email address |
| Optional |
phoneThe user's phone number. |
| Optional |
stringThe user's street address. |
| Optional |
zip_codeThe user's address ZIP code. |
| Optional |
stringThe user's city. |
| Optional |
intThe user's birth year. |
| Optional |
stringThe user's gender. |
| Optional |
intWill digitalbooker send account information to user |
| Optional |
stringPassword set for the user. |
| Optional |
intAllow transactional emails |
| Optional |
intAllow marketing emails |
| Optional |
intAllow transactional sms |
| Optional |
intAllow marketing sms |
Returns user object on success, or an error on failure.
| Required |
stringThe user's first name. |
| Required |
stringThe user's last name. |
| Optional |
The user's email address |
| Optional |
phoneThe user's phone number. |
| Optional |
stringThe user's street address. |
| Optional |
zip_codeThe user's address ZIP code. |
| Optional |
stringThe user's city. |
| Optional |
intThe user's birth year. |
| Optional |
stringThe user's gender. |
| Required |
intID of the user. |
Returns id of the deleted user object on success, or an error on failure.
stringString is 'location'. |
|
intId of the location. |
|
stringName of the location (localized). |
|
stringURL identifier of the location. |
|
| If set |
stringLocation address (localized). |
| If set |
stringLocation zip code. |
| If set |
stringLocation city (localized) |
| If set |
stringLocation country code |
| If set |
stringLocation phone number. |
| If set |
boolTrue if the location has business hours enabled. |
| If set |
floatLatitude geolocation |
| If set |
floatLongitude geolocation |
| If set |
boolTells if the location is available in the admin calendar. |
| If set |
boolTells if the location is publicly visible. |
| If set |
boolTrue if the location is included in the menu on the public booking site. |
| If set |
stringExternal ID of the location if set to be included. |
| Required |
intID of the location. |
| Optional |
boolFetches external IDs and includes them in the result if set to true. |
Returns location object on success, or an error on failure.
| Optional |
intNumber of objects being returned. |
| Optional |
intA cursor to define from where in the list to start. |
| Optional |
boolFetches external IDs and includes them in the result if set to true. |
Returns list of location objects, plus has_more to indicate if more objects exists, or an error on failure.
stringString is 'resource'. |
|
intResource id. |
|
stringType of resource. Type 'resource' is usually a physical resource, e.g. a room. Resources of type 'worker' are humans, e.g. hair stylists, instructors etc. |
|
stringName of the resource (localized). |
|
intThe ID of the category this resource belongs to. |
|
| If set |
stringDescription of the resource (localized). |
| If set |
objectUser account connected to the resource. |
| If set |
boolTells if the resource accepts time bookings, ie. is directly bookable through the public interface. |
| If set |
stringExternal ID of the resource if set to be included. |
| Required |
intID of the resource. |
Returns resource object on success, or an error on failure.
| Optional |
stringList resources of the given type only. |
| Optional |
intList resources in the category with this ID. |
| Optional |
intList resources for the location with this ID. |
| Optional |
intNumber of objects being returned. |
| Optional |
intA cursor to define from where in the list to start. |
Returns list of resource objects, plus has_more to indicate if more objects exists, or an error on failure.
stringString is 'resource_category'. |
|
intId of the category. |
|
stringName of the category (localized). |
|
stringThe resource type od this category. Type 'resource' is usually a physical resource, e.g. a room. Resources of type 'worker' are humans, e.g. hair stylists, instructors etc. |
Methods to manage data related to workers. Workers are a type of resources so these are methods that are specific to workers only. The other methods are found in the resources section.
Lists the work hours for the resource for all its locations.
| Required |
intID of the resource. |
| Optional |
dateDate to get work hours for. If this and from_date are omitted, the current date is used as default. |
| Optional |
dateList work hours from this date. |
| Optional |
dateList work hours to this date. |
Returns worker's work hours by date and location, plus has_more to indicate if more objects exists, or an error on failure.
Lists the work hours for the resource in the given location.
| Required |
intID of the resource. |
| Required |
intThe ID of the location the work hours of which should be fetched. |
| Optional |
dateDate to get work hours for. If this and from_date are omitted, the current date is used as default. |
| Optional |
dateList work hours from this date. |
| Optional |
dateList work hours to this date. |
Returns worker's work hours by date, plus has_more to indicate if more objects exists, or an error on failure.
| Required |
intID of the object. |
Returns service object on success, or an error on failure.
| Optional |
intNumber of objects being returned. |
| Optional |
intA cursor to define from where in the list to start. |
Returns list of service objects, plus has_more to indicate if more objects exists, or an error on failure.
| Required |
intID of the object. |
Returns class type object on success, or an error on failure.
| Optional |
intNumber of objects being returned. |
| Optional |
intA cursor to define from where in the list to start. |
Returns list of class type objects, plus has_more to indicate if more objects exists, or an error on failure.
stringString is 'location'. |
|
intId of the location. |
|
stringName of the location (localized). |
|
stringURL identifier of the location. |
|
| If set |
stringLocation address (localized). |
| If set |
stringLocation zip code. |
| If set |
stringLocation city (localized) |
| If set |
stringLocation country code |
| If set |
stringLocation phone number. |
| If set |
boolSet to true if the location has business hours enabled. |
| If set |
floatLatitude geolocation |
| If set |
floatLongitude geolocation |
| If set |
object listList of view objects that are available in the location. |
| Required |
stringURL identifier (url_text) of the location. |
| Optional |
string listExtend properties of the location object. |
Returns location object on success, or an error on failure.
Returns list of location objects, plus has_more to indicate if more objects exists, or an error on failure.
stringString is 'view'. |
|
intId of the view. |
|
stringType of the view. |
|
stringName of the view (localized). |
|
stringURL identifier of the view. |
|
intNumber of upcoming days that the booking view allows. |
|
| If set |
objectSpecifies the worker selection options if available. |
| If set |
stringName to be used in the worker selector. |
| If set |
time listDuration alternatives available for the resource. |
| If set |
intMax amount of resource time bookings that can be made at once. |
boolTells if the booking view has extra info specified for bookings. |
|
boolTells if the booking view has week browser enabled. |
|
| If set |
boolTells if the booking view is a one-service view (no selectors). |
| If set |
objectSpecifies the user-specific booking limit. |
| If set |
boolTells if thumbnails of worker images are to be displayed in worker selectors. |
| Required |
stringURL identifier (url_text) of the location. |
| Required |
stringURL identifier (url_text) of the view. |
Returns view object on success, or an error on failure.
Returns list of view objects, plus has_more to indicate if more objects exists, or an error on failure.
stringString is 'service'. |
|
intId of the service. |
|
stringName of the service (localized). |
|
| If set |
objectDescription obejct of the service. |
| If set |
boolTells whether the service has alternatives or not (E.g. Hair length, Gender etc). If true, the service will not have durations set. |
| If set |
object listList of extra service objects available to the service. |
| If set |
time listDuration alternatives available for the service. If set, has_alternatives will not be set. |
| If set |
boolTells if the service is a phone-only type of service. |
| If set |
intHow many extra services have to be selected in order to create a booking. |
| Required |
stringURL identifier (url_text) of the location. |
| Required |
stringURL identifier (url_text) of the view. |
Returns list of service category objects, plus has_more to indicate if more objects exists, or an error on failure.
| Required |
stringURL identifier (url_text) of the location. |
| Required |
stringURL identifier (url_text) of the view. |
| Required |
intService id. |
| Optional |
int listExtra service ids. |
Returns list of alternatives objects, plus has_more to indicate if more objects exists, or an error on failure.
| Required |
stringURL identifier (url_text) of the location. |
| Required |
stringURL identifier (url_text) of the view. |
| Required |
intService id. |
| Optional |
int listExtra service ids. |
| Optional |
int listSelected alternatives. |
| Optional |
timeDuration of the service, if service has multiple durations. |
Returns list of resource objects, plus has_more to indicate if more objects exists, or an error on failure.
| Required |
stringURL identifier (url_text) of the location. |
| Required |
stringURL identifier (url_text) of the view. |
| Required |
intService id. |
| Optional |
intId of the worker to perform the service. In not set, check all workers |
| Optional |
int listExtra service ids. |
| Optional |
int listSelected alternatives. |
| Optional |
timeDuration of the service, if service has multiple durations. |
| Optional |
dateDate to search for available times |
| Optional |
stringRange of dates |
| Optional |
boolIf set and, there are no available times available for the given week, the date for the next available times is returned. |
Returns list of available times, plus has_more to indicate if more objects exists, or an error on failure.
stringString is 'class'. |
|
intID of the class. |
|
stringName of the class (localized). |
|
intID of the category of the class. |
|
intID of the location where the class is held. |
|
dateDate of the class. |
|
timeStart time of the class. |
|
timeEnd time of the class. |
|
| If set |
intCurrent number of bookings. Set depending on system settings. |
| If set |
intMin number of bookings for the class. Set depending on system settings. |
| If set |
intMax number of bookings for the class. Set depending on system settings. |
| If set |
floatClass price (including tax). |
| If set |
floatClass tax. |
| If set |
objectDescription obejct of the class. |
stringClass status. |
|
| If set |
boolTrue if the class has a queue, meaning booking can be made although its already full. |
| If set |
intAmount of bookings in queue, set if the class has a queue |
| If set |
intShow places available. Set depending on system settings. |
| If set |
stringDirect booking url to class, set if status is 'bookable'. |
| If set |
objectList of resource objects for the class. Set depending on system settings. |
| If set |
stringClass color hex value. |
| Required |
stringUrl_text of the location. |
| Required |
stringURL identifier (url_text) of the view. |
| Optional |
dateDate to search for available classes |
| Optional |
stringRange of dates. |
| Optional |
int listIDs of class categories to filter by. |
| Optional |
intNumber of objects being returned. |
| Optional |
intA cursor to define from where in the list to start. |
| Optional |
boolIf set and, there are no available times available for the given week, the date for the next available times is returned. |
Returns list of class objects, plus has_more to indicate if more objects exists, or an error on failure.
stringString is 'resource'. |
|
intResource id. |
|
stringType of resource. Type 'resource' is usually a physical resource, e.g. a room. Resources of type 'worker' are humans, e.g. hair stylists, instructors etc. |
|
stringName of the resource (localized). |
|
| If set |
objectDescription object of the resource. |
| If set |
int listList of IDs of resources that get blocked by this resource if the feature is enabled. |
| Required |
stringURL identifier (url_text) of the location. |
| Required |
stringURL identifier (url_text) of the view. |
Returns list of resource objects, plus has_more to indicate if more objects exists, or an error on failure.
Description objects consist of a text body, and a list of icon objects. The description objects can be part part services, alternatives or resources objects.
stringString is 'description'. |
|
| If set |
stringDescription body (localized) |
| If set |
object listList of icon objects. |
stringString is 'icon'. |
|
stringIcon identifier. Allowed values are all the icons in the Font Awesome icon set. |
|
stringIcon label (localized) |