List packages
curl --request POST \
--url 'https://clarus-api.com/graphql#ListPackages' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"query": "query($filter: PackageFilterType) { packages { all(filter: $filter) { edges { node { id tracking_number shipment { id reference } storage_unit_type { id code } } } } } }"
}
'import requests
url = "https://clarus-api.com/graphql#ListPackages"
payload = { "query": "query($filter: PackageFilterType) { packages { all(filter: $filter) { edges { node { id tracking_number shipment { id reference } storage_unit_type { id code } } } } } }" }
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({
query: 'query($filter: PackageFilterType) { packages { all(filter: $filter) { edges { node { id tracking_number shipment { id reference } storage_unit_type { id code } } } } } }'
})
};
fetch('https://clarus-api.com/graphql#ListPackages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"packages": {
"all": {
"edges": [
{
"node": {
"id": "4821",
"tracking_number": "1Z999AA10123456784",
"shipment": {
"id": "1530",
"reference": "SHP-2026-001530"
},
"storage_unit_type": {
"id": "12",
"code": "EUROPALLET"
}
}
}
]
}
}
}
}{
"error": "<string>"
}Packages
List packages
Retrieve packages using GraphQL. Supports filtering, sorting, and pagination via relay-style connections.
POST
/
graphql#ListPackages
List packages
curl --request POST \
--url 'https://clarus-api.com/graphql#ListPackages' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"query": "query($filter: PackageFilterType) { packages { all(filter: $filter) { edges { node { id tracking_number shipment { id reference } storage_unit_type { id code } } } } } }"
}
'import requests
url = "https://clarus-api.com/graphql#ListPackages"
payload = { "query": "query($filter: PackageFilterType) { packages { all(filter: $filter) { edges { node { id tracking_number shipment { id reference } storage_unit_type { id code } } } } } }" }
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({
query: 'query($filter: PackageFilterType) { packages { all(filter: $filter) { edges { node { id tracking_number shipment { id reference } storage_unit_type { id code } } } } } }'
})
};
fetch('https://clarus-api.com/graphql#ListPackages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"packages": {
"all": {
"edges": [
{
"node": {
"id": "4821",
"tracking_number": "1Z999AA10123456784",
"shipment": {
"id": "1530",
"reference": "SHP-2026-001530"
},
"storage_unit_type": {
"id": "12",
"code": "EUROPALLET"
}
}
}
]
}
}
}
}{
"error": "<string>"
}Query Structure
query($filter: PackageFilterType) {
packages {
all(filter: $filter) {
edges {
node {
id
tracking_number
shipment {
id
reference
}
storage_unit_type {
id
code
}
}
}
}
}
}
Filter Argument
All filters are passed inside thefilter argument. Each filter field accepts an input object with operators (e.g. eq, ilike, from, to, between):
{
"filter": {
"shipment_id": {
"eq": "value"
}
}
}
Available Filters
| Filter | Input Type | Operators | Description |
|---|---|---|---|
shipment_id | IdInputType | eq, in, gt, gteq, lt, lteq, filled | Shipment ID |
shipment_reference | StringInputType | eq, ilike, like, in, between | Shipment reference |
storage_unit_id | IdInputType | eq, in, gt, gteq, lt, lteq, filled | Storage unit ID |
storage_unit_type_code | StringInputType | eq, ilike, like, in, between | Storage unit type code |
tracking_number | StringInputType | eq, ilike, like, in, between | Carrier tracking number |
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
GraphQL query string
Example:
"query($filter: PackageFilterType) { packages { all(filter: $filter) { edges { node { id tracking_number shipment { id reference } storage_unit_type { id code } } } } } }"
Query variables including the filter object
Show child attributes
Show child attributes
Example:
{
"filter": { "tracking_number": { "ilike": "1Z" } }
}

