Developers
Developer API
Integrate EveryLoading's 3D cargo optimization into your logistics platform. Send container dimensions and cargo items, get back optimized placement positions.
Quick start
- Create an API key below
- Add
X-API-Key: your_keyheader to requests - POST to
/api/v1/optimizewith container + items - Receive optimized placement positions in the response
Loading your API keys…
API documentation
POST
/api/v1/optimizeOptimize cargo placement in a container. Returns placement positions, utilization, and any unplaced items.
GET
/api/v1/presetsGet available container/vehicle presets with dimensions and weight limits.
Authentication
Include your API key in the X-API-Key header with every request.
Request Body — /api/v1/optimize
| Field | Type | Description |
|---|---|---|
| container | object | Container dimensions and max weight |
| length | number | Length in cm |
| width | number | Width in cm |
| height | number | Height in cm |
| maxWeight | number | Max weight in kg |
| loadingDirection | string? | from_back | from_right | from_left |
| wheelArches | object? | { fromFront, length, width, height } in cm: two arches on the floor, one against each side wall. Cargo goes around them and may rest on them |
| coolingUnit | object? | { length, height, width?, fromFloor? } in cm: unit against the front wall, centred across the width (default full width, under the roof) |
| door | object? | { width, height } in cm: every item must pass through the door opening; items are turned to fit or left out |
| cogLimit | object? | { length, width } in cm: max distance of the centre of gravity from the middle; the optimizer prefers plans within it and moves the load towards the middle |
| deck | object? | { height, thickness?, maxWeight? } cm / kg: Variofloor, a second floor across the whole space; cargo goes under it and onto it, maxWeight limits the upper deck |
| trailer | object? | { length, width, height, maxWeight, deck? }: truck + trailer set (Pro). The truck is filled first, then the trailer; placements carry vehicle 0 (truck) and 1 (trailer), more sets with settings.multiVehicle |
| items | array | Cargo items to place |
| id | string | Unique item identifier |
| name | string | Item name |
| length, width, height | number | Dimensions in cm |
| weight | number | Weight in kg |
| quantity | number | Number of this item |
| stackable | boolean? | May other items be stacked on top of this one (default: true). false = nothing on top |
| floorOnly | boolean? | The item itself must stand on the floor, never on another item (default: false) |
| rotationMode | string? | base | any | none (default: base) |
| shape | string? | box | pipe | barrel (default: box) |
| standOn | string[]? | Ids of the items this one may stand on (it may always stand on the floor). Empty or missing = any item |
| maxLoadsOnTop | number? | Most items of any type stacked above this one in its column |
| maxStackWeight | number? | Most weight in kg resting on this item, counting the whole pile above it |
| formation | string? | straight | honeycomb (pipes and barrels; default: straight). Honeycomb nests each row in the gaps of the row below |
| settings | object? | Algorithm settings |
| sortStrategy | string? | optimal | by_volume | by_weight | insertion_order |
Response
| Field | Type | Description |
|---|---|---|
| placements | array | Placed items with x, y, z positions, dimensions, rotation |
| utilization | number | Volume utilization percentage |
| totalWeight | number | Total weight of placed items in kg |
| unplacedItems | string[] | Names of items that didn't fit |
| cog | object | null | Centre of gravity of the load, { x, y, z } in cm |
| vehicles | array? | Several vehicles or a set: per vehicle index, space (truck | trailer), items, utilization, totalWeight, cog, cogWithinLimit |
| cogWithinLimit | boolean | null | With container.cogLimit: whether the centre of gravity is within it; otherwise null |
Examples
curl -X POST https://api.everyloading.com/api/v1/optimize \
-H "X-API-Key: bl_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"container": {
"length": 1360,
"width": 245,
"height": 270,
"maxWeight": 24000
},
"items": [
{
"id": "pallet-1",
"name": "Euro Pallet",
"length": 120,
"width": 80,
"height": 100,
"weight": 500,
"quantity": 10,
"stackable": true,
"rotationMode": "base",
"shape": "box"
}
],
"settings": {
"sortStrategy": "optimal"
}
}'