Missing Value: Shipping Address

Hello,

I have been trying to create a test order from the devapiverson.docs.apiary.io API.
I copied and pasted the example request body from https://devapiverson.docs.apiary.io/#reference/order/order/post and I am receiving this error message:

{
    "error_message": "Missing value",
    "param": "shipping_address"
}

I also tried tweaking the information, and completely writing a new order from scratch. No luck - same error message. What am I doing wrong?

Hi,

Are you certain that the request body is being posted with the correct json payload? What is the url you are using?

Thank you,

Sophie

Yes, positive. Tried it in C# and in Postman
The URL I utilized was https://apiverson.ordoro.com/order

I copied and pasted the example request body, and even tried reconstructing it with custom realistic data.
Yet I received the same error both times

I see that our docs have a typo, there should not be a validation key in the request for either addresses.

You will also need to adjust the cart value to be of an id that exists in your account.

Other than the aforementioned items, if you ensure that you are sending valid JSON, with the content-type set to JSON, the example will work as is.

Hello

I am getting same error

Array
(
[error_message] => Missing value
[param] => shipping_address
)

below is my code

<?php $ch = curl_init(); include_once 'config.php'; $string = $username.':'.$password; $encode_string = base64_encode($string); $authentication_string = "Basic ".$encode_string; $Accept ='application/json'; $url = 'https://apiverson.ordoro.com/order'; $request_headers = array( "Accept:" . $Accept, "Authorization:" . $authentication_string ); $datas = '{ "billing_address": { "city": "austin", "country": "USA", "email": "mrgattispizza@delivers.com", "name": "joe schmo", "phone": "4592222", "state": "tx", "street1": "123 foo-bar ln", "zip": "78701" }, "cart": 103571, "cart_order_id": "103571", "grand_total": 123.45, "lines": [ { "cart_orderitem_id": "1035711", "product": { "amazon_extra_info": { "asin": "55555", "listing_id": "12356", "pending_quantity": 4 }, "cost": 1.69, "name": "special product name", "price": 69.69, "sku": "sku1", "taxable": "false", "weight": 1 }, "quantity": 2 }, { "cart_orderitem_id": "1035714", "product": { "cost": 3.45, "name": "Plastic Toy", "price": 1.23, "sku": "sku2", "taxable": "false", "weight": 2 }, "quantity": 1 } ], "order_date": "2020-12-09T12:01:00.855700", "order_id": "2-222234", "product_amount": 100.1, "shipping_address": { "city": "austin", "country": "USA", "email": "jenny@igotyournumber.com", "name": "joe schmo", "phone": "8675309", "state": "tx", "street1": "123 foo-bar ln", "zip": "78701" }, "tags": [ { "color": "#FFFFFF", "text": "Unpaid" }, { "color": "#C0C0C0", "text": "Alert" } ], "tax_amount": 1.23 }'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $datas); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $season_data = curl_exec($ch); $json_data = json_decode($season_data, true); curl_close($ch); echo "
"; print_r($json_data); echo "
"; ?>

please let me know what is wrong, and how to place order successfully

I used your exact payload with one minor change to use a cart id that is valid for the company id I was making the POST request to, and did not receive an error.

I would suggest ensuring you are sending the JSON payload to the url as expected.

Thanks a lot, your response solve my issue too. I’m a Shopify multivendor expert in an IT company-CartCoders. I always try to figure out the solution to my problems on forums like Ordoro.