Building load units
A job carries exactly two flat lists: carriers[] (what you load into) and cargo[] (what you ship). Every entry in either list is described inline, directly in the request body, or references one you saved: a carrier from your carrier library, a cargo line from your SKU library (see Libraries and its SKU libraries section). How a unit behaves once placed (stacking, orientation) lives in Constraints.
When to use this
- You're describing your own carriers and cargo inline in a job. Both can instead be saved once and referenced by id: see Libraries and its SKU libraries section.
- You want to know exactly which fields belong to a carrier entry, which belong to a cargo entry, and which are shared.
The anatomy of a load unit
Every entry, carrier or cargo, is a flat object: there is no nesting and no separate upload step:
carriers[] |
cargo[] |
|
|---|---|---|
| Role | what you load into (supply) | what you ship (demand) |
| Required | externalId, geometry |
amount, geometry, weight |
| Count | quantity (null = the solver decides) |
amount (>= 1) |
| Only here | name, tareWeight, maxWeight |
description, color, constraints, groups |
| Both, but not the same field | category (container, pallet, truck or trailer) |
category (box) |
Two nuances in that Required row are worth knowing. A carrier's externalId is effectively required: the request-level check only caps its length, but a carrier without one is rejected anyway, so always send it. A cargo line's weight is required even when it is 0: an omitted weight is rejected with 400 against /cargo/{i}/weight, so send 0 for a unit whose weight does not matter.
The coordinate frame is fixed everywhere: X longitudinal, Y lateral, Z vertical, Z = 0 at the floor (see Concepts).
Geometry: the shape of a unit
Geometry is a box, and only a box, in this API. A carrier and a cargo line describe their outer shape the same way:
{ "type": "box", "dimensionX": 600, "dimensionY": 400, "dimensionZ": 400 }
typemust be"box". Any other value is rejected with400, with a pointer ending in/geometry/type.dimensionX/dimensionY/dimensionZ: all three required, all three must be greater than0, expressed in the job'sunits.length.Xis length,Yis width,Zis height.
Cargo geometry and weight
A cargo line's geometry is the same box shape; give it a weight too. Attach behavioural rules (whether other cargo may stack on it, how it may be rotated) via constraints; see Constraints. Optionally give it a category, the kind it is drawn as: box, the default. amount says how many identical units this one line represents:
{
"externalId": "BOX-A",
"category": "box",
"amount": 120,
"geometry": { "type": "box", "dimensionX": 600, "dimensionY": 400, "dimensionZ": 400 },
"weight": 18
}
Key fields
| Field | On | Notes |
|---|---|---|
geometry |
every unit | Box only: { "type": "box", "dimensionX", "dimensionY", "dimensionZ" }. |
weight |
cargo | Always send it. >= 0, per single unit, in units.weight. An omitted weight is rejected with 400. |
maxWeight |
carriers | Optional, > 0, in units.weight: the most cargo this carrier may carry, not counting its tareWeight. For a pallet, its load capacity. What does not fit moves on to the next carrier (another of this entry while its quantity allows, then the next entry). The result's kpis.weightUtilization says how much of it is used. |
tareWeight |
carriers | Optional, >= 0, in units.weight, the carrier's own empty weight, stored with the job. Per-carrier weight in the result is kpis.loadedWeight: the summed weight of that carrier's placements. |
amount |
cargo | Required, >= 1: how many identical units the line represents. |
quantity |
carriers | null/omitted = unlimited instances (the solver decides how many); else must be > 0. |
externalId |
carriers | Effectively required, non-empty, <=128 chars. Duplicates across carriers are allowed. |
externalId |
cargo | Optional echo label, <=128 chars, not unique; never a join key. |
description / color |
cargo | Optional echo fields; cargo has no name (carriers have name, not description). |
groups |
cargo | Optional labels. A label affects placement only when the job also declares it in the top-level groups block and sets configuration.groupSeparation; see Separating groups along the carrier. Every other label stays inert. Echoed back as groups on placements and unplaced items either way (and under the deprecated name group). |
category |
carriers | Which kind of carrier this is: container, pallet, truck or trailer. Any other value is rejected with 400, and on a MixedPalletizing job, inline or referenced, so is anything but pallet. Omit it and the kind implied by problemType is filled in and echoed. It decides the shape drawn around the cargo in the placement-instruction PDF, and is reserved as an input to solving, so label a carrier for what it is. It still does not select the problem type: problemType on the job is the only field that does; see Anatomy of a job. |
category |
cargo | Optional. The kind the unit is drawn as: box, matched in any case. Any other value is rejected with 400. Omit it and box is filled in and echoed. A separate set from a carrier's category. Results of jobs from before this set was closed can carry null or free text; read a value you do not know as box. |
constraints |
cargo | allowStackingOnTop / sameSkuStacking / allowedRotations; see Constraints. |
Notes & caveats
- Inline here, or saved. Every carrier and cargo line on this page is written out in full in the request body. Both can be saved once and referenced by id instead: carriers in your carrier library, cargo units as SKUs in your SKU library; see Libraries and its SKU libraries section.
- Box-only geometry. Any
geometry.typeother than"box"is a400; see Not supported. - Carriers have no
constraintsfield.allowStackingOnTop,sameSkuStackingandallowedRotationsapply to cargo lines only. tareWeightrecords the empty carrier. It is optional, expressed inunits.weight, and stored with the job. The weight figures the result reports are about the load, not the carrier:kpis.loadedWeightper carrier andsummary.totalWeightacross the job are both sums of placement weights.kpis.weightUtilizationcomparesloadedWeightwith the carrier'smaxWeight, when it has one.
Related
- Constraints:
allowStackingOnTop,sameSkuStackingandallowedRotationson a cargo line. - Units: the
units.length/units.weighta geometry's dimensions and weights are expressed in.