Skip to main content

Analytics & Reporting

1 API call in this section.

Dashboard Analytics

Storefront & Commerce / Advanced Features / Analytics & Reporting
GET/storefront/analytics?period=30d

Retrieves comprehensive dashboard analytics for the storefront including sales metrics, customer insights, and performance indicators. Authentication Required: Tenant admin access

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/storefront/analytics?period=30d" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

periodOptional
query string

30d

Time period (7d, 30d, 90d, 1y)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

JWT token for tenant admin users

Responses

Success - Dashboard Analytics200OK
Response body
json
1{2  "success": true,3  "data": {4    "period": "30d",5    "sales": {6      "total_revenue": 125430.5,7      "total_orders": 247,8      "average_order_value": 507.85,9      "growth_rate": 12.510    },11    "customers": {12      "total_customers": 189,13      "new_customers": 45,14      "returning_customers": 144,15      "retention_rate": 76.216    },17    "top_products": [18      {19        "id": "product-uuid-1",20        "name": {21          "en": "iPhone 15 Pro"22        },23        "units_sold": 45,24        "revenue": 44999.5525      }26    ]27  }28}