Plan a Cargo Load
plan_cargo_loadPlan how one cargo size loads into a shipping container, truck trailer or rail wagon. Use this when someone asks how many of their boxes, cartons, crates or pallets (of a given size, and optionally weight) fit in a 20ft, 40ft, 40ft High Cube, 45ft, 53ft dry van, curtainsider or other vehicle, how many containers or trucks a quantity needs, or whether weight or space limits the load. Returns units per floor layer (mixed orientations), layers by interior height, units per load, whether space or payload binds, loads needed, utilisation, and a link to the same plan drawn on the web. One size per call; for several sizes, call once per size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | Width of one unit. | |
| height | Yes | Height of one unit. For a pallet, the loaded height including the deck. | |
| length | Yes | Length of one unit (carton, crate or loaded pallet). | |
| vessel | Yes | The container, truck trailer or rail wagon to load. Accepts a slug ("40ft-high-cube-container") or a plain name ("40HC", "20ft", "53ft dry van", "curtainsider"). Air ULDs are not supported. Call get_container_dimensions with no arguments for the catalog. | |
| weight | No | Gross weight of one unit. Optional; without it the payload is not checked. | |
| quantity | No | How many units ship. | |
| stackable | No | Whether units may be stacked on top of each other. | |
| unitSystem | No | Units for the dimensions and weight. 'metric' = centimetres and kilograms; 'imperial' = inches and pounds. | metric |
| keepUpright | No | "This side up": false lets the unit lie on a side if that fits more. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layers | Yes | ||
| vessel | Yes | ||
| perLoad | Yes | Units one vessel takes: the smaller of space and payload. | |
| limitedBy | Yes | ||
| floorCount | Yes | Units in one floor layer. | |
| laidOnSide | Yes | ||
| plannerUrl | Yes | The same plan on the web, with the floor layout drawn. | |
| loadsNeeded | Yes | Vessels needed for the full quantity. | |
| payloadAllows | Yes | Units the payload allows; null when no weight was given. | |
| exactFloorCount | Yes | False when the floor count is a block-pattern lower bound. | |
| unitsInLastLoad | Yes | ||
| volumeUtilisationPct | Yes | Of the first load. | |
| weightUtilisationPct | Yes | Of the first load; 0 when no weight was given. |