Discussions

Ask a Question
Back to All

Parcels dimensions or all items dimensions are mandatory

I have this error "Parcels dimensions or all items dimensions are mandatory"

Can you please check what is wrong here?
If I change the value to a string value on dimensions.length, dimensions.width or dimensions.width, it says dimensions (length, width or width is not a number).

This is my complete JSON

{
"origin_address": {
"line_1": "25 St James Pl",
"line_2": "",
"state": "New York",
"city": "New York",
"postal_code": "10038",
"company_name": "Google",
"contact_name": "William Kress",
"contact_phone": "8877112233",
"contact_email": "[email protected]"
},
"destination_address": {
"line_1": "192 Spadina Ave",
"line_2": "",
"state": "Toronto",
"city": "Toronto",
"postal_code": "52700",
"country_alpha2": "CA",
"company_name": "Apple",
"contact_name": "Jhon Major",
"contact_phone": "8811223344",
"contact_email": "[email protected]"
},
"incoterms": "DDU",
"insurance": {"is_insured": false},
"courier_selection": {"apply_shipping_rules": true},
"shipping_settings": {
"units": {"weight": "kg", "dimensions": "cm"}
},
"parcels": [
{
"total_actual_weight": 1,
"box": {
"slug": "0c6d70ea-ce43-4fe3-8106-34b9509e36d5",
"length": 1,
"width": 1,
"height": 1
},
"items": [
{
"quantity": 1,
"category": "health_beauty",
"description": "This is a nice product",
"sku": "PDR-9191",
"actual_weight": 4,
"declared_currency": "USD",
"declared_customs_value": 1,
"dimensions": {
"length": "20",
"width": "20",
"height": "20"
}
}
]
}
]
}