The flat product dimensions size_x, size_y, size_z on
getProducts are now
deprecated and replaced by the new shipmentboxes field.
Each product can ship in one or more physical boxes, and each box has its own dimensions and gross weight.
The legacy size_x / size_y / size_z fields describe a single set of
dimensions, which does not reflect products that ship in multiple boxes.
What changed
- Deprecated:
size_x,size_y,size_z- still returned, but flagged as deprecated. Will be removed in a future version. - Added:
shipmentboxes- an array of shipment boxes, each with its own dimensions and gross weight.
New field: shipmentboxes
Returned on getProducts. Each element is an object with the following keys:
- size_x - box length (in cm)
- size_y - box width (in cm)
- size_z - box height (in cm)
- weightgross - box gross weight (in kg)
Example
"shipmentboxes": [
{
"size_x": "10.000",
"size_y": "20.000",
"size_z": "30.000",
"weightgross": "2.500"
},
{
"size_x": "40.000",
"size_y": "50.000",
"size_z": "60.000",
"weightgross": "5.000"
}
]
How to migrate
- Stop reading
size_x/size_y/size_zfrom the response. They remain for backward compatibility but will be removed. - Read
shipmentboxesinstead. It is always present (an array, possibly with a single box if the product ships as one unit). - For shipping cost / label calculations, sum across all boxes rather than using a single set of dimensions.
- If you only need a single representative dimension (e.g. for display), use the first box's dimensions.
Note: The legacy fields and the new shipmentboxes field are both returned during the deprecation period. Do not rely on both - migrate fully to shipmentboxes.