Overview /
Stock & supply /
Delete a warehouse
Delete a warehouse
delete
https://api.flactrum.com/v1/warehouses/{warehouse}
A warehouse still holding stock cannot be deleted.
| Required scope | warehouses.write |
| Success status | 204 |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| warehouse * | path | string | ULID of the record. |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X DELETE 'https://api.flactrum.com/v1/warehouses/01m43mzk7wcn9xm2q8hszmgf4k' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Accept: application/json'
HTTP 204
(empty body)
curl -X DELETE 'https://api.flactrum.com/v1/warehouses/01m43mzk7wcn9xm2q8hszmgf4k' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Accept: application/json'
HTTP 409 · application/json
{
"error": {
"code": "conflict",
"message": "This warehouse still holds stock in 1 item(s). Move it out first.",
"details": {
"stocked_item_count": 1
}
}
}