Skip to content

createLocation

POST
/locations
curl --request POST \
--url https://app.dev.buildtrace.eu/api/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "code": "example", "name": "example", "kind": "example", "notes": "example" }'

Required scope: inventory:write.

Media typeapplication/json
object
code
required
string
name
required
string
kind
required
string
notes
string

Example generated

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

Created

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: a code that isn’t 1 to 100 letters, digits, dots, dashes or underscores, a blank name, or an unknown kind

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

Another location already has the code

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}