Skip to main content
The metrics summary endpoint returns a single response with delivery, driver, and financial data for a given date range. Use it to build dashboards, generate reports, or monitor your account health.

Endpoint

GET /api/courier/s2s/metrics/summary
Requires: Authorization: Bearer <token> — see Authentication.

Query parameters

ParameterTypeRequiredDefaultDescription
start_dateISO 8601 dateNo30 days agoStart of the reporting period
end_dateISO 8601 dateNoTodayEnd of the reporting period
sourcestringNoFilter delivery counts by source. Does not affect financial figures.
currencystringNoMWKCurrency for financial figures

Request examples

Last 30 days (default):
curl --request GET "https://api.yonne.app/api/courier/s2s/metrics/summary" \
  --header "Authorization: Bearer <token>"
Custom date range:
curl --request GET \
  "https://api.yonne.app/api/courier/s2s/metrics/summary?start_date=2026-06-01&end_date=2026-06-17" \
  --header "Authorization: Bearer <token>"

Response

{
  "period": {
    "start": "2026-05-18",
    "end": "2026-06-17"
  },
  "delivery_metrics": {
    "total_deliveries": 120,
    "completed": 95,
    "cancelled": 10,
    "pending": 15,
    "average_rating": 4.6
  },
  "driver_metrics": {
    "active_drivers": 12,
    "total_registered": 20,
    "busy_external": 3,
    "offline": 5
  },
  "financial_summary": {
    "gross_delivery_value": 450000.00,
    "courier_earnings": 90000.00,
    "platform_fees": 45000.00,
    "total_withdrawn": 60000.00,
    "average_delivery_value": 3750.00
  }
}

Response fields

delivery_metrics

FieldDescription
total_deliveriesAll deliveries in the period
completedSuccessfully delivered
cancelledCancelled before delivery
pendingIn-progress or not yet dispatched
average_ratingAverage customer rating across completed deliveries

driver_metrics

FieldDescription
active_driversDrivers currently available for dispatch
total_registeredAll drivers registered under your courier account
busy_externalDrivers you’ve marked busy via Update Driver Status
offlineDrivers who are offline

financial_summary

FieldDescription
gross_delivery_valueTotal value of all deliveries billed to customers
courier_earningsYour net earnings after platform fees
platform_feesYonne’s fee deducted from gross value
total_withdrawnAmount already withdrawn from your account
average_delivery_valueAverage delivery value per completed order
Financial figures always reflect your entire courier account, regardless of the source filter. The source parameter only affects delivery counts.

Using the source filter

If your deliveries come from multiple channels (e.g. your own app, partner platforms), pass source to filter the delivery count breakdown to one channel:
GET /api/courier/s2s/metrics/summary?source=partner_app&start_date=2026-06-01&end_date=2026-06-17
This narrows delivery_metrics to only deliveries originating from partner_app. Financial figures remain courier-wide.