Description
I am trying to place an order via ordoro API, but unable to place an order, it gives me error e.g.
Array
(
[error_message] => Missing value
[param] => shipping_address
)
I passed the correct SKU and title for the product which is available in my volusion store.
Please check my code below
<?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": "adrian@websitedesignservicesllc.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": "adrian@websitedesignservicesllc.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 ""; then I tried with getting order list with same username and password, which is working fine also please tell me which values to be passed in "cart" and "cart_order_id", there are any particular values that we need to pass or we can use any random value for it? also, I have posted my query previous ticket but unable to receive any answer from ordoro forum So please let me know with a solution regarding my query. Thanks, Vikram