Please note:
We work according EU legislations, even when the law is stupid and makes no sense. Therefore we inform you now that we use cookies to make your experience at our site better. These cookies are not used to recognize you nor your browsing habits. They could though be used to help you to login quicker to our site. Happy cooking!
 

API Explorer

Get api token
  • Get api token »
Using Simplybook API methods require an authentification. To authorize in Simplybook API you need to get an access key — access-token. In order to get this access-token you should call the JSON-RPC method getToken on http://user-api.simplybook.me/login service passing your personal API-key. You can copy your API-key at admin interface: go to the 'Custom Features' link and select API custom feature 'Settings'.
var token = loginClient.getToken(companyLogin, apiKey);
Method result (JSON response)
Response body
HTTP Request
Get event list
  • Get api token »
  • Get event list »
You have just received auth token. Now you need to create JSON RPC Client, set http headers and then use this client to get data from Simplybook server. To get services list use getEventList() function as it is shown in code example below.
var events = client.getEventList();
Method result (JSON response)
Response body
HTTP Request
Get performer list
  • Get api token »
  • Get event list »
  • Get performer list »
Also you need to get list of all service performers. For this purpose use getUnitList() function.
var units = client.getUnitList();
Method result (JSON response)
Response body
HTTP Request
Filter performers by service
  • Get api token »
  • Get event list »
  • Get performer list »
  • Filter performers by service »
Now let users select service and then performer. Please note that services can be attached to certain performer or can be provided by any performer from list. That is why you should filter performers before users make selection, use unit_map param in service object for this. See code example below.
Get closest day with available time slots
  • Get api token »
  • Get event list »
  • Get performer list »
  • Filter performers by service »
  • Get closest day with available time slots »
After user has selected service and perfomer you should get first working day for the selected performer and set it as datepicker active date. Use getFirstWorkingDay() function for this purpose.
var firstWorkingDay = client.getFirstWorkingDay(performerId);
Method result (JSON response)
Response body
HTTP Request
Disable not working time in calendar
  • Get api token »
  • Get event list »
  • Get performer list »
  • Filter performers by service »
  • Get closest day with available time slots »
  • Disable not working time in calendar »
Becides setting active date in your datepicker you also can disable dayoffs in it using data of work calendar. See how the getWorkCalendar() function works in code example.
workCalendar = client.getWorkCalendar(year, month, performerId);
Method result (JSON response)
Response body
HTTP Request
Get available time slots
  • Get api token »
  • Get event list »
  • Get performer list »
  • Filter performers by service »
  • Get closest day with available time slots »
  • Disable not working time in calendar »
  • Get available time slots »
When user has selected a date you can load time intervals when service is available to be booked. Use the getStartTimeMatrix() function to get list of start time of time slots.
var startMatrix = client.getStartTimeMatrix(from, to, eventId, unitId, count)
Method result (JSON response)
Response body
HTTP Request
Check if Intake forms custom feature is activated
  • Get api token »
  • Get event list »
  • Get performer list »
  • Filter performers by service »
  • Get closest day with available time slots »
  • Disable not working time in calendar »
  • Get available time slots »
  • Check if Intake forms custom feature is activated »
Now check if Intake forms custom feature is active to define what should be shown to client in the next step. See isPluginActivated() function usage example.
var additionalFieldsActivated = client.isPluginActivated('event_field');
Method result (JSON response)
Response body
HTTP Request
Get intake form fields
  • Get api token »
  • Get event list »
  • Get performer list »
  • Filter performers by service »
  • Get closest day with available time slots »
  • Disable not working time in calendar »
  • Get available time slots »
  • Check if Intake forms custom feature is activated »
  • Get intake form fields »
If Intake forms custom feature is active, you should load intake form field list using getAdditionalFields() function and add them to client details form.
Method result (JSON response)
Response body
HTTP Request
Perform booking
  • Get api token »
  • Get event list »
  • Get performer list »
  • Filter performers by service »
  • Get closest day with available time slots »
  • Disable not working time in calendar »
  • Get available time slots »
  • Check if Intake forms custom feature is activated »
  • Get intake form fields »
  • Perform booking »
After client has filled his information into intake form fields you should start booking process by calling book() method.
Client name
Client email
Client phone
Method result (JSON response)
Response body
HTTP Request
Summary
  • Get api token »
  • Get event list »
  • Get performer list »
  • Filter performers by service »
  • Get closest day with available time slots »
  • Disable not working time in calendar »
  • Get available time slots »
  • Check if Intake forms custom feature is activated »
  • Get intake form fields »
  • Perform booking »
  • Summary »
It was simple example how you can use Simplybook API. Check out all available API methods here. Feel free to contact us and ask any questions.
Thank you for reading!
Live help