[#217] Available appointment slots not showing

Migrated from Redmine #217 | Author: Aisha Shafqat
Status: New | Priority: High, I’m very impatient | Created: 2018-08-14


There are no available slots when you navigate to booking page (step 2) on our website https://aisha-customer.test3.carfirst.com/
Although slots are available for the service ‘Germany Inspection’ in simplybook account https://frontiercar.secure.fcgnew.enterprisebookings.com/v2/.
Please investigate the issue and fix.

Redmine Admin wrote:

Please send as raw http request and response

Redmine Admin wrote:

Please send us raw http request and response

Aisha Shafqat wrote:

Request

XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}

Response:
response
:
“{“errors”:[{“message”:“SIMPLY_BOOK_TIMEOUT”,“locations”:[{“line”:1,“column”:2}],“path”:[“availableSlots”]}],“data”:{“availableSlots”:null}}”
responseText
:
“{“errors”:[{“message”:“SIMPLY_BOOK_TIMEOUT”,“locations”:[{“line”:1,“column”:2}],“path”:[“availableSlots”]}],“data”:{“availableSlots”:null}}”
responseType
:
“”
responseURL
:
https://aisha-customer.test3.carfirst.com/api/inspection/
responseXML
:
null
status
:
500
statusText
:
“”
timeout
:
0
upload
:
XMLHttpRequestUpload {onloadstart: null, onprogress: null, onabort: null, onerror: null, onload: null, …}
withCredentials
:
false
proto
:
XMLHttpRequest

Redmine Admin wrote:

this is not request/response from simplybook API. Please contact your site devlopers

Aisha Shafqat wrote:

The response takes 50 seconds which does not work for us, we need it in milliseconds.
We have kept the time out for 20 seconds which causes failed bookings because response time is taking longer than 50 seconds.

Redmine Admin wrote:

please send us http request to simplybook API which takes 50 seconds

Aisha Shafqat wrote:

{ protocol: ‘https:’,
method: ‘POST’,
headers:
{ ‘X-Company-Login’: ‘frontiercar’,
‘X-Token’: ‘6280c9f93c68b6a282504bc999cbd77d0dec663278c9b75796adc0e327ef811d’ },
json: true,
body:
{ id: ‘906d6418’,
method: ‘getStartTimeMatrix’,
jsonrpc: ‘2.0’,
params:
[ moment(“2018-08-14T16:11:52.542”),
moment(“2018-09-10T16:11:52.543”),
‘2’,
[Object] ] },
path: ‘/’,
hostname: ‘user-api.fcgnew.enterprisebookings.com’ }

Redmine Admin wrote:

you should not call getStartTimeMatrix with time intervals longer than one week. Of course it will be not very fast ta calc availability for one month for ALL providers (you have hundreds of providers). You must pass providerId not [Object] as 4th param to this function
please check API documentation Company administration service methods - Company administration service methods - SimplyBook.me

Aisha Shafqat wrote:

that is what we are sending in string format

{“protocol”:“https:”,“method”:“POST”,“headers”:{“X-Company-Login”:“frontiercar”,“X-Token”:“56a806222eb59b8b4271d9644f0604dceeab5674cf0cbe076b54623967423672”},“json”:true,“body”:{“id”:“0ea39e16”,“method”:“getStartTimeMatrix”,“jsonrpc”:“2.0”,“params”:[“2018-08-14T14:14:42.646Z”,“2018-09-10T14:14:42.646Z”,“2”,[“13”,“4”]]},“path”:“/”,“hostname”:“user-api.fcgnew.enterprisebookings.com”}

Redmine Admin wrote:

you are trying to get one month of data for 2 providers. It should 2x faster for one provider and much faster if you wll decrease period to one week.

Redmine Admin wrote:

and you have 99 slots per provider with id 13, which means it will be 100X faster for provider with just one slot.

Redmine Admin wrote:

we also did investigation of your server health, it is now under haevy API load. There are about 25 API requests per second to this server. With 4 cores it is more than 6 HEAVY API requests per core per second. It increased API response time considerably because 4 CPU is obviously not enough for such load.

Jasson Jac wrote:

We buy all passenger cars, vans, leasing cars and service cars, defective, scrap cars, damaged cars and cars without sight are also interested, WeBuyCars offer free online valuations of your car, to make selling it convenient for you in a quick, efficient and safe way….. https://www.vikoeberbiler.dk/

Redmine Admin wrote:

Jasson Jac wrote:

(Short original content)