[#945] 400 server error for booking reserver API

Migrated from Redmine #945 | Author: Venumadhav Adepu
Status: Rejected | Priority: Immediate, there is BUG! | Created: 2022-10-17


Hi Team,

We are facing issue with booking reserve API request has been failed 400 error.

URL : https://user-api.bookings.vicinity.com.au

Request : {
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: [
“20”,
11,
“2022-10-27”,
“14:00:00”,
{ “name”: “Guest”, “email”: “Venumadhav.adepu@vicinity.com.au” },
{ “terms”: true, “cc1fbde2c224b7219ec15eaca79f55da”:“2”, “faadcae1916b679db17c7dbe85654599”:“1”, “handle_invoice”: true},
3
],
“id”: 2
}

Response : 400 Bad Request.

When we try the same from Postman we are getting the 200 Ok response. Please let me know further.
Thanks.

Redmine Admin wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Venumadhav Adepu wrote:

Redmine Admin wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Hi Team,

PFA screenshots for raw request header, request payload and response which we are getting from Simplybook. This was happening for only Services not for classes. For services and classes we are passing the same payload with event ID change but classes are working as expected and serviced are getting 500 internal server error.

Thanks.

Venumadhav Adepu wrote:

Venumadhav Adepu wrote:

Redmine Admin wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Hi Team,

PFA screenshots for raw request header, request payload and response which we are getting from Simplybook. This was happening for only Services not for classes. For services and classes we are passing the same payload with event ID change but classes are working as expected and serviced are getting 500 internal server error.

Im unable to attach any files here. Please suggest me how can I share those.

Thanks.

Venumadhav Adepu wrote:

Redmine Admin wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Hi Team,

PFA screenshots for raw request header, request payload and response which we are getting from Simplybook. This was happening for only Services not for classes. For services and classes we are passing the same payload with event ID change but classes are working as expected and serviced are getting 500 internal server error.

Thanks.

Venumadhav Adepu wrote:

Redmine Admin wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Hi Team,

PFA screenshots for raw request header, request payload and response which we are getting from Simplybook. This was happening for only Services not for classes. For services and classes we are passing the same payload with event ID change but classes are working as expected and serviced are getting 500 internal server error.

Thanks.

Venumadhav Adepu wrote:

Redmine Admin wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Hi Team,

PFA screenshots for raw request header, request payload and response which we are getting from Simplybook. This was happening for only Services not for classes. For services and classes we are passing the same payload with event ID change but classes are working as expected and serviced are getting 500 internal server error.

Thanks.

Venumadhav Adepu wrote:

Venumadhav Adepu wrote:

Venumadhav Adepu wrote:

Redmine Admin wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Hi Team,

PFA screenshots for raw request header, request payload and response which we are getting from Simplybook. This was happening for only Services not for classes. For services and classes we are passing the same payload with event ID change but classes are working as expected and serviced are getting 500 internal server error.

Im unable to attach any files here. Please suggest me how can I share those.

Thanks.

Venumadhav Adepu wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Hi Team,

PFA screenshots for raw request header, request payload and response which we are getting from Simplybook. This was happening for only Services not for classes. For services and classes we are passing the same payload with event ID change but classes are working as expected and serviced are getting 500 internal server error.

Im unable to attach any files here. Please suggest me how can I share those.

Thanks.

Request Header : Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Authorization: 03AIIukzglhRd9kFjybplUf740yHcWz-8CJLBl_v4S4iNwSal2VXLmZ12PUkN7zmInxWHkyaZDijkdCTtJan4I0Nqnk3r_ddL-u-lkvQwCUG5ecVVZDwXh-ZCivCjySLRySqlQ3-_Q68aQAyPxsiyyl6kmUDu0cFEF8oRKzISJ7xQgfLMmKkEYyiv3SAsmiP-HsQnOwNWDbbiYZ1oJJP9c7PArLYhCvGhEylhHLZ94z10-rmCmja3a0WZeAuhJ34Bcj7xD15E5PR1yEnZQZpKt6GW3VO56vYcIF3DA4l2Yfwjn0FONGLpykG0r72Nic096sGxIAVaROIpturpsBVpYr7GEClUiX1CdxNZSSRuLcC7EStyPLO1uhlqsbU_lZ4XNYJrGslydre5ETm26V5wCDg44ZNlyyKa83MpvpWGiVUeMzcBpvUvJEJtUvsPtuwHfaU5r3_zXmtWnaewronoGNGaGOInPeGxx9P87YxcCwHW_RwPma6-RSi9wDInOtu7_LYICIEOPSy6kG9WeDl8f66rKNxO8fDH62Q
Connection: keep-alive
Content-Length: 474
Content-Type: application/json;charset=UTF-8
Cookie: _gcl_au=1.1.1842932413.1660527463; _ga=GA1.3.905699544.1660527463; _fbp=fb.2.1660527463362.1369332258; __stripe_mid=5a5396cd-654c-41bb-9a85-87e0995be8d48eefe1; _gid=GA1.3.176272313.1665970005; __stripe_sid=65d1bd70-1181-424e-b709-d3796d67b547073642
Host: www.qvb.com.au
Origin: https://www.qvb.com.au
Referer: https://www.qvb.com.au/channels/website/pages/christmas/high-tea-with-santa?_storyblok=80024703&_storyblok_c=website_component_page&_storyblok_tk[space_id]=57003&_storyblok_tk[timestamp]=1666049651&_storyblok_tk[token]=210ecd8a32380a13cc7f8f7ae86f6d034a1ff5e2&_storyblok_version=&_storyblok_lang=default&_storyblok_release=0
sec-ch-ua: “Google Chrome”;v=“105”, “Not)A;Brand”;v=“8”, “Chromium”;v=“105”
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: “macOS”
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Request Payload :
{,…}
allowTieredPricing
:
true
children
:
“0”
params
:
[“5”, 2, “2022-11-24”, “08:30:00”, {name: “Guest”, email: “Venumadhav.adepu@vicinity.com.au”},…]
0
:
“5”
1
:
2
2
:
“2022-11-24”
3
:
“08:30:00”
4
:
{name: “Guest”, email: “Venumadhav.adepu@vicinity.com.au”}
email
:
“Venumadhav.adepu@vicinity.com.au”
name
:
“Guest”
5
:
{cc1fbde2c224b7219ec15eaca79f55da: “2”, faadcae1916b679db17c7dbe85654599: “0”, terms: true,…}
03f85c67a158598231498af59c3a27c1
:
“”
5efb8abff76fbea8bbfcf484d67c373f
:
“”
5fc4da9766630ab6f3ba4ea99f42ad0a
:
“”
174f4eeff91c083230673e62bd6694f2
:
“”
c169adfe38ff7efbe8e0beb33c9461ac
:
“”
cc1fbde2c224b7219ec15eaca79f55da
:
“2”
faadcae1916b679db17c7dbe85654599
:
“0”
handle_invoice
:
true
terms
:
true
6
:
2
smsConfirmation
:
false

