---
title: "Create warehouses"
method: POST
path: "/api/v1/sa/inventory/warehouses"
tags: ["Warehouses"]
---

# Create warehouses

`POST /api/v1/sa/inventory/warehouses`

## Request

- Base URL: `https://app.sellerassistant.app` (the document declares no server; this is the origin it was published from)
- URL: `https://app.sellerassistant.app/api/v1/sa/inventory/warehouses`
- Auth: one of:
  - API key in query parameter `api_key`
  - API key in header `X-Api-Key`

The body is one warehouse or an array of them. The website is unique inside the team. `is_primary: true` moves the primary flag: one team has one primary warehouse.

## Request body

- union
  - object: The create needs `name` and `website`. The update sends only the fields it changes.
    - `name` string, required: The name of the warehouse.
    - `website` string, required: Unique inside the team.
    - `location` string, nullable
    - `contacts` string, nullable
    - `config` object, nullable
    - `status` string
    - `is_primary` boolean
  - WarehouseForm[]
    - `name` string: The name of the warehouse.
    - `website` string: Unique inside the team.
    - `location` string, nullable
    - `contacts` string, nullable
    - `config` object, nullable
    - `status` string
    - `is_primary` boolean

## Response `200`

One result for each element. An array answers this shape.

- object
  - `data` Warehouse[]
    - `id` integer
    - `name` string
    - `website` string, nullable
    - `location` string, nullable
    - `contacts` string, nullable
    - `config` object, nullable
    - `status` string, nullable
    - `is_primary` boolean: One team has one primary warehouse.
    - `is_shared` boolean: A shared warehouse is read only for the team.
    - `provider` string, nullable: The prep provider the warehouse syncs with.
    - `is_synced` boolean
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
  - `meta` ApiV1BatchMeta: The count of a write that took an array.
    - `succeeded` integer
    - `failed` integer
  - `errors` ApiV1BatchError[]
    - `code` string
    - `message` string

## Other responses

- `201`: The warehouse the call wrote. One object answers this shape.
- `400`: Bad request - validation failed or invalid parameters
- `402`: Payment Required - subscription expired or payment method required
- `403`: Access denied - insufficient permissions, invalid API key, or the API request limit is used up (`public_api_key_limit`)
- `409`: Conflict - the row is there, and another row already holds the place the call asks for
- `422`: Business logic error - operation cannot be completed due to business rules
- `429`: Too many requests - rate limit exceeded

---

[API](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api.md) · [All operations](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api/revisions/5b3ecdbcadb6?raw)
