Skip to main content

Reports

2 API calls in this section.

Get Reports Summary​

Customer Portal / Delivery Management / Reports
GET/customer/delivery/reports/summary

Customer-scoped delivery reports summary.

Returns

  • KPIs (orders/delivered/in_transit/cancelled+returned/spend)

  • Orders over time chart

  • Status breakdown

  • COD summary (scoped to the customer)

Query parameters

ParameterTypeDescription
rangestring

last_7_days | last_30_days | this_week | this_month | this_year | till_now | custom

Example: last_7_days

from_datestring

Required when range=custom (YYYY-MM-DD)

to_datestring

Required when range=custom (YYYY-MM-DD)

group_bystring

auto | day | week | month (auto picks based on range)

Example: auto

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/customer/delivery/reports/summary?range=last_7_days&group_by=auto" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "range": {5      "key": "last_7_days",6      "from": "2026-02-24",7      "to": "2026-03-02",8      "tz": "UTC",9      "group_by": "day",10      "chart_from": "2026-02-24",11      "chart_to": "2026-03-02"12    },13    "kpis": {14      "orders": 120,15      "delivered": 90,16      "in_transit": 12,17      "cancelled_returned": 4,18      "spend": 250,19      "completion_rate": 7520    },21    "charts": {22      "orders_over_time": {23        "labels": [24          "2026-02-24",25          "2026-02-25"26        ],27        "series": {28          "created": [29            12,30            1831          ],32          "delivered": [33            8,34            1535          ]36        }37      },38      "status_breakdown": {39        "draft": 0,40        "pending": 8,41        "assigned": 6,42        "picked_up": 2,43        "in_transit": 4,44        "delivered": 90,45        "cancelled": 2,46        "returned": 247      }48    },49    "cod": {50      "collected": 150,51      "remitted": 50,52      "outstanding": 100,53      "wallet_settled": 054    }55  }56}

Export Report Orders (CSV)​

Customer Portal / Delivery Management / Reports
GET/customer/delivery/reports/summary/export

Streams a CSV export of the underlying orders for the selected report range (same UTC boundary logic as summary).

Response headers

  • Content-Disposition

  • X-Total-Rows

  • X-Export-Tenant-Id

  • X-Export-Customer-Id

text/csv

Query parameters

ParameterTypeDescription
rangestring

last_7_days | last_30_days | this_week | this_month | this_year | till_now | custom

Example: last_7_days

from_datestring

Required when range=custom (YYYY-MM-DD)

to_datestring

Required when range=custom (YYYY-MM-DD)

group_bystring

auto | day | week | month (kept for parity with summary)

Example: auto

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/customer/delivery/reports/summary/export?range=last_7_days&group_by=auto" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.