CubeRules Standard Bin Pack (SBP) Endpoint
Note
This endpoint will be deprecated in early 2026. The new Cartonize endpoint should be used as an alternative. See PackNet DIM Cartonize Endpoint for more information.
Attempts to pack items using a defined box list with tenant rules applied.
[POST] https://api.prod1.packnet.app/Cube/v1/CubeRules/StandardBinPack
Status Codes
200 OK: Command received and processed.
400 Bad request: The request cannot be processed due to apparent client error.
500 Internal server error: The server does not know how to process the request.
{
"orderId": "ORDER123",
"items": [
{
"sku": "SKU001",
"dimension1": 10,
"dimension2": 8,
"dimension3": 5,
"weight": 2.5,
"quantity": 3
}
],
"boxList": [
{
"id": 0,
"dimension1": 15,
"dimension2": 12,
"dimension3": 10,
"maximumWeight": 25
},
{
"id": 1,
"dimension1": 20,
"dimension2": 15,
"dimension3": 12,
"maximumWeight": 50
}
],
"selectionOptions": {
"orderBy": "percent-filled",
"cutoffTime": 20000,
"shrinkwrap": true,
"maxCartons": 5
},
"limit": 1,
"customFields": {}
} [
{
"containerId": 1,
"timeoutReached": false,
"orderId": "ORDER123",
"packagingResult": {
"isCompletePack": true,
"packedItems": [
{
"id": 0,
"isPacked": true,
"dimension1": 12.0,
"dimension2": 10.0,
"dimension3": 7.0,
"coordinateX": 0.0,
"coordinateY": 0.0,
"coordinateZ": 0.0,
"quantity": 1,
"packedDimensionX": 10.0,
"packedDimensionY": 7.0,
"packedDimensionZ": 12.0,
"volume": 840.0,
"canNest": false,
"orientationLocked": false,
"isSingleLayer": false,
"nestGrowthDimension1": 0.0,
"nestGrowthDimension2": 0.0,
"nestGrowthDimension3": 0.0,
"nestMaxDimension1": 0.0,
"nestMaxDimension2": 0.0,
"nestMaxDimension3": 0.0,
"canContain": false,
"containDimension1": 0.0,
"containDimension2": 0.0,
"containDimension3": 0.0,
"sku": "SKU001",
"voidContents": null,
"nestedQuantity": 0,
"weight": 2.5
},
{
"id": 0,
"isPacked": true,
"dimension1": 12.0,
"dimension2": 10.0,
"dimension3": 7.0,
"coordinateX": 10.0,
"coordinateY": 0.0,
"coordinateZ": 0.0,
"quantity": 1,
"packedDimensionX": 10.0,
"packedDimensionY": 7.0,
"packedDimensionZ": 12.0,
"volume": 840.0,
"canNest": false,
"orientationLocked": false,
"isSingleLayer": false,
"nestGrowthDimension1": 0.0,
"nestGrowthDimension2": 0.0,
"nestGrowthDimension3": 0.0,
"nestMaxDimension1": 0.0,
"nestMaxDimension2": 0.0,
"nestMaxDimension3": 0.0,
"canContain": false,
"containDimension1": 0.0,
"containDimension2": 0.0,
"containDimension3": 0.0,
"sku": "SKU001",
"voidContents": null,
"nestedQuantity": 0,
"weight": 2.5
},
{
"id": 0,
"isPacked": true,
"dimension1": 12.0,
"dimension2": 10.0,
"dimension3": 7.0,
"coordinateX": 0.0,
"coordinateY": 7.0,
"coordinateZ": 0.0,
"quantity": 1,
"packedDimensionX": 10.0,
"packedDimensionY": 7.0,
"packedDimensionZ": 12.0,
"volume": 840.0,
"canNest": false,
"orientationLocked": false,
"isSingleLayer": false,
"nestGrowthDimension1": 0.0,
"nestGrowthDimension2": 0.0,
"nestGrowthDimension3": 0.0,
"nestMaxDimension1": 0.0,
"nestMaxDimension2": 0.0,
"nestMaxDimension3": 0.0,
"canContain": false,
"containDimension1": 0.0,
"containDimension2": 0.0,
"containDimension3": 0.0,
"sku": "SKU001",
"voidContents": null,
"nestedQuantity": 0,
"weight": 2.5
}
],
"packTimeInMilliseconds": 0,
"percentContainerVolumePacked": 75.00,
"percentItemVolumePacked": 100.0,
"unpackedItems": [],
"packedItemsCount": 3,
"packedItemsWeight": 7.5
},
"container": {
"id": 1,
"dimension1": 20.0,
"dimension2": 14.0,
"dimension3": 12.0,
"volume": 3360.0,
"ratio": 1.4285714285714285714285714286,
"surfaceArea": 1376.0,
"distance": 27.2029410174709,
"maximumWeight": 50.0
},
"solutionTimeMs": 0,
"messages": [],
"customFields": {}
}
]CubeRules SBP Field Descriptions
CubeRules SBP Request Parameters
Item Object
List of items to be packed.
Name | Type | Required | Description |
|---|---|---|---|
dimension1 | Float | Yes | Generally, the length of the product in mm or in. |
dimension2 | Float | Yes | Generally, the width of the product in mm or in. |
dimension3 | Float | Yes | Generally, the height of the product in mm or in. |
quantity | Integer | Yes | Number of this item to pack |
id | Number | No | Item identifier |
sku | Number | No | Stock keeping unit identifier |
weight | Float | No | Weight of the item in g or lbs (default is 0) |
canNest | Boolean | No | Whether the item can be nested with like items (default is false) |
canContain | Boolean | No | Whether the item can contain other non-like items (default is false) |
BoxList Object
List of available container sizes.
Name | Data Type | Required | Description |
|---|---|---|---|
dimension1 | Float | Yes | First dimension of container in mm or in. |
dimension2 | Float | Yes | Second dimension of container in mm or in. |
dimension3 | Float | Yes | Third dimension of container in mm or in. |
Id | Float | No | Container identified |
maximumWeight | Float | No | Maximum weight allowed in the carton (default is 0 where 0 is unlimited) |
Selection Options Object
Options for selecting the best solution.
Name | Data Type | Required | Description |
|---|---|---|---|
orderBy | List | No | Sort order for possible solutions (default is percent-filled). Additional options include Distance, Surface Area, and Volume. |
cutOffTime | Integer | No | Timeout in milliseconds (default value is 0). |
shrinkwrap | Boolean | No | Trims container to fit order (default value is true which is the best option for right-sized packages). |
maxCartons | Integer | No | Max number of cartons for splitting allowed in an order (default value is 0 where 0 is unlimited). |
OrderId Object
Order identifier string
Name | Data Type | Required | Description |
|---|---|---|---|
orderID | String | No | Order identifier string (default value is null) |
CustomFields Object
Name | Data Type | Required | Description |
|---|---|---|---|
customFields | Key-value pairs | No | Echo of custom fields (default value is null) |
CubeRules SBP Response Parameters
Field | Data Type | Description |
|---|---|---|
IsCompletePack | Boolean | When all items are packed |
PackedItems | Array | List of packed item objects |
UnpackedItems | Array | List of unpacked item objects |
PackTimeInMilliseconds | Integer | Packing computation time |
PercentContainerVolumePacked | Float | % container volume used |
PercentItemVolumePacked | Float | % item volume packed |
PackedItemsCount | Integer | Number of packed items |
PackedItemsWeight | Float | Total weight of packed items |
Container Structure
Field | Data Type | Description |
|---|---|---|
Id | Integer | Container ID |
Dimension1 | Float | Length in mm |
Dimension2 | Float | Width in mm |
Dimension3 | Float | Height in mm |
Volume | Float | Container volume |
Ratio | Float | Aspect ratio |
SurfaceArea | Float | Surface area in mm² |
Distance | Float | Diagonal distance in mm or in. depending on the tenant configuration |
MaximumWeight | Float | Max allowed weight in g or lbs depending on the tenant configuration |