taxRateSummary
Requires permission products:tax:read.
Returns tax-rate counts for the whole organization and the values the list screen offers as filters. Needs the tax read permission.
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 TaxRateSummary {
taxRateSummary {
activeTaxRates
averageRate
countries
recentlyUpdated
totalTaxRates
types
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query TaxRateSummary {\n taxRateSummary {\n activeTaxRates\n averageRate\n countries\n recentlyUpdated\n totalTaxRates\n types\n }\n}"
}
EOF
Response:
{
"data": {
"taxRateSummary": {
"activeTaxRates": 0,
"averageRate": 0,
"countries": [
"string"
],
"recentlyUpdated": 0,
"totalTaxRates": 0,
"types": [
"CARBON_TAX"
]
}
}
}
taxRateSummary: TaxRateSummary!
Type
TaxRateSummary object
Totals for the tax rate list and its filter choices, over the whole set.