Update warehouse
Changes the name, the external id or the default warehouse.
Send only what changes: name, externalId (accepts null to clear it), isDefault or status.
- Change the default: mark the other warehouse with
isDefault: true. There is noisDefault: false, because the seller never ends up without a default. The swap happens in one step: both warehouses getwarehouse.updated. - Reactivate:
status: "active"reactivates an archived warehouse. To archive, use Archive warehouse:archivedis not accepted here. - No change: if the body changes nothing, the response is
200with the warehouse, nothing is written and no event is sent.
curl -X PATCH "$BACKEND_URL/v1/warehouses/$WAREHOUSE_ID" \
-H "Authorization: Bearer mk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"isDefault":true}'Common errors
400: invalid body, for exampleisDefault: falseorstatus: "archived". Neither value exists here.409withdetails.reason = "warehouse_archived":isDefault: trueon an archived warehouse. Reactivate it first, or in the same call:{"status":"active","isDefault":true}.409withdetails.field = "externalId": another warehouse of the same seller already uses thisexternalId.404: the warehouse does not exist or belongs to another account.
api_keyAuthorizationBearer <token>API key (mk_...)
warehouseId*stringIdentifier of the warehouse, as returned by the API.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidapplication/json- body
Fields to change. Only the fields you send are updated.
name?stringNew display name, 1 to 200 characters; leading and trailing spaces are removed. Omit it to keep the current name. null is not accepted.
1 <= length <= 200externalId?|New external identifier, 1 to 120 characters after trimming, unique within the seller. Omit it to keep the current value; send null to clear it.
1 <= length <= 120isDefault?trueSend true to make this the seller's default warehouse. The current default stops being it in the same step, so the seller always has exactly one. false is not accepted: to move the default away from a warehouse, mark another one. Omit it to keep the default as it is.
truestatus?"active"Send active to reactivate an archived warehouse. Archiving is DELETE /v1/warehouses/{warehouseId}, so archived is not accepted here. Omit it to keep the current status.
"active"The warehouse after the change. A request that changes nothing answers the same way and emits no event.
application/json- response
A place where a seller keeps stock. Inventory is counted per variant and warehouse.
id*stringOpaque unique identifier of the warehouse, generated by the API. Use it in the /v1/warehouses/{warehouseId} routes and as warehouseId of an inventory movement.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidsellerId*stringThe seller that owns this warehouse. A warehouse never moves to another seller.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidname*stringDisplay name of the warehouse.
externalId*|Your own identifier for this warehouse, such as its code in your ERP, so you can find the record without storing ours. null when it was never set. Unique within the seller.
isDefault*booleantrue for the seller's default warehouse: the one an inventory movement uses when it names no warehouse. A seller has exactly one, created together with the seller. To change it, send isDefault: true for another warehouse.
status*stringLifecycle state. An active warehouse takes inventory movements and shows in the balance of every variant of the seller. An archived one stays for the ledger history and takes no new movement.
"active""archived"createdAt*stringWhen the warehouse was created, in ISO-8601 (UTC).
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$date-timeupdatedAt*stringWhen the warehouse was last changed, in ISO-8601 (UTC).
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$date-timecurl -X PATCH "https://example.com/v1/warehouses/b7e2a1c4-5d3f-4e8a-9b6c-2f1d0a8e7c35" \ -H "Content-Type: application/json" \ -d '{ "name": "Main warehouse" }'{ "id": "b7e2a1c4-5d3f-4e8a-9b6c-2f1d0a8e7c35", "sellerId": "3d1c8a52-7f0e-4b0a-8a65-9c1b2f6d7e01", "name": "Default", "externalId": null, "isDefault": true, "status": "active", "createdAt": "2026-10-10T12:00:00.000Z", "updatedAt": "2026-10-10T12:00:00.000Z"}