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.
POST
/locations/{id}/deactivate
const url = 'https://app.dev.buildtrace.eu/api/locations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deactivate';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.dev.buildtrace.eu/api/locations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deactivate \ --header 'Authorization: Bearer <token>'Required scope: inventory:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Responses
Section titled “Responses”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"}