Which locker size does this order need?

A customer at checkout picks a locker to collect from. Your carrier's API tells you where the lockers are and which compartments are free. It does not tell you whether the order fits one.

Send Binacle.Net the compartment sizes and the items, and it answers before the customer commits.

The problem

What it costs when nobody checks

The order is packed and labelled for a compartment it does not go into. Someone finds that out at the locker, not at the desk. The parcel is rerouted to an address or comes back to you, and the customer has already paid for the delivery they chose.

The check itself is one call, and it happens while the locker options are still on screen.

A worked example

One order, three compartment sizes

Send the compartments you can actually book, and the items in the cart.

POST /api/v3/fit/by-custom
{
  "parameters": { "algorithm": "FFD" },
  "bins": [
    { "id": "compartment-S", "length": 61, "width": 44, "height": 8 },
    { "id": "compartment-M", "length": 61, "width": 44, "height": 19 },
    { "id": "compartment-L", "length": 61, "width": 44, "height": 41 }
  ],
  "items": [
    { "id": "kettle-boxed", "quantity": 1, "length": 24, "width": 20, "height": 28 }
  ]
}
RESPONSE
{
  "result": "Success",
  "data": [
    {
      "result": "NotAllItemsFit",
      "bin": { "id": "compartment-S", "length": 61, "width": 44, "height": 8 },
      "fittedItems": [],
      "unfittedItems": [ { "id": "kettle-boxed", "quantity": 1 } ],
      "fittedBinVolumePercentage": 0,
      "fittedItemsVolumePercentage": 0
    },
    {
      "result": "NotAllItemsFit",
      "bin": { "id": "compartment-M", "length": 61, "width": 44, "height": 19 },
      "fittedItems": [],
      "unfittedItems": [ { "id": "kettle-boxed", "quantity": 1 } ],
      "fittedBinVolumePercentage": 0,
      "fittedItemsVolumePercentage": 0
    },
    {
      "result": "AllItemsFit",
      "bin": { "id": "compartment-L", "length": 61, "width": 44, "height": 41 },
      "fittedItems": [ { "id": "kettle-boxed", "length": 24, "width": 20, "height": 28 } ],
      "unfittedItems": [],
      "fittedBinVolumePercentage": 12.21,
      "fittedItemsVolumePercentage": 100
    }
  ]
}

Only the large compartment takes this order. Offer that one, or offer a courier.

Every compartment comes back with its own verdict, so the checkout page can grey out the sizes that will not work instead of letting the customer pick one that fails later.

Integrating

What it needs from you

  • Use centimetres for all measurements, and keep the values as integers.
  • Represent products as rectangular prisms - length, width, height. Irregular shapes have to be boxed first.
  • Use the maximum measurement of a product, not the nominal one. A box that is 24 cm on the label and 24.6 cm in the hand is the one that comes back.
  • Track weight yourself. Binacle.Net measures space and nothing else, so the carrier's weight limit is a check your code still has to make.

The integration guide has the rest, including the two ways to choose a bin set and where the call goes in a checkout flow.

A limit

Compartment sizes come from your carrier

The numbers in the request above are the shape a locker bank tends to have. They are not any carrier's published dimensions, and Binacle.Net ships no list of them. Get the real sizes from whoever runs the lockers you ship to, and configure them as your bin set.

There is no integration with any locker network, and none is implied. Binacle.Net answers the geometry question; booking the compartment stays between you and your carrier.

Get started

Run it

One image, one port.

docker run -d --name binacle-net -p 8080:8080 -e SWAGGER_UI=True -e SCALAR_UI=True -e UI_MODULE=True binacle/binacle-net:3.0

If your team calls this picking the right box for an order, it is the same call with your own boxes in place of the compartments.

The rest of what it does is on the homepage.