Skip to content

Reports

Analytics reports. Every example sets SOOQUNA_TOKEN from the environment; see authentication. Responses are from a test store, cut to two items per list.

Endpoint Method Path
List available reports GET /analytics/reports
Run a report GET /analytics/reports/{key}

GET /analytics/reports · Scope: read_reports

Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/analytics/reports" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"category": "sales",
"chart": "line",
"columns": [
{"key": "period", "type": "date"},
{"key": "orders", "type": "int"}
],
"group_by": ["day", "week"],
"key": "sales_over_time"
},
{
"category": "sales",
"chart": "bar",
"columns": [
{"key": "product", "type": "text"},
{"key": "orders", "type": "int"}
],
"key": "sales_by_product"
}
]
}

GET /analytics/reports/{key} · Scope: read_reports

Parameter In Description
key path The key ID.
group_by query For example day.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/analytics/reports/sales_over_time?group_by=day" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"currency": "QAR",
"group_by": "day",
"range": {"from": "2026-10-18T09:30:00Z", "to": "2026-10-18T09:30:00Z"},
"report": {
"category": "sales",
"chart": "line",
"columns": [
{"key": "period", "type": "date"},
{"key": "orders", "type": "int"}
],
"group_by": ["day", "week"],
"key": "sales_over_time"
},
"rows": [["2026-09-19", 0], ["2026-09-20", 0]],
"totals": [null, 0]
}

Was this page helpful?