Simplybook API Callback Example
This code is a callback example of Simplybook.me API Please find detailed info here. We can use Callback API in order to get details about event, for example, booking creation or change
The callback data from Simplybook will be presented in the raw post data in JSON format. The following fields are available:
booking_id - Booking ID
booking_hash - Booking hash
company - Your company login
notification_type - Notification type. Can be 'create', 'cancel', 'notify', 'change'
This example shows us that using Callback API we can get detailed info about booking and save it in the local database:
- get details via callback
- connect to Simplybook.me Company public service API using external JsonRPC library
- get booking details using getBookingsDetails method
- connect to the local SQLite database
- add booking details to the database
Please note: you can use another JsonRPC library or any other library in your software This example is created in order to show Callback API possibilities