Response :
message
:
“Request failed with status code 500”

Venumadhav Adepu wrote:

Venumadhav Adepu wrote:

please provide raw http request with all headers. If it is working from postman then it means there is something in your code

Hi Team,

PFA screenshots for raw request header, request payload and response which we are getting from Simplybook. This was happening for only Services not for classes. For services and classes we are passing the same payload with event ID change but classes are working as expected and serviced are getting 500 internal server error.

Im unable to attach any files here. Please suggest me how can I share those.

Thanks.

Request Header : Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Authorization: 03AIIukzglhRd9kFjybplUf740yHcWz-8CJLBl_v4S4iNwSal2VXLmZ12PUkN7zmInxWHkyaZDijkdCTtJan4I0Nqnk3r_ddL-u-lkvQwCUG5ecVVZDwXh-ZCivCjySLRySqlQ3-_Q68aQAyPxsiyyl6kmUDu0cFEF8oRKzISJ7xQgfLMmKkEYyiv3SAsmiP-HsQnOwNWDbbiYZ1oJJP9c7PArLYhCvGhEylhHLZ94z10-rmCmja3a0WZeAuhJ34Bcj7xD15E5PR1yEnZQZpKt6GW3VO56vYcIF3DA4l2Yfwjn0FONGLpykG0r72Nic096sGxIAVaROIpturpsBVpYr7GEClUiX1CdxNZSSRuLcC7EStyPLO1uhlqsbU_lZ4XNYJrGslydre5ETm26V5wCDg44ZNlyyKa83MpvpWGiVUeMzcBpvUvJEJtUvsPtuwHfaU5r3_zXmtWnaewronoGNGaGOInPeGxx9P87YxcCwHW_RwPma6-RSi9wDInOtu7_LYICIEOPSy6kG9WeDl8f66rKNxO8fDH62Q
Connection: keep-alive
Content-Length: 474
Content-Type: application/json;charset=UTF-8
Cookie: _gcl_au=1.1.1842932413.1660527463; _ga=GA1.3.905699544.1660527463; _fbp=fb.2.1660527463362.1369332258; __stripe_mid=5a5396cd-654c-41bb-9a85-87e0995be8d48eefe1; _gid=GA1.3.176272313.1665970005; __stripe_sid=65d1bd70-1181-424e-b709-d3796d67b547073642
Host: www.qvb.com.au
Origin: https://www.qvb.com.au
Referer: https://www.qvb.com.au/channels/website/pages/christmas/high-tea-with-santa?_storyblok=80024703&_storyblok_c=website_component_page&_storyblok_tk[space_id]=57003&_storyblok_tk[timestamp]=1666049651&_storyblok_tk[token]=210ecd8a32380a13cc7f8f7ae86f6d034a1ff5e2&_storyblok_version=&_storyblok_lang=default&_storyblok_release=0
sec-ch-ua: “Google Chrome”;v=“105”, “Not)A;Brand”;v=“8”, “Chromium”;v=“105”
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: “macOS”
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Request Payload :
{,…}
allowTieredPricing
:
true
children
:
“0”
params
:
[“5”, 2, “2022-11-24”, “08:30:00”, {name: “Guest”, email: “Venumadhav.adepu@vicinity.com.au”},…]
0
:
“5”
1
:
2
2
:
“2022-11-24”
3
:
“08:30:00”
4
:
{name: “Guest”, email: “Venumadhav.adepu@vicinity.com.au”}
email
:
“Venumadhav.adepu@vicinity.com.au”
name
:
“Guest”
5
:
{cc1fbde2c224b7219ec15eaca79f55da: “2”, faadcae1916b679db17c7dbe85654599: “0”, terms: true,…}
03f85c67a158598231498af59c3a27c1
:
“”
5efb8abff76fbea8bbfcf484d67c373f
:
“”
5fc4da9766630ab6f3ba4ea99f42ad0a
:
“”
174f4eeff91c083230673e62bd6694f2
:
“”
c169adfe38ff7efbe8e0beb33c9461ac
:
“”
cc1fbde2c224b7219ec15eaca79f55da
:
“2”
faadcae1916b679db17c7dbe85654599
:
“0”
handle_invoice
:
true
terms
:
true
6
:
2
smsConfirmation
:
false

Response :
message
:
“Request failed with status code 500”

Hi Team,

Could you please provide update ASAP as it is impacting our Prod.

Thanks

Dmytro Bondarev wrote:

Hi, as you can see this request is not our server.
We need raw HTTP request to our server and response from our server that you receive.
Also i see that you passed invalid JSON.

The response “Request failed with status code 500” is not our error message.