Create a bin

Operation ID: createBin

Group: Inventory › Bins

Open in the interactive reference

POST /inventory/bins

Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.

Creates a bin. The bin belongs to one warehouse. The response is the bin's id and binCode.

A warehouse must be given its bins before any stock moves in it. Once a warehouse has inventory transactions that recorded no bin, no bin can be created for it, and the request fails with WAREHOUSE_NOT_BIN_TRACKABLE.

That warehouse can never become bin-tracked. A warehouse that already has a bin can always have more.

Parameters

Name In Type Required Description
Api-Version header string · v1 yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: createBinInput.

Field Type Required Description
binCode string yes The short code that identifies the bin, for example 'A-01-1'. Required. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created. Example: "A-01-1".
locationId string yes The unique identifier for the warehouse the bin is in. Required. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id. Example: "f5272ae0-0f0b-47d2-b78a-2158fec2cc32".
barcode string no The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created.
aisle string no The aisle in the warehouse layout. Example: "A".
rack string no The rack within the aisle. Example: "01".
shelfLevel string no The shelf level within the rack. Example: "1".
zone string no The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'. Example: "Picking".
itemPosition string no The position within the shelf, where a bin is subdivided further.
isPickingBin boolean no Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments. Example: true.
isReceivingBin boolean no Whether the bin stages newly received goods before they are put away.
isProductionBin boolean no Whether the bin feeds or receives production.
maxQuantity number no The largest number of units the bin will hold, above zero. Leave it out for no quantity limit. It is meaningful only when everything in the bin is counted in the same unit.
maxWeight decimal no The largest weight the bin will hold, in maxWeightUnit, above zero. Send it together with maxWeightUnit, or leave both out for no weight limit. Example: "250".
maxWeightUnit string no The unit maxWeight is given in. Accepted values: 'G', 'Kg', 'Lbs'. Send it together with maxWeight, or leave both out. Example: "Kg".
maxVolume decimal no The largest volume the bin will hold, in maxVolumeUnit, above zero. Send it together with maxVolumeUnit, or leave both out for no volume limit.
maxVolumeUnit string no The unit maxVolume is given in. Accepted values: 'L'. Send it together with maxVolume, or leave both out.
capacityCheckMode string no What happens when a movement would exceed a limit. Accepted values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it. Example: "HardBlock".
tempZone string no The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'.
tempMin decimal no The lowest temperature kept in the bin, in degrees Celsius. It must not be above tempMax.
tempMax decimal no The highest temperature kept in the bin, in degrees Celsius.
supportsPerishable boolean no Whether perishable stock may be kept in the bin.
active boolean no Whether the bin may be chosen for new movements. Defaults to true.
{
  "binCode": "A-01-1",
  "locationId": "f5272ae0-0f0b-47d2-b78a-2158fec2cc32",
  "barcode": "<barcode>",
  "aisle": "A",
  "rack": "01",
  "shelfLevel": "1",
  "zone": "Picking",
  "itemPosition": "<itemPosition>",
  "isPickingBin": true,
  "isReceivingBin": true,
  "isProductionBin": true,
  "maxQuantity": 0,
  "maxWeight": "250",
  "maxWeightUnit": "Kg",
  "maxVolume": "19.99",
  "maxVolumeUnit": "<maxVolumeUnit>",
  "capacityCheckMode": "HardBlock",
  "tempZone": "<tempZone>",
  "tempMin": "19.99",
  "tempMax": "19.99",
  "supportsPerishable": true,
  "active": true
}

Response

200 Success

Under data (createBinOutput):

Field Type Required Description
id string yes The unique identifier for the created bin. Example: "8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02".
binCode string no The bin's code. Example: "A-01-1".
{
  "data": {
    "id": "8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02",
    "binCode": "A-01-1"
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Response headers

Errors

Code Status
REFERENCE_NOT_FOUND 400
DUPLICATE_CODE 400
WAREHOUSE_NOT_BIN_TRACKABLE 400
UNKNOWN_VALUE 400
INCOMPLETE_LIMIT 400
NON_POSITIVE_LIMIT 400
INVALID_RANGE 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses