[#115] getBookings no longer working as expected

Migrated from Redmine #115 | Author: Sasha Verma
Status: Resolved | Priority: High, I’m very impatient | Created: 2018-02-20


Previously I was able to call getBookings and get a list of bookings, but now I get a 500 Internal Server Error. Has the API call changed?

Here’s a sample API call that worked previously (returning a list of bookings for the day):

curl -X POST -v -H “Content-Type: application/json; charset=UTF-8”
-H “X-Company-Login: amazonscans”
-H “X-User-Token: 7c1fccd223b68382c2957afd2c962f1e0e2107ad8ae1489d3c6dca50ded4d74a”
-d “{"jsonrpc":"2.0","method":"getBookings","params":[{"date_from":"2018-02-20\”,\”date_to":"2018-02-20\”}],\”id":3}”
https://user-api.simplybook.me/admin/

Now this returns:

  • Connected to user-api.simplybook.me (158.69.26.11) port 443 (#0)
  • TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • Server certificate: *.simplybook.me
  • Server certificate: COMODO RSA Domain Validation Secure Server CA
  • Server certificate: COMODO RSA Certification Authority

POST /admin/ HTTP/1.1
Host: user-api.simplybook.me
User-Agent: curl/7.54.0
Accept: /
Content-Type: application/json; charset=UTF-8
X-Company-Login: amazonscans
X-User-Token: 7c1fccd223b68382c2957afd2c962f1e0e2107ad8ae1489d3c6dca50ded4d74a
Content-Length: 120

  • upload completely sent off: 120 out of 120 bytes
    < HTTP/1.1 500 Internal Server Error
    < Server: nginx
    < Date: Tue, 20 Feb 2018 17:31:02 GMT
    < Content-Type: text/html; charset=UTF-8
    < Content-Length: 0
    < Connection: keep-alive
    < Keep-Alive: timeout=20
    <
  • Connection #0 to host user-api.simplybook.me left intact

Our application is no longer syncing bookings which is causing us a lot of issues. Please let me know if this method has changed.

Sasha Verma wrote:

Also, it’s not a credential issue because I’m able to call getBookingDetails for an existing booking ID or getClientList and get results. It specifically seems to be an issue with getBookings. And these methods were working on Friday, so I’m not sure if there is an issue from our end.

Dmytro Bondarev wrote:

Hi! You are passing wrong JSON.
Look at the quotes on your request: Screenshot by Lightshot
The first one is wrong.