Migrated from Redmine #660 | Author: Fayaz Ahamed PA
Status: Closed | Priority: High, I’m very impatient | Created: 2021-03-13
Our application is getting available slots, and then it sends the available slots for booking, but after we hit booking, we get a slot not available response very frequently, we don’t get this error all the times, but frequently we get such error, even in Postman, we received such errors. But we already get only available slots and sending that. Following are the request and responses.
Available Slots:
https://user-api-v2.simplybook.me/admin/schedule/available-slots?date=2021-03-20&service_id=2
@Response:
[
{
“id”: “2021-03-20 07:00:00”,
“date”: “2021-03-20”,
“time”: “07:00:00”
},
{
“id”: “2021-03-20 09:30:00”,
“date”: “2021-03-20”,
“time”: “09:30:00”
},
{
“id”: “2021-03-20 12:00:00”,
“date”: “2021-03-20”,
“time”: “12:00:00”
},
{
“id”: “2021-03-20 14:30:00”,
“date”: “2021-03-20”,
“time”: “14:30:00”
}
]
@
Booking :
https://user-api-v2.simplybook.me/admin/bookings
@Request:
{“start_datetime”:“2021-03-20 07:00:00”,“provider_id”:1,“service_id”:1,“products”:,“client_id”:“211”,“accept_payment”:“true”,“payment_processor”:“delay”,“additional_fields”:[{“field”:“174f93dea26a3e68edd5863971f1a776”,“value”:“Masha”},{“field”:“1e03f7a8574a6acea8d9871c3fb65b25”,“value”:“66889658”},{“field”:“2d42cf2bb70e82898ba9ffc46dba74f2”,“value”:“South Melbourne Market, Coventry Street, South Melbourne VIC, Australia”},{“field”:“9f785f73333f13a44dbd5cc9df0060f4”,“value”:“Skoda ar”},{“field”:“ac59cc4cfbdefb7805668ea679018e02”,“value”:1110},{“field”:“a25f4d5f4cba4c7428d27430d7dca0d6”,“value”:“VIN”},{“field”:“661e7ff7914016277b3e4de4c62fb285”,“value”:“67823”},{“field”:“a6bf0d4d47602038ef0bbb2fd3ff6f22”,“value”:null},{“field”:“36820785829f0404de8fb18d886350a7”}]}@
Error response:
@{“name”:“StatusCodeError”,“statusCode”:400,“message”:“400 - {"code":400,"message":"","data":{"start_datetime":["Selected time not available"]},"message_data":}”,“error”:{“code”:400,“message”:“”,“data”:{“start_datetime”:[“Selected time not available”]},“message_data”:},“options”:{“baseUrl”:“https://user-api-v2.simplybook.me”,“method”:“POST”,“uri”:“/admin/bookings”,“json”:true,“body”:{“start_datetime”:“2021-03-20 07:00:00”,“provider_id”:1,“service_id”:1,“products”:,“client_id”:“211”,“accept_payment”:“true”,“payment_processor”:“delay”,“additional_fields”:[{“field”:“174f93dea26a3e68edd5863971f1a776”,“value”:“Masha”},{“field”:“1e03f7a8574a6acea8d9871c3fb65b25”,“value”:“66889658”},{“field”:“2d42cf2bb70e82898ba9ffc46dba74f2”,“value”:“South Melbourne Market, Coventry Street, South Melbourne VIC, Australia”},{“field”:“9f785f73333f13a44dbd5cc9df0060f4”,“value”:“Skoda ar”},{“field”:“ac59cc4cfbdefb7805668ea679018e02”,“value”:1110},{“field”:“a25f4d5f4cba4c7428d27430d7dca0d6”,“value”:“VIN”},{“field”:“661e7ff7914016277b3e4de4c62fb285”,“value”:“67823”},{“field”:“a6bf0d4d47602038ef0bbb2fd3ff6f22”,“value”:null},{“field”:“36820785829f0404de8fb18d886350a7”}]},“qs”:{},“headers”:{“Accept”:“application/json”,“Content-Type”:“application/json”,“X-Company-Login”:“safebuy”,“X-Token”:“0c1d2e561e6606da8e2f0ac0a635abcadb7e8d21f8c0a41d2ced771174f28274”},“simple”:true,“resolveWithFullResponse”:false,“transform2xxOnly”:false},“response”:{“statusCode”:400,“body”:{“code”:400,“message”:“”,“data”:{“start_datetime”:[“Selected time not available”]},“message_data”:},“headers”:{“server”:“nginx”,“date”:“Sat, 13 Mar 2021 05:15:42 GMT”,“content-type”:“application/json; charset=UTF-8”,“content-length”:“101”,“connection”:“close”,“access-control-allow-origin”:“*”,“access-control-allow-methods”:“POST, PUT, DELETE, GET, OPTIONS”,“access-control-allow-headers”:“content-type, x-company-login, x-token, x-requested-with”},“request”:{“uri”:{“protocol”:“https:”,“slashes”:true,“auth”:null,“host”:“user-api-v2.simplybook.me”,“port”:443,“hostname”:“user-api-v2.simplybook.me”,“hash”:null,“search”:null,“query”:null,“pathname”:“/admin/bookings”,“path”:“/admin/bookings”,“href”:“https://user-api-v2.simplybook.me/admin/bookings"},“method”:“POST”,“headers”:{“Accept”:“application/json”,“Content-Type”:“application/json”,“X-Company-Login”:“safebuy”,“X-Token”:“0c1d2e561e6606da8e2f0ac0a635abcadb7e8d21f8c0a41d2ced771174f28274”,“content-length”:775}}},"success”:false}@