POST order returns 400

I am getting 400 when I try to POST a valid payload as below:
{
“order_id”: “Test-Bulk Order”,
“shipping_address”: {
“name”: “Test Order”,
“street1”: “10 Broadway”,
“city”: “San Diego”,
“state”: “CA”,
“zip”: “92101”,
“email”: “sfdfm@clsdfsdfo.com
},
“billing_address”: {
“name”: “Test Order”,
“street1”: “10 Broadway”,
“city”: “San Diego”,
“state”: “CA”,
“zip”: “92101”,
“email”: “sfdfm@clsdfsdfo.com
},
“lines”: [{
“cart_orderitem_id”: “Test-Bulk ItemId”,
“quantity”: 3,
“product”: {
“sku”: “0614198252518”,
“name”: “KIT Launch Monitor”,
“price”: 3999
}
}]
}

Hi,
Can you provide a little more information? What is the error message returned from the API? Also, please provide the X-API-REQUEST-ID response header so we can find the request on our end.

Thanks!

this is the response I got a few days ago, if you need more info I would need to setup another post and try:

{
“error_message”: “The input field ‘{\n “order_id” : “Test-Bulk Order”,\n “shipping_address” : {\n “name” : “Cloud Test”,\n “street1” : “5021 W. Broadway, Ste A #101”,\n “city” : “San Diego”,\n “state” : “CA”,\n “zip” : “92101”,\n “email” : “moji@cloudconstructionllc.com”\n },\n “billing_address” : {\n “name” : “Cloud Test”,\n “street1” : “5021 W. Broadway, Ste A #101”,\n “city” : “San Diego”,\n “state” : “CA”,\n “zip” : “92101”,\n “email” : “moji@cloudconstructionllc.com”\n },\n “lines” : [ {\n “cart_orderitem_id” : “Test-Bulk ItemId”,\n “quantity” : 3,\n “product” : {\n “sku” : “0614198252518”,\n “name” : “KIT Launch Monitor”,\n “price” : 3999\n }\n } ]\n}’ was not expected.”,
“param”: null
}

Without knowing what endpoint you’re hitting I can’t really diagnose the issue. An example CURL (or similar) with the API response would certainly help.

Can someone please explain what this email means and why I am receiving it? I didn’t start any support tickets with Ordoro, so perhaps this is a mistake?

Best,

this is the endpoint for the POST:
https://api.ordoro.com/v3/order

Hey @katiepm it looks like you have Mailing List Mode enabled in your account preferences. You can disable that and you won’t receive emails for every new forum post.

Gotcha. Once I receive the X-API-REQUEST-ID and an example CURL I’ll be able to diagnose the request on our end.

you’ve got the endpoint (which must’ve been obvious) and an example of payload and response error.
You should be able to simulate this on your side on a sandbox, without me giving you the client’s token.
There’s nothing else in the header except for the Authorization (basic).
So if the response doesn’t mean anything, then please try to post with your sandbox token.

I tried from a rest client adding this header:
X-API-REQUEST-ID
with value: 98211
now I’m getting a different error which is very odd:
{
“error_message”: “Missing value”,
“param”: “shipping_address”
}

The shipping_address is in the payload correctly:
{
“order_id”: “Test-Bulk Order”,
“shipping_address”: {
“name”: “Cloud Test”,

This is definitely what a response might look like if you aren’t sending the content type as application/json. Try that out.