Reports
Fleet reports in PDF and Excel, created and delivered by email or WhatsApp.
Base URLhttps://api.ping.nml.sa/v11 operation
Jump to an operation
Send a fleet report
POST/v1/reports
Queues a fleet summary, trips, alarms or daily statistics report for a period, rendered as PDF or Excel and sent by email or WhatsApp to the recipients given. The response is the queued request; rendering and delivery follow asynchronously.
Scopereports:write Accepts Idempotency-Key
Parameters
Idempotency-KeystringheaderA unique key per create request. A retry with the same key within 24 hours returns the first result instead of creating again.
Request body
kindstringrequiredfleet_summary: totals and distance per day and per vehicle; trips: each trip with its stops; alarms: alarms raised and how they were handled; daily_stats: distance, driving and idle hours per vehicle per day.
one of
fleet_summarytripsalarmsdaily_statsperiodobjectrequiredCalendar days in Asia/Riyadh, both inclusive. At most 366 days, within the last five years, and not after today.
Fields of period
fromstring (date)requirede.g.
2026-11-09tostring (date)requirede.g.
2026-11-15
vehicle_idsstring[]Vehicles to include. With neither vehicle_ids nor group_ids, every vehicle the key can see.
e.g.
["019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c"]group_idsstring[]Groups whose vehicles to include, limited to the vehicles the key can see.
e.g.
["019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8d"]formatstringpdf, or xlsx for Excel.
one of
pdfxlsxlanguagestringone of
arenrecipientsobject[]requirede.g.
[{"email":"operations@example.com.sa"},{"contact_id":"019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c"}]Fields of recipients
emailstringEmail address
e.g.
fahad@example.comcontact_idstringA contact of the account (accounts API).
e.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c
Response 202
idstringe.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8ckindstringfleet_summary: totals and distance per day and per vehicle; trips: each trip with its stops; alarms: alarms raised and how they were handled; daily_stats: distance, driving and idle hours per vehicle per day.
one of
fleet_summarytripsalarmsdaily_statsperiodobjectCalendar days in Asia/Riyadh, both inclusive. At most 366 days, within the last five years, and not after today.
Fields of period
fromstring (date)e.g.
2026-11-09tostring (date)e.g.
2026-11-15
vehicle_idsstring[]group_idsstring[]formatstringpdf, or xlsx for Excel.
one of
pdfxlsxlanguagestringone of
arenrecipientsobject[]Fields of recipients
emailstringEmail address
e.g.
fahad@example.comcontact_idstringA contact of the account (accounts API).
e.g.
019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c
statusstringone of
queuedrenderingsentfailedcreated_atstring (date-time)e.g.
2026-11-16T05:30:00Z
Errors
400The request is invalid (code: invalid_request), with field errors.401The API key is missing, unknown, expired or revoked (code: unauthorized).403The API key lacks the scope this operation needs (code: forbidden).404No such resource in this account, or outside the key's data scope (code: not_found).429The key's rate limit is reached (code: rate_limited). Retry after the Retry-After header's seconds.
curl -X POST "https://api.ping.nml.sa/v1/reports" \
-H "Authorization: Bearer $PING_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind": "fleet_summary", "period": {"from": "2026-11-09", "to": "2026-11-15"}, "vehicle_ids": ["019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c"], "group_ids": ["019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8d"], "format": "pdf", "recipients": [{"email": "operations@example.com.sa"}, {"contact_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c"}]}'{
"id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c",
"kind": "fleet_summary",
"period": {
"from": "2026-11-09",
"to": "2026-11-15"
},
"vehicle_ids": [
"string"
],
"group_ids": [
"string"
],
"format": "pdf",
"language": "ar",
"recipients": [
{
"email": "fahad@example.com",
"contact_id": "019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c"
}
],
"status": "queued",
"created_at": "2026-11-16T05:30:00Z"
}