> ## 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 warehouse

> Create a warehouse

### Request body

`CreateWarehouseRequest`

<ParamField body="address" type="object" />

<ParamField body="code" type="string" required />

<ParamField body="name" type="string" required />

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

<ParamField body="warehouse_type" type="string,null">
  One of `distribution`, `manufacturing`, `retail`, `third_party`, `consignment`, `returns`.
</ParamField>

### Responses

<ResponseField name="201" type="WarehouseResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/warehouses' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "address": null,
    "code": "string",
    "name": "string",
    "timezone": null,
    "warehouse_type": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "city": null,
    "code": "string",
    "country": null,
    "created_at": "string",
    "id": 1,
    "is_active": true,
    "name": "string",
    "timezone": null,
    "warehouse_type": "string"
  }
  ```
</ResponseExample>
