Warehouses
Manage the warehouse addresses that orders ship from.
List Warehouses
GET /api/v1/warehouses
Returns all warehouses for your account.
Example
curl https://shipwave.app/api/v1/warehouses \
-H "Authorization: Bearer sw_live_abc123..."
const res = await fetch("https://shipwave.app/api/v1/warehouses", {
headers: { Authorization: "Bearer sw_live_abc123..." },
});
const { data } = await res.json();
Response
{
"data": [
{
"id": "clw9wh1",
"name": "Main Warehouse",
"isDefault": true,
"storeId": null,
"createdAt": "2026-01-10T12:00:00.000Z",
"updatedAt": "2026-02-01T08:30:00.000Z",
"address": {
"id": "clw9addr1",
"street1": "500 Commerce Dr",
"street2": "Suite 100",
"city": "Portland",
"state": "OR",
"zip": "97201",
"country": "US",
"phone": "503-555-0100",
"email": "warehouse@example.com"
}
}
]
}
Create Warehouse
POST /api/v1/warehouses
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Warehouse name |
address | object | yes | Warehouse address — see below |
isDefault | boolean | no | Set as the default warehouse (default false) |
storeId | string | no | Associate with a specific store |
Address Object:
| Field | Type | Required |
|---|---|---|
street1 | string | yes |
street2 | string | no |
city | string | yes |
state | string | yes |
zip | string | yes |
country | string | no (defaults to US) |
phone | string | no |
email | string | no |
Example
curl -X POST https://shipwave.app/api/v1/warehouses \
-H "Authorization: Bearer sw_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "East Coast Warehouse",
"address": {
"street1": "200 Industrial Pkwy",
"city": "Newark",
"state": "NJ",
"zip": "07102",
"country": "US",
"phone": "973-555-0200"
},
"isDefault": false
}'
const res = await fetch("https://shipwave.app/api/v1/warehouses", {
method: "POST",
headers: {
Authorization: "Bearer sw_live_abc123...",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "East Coast Warehouse",
address: {
street1: "200 Industrial Pkwy",
city: "Newark",
state: "NJ",
zip: "07102",
country: "US",
phone: "973-555-0200",
},
isDefault: false,
}),
});
const { data } = await res.json(); // 201 Created
Response (201 Created)
Returns the full warehouse object (same shape as the list response).
Errors
| Status | Code | Cause |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing name or required address fields |
| 404 | NOT_FOUND | storeId was provided but store was not found |
Get Warehouse
GET /api/v1/warehouses/:id
Returns a single warehouse with its address.
Example
curl https://shipwave.app/api/v1/warehouses/clw9wh1 \
-H "Authorization: Bearer sw_live_abc123..."
Errors
| Status | Code | Cause |
|---|---|---|
| 403 | FORBIDDEN | Warehouse exists but belongs to another user |
| 404 | NOT_FOUND | Warehouse not found |
Update Warehouse
PUT /api/v1/warehouses/:id
Updates an existing warehouse. Only the provided fields are modified.
Updatable Fields
| Field | Type | Description |
|---|---|---|
name | string | Warehouse name |
isDefault | boolean | Set as the default warehouse |
address | object | Partial address update (any address fields) |
Example
curl -X PUT https://shipwave.app/api/v1/warehouses/clw9wh1 \
-H "Authorization: Bearer sw_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Main Warehouse (Updated)",
"address": {
"phone": "503-555-0199"
}
}'
const res = await fetch("https://shipwave.app/api/v1/warehouses/clw9wh1", {
method: "PUT",
headers: {
Authorization: "Bearer sw_live_abc123...",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Main Warehouse (Updated)",
address: { phone: "503-555-0199" },
}),
});
Errors
| Status | Code | Cause |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid request body |
| 403 | FORBIDDEN | Warehouse exists but belongs to another user |
| 404 | NOT_FOUND | Warehouse not found |
Delete Warehouse
DELETE /api/v1/warehouses/:id
Deletes a warehouse.
Example
curl -X DELETE https://shipwave.app/api/v1/warehouses/clw9wh2 \
-H "Authorization: Bearer sw_live_abc123..."
Response
{
"data": {
"id": "clw9wh2",
"deleted": true
}
}
Errors
| Status | Code | Cause |
|---|---|---|
| 403 | FORBIDDEN | Warehouse exists but belongs to another user |
| 404 | NOT_FOUND | Warehouse not found |