Skip to main content
POST
/
graphql#ListStorageUnitTypes
List storage unit types
curl --request POST \
  --url 'https://clarus-api.com/graphql#ListStorageUnitTypes' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "query": "query($filter: StorageUnitTypeFilterType) { storage_unit_types { all(filter: $filter) { edges { node { id code name unit_name is_pickable has_check_digit dimensions { length width height weight unit_of_measure } } } } } }"
}
'
{
  "data": {
    "storage_unit_types": {
      "all": {
        "edges": [
          {
            "node": {
              "id": "12",
              "code": "STDPAL",
              "name": "Standard Pallet",
              "unit_name": "Pallet",
              "is_pickable": false,
              "has_check_digit": true,
              "dimensions": {
                "length": 1.2,
                "width": 1,
                "height": 1.5,
                "weight": 25,
                "unit_of_measure": "metre"
              }
            }
          }
        ]
      }
    }
  }
}

Query Structure

query($filter: StorageUnitTypeFilterType) {
  storage_unit_types {
    all(filter: $filter) {
      edges {
        node {
          id
          code
          name
          unit_name
          is_pickable
          has_check_digit
          dimensions {
            length
            width
            height
            weight
            unit_of_measure
          }
        }
      }
    }
  }
}

Filter Argument

All filters are passed inside the filter argument. Each filter field accepts an input object with operators (e.g. eq, ilike, from, to, between):
{
  "filter": {
    "code": {
      "ilike": "value"
    }
  }
}

Available Filters

FilterInput TypeOperatorsDescription
codeStringInputTypeeq, ilike, like, in, betweenCode
nameStringInputTypeeq, ilike, like, in, betweenName
unit_nameStringInputTypeeq, ilike, like, in, betweenUnit name
is_pickableBooleanInputTypeeqPickable flag
has_check_digitBooleanInputTypeeqCheck-digit flag
leaves_warehouseBooleanInputTypeeqLeaves-warehouse flag
More fields and filters available via GraphQL introspection.

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
query
string<textarea>
required

GraphQL query string

Example:

"query($filter: StorageUnitTypeFilterType) { storage_unit_types { all(filter: $filter) { edges { node { id code name unit_name is_pickable has_check_digit dimensions { length width height weight unit_of_measure } } } } } }"

variables
object

Query variables including the filter object

Example:
{ "filter": { "code": { "ilike": "PAL" } } }

Response

Successful GraphQL response

data
object
errors
object[]