Update Warehouse
4/10/26Less than 1 minute
Update Warehouse
Updates the details of an existing warehouse. All fields are optional β only include what you want to change.
Endpoint
PATCH /v1/warehouses/{id}
Required Headers
{
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}Path Parameters
| Parameter | Description |
|---|---|
id | The ID of the warehouse to update. |
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated warehouse name. |
code | string | No | Updated short identifier. Must remain unique per store. |
address | string | No | Updated physical address. |
isDefault | boolean | No | Set to true to make this the default warehouse. Setting this to true will remove the default flag from any other warehouse. |
active | boolean | No | Set to false to deactivate a warehouse. Deactivated warehouses are excluded from new inventory assignments. |
π₯ Request Sample
{
"name": "Lagos Main Warehouse (Expanded)",
"isDefault": true,
"active": true
}β Sample 200 Response (Success)
{
"status": true,
"data": {
"id": "wh_abc123",
"tenantId": "tenant_xyz",
"name": "Lagos Main Warehouse (Expanded)",
"code": "LGS-01",
"address": "14 Adeola Odeku Street, Victoria Island, Lagos",
"isDefault": true,
"active": true,
"type": "OWNED",
"createdAt": "2024-11-01T10:00:00Z",
"updatedAt": "2024-12-01T14:22:00Z"
}
}β Sample Error Response
{
"status": false,
"message": "Warehouse not found."
}