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

FieldTypeRequiredDescription
namestringyesWarehouse name
addressobjectyesWarehouse address — see below
isDefaultbooleannoSet as the default warehouse (default false)
storeIdstringnoAssociate with a specific store

Address Object:

FieldTypeRequired
street1stringyes
street2stringno
citystringyes
statestringyes
zipstringyes
countrystringno (defaults to US)
phonestringno
emailstringno

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

StatusCodeCause
400VALIDATION_ERRORMissing name or required address fields
404NOT_FOUNDstoreId 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

StatusCodeCause
403FORBIDDENWarehouse exists but belongs to another user
404NOT_FOUNDWarehouse not found

Update Warehouse

PUT /api/v1/warehouses/:id

Updates an existing warehouse. Only the provided fields are modified.

Updatable Fields

FieldTypeDescription
namestringWarehouse name
isDefaultbooleanSet as the default warehouse
addressobjectPartial 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

StatusCodeCause
400VALIDATION_ERRORInvalid request body
403FORBIDDENWarehouse exists but belongs to another user
404NOT_FOUNDWarehouse 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

StatusCodeCause
403FORBIDDENWarehouse exists but belongs to another user
404NOT_FOUNDWarehouse not found