Skip to main content

Financial Dashboard (Delivery)

6 API calls in this section.

Payout success and failure response messages are localized using language or Accept-Language. Database error text is never returned for display. English examples include The payout was approved successfully, The payout was rejected successfully, and The manual payout request was created successfully.

Get Financial Dashboard (Overview)​

Delivery & Last-Mile / Financial Dashboard (Delivery)
GET/delivery/financial-dashboard

Returns the Financial Dashboard overview payload.

Includes

  • KPI summary cards (with trends and sparkline chart_data)

  • Revenue chart (Delivery Fees vs COD Collected)

  • COD breakdown donut values

  • Customer breakdown (Individual vs Business)

  • Wallet overview (total wallet balances, pending payouts, available after payouts)

Notes

  • pending_payouts and wallet overview are point-in-time (not date-range based), but respect customer filters.

  • KPI totals and charts follow the date range.

Permissions

  • view:financial_reports OR view:finance:tenant OR manage:wallets OR manage:operations:tenant

Query parameters

ParameterTypeDescription
start_datestring

Filter from date (ISO or YYYY-MM-DD). Default: last 56 days window.

end_datestring

Filter to date (ISO or YYYY-MM-DD). Default: today (UTC day).

customer_typestring

Filter by customer type: individual | business

customer_idstring

Filter by customer user id (UUID)

tenant_idOptionalstring

Tenant ID (optional if in auth token)

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/delivery/financial-dashboard?start_date=&end_date=&customer_type=&customer_id=&tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

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

Get Driver COD Ranking​

Delivery & Last-Mile / Financial Dashboard (Delivery)
GET/delivery/financial-dashboard/driver-cod

Returns drivers ranked by COD collected in the date range.

Each row includes

  • total_cod_collected

  • total_cod_remitted (includes settled_by_wallet)

  • pending_cod

  • deliveries_completed

  • avg_cod_per_delivery

  • remit_rate (%)

Permissions

  • view:financial_reports OR view:finance:tenant OR manage:wallets OR manage:operations:tenant

Query parameters

ParameterTypeDescription
pagestring

Page number (default: 1)

Example: 1

limitstring

Items per page (default: 10, max: 100)

Example: 10

start_datestring

Filter from date (ISO or YYYY-MM-DD). Default: last 56 days window.

end_datestring

Filter to date (ISO or YYYY-MM-DD). Default: today (UTC day).

customer_typeOptionalstring

Optional customer type filter: individual | business

customer_idOptionalstring

Optional customer user id filter (UUID)

tenant_idOptionalstring

Tenant ID (optional if in auth token)

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/delivery/financial-dashboard/driver-cod?page=1&limit=10&start_date=&end_date=&customer_type=&customer_id=&tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

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

List Payout Requests​

Delivery & Last-Mile / Financial Dashboard (Delivery)
GET/delivery/financial-dashboard/payout-requests

Returns payout requests with filters and pagination.

Includes per row

  • customer_name / phone

  • wallet_balance

  • total_orders (lifetime count in tenant)

  • requested_at / processed_at

Also returns top-level counts for the KPI strip:

  • all

  • pending

  • approved

  • rejected

Notes

  • counts respect search, date range, customer type, user, and tenant filters

  • counts intentionally ignore the active status filter

Permissions

  • view:financial_reports OR view:finance:tenant OR manage:wallets OR manage:operations:tenant

Query parameters

ParameterTypeDescription
statusstring

Filter by status: pending | approved | rejected (omit for all)

customer_typestring

Filter by customer type: individual | business (omit for all)

user_idstring

Filter by customer user id (UUID)

searchstring

Search by customer name or phone

start_datestring

Filter by requested_at from date (ISO or YYYY-MM-DD)

end_datestring

Filter by requested_at to date (ISO or YYYY-MM-DD)

pagestring

Page number (default: 1)

Example: 1

limitstring

Items per page (default: 10, max: 100)

Example: 10

tenant_idOptionalstring

Tenant ID (optional if in auth token)

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/delivery/financial-dashboard/payout-requests?status=&customer_type=&user_id=&search=&start_date=&end_date=&page=1&limit=10&tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

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

Approve Payout Request​

Delivery & Last-Mile / Financial Dashboard (Delivery)
POST/delivery/financial-dashboard/payout-requests/:id/approve

Approves a pending payout request and creates a wallet debit transaction. HTTP 200 returns a localized success message; an RPC failure returns a localized safe message and never exposes database error text.

Permissions

  • manage:wallets OR manage:operations:tenant

Path parameters

ParameterTypeDescription
idRequiredstring

Payout request ID

Example: payout-request-uuid

Query parameters

ParameterTypeDescription
tenant_idOptionalstring

Tenant ID (optional if in auth token)

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
notesstring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/delivery/financial-dashboard/payout-requests/${ID}/approve?tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "notes": ""6}'

Response examples

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

Reject Payout Request​

Delivery & Last-Mile / Financial Dashboard (Delivery)
POST/delivery/financial-dashboard/payout-requests/:id/reject

Rejects a pending payout request (no wallet transaction is created). HTTP 200 returns a localized success message; an RPC failure returns a localized safe message and never exposes database error text.

Body is optional.

  • If reason is omitted/empty, backend stores a default reason.

Permissions

  • manage:wallets OR manage:operations:tenant

Path parameters

ParameterTypeDescription
idRequiredstring

Payout request ID

Example: payout-request-uuid

Query parameters

ParameterTypeDescription
tenant_idOptionalstring

Tenant ID (optional if in auth token)

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
reasonstring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/delivery/financial-dashboard/payout-requests/${ID}/reject?tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "reason": ""6}'

Response examples

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

Create Manual Payout​

Delivery & Last-Mile / Financial Dashboard (Delivery)
POST/delivery/financial-dashboard/payouts

Creates a manual payout request with caller-provided status. Success returns a localized message: English is The manual payout request was created successfully for pending or The manual payout was created successfully for approved.

Behavior

  • pending: creates only the payout request

  • approved: creates the payout request and immediately debits the wallet

Permissions

  • manage:wallets OR manage:operations:tenant

Query parameters

ParameterTypeDescription
tenant_idOptionalstring

Tenant ID (optional if in auth token)

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
business_user_idRequiredstring

(required)

amountRequirednumber

(required)

statusRequiredstring

(required: pending | approved)

referenceOptionalstring

(optional)

notesOptionalstring

(optional)

Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/delivery/financial-dashboard/payouts?tenant_id=&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "business_user_id": "",6  "amount": 0,7  "status": "pending",8  "reference": "",9  "notes": ""10}'

Response examples

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