Skip to main content

PackNet Online Documentation

CubeRules Right Size Bin Pack (RSBP) Endpoint

Note

These endpoints will be deprecated in 2026. The new Cartonize endpoint should be used as an alternative. See PackNet DIM Cartonize Endpoint for more information.

Attempts to pack items using dynamic box-sizing with tenant rules applied.

[POST] https://api.prod1.packnet.app/Cube/v1/CubeRules/RightSizeBinPack

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
    }
  ],
  "containerOptions": {
    "minimumDimension1": 6,
    "maximumDimension1": 36,
    "incrementDimension1By": 2,
    "minimumDimension2": 4,
    "maximumDimension2": 24,
    "incrementDimension2By": 2,
    "minimumDimension3": 4,
    "maximumDimension3": 18,
    "incrementDimension3By": 2,
    "maximumWeight": 50
  },
  "selectionOptions": {
    "orderBy": "percent-filled",
    "cutoffTime": 20000,
    "shrinkwrap": true,
    "maxCartons": 5
  },
  "limit": 1,
  "customFields": {}
}
[
  {
    "containerId": 441,
    "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": 20.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
        }
      ],
      "packTimeInMilliseconds": 0,
      "percentContainerVolumePacked": 62.50,
      "percentItemVolumePacked": 100.0,
      "unpackedItems": [],
      "packedItemsCount": 3,
      "packedItemsWeight": 7.5
    },
    "container": {
      "id": 441,
      "dimension1": 32.0,
      "dimension2": 9.0,
      "dimension3": 14.0,
      "volume": 4032.0,
      "ratio": 3.5555555555555555555555555556,
      "surfaceArea": 1724.0,
      "distance": 36.0693775937429,
      "maximumWeight": 50.0
    },
    "solutionTimeMs": 4,
    "messages": [],
    "customFields": {}
  }
]
CubeRules RSBP Field Descriptions
CubeRules RSBP Request Field Parameters
Item Object

List of Items to be packed.

Name

Data 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 value is 0)

canNest

Boolean

No

Whether the item can be nested with like items (default value is false)

canContain

Boolean

No

Whether the item can contain other non-like items (default value is false)

Container Options Object

Dynamic container generation parameters.

Name

Data Type

Required

Description

minimumDimension1

Float

Yes

Minimum size for Dimension1 in mm or in.

maximumDimension1

Float

Yes

Maximum size for Dimension1 in mm or in.

incrementDimension1By

Float

Yes

Step size for Dimension1 in mm or in.

minimumDimension2

Float

Yes

Minimum size for Dimension2 in mm or in.

maximumDimension2

Float

Yes

Maximum size for Dimension2 in mm or in.

incrementDimension2By

Float

Yes

Step size for Dimension2 in mm or in.

minimumDimension3

Float

Yes

Minimum size for Dimension3 in mm or in.

maximumDimension3

Float

Yes

Maximum size for Dimension3 in mm or in.

incrementDimension3By

Float

Yes

Step size for Dimension3 in mm or in.

maximumWeight

Float

No

Maximum weight container can hold (default value 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 value 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 the container to fit the 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 RSBP Response Field 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