shipment_summary
Analyze composite shipments in one call: calculate volume, chargeable weight, road LDM, air volumetric weight, sea revenue tonnes, dangerous goods, and UK duty estimates.
Instructions
Composite shipment analysis in one call: volume (CBM), gross and chargeable weight, road LDM with pallet spaces and a vehicle suggestion (road mode), volumetric weight (air), revenue tonnes with a container suggestion (sea), dangerous-goods presence for items carrying un_number, and UK duty estimates for items carrying hs_code + customs_value.
Provide mode (road | air | sea | multimodal) and items[] (dims in cm, weight in kg PER ITEM, quantity; optional stackable, pallet_type, hs_code, un_number, customs_value PER ITEM, and adr_quantity — the TOTAL for the dangerous-goods line, all pieces together); origin/destination and incoterm refine the duty leg.
Behavior: calls the ldm_calculator, adr_lookup and uk_duty_calculator engines directly; CBM, volumetric weight and revenue tonnes are the same arithmetic inline rather than a call out. Road LDM uses the 2.40 m loading-metre convention divisor and, like ldm_calculator, treats an item with no stackable flag as NOT stacked. modeSpecific.palletSpaces is pallet FLOOR POSITIONS (the figure ldm_calculator reports); palletRows is the separate row count. The suggested vehicle is the smallest that holds the load by its length, its payload and its pallet floor positions — the record's own count when it is a floor count, otherwise worked from its deck (a 7.5t rigid holds 15 Euro pallets on the floor; modeSpecific.suggestedVehicleFloorPositions says which) — and trailerUtilisation is of that vehicle (utilisationBasis names it); the suggested container is the smallest dry box whose record holds the volume and payload. Sections that cannot run (e.g. duty without a customs value) surface in warnings instead of failing the whole call. Fields are checked by name: a field the tool does not read is refused with a tool error naming it and listing the accepted ones, never ignored. Rate-limited: a limit error carries reset_at, the UTC time the allowance resets.
Returns: mode, itemCount, totals {pieces, grossWeight, volumeCBM, chargeableWeight, billingBasis}, modeSpecific (LDM / pallet floor positions / pallet rows / suggested vehicle, or revenue tonnes / container), warnings and dataVersion (road mode attributes the vehicle dataset and the LDM divisor) under result — note this composite's result uses camelCase field names (legacy shape); plus confidence, _source and citation (the FreightUtils v1 response envelope).
Limitations: a planning summary, not a quotation or compliance determination.
Related: consignment_calculator (canonical snake_case lines[] shape with advisory flags), cbm_calculator, chargeable_weight_calculator, ldm_calculator, adr_lookup, uk_duty_calculator. ldm_calculator, adr_lookup and uk_duty_calculator are the engines this actually calls; the rest are the single-purpose equivalents of arithmetic it does inline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Transport mode — selects the mode-specific section of the result. | |
| items | Yes | Shipment items with dimensions, weight and optional HS/UN codes. | |
| origin | No | Origin — ISO country code and optional UN/LOCODE. | |
| incoterm | No | Incoterms 2020 three-letter code. Examples: "DAP", "EXW", "FOB". | |
| destination | No | Destination — ISO country code and optional UN/LOCODE. | |
| freight_cost | No | Freight cost in GBP for the duty calculation, 0 or more. Default: 0. | |
| insurance_cost | No | Insurance cost in GBP for the duty calculation, 0 or more. Default: 0. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| result | Yes | ||
| _source | Yes | ||
| citation | Yes | ||
| validity | No | ||
| warnings | No | ||
| confidence | Yes | ||
| blocking_errors | No | ||
| envelope_version | Yes | ||
| normalized_input | No |