Issues creating orders via API

I’m having an odd issue when trying to create an order via the API. When I our current process runs to create an order it fails and get receive a response back of:

{
“error_message”: “Missing value”,
“param”: “shipping_address”
}

however, when I take the JSON payload from that process and copy and paste it into a process I have built out that just sends the payload to Ordoro, it works without a problem and we can see the order.

Hoping I can get some insight as to what’s going on. This is the current payload we’re using (customer’s info has been scrubbed).

{
“order_id”:“SUP017725”,
“order_date”:“22-Feb-2023”,
“shipping_address”: {
“name”:“SCRUBBED”,
“street1”:“3838 SCRUBBED WAY”,
“city”:"SCRUBBED ",
“state”:“TX”,
“zip”:“11111”,
“country”:“USA”,
“phone”: null,
“email”: null
},
“billing_address”: {
“name”:“SCRUBBED”,
“street1”:“3838 SCRUBBED WAY”,
“city”:"SCRUBBED ",
“state”:“TX”,
“zip”:“11111”,
“country”:“USA”,
“phone”: null,
“email”: null
},
“lines”:[
{
“cart_orderitem_id”:“abc.123”,
“quantity”:1,
“item_price”:79.150,
“total_price”:79.15,
“product”:{
“sku”:“50405”,
“name”:“Vinyl & Leather Conditioner 5 GAL”,
“price”:79.15,
“weight”:0,
“taxable”:“false”,
“cost”:79.150
}
}, {
“cart_orderitem_id”:“abc.123”,
“quantity”:2,
“item_price”:0,
“total_price”:0,
“product”:{
“sku”:“PA9001”,
“name”:“OSHA Label-Vinyl & Leather Conditioner”,
“price”:0,
“weight”:0,
“taxable”:“false”,
“cost”:0
}
}, {
“cart_orderitem_id”:“abc.123”,
“quantity”:1,
“item_price”:0,
“total_price”:0,
“product”:{
“sku”:“9153”,
“name”:“Spout 3/4"”,
“price”:0,
“weight”:0,
“taxable”:“false”,
“cost”:0
}
}
],
“product_amount”:79.15,
“tax_amount”:0,
“grand_total”:111.26,
}

Hi @Omega12 are you saying you’re building a new process and getting failures with the same payload that works on an older process you already have in place?

from just the response i’m seeing, i would guess that you haven’t set the content-type to application/json and so the api is not reading the payload correctly in the failure case.

More or less, we’re using power automate to try to create these orders. We have the main process we’re trying to get working, and then we have another flow that we’re using to test the payloads when the main process fails to create the order. When we copy the payload from the main process and put it into the test process we receive no error.

image
Both the main flow and the test one have HTTP steps set up the same way. I just ran the test flow again and received a 201 response without specifying the content type

have you tried it with the content type?

I have not, I’ll go ahead and add that and report back

It looks like that was the missing ingredient. We’re starting to see orders get created now!

Thank you so much!