customerTierConfig
Requires at least one of the permissions customers:customer:read, settings:customer_tiers:read or settings:tenant:read.
Returns the customer tier setup: whether tiers are on, and each tier's name, rank, threshold and discount scheme. Requires permission to read customer tier or tenant settings, or customers (the customer list shows each tier).
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query CustomerTierConfig {
customerTierConfig {
enabled
moduleEnabled
tiers {
name
discountSchemeId
isDefault
key
rank
threshold
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerTierConfig {\n customerTierConfig {\n enabled\n moduleEnabled\n tiers {\n name\n discountSchemeId\n isDefault\n key\n rank\n threshold\n }\n }\n}"
}
EOF
Response:
{
"data": {
"customerTierConfig": {
"enabled": true,
"moduleEnabled": true,
"tiers": [
{
"name": "string",
"discountSchemeId": "string",
"isDefault": true,
"key": "string",
"rank": 0,
"threshold": 0
}
]
}
}
}
customerTierConfig: CustomerTierConfig!
Type
CustomerTierConfig object
The customer discount tier setup.