Skip to main content
POST
/
locations
Create a location
curl --request POST \
  --url https://api.retrac.co/locations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "warehouse",
  "note": "<string>",
  "accessLevel": null
}
'
{
  "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.

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
Required string length: 1 - 64
type
enum<string>
default:warehouse
Available options:
warehouse,
van,
truck,
site,
other
note
string | null
Maximum string length: 500
accessLevel
enum<string> | null

The access level of the location within the workspace.

Available options:
read,
write,
null

Response

The created 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