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