V3

Version 3 of the Binacle.Net API builds upon Version 2โ€™s Pack By Custom but only accepts an algorithm selection as a parameter.

It also introduces ViPaq, a protocol for encoding packing information efficiently.

๐Ÿ” Learn more:

This API version is experimental and can change at any time.


๐Ÿ“‘ Contents


๐Ÿ“ฆ Pack by Custom

POST /api/v3/pack/by-custom
Performs the Packing function for all provided bins and items using the selected algorithm.

Request Example

{
  "parameters": {
    "algorithm": "FFD"
  },
  "bins": [
    { "id": "custom_bin_1", "length": 10, "width": 40, "height": 60 },
    { "id": "custom_bin_2", "length": 20, "width": 40, "height": 60 }
  ],
  "items": [
    { "id": "box_1", "quantity": 2, "length": 2, "width": 5, "height": 10 },
    { "id": "box_2", "quantity": 1, "length": 12, "width": 15, "height": 10 },
    { "id": "box_3", "quantity": 1, "length": 12, "width": 10, "height": 15 }
  ]
}

Response Example

{
  "result": "Success",
  "data": [
    {
      "result": "FullyPacked",
      "bin": { "id": "custom_bin_1", "length": 10, "width": 40, "height": 60 },
      "packedItems": [
        { "id": "box_2", "length": 10, "width": 12, "height": 15, "x": 0, "y": 0, "z": 0 },
        { "id": "box_3", "length": 10, "width": 12, "height": 15, "x": 0, "y": 12, "z": 0 },
        { "id": "box_1", "length": 2, "width": 5, "height": 10, "x": 0, "y": 0, "z": 15 },
        { "id": "box_1", "length": 2, "width": 5, "height": 10, "x": 0, "y": 24, "z": 0 }
      ],
      "unpackedItems": [],
      "packedItemsVolumePercentage": 100,
      "packedBinVolumePercentage": 15.83,
      "viPaqData": "AAQACig8CgwPAAAACgwPAAwAAgUKAAAPAgUKABgA"
    },
    {
      "result": "FullyPacked",
      "bin": { "id": "custom_bin_2", "length": 20, "width": 40, "height": 60 },
      "packedItems": [
        { "id": "box_2", "length": 12, "width": 15, "height": 10, "x": 0, "y": 0, "z": 0 },
        { "id": "box_3", "length": 12, "width": 10, "height": 15, "x": 0, "y": 15, "z": 0 },
        { "id": "box_1", "length": 2, "width": 5, "height": 10, "x": 12, "y": 0, "z": 0 },
        { "id": "box_1", "length": 2, "width": 5, "height": 10, "x": 0, "y": 0, "z": 10 }
      ],
      "unpackedItems": [],
      "packedItemsVolumePercentage": 100,
      "packedBinVolumePercentage": 7.92,
      "viPaqData": "AAQAFCg8DA8KAAAADAoPAA8AAgUKDAAAAgUKAAAK"
    }
  ]
}

๐Ÿ“ฆ Packing Parameters


๐Ÿง  Available Algorithms: