Anonymous wrote:
I am getting the correct service and provider. Everything matches up with the calendar of the provider and service. The problem is that it lets me see slots for the start time of 1130pm when I am not available after midnight and the appointment lasts one hour. Or on another occasion it lets me choose a slot that is at 4:30pm but I have another appointment booked at 5:00pm and the appointment lasts 1 hour.
You can see in the getStartTimeMatrix response that the appointment time of 2330 or 1130pm is listed as a time-slot (yet the only service he offers is 1 hour in length) and he is not available after midnight. How can I have this function be aware of the 1 hour service duration that I set in the simplybook.me GUI. I want it to not show 11:30pm but only up until 11:00pm if the service being booked is 1 hour and availability stops at midnight for example.
Am I not passing in the right service somehow? Can you tell that from the request?
Thanks.
RAW REQUESTS AND RESPONSES:
I also included the getWokingCalendar Request and Response:
Request URL: http://user-api.simplybook.me/
Request Method: POST
Status Code: 200 OK
Remote Address: 158.69.26.11:80
Referrer Policy: no-referrer-when-downgrade
Access-Control-Allow-Headers: content-type, x-company-login, x-application-token, x-user-token, x-token, x-requested-with
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Date: Mon, 11 Jun 2018 21:21:10 GMT
Keep-Alive: timeout=20
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-XSS-Protection: 1; mode=block
Provisional headers are shown
Accept: application/json, text/javascript, /; q=0.01
Content-Type: application/json
Origin: http://localhost:3000
Referer: http://localhost:3000/calendar/rebook/-LEXJZ-oHRexwYtTMEf0/-LDqQS8qDdva1HQ82Rqg/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36
X-Company-Login: cyno
X-Token: 4ca9a89baaa1adde9fc030cc3330a65a568e481a5897ea71ba41809dd14a4bd3
{“jsonrpc”:“2.0”,“method”:“getWorkCalendar”,“params”:[“2018”,“06”,“25”],“id”:3}
RESPONSE:
{“result”:{“2018-06-01”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-02”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-03”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-04”:{“from”:“09:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-05”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-06”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-07”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-08”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-09”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-10”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-11”:{“from”:“09:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-12”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-13”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-14”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-15”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-16”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-17”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-18”:{“from”:“09:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-19”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-20”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-21”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-22”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-23”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-24”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-25”:{“from”:“09:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-26”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-27”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-28”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-29”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”},“2018-06-30”:{“from”:“06:00:00”,“to”:“24:00:00”,“is_day_off”:“0”}},“id”:“3”,“jsonrpc”:“2.0”}
HERE IS getStartTimeMatrix Request:
Request URL: http://user-api.simplybook.me/
Request Method: POST
Status Code: 200 OK
Remote Address: 158.69.26.11:80
Referrer Policy: no-referrer-when-downgrade
Access-Control-Allow-Headers: content-type, x-company-login, x-application-token, x-user-token, x-token, x-requested-with
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Date: Mon, 11 Jun 2018 21:21:10 GMT
Keep-Alive: timeout=20
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-XSS-Protection: 1; mode=block
Provisional headers are shown
Accept: application/json, text/javascript, /; q=0.01
Content-Type: application/json
Origin: http://localhost:3000
Referer: http://localhost:3000/calendar/rebook/-LEXJZ-oHRexwYtTMEf0/-LDqQS8qDdva1HQ82Rqg/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36
X-Company-Login: cyno
X-Token: 4ca9a89baaa1adde9fc030cc3330a65a568e481a5897ea71ba41809dd14a4bd3
{jsonrpc: “2.0”, method: “getStartTimeMatrix”, params: [“2018-06-10”, “2018-06-18”, 2, “25”, 1], id: 6}
id
:
6
jsonrpc
:
“2.0”
method
:
“getStartTimeMatrix”
params
:
[“2018-06-10”, “2018-06-18”, 2, “25”, 1]
AND HERE IS THE RESPONSE:
{“result”:{“2018-06-10”:,“2018-06-11”:,“2018-06-12”:[“19:00:00”,“19:15:00”,“19:30:00”,“19:45:00”,“20:00:00”,“20:15:00”,“20:30:00”,“20:45:00”,“21:00:00”,“21:15:00”,“21:30:00”,“21:45:00”,“22:00:00”,“22:15:00”,“22:30:00”,“22:45:00”,“23:00:00”,“23:15:00”,“23:30:00”],“2018-06-13”:[“06:00:00”,“06:15:00”,“06:30:00”,“06:45:00”,“07:00:00”,“07:15:00”,“07:30:00”,“07:45:00”,“08:00:00”,“08:15:00”,“08:30:00”,“08:45:00”,“09:00:00”,“09:15:00”,“09:30:00”,“09:45:00”,“10:00:00”,“10:15:00”,“10:30:00”,“10:45:00”,“11:00:00”,“11:15:00”,“11:30:00”,“11:45:00”,“12:00:00”,“12:15:00”,“12:30:00”,“12:45:00”,“13:00:00”,“13:15:00”,“13:30:00”,“13:45:00”,“14:00:00”,“14:15:00”,“14:30:00”,“14:45:00”,“15:00:00”,“15:15:00”,“15:30:00”,“15:45:00”,“16:00:00”,“16:15:00”,“16:30:00”,“16:45:00”,“17:00:00”,“17:15:00”,“17:30:00”,“17:45:00”,“18:00:00”,“18:15:00”,“18:30:00”,“18:45:00”,“19:00:00”,“19:15:00”,“19:30:00”,“19:45:00”,“20:00:00”,“20:15:00”,“20:30:00”,“20:45:00”,“21:00:00”,“21:15:00”,“21:30:00”,“21:45:00”,“22:00:00”,“22:15:00”,“22:30:00”,“22:45:00”,“23:00:00”,“23:15:00”,“23:30:00”],“2018-06-14”:[“06:00:00”,“06:15:00”,“06:30:00”,“06:45:00”,“07:00:00”,“07:15:00”,“07:30:00”,“07:45:00”,“08:00:00”,“08:15:00”,“08:30:00”,“08:45:00”,“09:00:00”,“09:15:00”,“09:30:00”,“09:45:00”,“10:00:00”,“10:15:00”,“10:30:00”,“10:45:00”,“11:00:00”,“11:15:00”,“11:30:00”,“11:45:00”,“12:00:00”,“12:15:00”,“12:30:00”,“12:45:00”,“13:00:00”,“13:15:00”,“13:30:00”,“13:45:00”,“14:00:00”,“14:15:00”,“14:30:00”,“14:45:00”,“15:00:00”,“15:15:00”,“15:30:00”,“15:45:00”,“16:00:00”,“16:15:00”,“16:30:00”,“16:45:00”,“17:00:00”,“17:15:00”,“17:30:00”,“17:45:00”,“18:00:00”,“18:15:00”,“18:30:00”,“18:45:00”,“19:00:00”,“19:15:00”,“19:30:00”,“19:45:00”,“20:00:00”,“20:15:00”,“20:30:00”,“20:45:00”,“21:00:00”,“21:15:00”,“21:30:00”,“21:45:00”,“22:00:00”,“22:15:00”,“22:30:00”,“22:45:00”,“23:00:00”,“23:15:00”,“23:30:00”],“2018-06-15”:[“06:00:00”,“06:15:00”,“07:45:00”,“08:00:00”,“08:15:00”,“10:45:00”,“11:00:00”,“11:15:00”,“11:30:00”,“11:45:00”,“12:00:00”,“12:15:00”,“12:30:00”,“12:45:00”,“13:00:00”,“13:15:00”,“13:30:00”,“13:45:00”,“14:00:00”,“14:15:00”,“14:30:00”,“14:45:00”,“15:00:00”,“15:15:00”,“15:30:00”,“15:45:00”,“16:00:00”,“16:15:00”,“16:30:00”,“16:45:00”,“17:00:00”,“17:15:00”,“17:30:00”,“17:45:00”,“18:00:00”,“18:15:00”,“18:30:00”,“18:45:00”,“19:00:00”,“19:15:00”,“19:30:00”,“19:45:00”,“20:00:00”,“20:15:00”,“20:30:00”,“20:45:00”,“21:00:00”,“21:15:00”,“21:30:00”,“21:45:00”,“22:00:00”,“22:15:00”,“22:30:00”,“22:45:00”,“23:00:00”,“23:15:00”,“23:30:00”],“2018-06-16”:[“07:00:00”,“08:30:00”,“08:45:00”,“09:00:00”,“09:15:00”,“09:30:00”,“09:45:00”,“10:00:00”,“10:15:00”,“10:30:00”,“10:45:00”,“11:00:00”,“11:15:00”,“11:30:00”,“11:45:00”,“12:00:00”,“12:15:00”,“12:30:00”,“12:45:00”,“13:00:00”,“13:15:00”,“13:30:00”,“13:45:00”,“14:00:00”,“14:15:00”,“14:30:00”,“14:45:00”,“15:00:00”,“15:15:00”,“15:30:00”,“15:45:00”,“16:00:00”,“16:15:00”,“16:30:00”,“16:45:00”,“17:00:00”,“17:15:00”,“17:30:00”,“17:45:00”,“18:00:00”,“18:15:00”,“18:30:00”,“18:45:00”,“19:00:00”,“19:15:00”,“19:30:00”,“19:45:00”,“20:00:00”,“20:15:00”,“20:30:00”,“20:45:00”,“21:00:00”,“21:15:00”,“21:30:00”,“21:45:00”,“22:00:00”,“22:15:00”,“22:30:00”,“22:45:00”,“23:00:00”,“23:15:00”,“23:30:00”],“2018-06-17”:[“06:00:00”,“06:15:00”,“06:30:00”,“06:45:00”,“07:00:00”,“07:15:00”,“07:30:00”,“07:45:00”,“08:00:00”,“08:15:00”,“08:30:00”,“08:45:00”,“09:00:00”,“09:15:00”,“09:30:00”,“09:45:00”,“10:00:00”,“10:15:00”,“10:30:00”,“10:45:00”,“11:00:00”,“11:15:00”,“11:30:00”,“11:45:00”,“12:00:00”,“12:15:00”,“12:30:00”,“12:45:00”,“13:00:00”,“13:15:00”,“13:30:00”,“13:45:00”,“14:00:00”,“14:15:00”,“14:30:00”,“14:45:00”,“15:00:00”,“15:15:00”,“15:30:00”,“15:45:00”,“16:00:00”,“16:15:00”,“16:30:00”,“16:45:00”,“17:00:00”,“17:15:00”,“17:30:00”,“17:45:00”,“18:00:00”,“18:15:00”,“18:30:00”,“18:45:00”,“19:00:00”,“19:15:00”,“19:30:00”,“19:45:00”,“20:00:00”,“20:15:00”,“20:30:00”,“20:45:00”,“21:00:00”,“21:15:00”,“21:30:00”,“21:45:00”,“22:00:00”,“22:15:00”,“22:30:00”,“22:45:00”,“23:00:00”,“23:15:00”,“23:30:00”],“2018-06-18”:[“09:00:00”,“09:15:00”,“09:30:00”,“09:45:00”,“10:00:00”,“10:15:00”,“10:30:00”,“10:45:00”,“11:00:00”,“11:15:00”,“11:30:00”,“11:45:00”,“12:00:00”,“12:15:00”,“12:30:00”,“12:45:00”,“13:00:00”,“13:15:00”,“13:30:00”,“13:45:00”,“14:00:00”,“14:15:00”,“14:30:00”,“14:45:00”,“15:00:00”,“15:15:00”,“15:30:00”,“15:45:00”,“16:00:00”,“16:15:00”,“16:30:00”,“16:45:00”,“17:00:00”,“17:15:00”,“17:30:00”,“17:45:00”,“18:00:00”,“18:15:00”,“18:30:00”,“18:45:00”,“19:00:00”,“19:15:00”,“19:30:00”,“19:45:00”,“20:00:00”,“20:15:00”,“20:30:00”,“20:45:00”,“21:00:00”,“21:15:00”,“21:30:00”,“21:45:00”,“22:00:00”,“22:15:00”,“22:30:00”,“22:45:00”,“23:00:00”,“23:15:00”,“23:30:00”]},“id”:“6”,“jsonrpc”:“2.0”}