Skip to main content

Analytics & Reporting

1 API call in this section.

APIs for comprehensive analytics, sales reports, and business intelligence for storefront administrators.

Dashboard Analytics​

Storefront & Commerce / Advanced Features / Analytics & Reporting
GET/storefront/analytics

Retrieves comprehensive dashboard analytics for the storefront including sales metrics, customer insights, and performance indicators.

Authentication Required

Tenant admin access

Query parameters

ParameterTypeDescription
periodstring

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

Example: 30d

Headers

ParameterTypeDescription
Authorizationstring

JWT token for tenant admin users

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/storefront/analytics?period=30d" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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}