Generate locations from a range
curl --request POST \
--url https://clarus-api.com/api/location_ranges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "location_ranges",
"attributes": {
"prefix": "WH1-",
"range_start_zone": "A",
"range_end_zone": "C",
"range_start_aisle": "01",
"range_end_aisle": "10",
"warehouse_id": 1,
"location_type_id": 2,
"active": true
}
}
}
'import requests
url = "https://clarus-api.com/api/location_ranges"
payload = { "data": {
"type": "location_ranges",
"attributes": {
"prefix": "WH1-",
"range_start_zone": "A",
"range_end_zone": "C",
"range_start_aisle": "01",
"range_end_aisle": "10",
"warehouse_id": 1,
"location_type_id": 2,
"active": True
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'location_ranges',
attributes: {
prefix: 'WH1-',
range_start_zone: 'A',
range_end_zone: 'C',
range_start_aisle: '01',
range_end_aisle: '10',
warehouse_id: 1,
location_type_id: 2,
active: true
}
}
})
};
fetch('https://clarus-api.com/api/location_ranges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Locations
Generate locations from a range
Bulk-generate Location records from zone/aisle/column/row/slot ranges. Returns 204 No Content; the generated locations can be read via the Locations GraphQL list.
POST
/
api
/
location_ranges
Generate locations from a range
curl --request POST \
--url https://clarus-api.com/api/location_ranges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "location_ranges",
"attributes": {
"prefix": "WH1-",
"range_start_zone": "A",
"range_end_zone": "C",
"range_start_aisle": "01",
"range_end_aisle": "10",
"warehouse_id": 1,
"location_type_id": 2,
"active": true
}
}
}
'import requests
url = "https://clarus-api.com/api/location_ranges"
payload = { "data": {
"type": "location_ranges",
"attributes": {
"prefix": "WH1-",
"range_start_zone": "A",
"range_end_zone": "C",
"range_start_aisle": "01",
"range_end_aisle": "10",
"warehouse_id": 1,
"location_type_id": 2,
"active": True
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'location_ranges',
attributes: {
prefix: 'WH1-',
range_start_zone: 'A',
range_end_zone: 'C',
range_start_aisle: '01',
range_end_aisle: '10',
warehouse_id: 1,
location_type_id: 2,
active: true
}
}
})
};
fetch('https://clarus-api.com/api/location_ranges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "location_ranges",
"attributes": {
"prefix": "WH1-",
"range_start_zone": "A",
"range_end_zone": "C",
"range_start_aisle": "01",
"range_end_aisle": "10",
"warehouse_id": 1,
"location_type_id": 2
}
}
}
range_start_*/range_end_* pair is required). Each created location’s code is the concatenation of its range components.
| Field | Required | Description |
|---|---|---|
warehouse_id | Yes | Target warehouse |
location_type_id | Yes | Location type for the created locations |
range_start_* / range_end_* | At least one pair | Ranges for zone, aisle, column, row, slot |
prefix | No | Code prefix |
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
FlowAuthorization Code
- Authorization URL
- https://clarus-api.com/oauth/authorize
- Token URL
- https://clarus-api.com/oauth/token
FlowClient Credentials
- Token URL
- https://clarus-api.com/oauth/token
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Show child attributes
Show child attributes
Response
Operation completed successfully with no content to return

