> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a bin

> Create a bin

### Request body

`CreateBinRequest`

<ParamField body="aisle" type="string,null" />

<ParamField body="bin_type" type="string,null">
  One of `pick`, `bulk`, `receiving`, `staging`, `quarantine`, `returns`. Default `pick`.
</ParamField>

<ParamField body="capacity" type="string,null">
  Optional per-SKU maximum on-hand quantity (decimal string).
</ParamField>

<ParamField body="code" type="string" required>
  Unique per warehouse.
</ParamField>

<ParamField body="position" type="string,null" />

<ParamField body="rack" type="string,null" />

<ParamField body="shelf" type="string,null" />

<ParamField body="warehouse_id" type="integer (int32)" required />

<ParamField body="zone" type="string,null" />

### Response

`BinResponse`

<ResponseField name="aisle" type="string,null" />

<ResponseField name="bin_type" type="string" required />

<ResponseField name="capacity" type="string,null" />

<ResponseField name="code" type="string" required />

<ResponseField name="created_at" type="string" required />

<ResponseField name="id" type="integer (int32)" required />

<ResponseField name="is_active" type="boolean" required />

<ResponseField name="position" type="string,null" />

<ResponseField name="rack" type="string,null" />

<ResponseField name="shelf" type="string,null" />

<ResponseField name="updated_at" type="string" required />

<ResponseField name="warehouse_id" type="integer (int32)" required />

<ResponseField name="zone" type="string,null" />

### Status codes

| Code  | Meaning |
| ----- | ------- |
| `201` | —       |
| `400` | —       |
| `409` | —       |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/warehouse-bins' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "aisle": null,
    "bin_type": null,
    "capacity": null,
    "code": "string",
    "position": null,
    "rack": null,
    "shelf": null,
    "warehouse_id": 1,
    "zone": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "aisle": null,
    "bin_type": "string",
    "capacity": null,
    "code": "string",
    "created_at": "string",
    "id": 1,
    "is_active": true,
    "position": null,
    "rack": null,
    "shelf": null,
    "updated_at": "string",
    "warehouse_id": 1,
    "zone": null
  }
  ```
</ResponseExample>
