3D Bin Packing

RocketShipIt comes with an experimental feature to help you determine how many packages you might need to ship items in a shopping cart.

For this example, let's assume that your company only uses USPS Flat Rate boxes. Or, you want to determine if this particular order is eligible for USPS flat rate shipping based on the items in your customer's shopping cart.

USPS flat rate boxes are available with these inside diameters:

  • Small Flat Rate Box - 8 5/8" x 5 3/8" x 1 5/8"
  • Medium Flat Rate Box – 1 (top-loading) - 11" x 8 1/2" x 5 1/2"
  • Medium Flat Rate Box – 2 (side-loading) - 13 5/8" x 11 7/8" x 3 3/8"
  • Large Flat Rate Box - 12" x 12" x 5 1/2"
  • Large Flat Rate Board Game Box - 23 11/16" x 11 3/4" x 3"

RocketShipIt's bin packing algorithm requires you to submit your available containers with their sizes.

Let's translate the USPS flat rate boxes into containers:

...
    "containers": [
      {
        "name": "Small Flat Rate Box",
        "length": 8.625,
        "width": 5.375,
        "height": 1.625,
        "max_weight": 70
      },
      {
        "name": "Medium Flat Rate Box – 1 (top-loading)",
        "length": 11,
        "width": 8.5,
        "height": 5.5,
        "max_weight": 70
      },
      {
        "name": "Medium Flat Rate Box – 2 (side-loading)",
        "length": 13.625,
        "width": 11.875,
        "height": 3.375,
        "max_weight": 70
      },
      {
        "name": "Large Flat Rate Box",
        "length": 12,
        "width": 12,
        "height": 5.5,
        "max_weight": 70
      },
      {
        "name": "Large Flat Rate Board Game Box",
        "length": 23.6875,
        "width": 11.75,
        "height": 3,
        "max_weight": 70
      }
    ],
...

Let's now start with a simple example of a single item. The RocketShipIt packing algorithm should choose the correct box (Large Flat Rate Box) that would fit this item with the least wasted space.

...
    "items": [
      {
        "name": "Item 1",
        "length": 11,
        "width": 11,
        "height": 5.5,
        "weight": 10
      }
    ]
...

RocketShipIt chooses the correct box and shows you were your items are packed:

{
  "data": {
    "packages": [
      {
        "height": 5.5,
        "items": [
          {
            "depth": 11,
            "height": 5.5,
            "name": "Item 1",
            "weight": 10,
            "width": 11
          }
        ],
        "length": 12,
        "max_weight": 70,
        "name": "Large Flat Rate Box",
        "width": 12
      }
    ]
  },
  "meta": {
    "code": 200,
    "error_message": ""
  }
}