catalogPerformanceAnalytics
Requires an authenticated session.
Catalog performance analytics over a date range. Org-wide figures: needs the analytics:organization:read permission, so users limited to their own records are refused.
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 CatalogPerformanceAnalytics($range: AnalyticsRangeInput!) {
catalogPerformanceAnalytics(range: $range) {
decliningProducts {
name
deltaPct
previousRevenue
productId
revenue
units
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CatalogPerformanceAnalytics($range: AnalyticsRangeInput!) {\n catalogPerformanceAnalytics(range: $range) {\n decliningProducts {\n name\n deltaPct\n previousRevenue\n productId\n revenue\n units\n }\n }\n}",
"variables": {
"range": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}
}
EOF
Variables:
{
"range": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}
Response:
{
"data": {
"catalogPerformanceAnalytics": {
"decliningProducts": [
{
"name": "string",
"deltaPct": 0,
"previousRevenue": 0,
"productId": "id",
"revenue": 0,
"units": 0
}
]
}
}
}
catalogPerformanceAnalytics(
range: AnalyticsRangeInput!
): CatalogPerformanceAnalytics!
Arguments
catalogPerformanceAnalytics.range ● AnalyticsRangeInput! non-null input
The date range and, optionally, the visibility scope.
Type
CatalogPerformanceAnalytics object
How the catalog performs.