# Bins _(Realtime-enabled)_

`GET` `POST` `PATCH` `DELETE` _(Table: Bin)_

```
eOne/core/v1.0/bins
```

Read and write warehouse bins. A bin belongs to a location; `locationCode` + `code` together form the key, so both are required on create.

## Create a bin

`POST` `/bins`

```
{
  "locationCode": "MAIN",
  "code": "A-01-001",
  "displayName": "Aisle A, Bay 01, Level 001",
  "zoneCode": "PICK",
  "integrationId": "WMS-A01001"
}
```

## Create bins under a location (deep insert)

Bins are also a child of [Locations](https://eonesolutions.github.io/eone-bc-integration/core-locations.md). POST to the location with a `bins` array and the parent `locationCode` is stamped for you:

```
POST /locations
{
  "code": "MAIN",
  "displayName": "Main Warehouse",
  "bins": [
    { "code": "RECEIVE", "displayName": "Receiving" },
    { "code": "SHIP", "displayName": "Shipping" }
  ]
}
```

## Rename

> **Caution:** Changing `locationCode` or `code` on a PATCH **renames** the bin (carrying its contents) rather than creating a new one.

> **Note:** Bins carry an `integrationId`, so you can also address one by your own external key. See [The Integration Id](https://eonesolutions.github.io/eone-bc-integration/integration-id.md).

## Bins fields

_API column → BC field._

**Legend**

- _(req)_ required on create
- _(res)_ resolver
- _(cur)_ currency-translated
- _(ro)_ read-only
- _(ext)_ added to this endpoint by another extension (BC field name shown; its API column name is not known here)

| API | BC field | Notes |
| --- | --- | --- |
| `id` | SystemId | BC record GUID. _(ro)_ |
| `bcCompanyId` | bcCompanyId | The company this row belongs to - the same GUID that appears in the request URL. Present on every endpoint so a store pooling several companies can keep them apart without relying on which URL it called. _(ro)_ |
| `bcCompanyName` | bcCompanyName | The name of the company this row belongs to. _(ro)_ |
| `locationCode` | Location Code | Parent location; part of the key. Required. _(req)_ |
| `code` | Code | Bin code; part of the key. Required. _(req)_ |
| `integrationId` | EONE Integration Id | Your external key. |
| `displayName` | Description | Bin description. |
| `zoneCode` | Zone Code | Zone the bin sits in. |
| `binTypeCode` | Bin Type Code | Bin type (receive/ship/pick/put-away). |
| `warehouseClassCode` | Warehouse Class Code | Warehouse class. |
| `specialEquipmentCode` | Special Equipment Code | Equipment needed to work the bin. |
| `blockMovement` | Block Movement | Blocks inbound/outbound movement. |
| `binRanking` | Bin Ranking | Higher ranks are picked first. |
| `maximumCubage` | Maximum Cubage | Capacity by volume. |
| `maximumWeight` | Maximum Weight | Capacity by weight. |
| `crossDockBin` | Cross-Dock Bin | Marks a cross-dock bin. |
| `dedicated` | Dedicated | Quantities protected from other demand. |
| `createdDateTime` | SystemCreatedAt | _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Nested under [Locations](https://eonesolutions.github.io/eone-bc-integration/core-locations.md).
