Create a new warehouse
# Create a new warehouse
Creates a new warehouse with the specified name, slug, address, and optional market associations. The warehouse can be marked as available online and linked to one or more markets.
POST
/api/v1/{team_slug}/{app_slug}/warehouses
PurposeCreates a new warehouse with the specified name, slug, address, and optional market associations.
Required inputsapp_slug path team_slug path
Primary response200 ยท Warehouse created successfully
Operation keymanagement-api:POST:/api/v1/{team_slug}/{app_slug}/warehouses
## API ownership
- API family: Management API
- Best for: Trusted back-office workflows that create, update, organize, or delete merchant-owned data.
- Do not use from: Browser-only storefront code or public clients.
- Guide route: [/apis/management/latest](/apis/management/latest)
The OpenAPI contract defines the method, path, parameters, request body, and responses for this operation.
## Operation
- Method: `POST`
- Path: `/api/v1/{team_slug}/{app_slug}/warehouses`
- Summary: Create a new warehouse
- Description: Creates a new warehouse with the specified name, slug, address, and optional market associations. The warehouse can be marked as available online and linked to one or more markets.
- OpenAPI contract:
management-api
- Operation ID: Not documented in the OpenAPI contract.
- Stable operation key: `management-api:POST:/api/v1/{team_slug}/{app_slug}/warehouses`
Operation key uses API family, method, and path because this OpenAPI contract does not publish an operation ID.
## Parameters
| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| app_slug | path | Yes | string | App slug |
| team_slug | path | Yes | string | Team slug |
## Request body
- Required: Yes
- Description: Warehouse data
- Content: application/json (object)
### Input Warehouse
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `address` | object | Yes | - |
| `available_online` | boolean | No | default: true |
| `markets` | string[] | No | - |
| `name` | string | Yes | - |
| `slug` | string | Yes | - |
#### Input Warehouse Address
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `city` | string | Yes | - |
| `country` | string | Yes | Country value needs to follow ISO3166_1_alpha2, which means we want a country value written in alpha-2 two-letter country codes, Example: SE or FI |
| `postal_code` | string | Yes | - |
| `state` | string | Yes | - |
| `street_address` | string | Yes | - |
**Generated example (synthetic):**
```json
{
"address": {
"city": "string",
"country": "string",
"postal_code": "string",
"state": "string",
"street_address": "string"
},
"available_online": false,
"markets": [
"string"
],
"name": "string",
"slug": "string"
}
```
## Responses
| Status | Description | Content |
| --- | --- | --- |
| 200 | Warehouse created successfully | application/json (object) |
| 201 | Successful response | application/json (object) |
| 400 | Invalid request (e.g. bad UUID, validation error) | application/json (object) |
| 401 | Unauthorized access | application/json (object) |
| 500 | Internal server error | application/json (object) |
### 200 - object
#### Warehouse Response
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `data` | object | Yes | - |
| `details` | string[] | No | Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes |
| `success` | boolean | Yes | - |
##### Warehouse With Markets
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `address` | object | No | - |
| `app_id` | string | No | - |
| `available_online` | boolean | No | - |
| `created_at` | string | No | - |
| `id` | string | No | - |
| `markets` | object[] | No | - |
| `name` | string | No | - |
| `slug` | string | No | - |
| `updated_at` | string | No | - |
##### Warehouse Address
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `city` | string | No | - |
| `country` | string | Yes | Country value needs to follow ISO3166_1_alpha2, which means we want a country value written in alpha-2 two-letter country codes, Example: SE or FI |
| `postal_code` | string | No | - |
| `state` | string | No | - |
| `street_address` | string | No | - |
##### Market
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `active` | boolean | No | - |
| `country_codes` | string[] | No | - |
| `created_at` | string | No | - |
| `currency_code` | string | No | - |
| `id` | string | No | - |
| `locale` | string | No | - |
| `name` | string | No | - |
| `slug` | string | No | - |
| `updated_at` | string | No | - |
**Generated example (synthetic):**
```json
{
"data": {
"address": {
"city": "string",
"country": "string",
"postal_code": "string",
"state": "string",
"street_address": "string"
},
"app_id": "string",
"available_online": false,
"created_at": "string",
"id": "string",
"markets": [
{
"active": false,
"country_codes": [],
"created_at": "string",
"currency_code": "string",
"id": "string",
"locale": "string",
"name": "string",
"slug": "string",
"updated_at": "string"
}
],
"name": "string",
"slug": "string",
"updated_at": "string"
},
"details": [
"string"
],
"success": false
}
```
### 201 - object
#### Warehouse Response
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `data` | object | Yes | - |
| `details` | string[] | No | Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes |
| `success` | boolean | Yes | - |
##### Warehouse With Markets
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `address` | object | No | - |
| `app_id` | string | No | - |
| `available_online` | boolean | No | - |
| `created_at` | string | No | - |
| `id` | string | No | - |
| `markets` | object[] | No | - |
| `name` | string | No | - |
| `slug` | string | No | - |
| `updated_at` | string | No | - |
##### Warehouse Address
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `city` | string | No | - |
| `country` | string | Yes | Country value needs to follow ISO3166_1_alpha2, which means we want a country value written in alpha-2 two-letter country codes, Example: SE or FI |
| `postal_code` | string | No | - |
| `state` | string | No | - |
| `street_address` | string | No | - |
##### Market
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `active` | boolean | No | - |
| `country_codes` | string[] | No | - |
| `created_at` | string | No | - |
| `currency_code` | string | No | - |
| `id` | string | No | - |
| `locale` | string | No | - |
| `name` | string | No | - |
| `slug` | string | No | - |
| `updated_at` | string | No | - |
**Generated example (synthetic):**
```json
{
"data": {
"address": {
"city": "string",
"country": "string",
"postal_code": "string",
"state": "string",
"street_address": "string"
},
"app_id": "string",
"available_online": false,
"created_at": "string",
"id": "string",
"markets": [
{
"active": false,
"country_codes": [],
"created_at": "string",
"currency_code": "string",
"id": "string",
"locale": "string",
"name": "string",
"slug": "string",
"updated_at": "string"
}
],
"name": "string",
"slug": "string",
"updated_at": "string"
},
"details": [
"string"
],
"success": false
}
```
### 400 - object
#### Error Message
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `details` | string[] | No | - |
| `message` | string | No | - |
| `success` | boolean | Yes | - |
**Generated example (synthetic):**
```json
{
"details": [
"string"
],
"message": "string",
"success": false
}
```
### 401 - object
#### Error Message
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `details` | string[] | No | - |
| `message` | string | No | - |
| `success` | boolean | Yes | - |
**Generated example (synthetic):**
```json
{
"details": [
"string"
],
"message": "string",
"success": false
}
```
### 500 - object
#### Error Message
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `details` | string[] | No | - |
| `message` | string | No | - |
| `success` | boolean | Yes | - |
**Generated example (synthetic):**
```json
{
"details": [
"string"
],
"message": "string",
"success": false
}
```
## Contract identity
Use these fields to confirm you are implementing the intended endpoint contract.
- API family: Management API
- Method: `POST`
- Path: `/api/v1/{team_slug}/{app_slug}/warehouses`
- Operation ID: Not documented in the OpenAPI contract.
- Stable operation key: `management-api:POST:/api/v1/{team_slug}/{app_slug}/warehouses`
- OpenAPI tag: Warehouses
- OpenAPI summary: Create a new warehouse