These docs are for v1.0. Click to read the latest docs for v2024.09.

Discussions

Ask a Question
Back to All

Creaet a shipment issue

Request

array:4 [▼
"courier_selection" => array:4 [▼
"selected_courier_id" => "c3e97b11-2842-44f1-84d1-afaa6b3f0a7c"
"allow_courier_fallback" => false
"apply_shipping_rules" => true
"list_unavailable_couriers" => null
]
"origin_address" => array:10 [▼
"line_1" => "Jinyuan 2nd Road"
"line_2" => "Liangping Avenue no 3"
"state" => "Nebraska"
"city" => "Fort Campbell"
"postal_code" => "51023"
"country_alpha2" => "US"
"contact_name" => "demo"
"company_name" => "demo Co"
"contact_phone" => ""
"contact_email" => "[email protected]"
]
"destination_address" => array:10 [▼
"line_1" => "RK empire"
"line_2" => "150 feet ring road"
"state" => "Kentucky"
"city" => "Fort Campbell"
"postal_code" => "42223"
"country_alpha2" => "US"
"contact_name" => "demo"
"company_name" => "demo Co"
"contact_phone" => ""
"contact_email" => "[email protected]"
]
"parcels" => array:1 [▼
0 => array:3 [▼
"total_actual_weight" => 0.5
"box" => null
"items" => array:1 [▼
0 => array:10 [▼
"description" => "Electronics"
"sku" => "123456"
"category" => "Mobile Phones"
"hs_code" => "123456"
"origin_country_alpha2" => "US"
"quantity" => 1
"dimensions" => array:3 [▼
"length" => 5
"width" => 5
"height" => 5
]
"actual_weight" => 0.5
"declared_currency" => "HKD"
"declared_customs_value" => 0.5
]
]
]
]
]

Response

"data": """
Client error: POST https://api.easyship.com/2023-01/shipments resulted in a 422 Unprocessable Entity response:
{"error":{"code":"invalid_content","details":["destination_address.contact_phone can't be blank","origin_address.contact (truncated...)

I have added this address but response is invalid content what is the issues?