Skip to main content
POST
/
api
/
location_types
Create a location type
curl --request POST \
  --url https://clarus-api.com/api/location_types \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "data": {
    "type": "location_types",
    "attributes": {
      "code": "BAY",
      "name": "Pick Bay",
      "description": "Standard pickable bay location"
    }
  }
}
'
{
  "data": {
    "id": "6",
    "type": "location_types",
    "attributes": {
      "code": "BAY",
      "name": "Pick Bay",
      "description": "Standard pickable bay location"
    }
  }
}

Request Structure

{
  "data": {
    "type": "location_types",
    "attributes": {
      "code": "BAY",
      "name": "Pick Bay"
    }
  }
}

Key Fields

FieldRequiredDescription
codeYesUnique location type code (max 50)
nameYesDisplay name (max 150)
descriptionNoDescription
Certain codes carry special behaviour (e.g. BAY, GOBAY, PICKANDDROP, WORK, PERSONALLOCATION).

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Body

application/json
data
object
required

Response

Created successfully

data
object