Skip to main content
PATCH
/
locations
/
{id}
Update a location
curl --request PATCH \
  --url https://api.retrac.co/locations/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "note": "<string>",
  "active": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "active": true,
  "createdAt": "<string>",
  "note": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer API key from Settings → API Keys. Use restricted keys (prefix retrac_) with the minimum scopes required.

Path Parameters

id
string
required

The location ID.

Query Parameters

workspaceId
string
required

The ID of the workspace.

Example:

"ws_cluuwcv0r..."

projectSlug
string
deprecated

The slug of the project. This field is deprecated – use workspaceId instead.

Body

application/json
name
string
Required string length: 1 - 64
type
enum<string>
Available options:
warehouse,
van,
truck,
site,
other
note
string | null
Maximum string length: 500
active
boolean
accessLevel
enum<string> | null

The access level of the location within the workspace.

Available options:
read,
write,
null

Response

The updated location

id
string
required
name
string
required
type
enum<string>
required
Available options:
warehouse,
van,
truck,
site,
other
active
boolean
required
createdAt
string
required
note
string | null