error response org.springframework.web.client.HttpClientError

Hi I am getting follow error
'status' => string 'fail' (length=4) 'msg' => string 'org.springframework.web.client.HttpClientErrorException: 400 ' (length=61)
What does it mean?
How we can debug it?
I am using https://console-trial.ikentoo.com
Request params
$data = [
"businessLocationId" => 276638843535362,
"thirdPartyReference" => uniqid()." Tryngo order - sauce-123-M-",
"endpointId" => "tesst",
"customerInfo" => [
"firstName" => "Peter",
"lastName" => "Smith",
"thirdPartyReference" => uniqid()."test party referencesauce-123-M-",
"email" => "petersmith" . uniqid() ."@gmail.com",
"contactNumberAsE164" => "string",
"notes" => "Test notes goes here " .uniqid(),
"salutation" => "Mr"
],
"orderNote" => "test order note" . uniqid(),
"maxTimeToAttemptOrderDeliverToPos" => 1000,
// "staffId" => 0,
"staffId" => 38608, // https://console-trial.ikentoo.com/configuration/editUser/38608
"accountProfileCode" => "PICKUP",
// "scheduledTimeForOrderAsIso8601" => "2021-09-23T01:23:45.678+09:00",
// "scheduledTimeForOrderAsIso8601" => "2021-09-23T01:23:45.678+09:00",
"payment" => [
"paymentMethod" => "MASTERCARD",
"paymentAmount" => 100.00,
"tipAmount" => 10.00,
"min_TTL" => 0
],
"collectionCode" => uniqid(),
// "orderCollectionTimeAsIso8601" => "2021-09-23T01:23:45.678+09:00",
"items" => [
[
"quantity" => 3,
"sku" => "MSG2".uniqid(),
"customItemName" => "Accélérer SVP",
"customItemPrice" => 10.52,
"modifiers" => [
[
"modifierId" => "sauce-123-M-"
]
],
"discountCode" => "",
"subItems" => [
[
"quantity" => 12,
"sku" => "abc" .uniqid(),
"customItemName" => "TestUser" .rand(10,1000),
"customItemPrice" => 12.00,
"modifiers" => [
[
"modifierId" => "sauce-123-M-"
]
]
]
]
]
],
"takeAway" => true,
"deliveryAddress" => [
"addressLine1" => "123 address ".rand(10,1000),
"addressLine2" => "street 456".rand(10,1000),
"zip" => "54800",
"city" => "Lahore"
],
// "min_TTL" => 0
];
Please guide urgently.Thanks
5 comments
Hi @hamzakhan,
Thank you for contacting us.
I suggest testing the API in postman. Below you'll find the collection and environment, you can import this in Postman and test the API.
Imported the collection and getting the same issue with order placing api
screenshot is above
Complete params are as follow
{
"businessLocationId": 276638843535362,
"thirdPartyReference": "sdfasdf",
"endpointId": "tesst",
"customerInfo": {
"firstName": "Test",
"lastName": "Test 123",
"thirdPartyReference": "sdfasdf",
"email": "[email protected]",
"contactNumberAsE164": "+44207183875044",
"notes": "test note ",
"salutation": "Mr"
},
"orderNote": "test g",
"maxTimeToAttemptOrderDeliverToPos": 6000,
"staffId": 0,
"accountProfileCode": "DELIVERY",
"scheduledTimeForOrderAsIso8601": "2019-08-24T14:15:22Z",
"payment": {
"paymentMethod": "string",
"paymentAmount": 10.10,
"tipAmount": 10.00,
"min_TTL": 0
},
"accountId": "string",
"accountIdentifier": "string",
"tableNumber": "string",
"clientCount": 0,
"items": [
{
"quantity": 10.00,
"sku": "test",
"customItemName": "Peter",
"customItemPrice": 10.00,
"modifiers": [
{
"modifierId": "string"
}
],
"discountCode": "string",
"course": 0,
"subItems": [
{
"quantity": 0,
"sku": "string",
"customItemName": "string",
"customItemPrice": 0,
"modifiers": [
{
"modifierId": "string"
}
]
}
]
}
],
"min_TTL": 0
}
@LucienVersendaal ?
Hi
Please remove this line " "scheduledTimeForOrderAsIso8601": "2019-08-24T14:15:22Z", and try again.
Tried but no luck at all.