Skip to content

Deactivate a location

POST
/locations/{id}/deactivate
curl --request POST \
--url https://app.buildtrace.eu/api/locations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deactivate \
--header 'Authorization: Bearer <token>'

Take a location out of use: it can no longer receive stock or units, be a transfer or move target, have stock added by an adjustment, or be a build order’s consume-from or produce-to location, and pickers stop offering it. Stock left there can still be written off or transferred out. It stays in history and filters. Refused while it holds stock or units, or an open build order uses it. Deactivating an inactive location is not an error.

Required scope: inventory:write.

id
required
string format: uuid

Deactivated

Media typeapplication/json
object
id
required
string format: uuid
code
required
string
name
required
string
kind
required
string
notes
string
isActive
required
boolean

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"code": "example",
"name": "example",
"kind": "example",
"notes": "example",
"isActive": true
}

Unauthorized

Not found

The location still holds stock or units, or an open build order uses it; the message gives the counts

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}