Analytics
Your delivery performance
GET/analytics/summary
Scope analytics.read
Volume trend, on-time rate, delivery time by product and region, returns and claims rates, cost per parcel, overstay you covered and top destinations, for your own parcels. Figures are rebuilt hourly from daily aggregates in the market time zone (Africa/Accra for Ghana). The period defaults to the last 30 days and is at most 366 days.
Request
Query parameters
| Name | In | Type | Description |
|---|---|---|---|
fromOptional | query | string | First business day (YYYY-MM-DD). Default 29 days before to. |
toOptional | query | string | Last business day (YYYY-MM-DD). Default today in the market. |
Response
| Status | Meaning |
|---|---|
200 | Your figures |
The body is { "status": "success", "data": … }. Fields of data (AnalyticsSummary):
| Field | Type | Description |
|---|---|---|
environmentRequired | Environment | The key environment. TEST never touches live custody, payments, dispatch or notifications. |
marketRequired | string | |
currencyRequired | string | |
fromRequired | string (date) | |
toRequired | string (date) | |
refreshedAtOptional | string (date-time) or null | When the daily figures were last rebuilt (hourly). |
totalsRequired | AnalyticsTotals | Totals for the period. Each figure counts on the business day its own event happened. |
trendRequired | array of AnalyticsTrendDay | One entry per business day in the period. |
byProductRequired | array of AnalyticsBreakdown | |
byRegionRequired | array of AnalyticsBreakdown | |
topDestinationsRequired | array of object | Up to 10 destination regions by parcels booked. |
regionRequired | string | |
parcelsRequired | integer |
Errors
Errors use the error envelope { "status": "error", "message", "code"?, "details"? }.
| Status | When |
|---|---|
400 | The request is not valid. A field is missing or invalid, or the Idempotency-Key header is missing or malformed. |
401 | Missing, invalid, expired or revoked API key. The API key is missing, invalid, expired or revoked. |
403 | The key lacks the scope, or the operation needs a LIVE key. The key lacks the scope, or this call needs a LIVE key (LIVE_KEY_REQUIRED), or the Business owner is not verified (SENDER_VERIFICATION_REQUIRED). |
429 | Too many requests. See the RateLimit headers. Too many requests. Wait for Retry-After, then retry with the same idempotency key. |