The Platform Statistics API provides aggregated data across all services for reporting, billing, and analytics purposes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/alphagov/notifications-api/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
Authentication
All endpoints require admin authentication.Endpoints
Get Platform Stats
Retrieve platform-wide notification statistics for a date range.Parameters
Start date in YYYY-MM-DD format. Defaults to today.
End date in YYYY-MM-DD format. Defaults to today.
Response
Response Fields
For each notification type (email, sms, letter):total- Total notifications processeddelivered- Successfully delivered notificationsfailed- Total failed notificationsrequested- Total requested notificationstechnical-failure- Technical failures (system errors)temporary-failure- Temporary failures (will retry)permanent-failure- Permanent failures (invalid recipient, etc.)
Get Billing Report Data
Retrieve comprehensive billing data for all services within a financial year date range.Parameters
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
Response
Response Fields
organisation_id- UUID of the organisation (empty string if none)organisation_name- Name of the organisation (empty string if none)service_id- UUID of the serviceservice_name- Name of the servicesms_cost- Total SMS cost in GBPsms_chargeable_units- Total chargeable SMS units (fragments)total_letters- Total number of letters sentletter_cost- Total letter cost in GBPletter_breakdown- Human-readable breakdown of letter costs by typepurchase_order_number- PO number for billingcontact_names- Billing contact namescontact_email_addresses- Billing contact emailsbilling_reference- Service billing reference
The results are sorted by organisation name (blanks last), then by service name. Only services with non-zero costs are included.
Error Responses
Get DVLA Billing Report Data
Retrieve DVLA-specific billing data for letters within a financial year date range.Parameters
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
Response
Response Fields
date- Date in ISO format (YYYY-MM-DD)postage- Postage class (first, second, europe, rest-of-world)cost_threshold- Letter sorting threshold (sorted, unsorted)sheets- Number of sheets per letterrate- Rate per letter in GBPletters- Number of letters sentcost- Total cost in GBP
Daily Volumes Report
Retrieve daily notification volumes for the platform.Parameters
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
Response
Response Fields
day- Date in YYYY-MM-DD format (BST timezone)sms_totals- Total SMS notifications sentsms_fragment_totals- Total SMS fragments (160-char chunks)sms_chargeable_units- Chargeable SMS unitsemail_totals- Total emails sentletter_totals- Total letters sentletter_sheet_totals- Total letter sheets (pages)
Daily SMS Provider Volumes Report
Retrieve daily SMS volumes broken down by provider.Parameters
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
Response
Response Fields
day- Date in ISO format (YYYY-MM-DD)provider- SMS provider name (e.g., mmg, firetext)sms_totals- Total SMS sent via this providersms_fragment_totals- Total SMS fragmentssms_chargeable_units- Chargeable units for this providersms_cost- Total cost for this provider in GBP
Volumes by Service Report
Retrieve notification volumes grouped by service.Parameters
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
Response
Response Fields
service_name- Name of the serviceservice_id- UUID of the serviceorganisation_name- Name of parent organisation (empty string if none)organisation_id- UUID of parent organisation (empty string if none)free_allowance- Free SMS allowance for the servicesms_notifications- Total SMS notifications sentsms_chargeable_units- Total chargeable SMS unitsemail_totals- Total emails sentletter_totals- Total letters sentletter_sheet_totals- Total letter sheetsletter_cost- Total letter cost in GBP
Common Error Responses
Invalid Date Format
Invalid Date Range
Financial Year Validation
Notes
- All dates use the YYYY-MM-DD format
- Times are in UTC unless specified as BST (British Summer Time)
- Financial year runs from April 1st to March 31st
- Cost values are in GBP (Great British Pounds)
- Empty organisation fields return empty strings, not null