Skip to content

Edit a location's name, kind and notes. The code can change only while nothing refers to the location yet (no stock, units, movements or build orders); after that it is fixed, so history and labels keep reading the same. Omitted fields are left as they are; an empty notes clears it.

PATCH
/locations/{id}
curl --request PATCH \
--url https://app.dev.buildtrace.eu/api/locations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "code": "example", "name": "example", "kind": "example", "notes": "example" }'

Required scope: inventory:write.

id
required
string format: uuid
Media typeapplication/json
object
code

Only while nothing refers to the location yet.

string
name
string
kind
string
notes

An empty string clears the notes.

string

Example generated

{
"code": "example",
"name": "example",
"kind": "example",
"notes": "example"
}

Updated

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
}

Invalid (blank name or code, unknown kind)

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

Not found

The code is taken by another location, or the location is in use and its code is fixed

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}