Overview /
Operations /
Delete a branch
Delete a branch
delete
https://api.flactrum.com/v1/branches/{branch}
A branch that already has orders cannot be deleted — past sales would lose their owner and report totals would stop adding up. Close it with is_active: false instead.
| Required scope | branches.write |
| Success status | 204 |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| branch * | 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/branches/01m43mxk9mgzcnth1f1gcg6jzb' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Accept: application/json'
HTTP 204
(empty body)
curl -X DELETE 'https://api.flactrum.com/v1/branches/01m43mxkcej1p4vne7f4b9hgyh' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Accept: application/json'
HTTP 409 · application/json
{
"error": {
"code": "conflict",
"message": "This branch has orders and cannot be deleted. Set is_active to false to close it instead.",
"details": {
"branch_id": "01m43mxkcej1p4vne7f4b9hgyh"
}
}
}