Migrated from Redmine #116 | Author: Daniel Okwufulueze Status: Closed | Priority: High, I’m very impatient | Created: 2018-02-21
Hi,
We have enabled API Custom Features. We successfully interact with Simplybook using the API methods.
Recently, we decided to send the booking_id of any booking created on simplybook.me directly to one of our endpoints using the callback URL feature. This has not worked. Whenever a new booking is created, nothing happens on our endpoint [it’s not getting any booking_id from Simplybook, not even a request is sent from Simplybook].
We have read the docs, and done everything as stated. Please help, in case we may be missing anything.
I have attached a snapshot of our API custom feature page where we set the callback URL.
Hi! Please attach snapshot.
To check we need company login and your callback URL.
You can contact to our support and provide this information in case you do not want to publish it.
We have checked and see that our server calls your URL.
I see that your URL returns 500 error.
So it looks like something wrong at your end.
Please check code, make sure that you expect raw data in json in POST.
This has been fixed on our endpoint, with sample raw JSON POST requests sent to the callback URL on Postman without any issues, but Simplybook is still not posting anything to us.
Perhaps we’re reading the wrong key, this is a sample raw JSON POST we used to test on Postman:
It turned out that the 500 error, after handling the raw JSON POST issue, was a missing / after the callback URL we supplied to Simplybook. Simplybook seems to append to the URL, the POST data without a / if one is missing, so the server sees this as one long and wrong URL and throws a 500.
I simply added the missing / to the callback URL on Simplybook API Custom Feature, and Simplybook worked fine.
For the sake of anyone who may have problems with Simplybook not calling their callback URL, ensure you’re expecting a raw JSON POST on your server, and supply a URL ending with a forward-slash [/] in the text field for callback URL in Simplybook, and you should be fine.