All resources

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-Keystring header

    A unique key per create request. A retry with the same key within 24 hours returns the first result instead of creating again.

Request body

  • kindstring required

    fleet_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 offleet_summarytripsalarmsdaily_stats

  • periodobject required

    Calendar days in Asia/Riyadh, both inclusive. At most 366 days, within the last five years, and not after today.

    Fields of period
    • fromstring (date) required

      e.g.2026-11-09

    • tostring (date) required

      e.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"]

  • formatstring

    pdf, or xlsx for Excel.

    one ofpdfxlsx

  • languagestring

    one ofaren

  • recipientsobject[] required

    e.g.[{"email":"operations@example.com.sa"},{"contact_id":"019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c"}]

    Fields of recipients
    • emailstring

      Email address

      e.g.fahad@example.com

    • contact_idstring

      A contact of the account (accounts API).

      e.g.019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c

Response 202

  • idstring

    e.g.019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c

  • kindstring

    fleet_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 offleet_summarytripsalarmsdaily_stats

  • periodobject

    Calendar 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-09

    • tostring (date)

      e.g.2026-11-15

  • vehicle_idsstring[]
  • group_idsstring[]
  • formatstring

    pdf, or xlsx for Excel.

    one ofpdfxlsx

  • languagestring

    one ofaren

  • recipientsobject[]
    Fields of recipients
    • emailstring

      Email address

      e.g.fahad@example.com

    • contact_idstring

      A contact of the account (accounts API).

      e.g.019ac0c3-5e0d-7f2a-8b1c-3d4e5f6a7b8c

  • statusstring

    one ofqueuedrenderingsentfailed

  • created_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.
Example request
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"}]}'
Example response · 202
{
  "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"
}