evaluateItem
Check how many of the provided item will be able to fit into a single bin.
The evaluateItem endpoint requires bin size and item information as input and provides detailed information about how many of the provided item will be able to fit into a single bin. It provides detailed information per item in the bin, such as how to rotate the item and where to place it.Just getting started?
Take a look at our quick start page.
Not sure which endpoint to use?
Take a look at our features for more information.
Establishing Connection
Connectivity
- Base url
https://www.packing-optimizer.com
- Path
/api/evaluateItem
- Method
POST
All API requests must be made over HTTPS.
Headers
- Authorization
Basic-Auth
- Content-Type
application/json
Your credentials can be retrieved (and reset) from your account settings.
curl --user username:password -d @input.json -H "Content-Type: application/json" https://www.packing-optimizer.com/api/evaluateItem
The Request
The Bin object
Information about the bin that will be used for packing.
A bin is a shipping unit which will contain items. Think of a box, pallet, or container.
Mandatory attributes
bin.type string
Type of bin used for packing.
Example: pallet
bin.width numeric
Width of the bin.
Example: 1.2
bin.depth numeric
Depth of the bin.
Example: 0.8
bin.height numeric
Height of the bin.
Example: 1.65
bin.maxWeight numeric
Max weight that a single bin can carry.
Example: 1500
Other attributes
bin.packingMarginWidth numeric
The maximum distance an item is allowed to exceed the width of the bin.
Example: 0.1
bin.packingMarginDepth numeric
The maximum distance an item is allowed to exceed the depth of the bin.
Example: 0.1
bin.packingMarginHeight numeric
The maximum distance an item is allowed to exceed the height of the bin.
Example: 0.1
The Item object
Information about the items that have to be packed.
The request takes a single item object as input.
Mandatory attributes
item.id string
Id to identify this individual item.
Example: ITEM001
item.width numeric
The width of the item.
Example: 0.20
item.depth numeric
The depth of the item.
Example: 0.20
item.height numeric
The height of the item.
Example: 0.20
item.weight numeric
The weight of the item.
Example: 10
Query String Options
Parameters which provide some control over the data being transmitted in the response, such as specifying the quantity or format of the data.
includeItems boolean
If false, the individual item information per bin will not be included in the response.
Options: true
or false
Default: true
Example: /api/evaluateItem?includeItems=false
responsePrecision integer
Sets the decimal precision of the response body.
Default: 3
Example: /api/evaluateItem?responsePrecision=5
itemDimensionsAfter string
If rotated, the item dimensions in the response message will be adjusted according to the rotation type.
Options: orginal
, rotated
Default: original
Example: /api/evaluateItem?itemDimensionsAfter=rotated
Example
{
"bin": {
"type": "Pallet",
"width": 1.2,
"depth": 0.8,
"height": 1.65,
"maxWeight": 1500,
"packingMarginDepth": 0.1
},
"item": {
"id": "DTM001",
"width": 0.18575,
"depth": 0.61755,
"height": 0.19368,
"weight": 10
}
}
The Response
A single bin
Contains information about the bin that has been packed.
type string
The type of bin as provided by the caller in the request body.
width numeric
The maximum width of the bin as provided by the caller in the request body.
depth numeric
The maximum depth of the bin as provided by the caller in the request body.
height numeric
The maximum height of the bin as provided by the caller in the request body.
maxVolume numeric
The maximum volume of the bin.
actualVolume numeric
Total volume of the items packed in the bin.
actualVolumeUtil numeric
actualVolume expressed in percentage points relative to the maxVolume attribute.
maxWeight numeric
The maximum weight of the bin as provided by the caller in the request body.
actualWeight numeric
Total weight of the items packed in the bin.
actualWeightUtil numeric
actualWeight expressed in percentage points relative to the maxWeight attribute.
furthestPointWidth numeric
The furthest point alongside the x axis that any item is reaching.
furthestPointDepth numeric
The furthest point alongside the y axis that any item is reaching.
furthestPointHeight numeric
The furthest point alongside the z axis that any item is reaching.
nrOfItems numeric
The total number of items packed inside the bin.
nrOfItemsPerLayer numeric
The maximum number of items packed per layer.
nrOfLayers numeric
The total number of layers that have been placed inside the bin.
fittedItems array
Contains the items inside the bin.
FittedItems
Contains information about each item that has been packed in the bin.
fittedItems[].id numeric
Item identifier as provided by the caller in the request body.
fittedItems[].layer numeric
The layer on which this item is placed.
fittedItems[].width numeric
Width of the item.
fittedItems[].depth numeric
Depth of the item.
fittedItems[].height numeric
Height of the item.
fittedItems[].weight numeric
Weight of the item.
fittedItems[].volume numeric
Volume of the item.
fittedItems[].xCoordinate numeric
X coordinate of the item inside the bin.
fittedItems[].yCoordinate numeric
Y coordinate of the item inside the bin.
fittedItems[].zCoordinate numeric
Z coordinate of the item inside the bin.
fittedItems[].rotationType numeric
Type of rotation that has been used to pack this item.
fittedItems[].rotationTypeDescription string
Rotation description.
Example
{
"actualVolume": 0.06665105,
"actualVolumeUtil": 3.060195,
"actualWeight": 1500,
"actualWeightUtil": 100,
"depth": 1,
"fittedItems": [
{
"depth": 0.61755,
"height": 0.19368,
"id": "DTM001-1",
"layer": 1,
"rotationType": 1,
"rotationTypeDescription": "Rotate around the z-axis by 90°",
"volume": 0.02221702,
"weight": 500,
"width": 0.18575,
"xCoordinate": 0,
"yCoordinate": 0,
"zCoordinate": 0
},
{
"depth": 0.61755,
"height": 0.19368,
"id": "DTM001-2",
"layer": 1,
"rotationType": 0,
"rotationTypeDescription": "No rotation",
"volume": 0.02221702,
"weight": 500,
"width": 0.18575,
"xCoordinate": 0.6175,
"yCoordinate": 0,
"zCoordinate": 0
},
{
"depth": 0.61755,
"height": 0.19368,
"id": "DTM001-3",
"layer": 1,
"rotationType": 0,
"rotationTypeDescription": "No rotation",
"volume": 0.02221702,
"weight": 500,
"width": 0.18575,
"xCoordinate": 0.8032,
"yCoordinate": 0,
"zCoordinate": 0
}
],
"furthestPointDepth": 0.61755,
"furthestPointHeight": 0.19368,
"furthestPointWidth": 0.98895,
"height": 1.65,
"maxVolume": 2.178,
"maxWeight": 1500,
"nrOfItems": 3,
"nrOfItemsPerLayer": 3,
"nrOfLayers": 1,
"packingMarginDepth": 0.1,
"packingMarginHeight": 0,
"packingMarginWidth": 0,
"type": "Pallet",
"width": 1.2
}