All resources

Fleet

Vehicles, drivers, groups, zones, routes, dispatch jobs and riders over REST.

Base URLhttps://api.ping.nml.sa/v144 operations

Jump to an operation

Common errors

Operations on this page answer these errors in one shape; each operation lists the ones it returns.

  • 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).
  • 409The resource is not in a state that allows this (code: conflict), or the idempotency key is in use.
  • 429The key's rate limit is reached (code: rate_limited). Retry after the Retry-After header's seconds.

List coaching sessions

GET/v1/coaching-sessions

Coaching sessions held with the account's drivers, newest first; with driver, one driver's.

Scopefleet:read

Parameters

  • driverstring query

    Only this driver's sessions

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • driver_idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • atstring (date-time)

      e.g.2026-11-17T08:30:00Z

    • coachstring

      Who held it (the caller)

      e.g.user:usr_4Kd9

    • focusstring

      one ofharsh_brakingharsh_accelerationharsh_corneringoverspeed

    • notestring | null

      e.g.Reviewed the three braking events on the Dammam run

    • score_at_sessioninteger | null

      e.g.58

    • follow_up_onstring (date)

      e.g.2026-12-01

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/coaching-sessions" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "driver_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "at": "2026-11-17T08:30:00Z",
      "coach": "user:usr_4Kd9",
      "focus": "harsh_braking",
      "note": "Reviewed the three braking events on the Dammam run",
      "score_at_session": 58,
      "follow_up_on": "2026-12-01"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Record a coaching session

POST/v1/coaching-sessions

Records a coaching session with a driver: what it focused on, the score then, a note and when to follow up. The coach is the caller.

Scopefleet: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

  • driver_idstring required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • focusstring required

    one ofharsh_brakingharsh_accelerationharsh_corneringoverspeed

  • notestring | null

    e.g.Reviewed the three braking events on the Dammam run

  • score_at_sessioninteger | null

    e.g.58

  • follow_up_onstring (date) required

    e.g.2026-12-01

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • driver_idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • coachstring

    Who held it (the caller)

    e.g.user:usr_4Kd9

  • focusstring

    one ofharsh_brakingharsh_accelerationharsh_corneringoverspeed

  • notestring | null

    e.g.Reviewed the three braking events on the Dammam run

  • score_at_sessioninteger | null

    e.g.58

  • follow_up_onstring (date)

    e.g.2026-12-01

Errors

400401403429

Example request
curl -X POST "https://api.ping.nml.sa/v1/coaching-sessions" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"driver_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d", "focus": "harsh_braking", "note": "Reviewed the three braking events on the Dammam run", "score_at_session": 58, "follow_up_on": "2026-12-01"}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "driver_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "at": "2026-11-17T08:30:00Z",
  "coach": "user:usr_4Kd9",
  "focus": "harsh_braking",
  "note": "Reviewed the three braking events on the Dammam run",
  "score_at_session": 58,
  "follow_up_on": "2026-12-01"
}

List drivers

GET/v1/drivers

Lists the account's drivers by name.

Scopefleet:read

Parameters

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

  • leftboolean query

    true lists the drivers who have left instead.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • namestring

      The name in Latin letters

      e.g.Faisal Al-Harbi

    • name_arstring | null

      The name in Arabic

      e.g.فيصل الحربي

    • department_idstring | null

      The account department the driver belongs to

    • phone_e164string | null

      Job links are sent here on WhatsApp

    • national_idstring | null

      A Saudi driver's national ID, the number their licence is issued on

    • iqama_numberstring | null

      A resident driver's Iqama, the number their licence is issued on

    • licence_classesstring[]

      The classes the driving licence holds

    • licence_expirystring | null (date)

      e.g.2028-05-14

    • ibutton_idstring | null

      The iButton key that identifies the driver in the vehicle (hex)

      e.g.01A2B3C4D5E6

    • created_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

    • updated_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

    • left_onstring | null (date)

      The day the driver left the account; null while employed

    • leave_reasonstring | null
  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/drivers" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "name": "Faisal Al-Harbi",
      "name_ar": "فيصل الحربي",
      "department_id": "string",
      "phone_e164": "+966551234567",
      "national_id": "1012345678",
      "iqama_number": "2412345678",
      "licence_classes": [
        "private"
      ],
      "licence_expiry": "2028-05-14",
      "ibutton_id": "01A2B3C4D5E6",
      "created_at": "2026-11-17T08:30:00Z",
      "updated_at": "2026-11-17T08:30:00Z",
      "left_on": "string",
      "leave_reason": "resigned"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Create a driver

POST/v1/drivers

Registers a driver with a WhatsApp number for job links, the ID or Iqama their licence is issued on, the licence's classes and expiry, and an iButton key for identification (driver.changed).

Scopefleet: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

  • namestring required

    e.g.Faisal Al-Harbi

  • name_arstring | null

    e.g.فيصل الحربي

  • department_idstring | null
  • phone_e164string | null
  • national_idstring | null

    Not with iqama_number

  • iqama_numberstring | null

    Not with national_id

  • licence_classesstring[]
  • licence_expirystring | null (date)

    e.g.2028-05-14

  • ibutton_idstring | null

    e.g.01A2B3C4D5E6

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    The name in Latin letters

    e.g.Faisal Al-Harbi

  • name_arstring | null

    The name in Arabic

    e.g.فيصل الحربي

  • department_idstring | null

    The account department the driver belongs to

  • phone_e164string | null

    Job links are sent here on WhatsApp

  • national_idstring | null

    A Saudi driver's national ID, the number their licence is issued on

  • iqama_numberstring | null

    A resident driver's Iqama, the number their licence is issued on

  • licence_classesstring[]

    The classes the driving licence holds

  • licence_expirystring | null (date)

    e.g.2028-05-14

  • ibutton_idstring | null

    The iButton key that identifies the driver in the vehicle (hex)

    e.g.01A2B3C4D5E6

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • left_onstring | null (date)

    The day the driver left the account; null while employed

  • leave_reasonstring | null

Errors

400401403429

Example request
curl -X POST "https://api.ping.nml.sa/v1/drivers" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Faisal Al-Harbi", "name_ar": "فيصل الحربي", "licence_expiry": "2028-05-14", "ibutton_id": "01A2B3C4D5E6"}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Faisal Al-Harbi",
  "name_ar": "فيصل الحربي",
  "department_id": "string",
  "phone_e164": "+966551234567",
  "national_id": "1012345678",
  "iqama_number": "2412345678",
  "licence_classes": [
    "private"
  ],
  "licence_expiry": "2028-05-14",
  "ibutton_id": "01A2B3C4D5E6",
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "left_on": "string",
  "leave_reason": "resigned"
}

Get a driver

GET/v1/drivers/{driverId}

Returns one driver, in the account or having left it.

Scopefleet:read

Parameters

  • driverIdstring path required

    e.g.019ac0c4-7a2b-7c3d-8e4f-5a6b7c8d9e0f

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    The name in Latin letters

    e.g.Faisal Al-Harbi

  • name_arstring | null

    The name in Arabic

    e.g.فيصل الحربي

  • department_idstring | null

    The account department the driver belongs to

  • phone_e164string | null

    Job links are sent here on WhatsApp

  • national_idstring | null

    A Saudi driver's national ID, the number their licence is issued on

  • iqama_numberstring | null

    A resident driver's Iqama, the number their licence is issued on

  • licence_classesstring[]

    The classes the driving licence holds

  • licence_expirystring | null (date)

    e.g.2028-05-14

  • ibutton_idstring | null

    The iButton key that identifies the driver in the vehicle (hex)

    e.g.01A2B3C4D5E6

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • left_onstring | null (date)

    The day the driver left the account; null while employed

  • leave_reasonstring | null

Errors

401403404429

  • 400Missing proof or the wrong code (error: otp, proof_photo, proof_signature, invalid, kind, no_file, too_large, not_image)
Example request
curl "https://api.ping.nml.sa/v1/drivers/019ac0c4-7a2b-7c3d-8e4f-5a6b7c8d9e0f" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Faisal Al-Harbi",
  "name_ar": "فيصل الحربي",
  "department_id": "string",
  "phone_e164": "+966551234567",
  "national_id": "1012345678",
  "iqama_number": "2412345678",
  "licence_classes": [
    "private"
  ],
  "licence_expiry": "2028-05-14",
  "ibutton_id": "01A2B3C4D5E6",
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "left_on": "string",
  "leave_reason": "resigned"
}

Update a driver

PATCH/v1/drivers/{driverId}

Changes the fields sent; a field sent as null is cleared. The name cannot be cleared; licence_classes sent replaces the classes held.

Scopefleet:write

Parameters

  • driverIdstring path required

    e.g.019ac0c4-7a2b-7c3d-8e4f-5a6b7c8d9e0f

Request body

  • namestring

    e.g.Faisal Al-Harbi

  • name_arstring | null

    e.g.فيصل الحربي

  • department_idstring | null
  • phone_e164string | null
  • national_idstring | null
  • iqama_numberstring | null
  • licence_classesstring[]
  • licence_expirystring | null (date)

    e.g.2028-05-14

  • ibutton_idstring | null

    e.g.01A2B3C4D5E6

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    The name in Latin letters

    e.g.Faisal Al-Harbi

  • name_arstring | null

    The name in Arabic

    e.g.فيصل الحربي

  • department_idstring | null

    The account department the driver belongs to

  • phone_e164string | null

    Job links are sent here on WhatsApp

  • national_idstring | null

    A Saudi driver's national ID, the number their licence is issued on

  • iqama_numberstring | null

    A resident driver's Iqama, the number their licence is issued on

  • licence_classesstring[]

    The classes the driving licence holds

  • licence_expirystring | null (date)

    e.g.2028-05-14

  • ibutton_idstring | null

    The iButton key that identifies the driver in the vehicle (hex)

    e.g.01A2B3C4D5E6

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • left_onstring | null (date)

    The day the driver left the account; null while employed

  • leave_reasonstring | null

Errors

400401403404429

Example request
curl -X PATCH "https://api.ping.nml.sa/v1/drivers/019ac0c4-7a2b-7c3d-8e4f-5a6b7c8d9e0f" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Faisal Al-Harbi", "name_ar": "فيصل الحربي", "licence_expiry": "2028-05-14", "ibutton_id": "01A2B3C4D5E6"}'
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Faisal Al-Harbi",
  "name_ar": "فيصل الحربي",
  "department_id": "string",
  "phone_e164": "+966551234567",
  "national_id": "1012345678",
  "iqama_number": "2412345678",
  "licence_classes": [
    "private"
  ],
  "licence_expiry": "2028-05-14",
  "ibutton_id": "01A2B3C4D5E6",
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "left_on": "string",
  "leave_reason": "resigned"
}

Record a driver leaving

POST/v1/drivers/{driverId}/leave

The driver leaves the account on the date given: their record and history stay, their open driver session ends, and they move to the former drivers.

Scopefleet:write

Parameters

  • driverIdstring path required

    e.g.019ac0c4-7a2b-7c3d-8e4f-5a6b7c8d9e0f

Request body

  • reasonstring required

    one ofresigneddismissedcontract_endedother

  • onstring (date) required

    The last day in the account

    e.g.2026-11-30

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    The name in Latin letters

    e.g.Faisal Al-Harbi

  • name_arstring | null

    The name in Arabic

    e.g.فيصل الحربي

  • department_idstring | null

    The account department the driver belongs to

  • phone_e164string | null

    Job links are sent here on WhatsApp

  • national_idstring | null

    A Saudi driver's national ID, the number their licence is issued on

  • iqama_numberstring | null

    A resident driver's Iqama, the number their licence is issued on

  • licence_classesstring[]

    The classes the driving licence holds

  • licence_expirystring | null (date)

    e.g.2028-05-14

  • ibutton_idstring | null

    The iButton key that identifies the driver in the vehicle (hex)

    e.g.01A2B3C4D5E6

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • left_onstring | null (date)

    The day the driver left the account; null while employed

  • leave_reasonstring | null

Errors

400401403404409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/drivers/019ac0c4-7a2b-7c3d-8e4f-5a6b7c8d9e0f/leave" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason": "resigned", "on": "2026-11-30"}'
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Faisal Al-Harbi",
  "name_ar": "فيصل الحربي",
  "department_id": "string",
  "phone_e164": "+966551234567",
  "national_id": "1012345678",
  "iqama_number": "2412345678",
  "licence_classes": [
    "private"
  ],
  "licence_expiry": "2028-05-14",
  "ibutton_id": "01A2B3C4D5E6",
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "left_on": "string",
  "leave_reason": "resigned"
}

List geofences

GET/v1/geofences

Lists the account's geofences by name, each as a GeoJSON polygon or a circle (a point with radius_m).

Scopefleet:read

Parameters

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • namestring

      e.g.Main depot

    • kindstring

      depot: the account's own base; site: a place it works at; customer: a customer's premises; restricted: an area to keep out of; workshop: where vehicles are serviced; fuel: a fuel station

      one ofdepotsitecustomerrestrictedworkshopfuel

    • geometryPolygon | Point

      A Polygon, or a Point that is the centre of a circle of radius_m.

      e.g.{"type":"Point","coordinates":[46.6753,24.7136]}

    • radius_minteger | null

      The circle's radius in metres; null for a polygon

      e.g.500

    • speed_limit_kmhinteger | null

      Speed limit inside the geofence, km/h

      e.g.40

    • cargo_min_cnumber | null

      A customer site's cargo range: new jobs to it start with it (cold chain)

      e.g.2

    • cargo_max_cnumber | null

      e.g.8

    • created_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

    • updated_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/geofences" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "name": "Main depot",
      "kind": "depot",
      "geometry": {
        "type": "Point",
        "coordinates": [
          46.6753,
          24.7136
        ]
      },
      "radius_m": 500,
      "speed_limit_kmh": 40,
      "cargo_min_c": 2,
      "cargo_max_c": 8,
      "created_at": "2026-11-17T08:30:00Z",
      "updated_at": "2026-11-17T08:30:00Z"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Create a geofence

POST/v1/geofences

Creates a circle (a GeoJSON Point and radius_m) or a GeoJSON Polygon, in WGS 84 longitude and latitude (geofence.changed).

Scopefleet: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

  • namestring required

    e.g.Main depot

  • kindstring

    depot: the account's own base; site: a place it works at; customer: a customer's premises; restricted: an area to keep out of; workshop: where vehicles are serviced; fuel: a fuel station

    one ofdepotsitecustomerrestrictedworkshopfuel

  • geometryPolygon | Point required

    A Polygon, or a Point that is the centre of a circle of radius_m.

    e.g.{"type":"Point","coordinates":[46.6753,24.7136]}

  • radius_minteger | null

    Required with a Point; not allowed with a Polygon

    e.g.500

  • speed_limit_kmhinteger | null

    e.g.40

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Main depot

  • kindstring

    depot: the account's own base; site: a place it works at; customer: a customer's premises; restricted: an area to keep out of; workshop: where vehicles are serviced; fuel: a fuel station

    one ofdepotsitecustomerrestrictedworkshopfuel

  • geometryPolygon | Point

    A Polygon, or a Point that is the centre of a circle of radius_m.

    e.g.{"type":"Point","coordinates":[46.6753,24.7136]}

  • radius_minteger | null

    The circle's radius in metres; null for a polygon

    e.g.500

  • speed_limit_kmhinteger | null

    Speed limit inside the geofence, km/h

    e.g.40

  • cargo_min_cnumber | null

    A customer site's cargo range: new jobs to it start with it (cold chain)

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403429

Example request
curl -X POST "https://api.ping.nml.sa/v1/geofences" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Main depot", "kind": "depot", "geometry": {"type": "Point", "coordinates": [46.6753, 24.7136]}, "radius_m": 500, "speed_limit_kmh": 40, "cargo_min_c": 2, "cargo_max_c": 8}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Main depot",
  "kind": "depot",
  "geometry": {
    "type": "Point",
    "coordinates": [
      46.6753,
      24.7136
    ]
  },
  "radius_m": 500,
  "speed_limit_kmh": 40,
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z"
}

Update a geofence

PATCH/v1/geofences/{geofenceId}

Changes the fields sent. A new geometry replaces the shape; radius_m alone resizes a circle; a cargo bound sent as null is cleared.

Scopefleet:write

Parameters

  • geofenceIdstring path required

    e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

Request body

  • namestring

    e.g.Main depot

  • kindstring

    depot: the account's own base; site: a place it works at; customer: a customer's premises; restricted: an area to keep out of; workshop: where vehicles are serviced; fuel: a fuel station

    one ofdepotsitecustomerrestrictedworkshopfuel

  • geometryPolygon | Point

    A Polygon, or a Point that is the centre of a circle of radius_m.

    e.g.{"type":"Point","coordinates":[46.6753,24.7136]}

  • radius_minteger

    e.g.750

  • speed_limit_kmhinteger | null

    e.g.40

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Main depot

  • kindstring

    depot: the account's own base; site: a place it works at; customer: a customer's premises; restricted: an area to keep out of; workshop: where vehicles are serviced; fuel: a fuel station

    one ofdepotsitecustomerrestrictedworkshopfuel

  • geometryPolygon | Point

    A Polygon, or a Point that is the centre of a circle of radius_m.

    e.g.{"type":"Point","coordinates":[46.6753,24.7136]}

  • radius_minteger | null

    The circle's radius in metres; null for a polygon

    e.g.500

  • speed_limit_kmhinteger | null

    Speed limit inside the geofence, km/h

    e.g.40

  • cargo_min_cnumber | null

    A customer site's cargo range: new jobs to it start with it (cold chain)

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403404429

Example request
curl -X PATCH "https://api.ping.nml.sa/v1/geofences/019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Main depot", "kind": "depot", "geometry": {"type": "Point", "coordinates": [46.6753, 24.7136]}, "radius_m": 750, "speed_limit_kmh": 40, "cargo_min_c": 2, "cargo_max_c": 8}'
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Main depot",
  "kind": "depot",
  "geometry": {
    "type": "Point",
    "coordinates": [
      46.6753,
      24.7136
    ]
  },
  "radius_m": 500,
  "speed_limit_kmh": 40,
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z"
}

Delete a geofence

DELETE/v1/geofences/{geofenceId}

Deletes the geofence permanently; stops picked from it keep their place and lose the link.

Scopefleet:write

Parameters

  • geofenceIdstring path required

    e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

Response 204

Deleted

Errors

400401403404429

Example request
curl -X DELETE "https://api.ping.nml.sa/v1/geofences/019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a" \
  -H "Authorization: Bearer $PING_API_KEY"

List vehicle groups

GET/v1/groups

Lists the account's vehicle groups by name with their vehicles. A department-scoped key sees only its vehicles in each group.

Scopefleet:read

Parameters

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • namestring

      e.g.Riyadh deliveries

    • vehicle_idsstring[]
    • created_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/groups" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "name": "Riyadh deliveries",
      "vehicle_ids": [
        "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d"
      ],
      "created_at": "2026-11-17T08:30:00Z"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Create a vehicle group

POST/v1/groups

Creates a named group of the account's vehicles.

Scopefleet: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

  • namestring required

    e.g.Riyadh deliveries

  • vehicle_idsstring[]

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Riyadh deliveries

  • vehicle_idsstring[]
  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403429

Example request
curl -X POST "https://api.ping.nml.sa/v1/groups" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Riyadh deliveries"}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Riyadh deliveries",
  "vehicle_ids": [
    "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d"
  ],
  "created_at": "2026-11-17T08:30:00Z"
}

Change a vehicle group

PATCH/v1/groups/{groupId}

Renames the group, and adds or removes vehicles (a vehicle both added and removed is refused). A department-scoped key changes only its own vehicles in it.

Scopefleet:write

Parameters

  • groupIdstring path required

    e.g.019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d

Request body

  • namestring

    e.g.Riyadh deliveries

  • add_vehicle_idsstring[]
  • remove_vehicle_idsstring[]

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Riyadh deliveries

  • vehicle_idsstring[]
  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403404429

Example request
curl -X PATCH "https://api.ping.nml.sa/v1/groups/019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Riyadh deliveries"}'
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Riyadh deliveries",
  "vehicle_ids": [
    "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d"
  ],
  "created_at": "2026-11-17T08:30:00Z"
}

Delete a vehicle group

DELETE/v1/groups/{groupId}

Deletes the group; its vehicles are not changed. A department-scoped key deletes only a group holding none but its own vehicles.

Scopefleet:write

Parameters

  • groupIdstring path required

    e.g.019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Riyadh deliveries

  • vehicle_idsstring[]
  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403404409429

Example request
curl -X DELETE "https://api.ping.nml.sa/v1/groups/019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Riyadh deliveries",
  "vehicle_ids": [
    "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d"
  ],
  "created_at": "2026-11-17T08:30:00Z"
}

List jobs

GET/v1/jobs

Lists jobs, latest scheduled first, filtered by status, vehicle and day (Asia/Riyadh). A department-scoped key sees jobs of its vehicles and jobs without a vehicle.

Scopefleet:read

Parameters

  • statusstring query

    Only jobs in this status

    e.g.draft

  • vehiclestring query

    Only jobs of this vehicle

  • daystring (date) query

    Only jobs scheduled (or, unscheduled, created) on this day in Asia/Riyadh

  • coldboolean query

    Only jobs that carry a cold-chain load (a cargo temperature range)

  • fromstring (date-time) query

    Only jobs not finished (completed, failed or cancelled) before this time

  • tostring (date-time) query

    Only jobs started (or, not started, scheduled or created) before this time

  • departmentstring query

    Only jobs planned for this department, or on its vehicles

  • with_stopsboolean query

    Include each job's stops

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • refstring

      e.g.J-2611-4821

    • statusstring

      one ofdraftdispatchedin_progresscompletedfailedcancelled

    • vehicle_idstring | null
    • plate_codestring | null

      The vehicle's plate

    • driver_idstring | null
    • driverstring | null

      The driver's name

      e.g.Faisal Al-Harbi

    • scheduled_atstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • created_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

    • started_atstring | null (date-time)

      The first arrival at a stop

    • completed_atstring | null (date-time)
    • cargo_min_cnumber | null

      e.g.2

    • cargo_max_cnumber | null

      e.g.8

    • cargostring | null

      e.g.Dairy, chilled

    • palletsinteger | null

      e.g.12

    • department_idstring | null
    • requires_kindstring | null
    • stopsobject[]

      The job's stops in order, with with_stops=true

      Fields of stops
      • idstring

        e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

      • seqinteger

        Order in the job, from 1

        e.g.1

      • kindstring

        one ofpickupdrop

      • namestring

        e.g.Al Olaya branch

      • latnumber

        e.g.24.6951

      • lonnumber

        e.g.46.6857

      • radius_minteger

        e.g.150

      • contact_phonestring | null
      • window_fromstring | null (date-time)

        e.g.2026-11-17T09:00:00Z

      • window_tostring | null (date-time)

        e.g.2026-11-17T11:00:00Z

      • statusstring

        one ofpendingarriveddonefailedskipped

      • eta_atstring | null (date-time)

        Estimated arrival from the vehicle's position

      • arrived_atstring | null (date-time)
      • departed_atstring | null (date-time)
      • done_atstring | null (date-time)

        When the stop was done, failed or skipped

      • service_mininteger

        Minutes spent at the stop

        e.g.15

      • geofence_idstring | null

        The geofence (customer site) the stop was picked from

        e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

    • first_stopstring | null

      The first stop's name

      e.g.Sudair dairy plant

    • last_stopstring | null

      The last stop's name

      e.g.Al Olaya branch

    • dispositionstring | null
    • stop_countinteger

      e.g.4

    • stops_doneinteger

      e.g.1

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/jobs" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "ref": "J-2611-4821",
      "status": "draft",
      "vehicle_id": "string",
      "plate_code": "2070SKD",
      "driver_id": "string",
      "driver": "Faisal Al-Harbi",
      "scheduled_at": "2026-11-17T09:00:00Z",
      "created_at": "2026-11-17T08:30:00Z",
      "started_at": "string",
      "completed_at": "string",
      "cargo_min_c": 2,
      "cargo_max_c": 8,
      "cargo": "Dairy, chilled",
      "pallets": 12,
      "department_id": "string",
      "requires_kind": "truck",
      "stops": [
        {
          "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
          "seq": 1,
          "kind": "drop",
          "name": "Al Olaya branch",
          "lat": 24.6951,
          "lon": 46.6857,
          "radius_m": 150,
          "contact_phone": "+966551234567",
          "window_from": "2026-11-17T09:00:00Z",
          "window_to": "2026-11-17T11:00:00Z",
          "status": "pending",
          "eta_at": "string",
          "arrived_at": "string",
          "departed_at": "string",
          "done_at": "string",
          "service_min": 15,
          "geofence_id": "019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a"
        }
      ],
      "first_stop": "Sudair dairy plant",
      "last_stop": "Al Olaya branch",
      "disposition": "quarantined",
      "stop_count": 4,
      "stops_done": 1
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Create a job

POST/v1/jobs

Creates a draft job with its stops in order, the proof each stop needs, and optionally its vehicle, driver and cargo temperature range.

Scopefleet: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

  • vehicle_idstring | null

    Needed to dispatch

  • driver_idstring | null

    Defaults at dispatch to the vehicle's current driver

  • scheduled_atstring | null (date-time)

    e.g.2026-11-17T09:00:00Z

  • proofstring[]

    e.g.["photo","otp"]

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • notesstring | null

    e.g.Deliver to the loading bay.

  • cargostring | null

    What the job carries

    e.g.Dairy, chilled

  • palletsinteger | null

    e.g.12

  • department_idstring | null

    The department the job is planned for (its board), whether or not it has a vehicle

  • requires_kindstring | null

    The kind of vehicle the job needs

  • stopsobject[] required
    Fields of stops
    • kindstring required

      one ofpickupdrop

    • namestring required

      e.g.Al Olaya branch

    • latnumber required

      Latitude, within Saudi Arabia

      e.g.24.6951

    • lonnumber required

      Longitude, within Saudi Arabia

      e.g.46.6857

    • radius_minteger

      The vehicle has arrived within this distance

      e.g.150

    • contact_phonestring | null

      Receives the tracking link and, with proof otp, the code

    • window_fromstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • window_tostring | null (date-time)

      After window_from

      e.g.2026-11-17T11:00:00Z

    • service_mininteger

      Minutes spent at the stop

      e.g.15

    • geofence_idstring | null

      The geofence (customer site) the stop was picked from

      e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • refstring

    The reference shown to drivers and recipients

    e.g.J-2611-4821

  • statusstring

    one ofdraftdispatchedin_progresscompletedfailedcancelled

  • route_idstring | null

    The saved route the job was made from

  • vehicle_idstring | null
  • driver_idstring | null
  • scheduled_atstring | null (date-time)

    e.g.2026-11-17T09:00:00Z

  • proofstring[]

    e.g.["photo","otp"]

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • notesstring | null

    e.g.Deliver to the loading bay.

  • cargostring | null

    e.g.Dairy, chilled

  • palletsinteger | null

    e.g.12

  • department_idstring | null

    The department the job is planned for

  • requires_kindstring | null
  • dispositionobject | null

    What the receiver did with the load after a breach

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • dispatched_atstring | null (date-time)
  • started_atstring | null (date-time)

    The first arrival at a stop

  • completed_atstring | null (date-time)

    When the job completed or failed

  • cancelled_atstring | null (date-time)
  • stopsobject[]
    Fields of stops
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • seqinteger

      Order in the job, from 1

      e.g.1

    • kindstring

      one ofpickupdrop

    • namestring

      e.g.Al Olaya branch

    • latnumber

      e.g.24.6951

    • lonnumber

      e.g.46.6857

    • radius_minteger

      e.g.150

    • contact_phonestring | null
    • window_fromstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • window_tostring | null (date-time)

      e.g.2026-11-17T11:00:00Z

    • statusstring

      one ofpendingarriveddonefailedskipped

    • eta_atstring | null (date-time)

      Estimated arrival from the vehicle's position

    • arrived_atstring | null (date-time)
    • departed_atstring | null (date-time)
    • done_atstring | null (date-time)

      When the stop was done, failed or skipped

    • service_mininteger

      Minutes spent at the stop

      e.g.15

    • geofence_idstring | null

      The geofence (customer site) the stop was picked from

      e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

  • eventsobject[]
    Fields of events
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring | null
    • codestring

      one ofcreatedupdateddispatchedarriveddeparteddonefailedskippedcompletedcancelled

    • actorstring

      Who acted: user:, agent:, system: or driver:

      e.g.system:fleet

    • latnumber | null

      e.g.24.6951

    • lonnumber | null

      e.g.46.6857

    • notestring | null
    • atstring (date-time)

      e.g.2026-11-17T09:41:00Z

  • proofsobject[]
    Fields of proofs
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • kindstring

      photo, signature: a file kept with the job; otp: the stop's code was given; note: completed without a code

      one ofphotosignatureotpnote

    • received_bystring | null

      Who received the delivery, as the driver wrote it

      e.g.Store manager

    • atstring (date-time)

      e.g.2026-11-17T09:48:00Z

Errors

400401403429

Example request
curl -X POST "https://api.ping.nml.sa/v1/jobs" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scheduled_at": "2026-11-17T09:00:00Z", "proof": ["photo", "otp"], "cargo_min_c": 2, "cargo_max_c": 8, "notes": "Deliver to the loading bay.", "cargo": "Dairy, chilled", "pallets": 12, "stops": [{"kind": "drop", "name": "Al Olaya branch", "lat": 24.6951, "lon": 46.6857, "radius_m": 150, "contact_phone": "+966551234567", "window_from": "2026-11-17T09:00:00Z", "window_to": "2026-11-17T11:00:00Z", "service_min": 15, "geofence_id": "019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a"}]}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "ref": "J-2611-4821",
  "status": "draft",
  "route_id": "string",
  "vehicle_id": "string",
  "driver_id": "string",
  "scheduled_at": "2026-11-17T09:00:00Z",
  "proof": [
    "photo",
    "otp"
  ],
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "notes": "Deliver to the loading bay.",
  "cargo": "Dairy, chilled",
  "pallets": 12,
  "department_id": "string",
  "requires_kind": "truck",
  "disposition": {
    "outcome": "quarantined",
    "reason": "string",
    "receiver_name": "Store manager",
    "recorded_by": "user:usr_Qm4rT8wZ1",
    "recorded_at": "2026-11-17T10:12:00Z"
  },
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "dispatched_at": "string",
  "started_at": "string",
  "completed_at": "string",
  "cancelled_at": "string",
  "stops": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "seq": 1,
      "kind": "drop",
      "name": "Al Olaya branch",
      "lat": 24.6951,
      "lon": 46.6857,
      "radius_m": 150,
      "contact_phone": "+966551234567",
      "window_from": "2026-11-17T09:00:00Z",
      "window_to": "2026-11-17T11:00:00Z",
      "status": "pending",
      "eta_at": "string",
      "arrived_at": "string",
      "departed_at": "string",
      "done_at": "string",
      "service_min": 15,
      "geofence_id": "019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a"
    }
  ],
  "events": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "string",
      "code": "arrived",
      "actor": "system:fleet",
      "lat": 24.6951,
      "lon": 46.6857,
      "note": "string",
      "at": "2026-11-17T09:41:00Z"
    }
  ],
  "proofs": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "kind": "otp",
      "received_by": "Store manager",
      "at": "2026-11-17T09:48:00Z"
    }
  ]
}

Get a job

GET/v1/jobs/{jobId}

Returns a job with its stops, its event history and the proofs collected at each stop.

Scopefleet:read

Parameters

  • jobIdstring path required

    e.g.019ac0c4-9c4d-7e5f-a06b-7c8d9e0f1a2b

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • refstring

    The reference shown to drivers and recipients

    e.g.J-2611-4821

  • statusstring

    one ofdraftdispatchedin_progresscompletedfailedcancelled

  • route_idstring | null

    The saved route the job was made from

  • vehicle_idstring | null
  • driver_idstring | null
  • scheduled_atstring | null (date-time)

    e.g.2026-11-17T09:00:00Z

  • proofstring[]

    e.g.["photo","otp"]

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • notesstring | null

    e.g.Deliver to the loading bay.

  • cargostring | null

    e.g.Dairy, chilled

  • palletsinteger | null

    e.g.12

  • department_idstring | null

    The department the job is planned for

  • requires_kindstring | null
  • dispositionobject | null

    What the receiver did with the load after a breach

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • dispatched_atstring | null (date-time)
  • started_atstring | null (date-time)

    The first arrival at a stop

  • completed_atstring | null (date-time)

    When the job completed or failed

  • cancelled_atstring | null (date-time)
  • stopsobject[]
    Fields of stops
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • seqinteger

      Order in the job, from 1

      e.g.1

    • kindstring

      one ofpickupdrop

    • namestring

      e.g.Al Olaya branch

    • latnumber

      e.g.24.6951

    • lonnumber

      e.g.46.6857

    • radius_minteger

      e.g.150

    • contact_phonestring | null
    • window_fromstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • window_tostring | null (date-time)

      e.g.2026-11-17T11:00:00Z

    • statusstring

      one ofpendingarriveddonefailedskipped

    • eta_atstring | null (date-time)

      Estimated arrival from the vehicle's position

    • arrived_atstring | null (date-time)
    • departed_atstring | null (date-time)
    • done_atstring | null (date-time)

      When the stop was done, failed or skipped

    • service_mininteger

      Minutes spent at the stop

      e.g.15

    • geofence_idstring | null

      The geofence (customer site) the stop was picked from

      e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

  • eventsobject[]
    Fields of events
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring | null
    • codestring

      one ofcreatedupdateddispatchedarriveddeparteddonefailedskippedcompletedcancelled

    • actorstring

      Who acted: user:, agent:, system: or driver:

      e.g.system:fleet

    • latnumber | null

      e.g.24.6951

    • lonnumber | null

      e.g.46.6857

    • notestring | null
    • atstring (date-time)

      e.g.2026-11-17T09:41:00Z

  • proofsobject[]
    Fields of proofs
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • kindstring

      photo, signature: a file kept with the job; otp: the stop's code was given; note: completed without a code

      one ofphotosignatureotpnote

    • received_bystring | null

      Who received the delivery, as the driver wrote it

      e.g.Store manager

    • atstring (date-time)

      e.g.2026-11-17T09:48:00Z

Errors

400401403404429

Example request
curl "https://api.ping.nml.sa/v1/jobs/019ac0c4-9c4d-7e5f-a06b-7c8d9e0f1a2b" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "ref": "J-2611-4821",
  "status": "draft",
  "route_id": "string",
  "vehicle_id": "string",
  "driver_id": "string",
  "scheduled_at": "2026-11-17T09:00:00Z",
  "proof": [
    "photo",
    "otp"
  ],
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "notes": "Deliver to the loading bay.",
  "cargo": "Dairy, chilled",
  "pallets": 12,
  "department_id": "string",
  "requires_kind": "truck",
  "disposition": {
    "outcome": "quarantined",
    "reason": "string",
    "receiver_name": "Store manager",
    "recorded_by": "user:usr_Qm4rT8wZ1",
    "recorded_at": "2026-11-17T10:12:00Z"
  },
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "dispatched_at": "string",
  "started_at": "string",
  "completed_at": "string",
  "cancelled_at": "string",
  "stops": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "seq": 1,
      "kind": "drop",
      "name": "Al Olaya branch",
      "lat": 24.6951,
      "lon": 46.6857,
      "radius_m": 150,
      "contact_phone": "+966551234567",
      "window_from": "2026-11-17T09:00:00Z",
      "window_to": "2026-11-17T11:00:00Z",
      "status": "pending",
      "eta_at": "string",
      "arrived_at": "string",
      "departed_at": "string",
      "done_at": "string",
      "service_min": 15,
      "geofence_id": "019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a"
    }
  ],
  "events": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "string",
      "code": "arrived",
      "actor": "system:fleet",
      "lat": 24.6951,
      "lon": 46.6857,
      "note": "string",
      "at": "2026-11-17T09:41:00Z"
    }
  ],
  "proofs": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "kind": "otp",
      "received_by": "Store manager",
      "at": "2026-11-17T09:48:00Z"
    }
  ]
}

Cancel a job

POST/v1/jobs/{jobId}/cancel

Cancels a job that has not finished and revokes its tracking links (job.cancelled).

Scopefleet:write

Parameters

  • jobIdstring path required

    e.g.019ac0c4-9c4d-7e5f-a06b-7c8d9e0f1a2b

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • refstring

    The reference shown to drivers and recipients

    e.g.J-2611-4821

  • statusstring

    one ofdraftdispatchedin_progresscompletedfailedcancelled

  • route_idstring | null

    The saved route the job was made from

  • vehicle_idstring | null
  • driver_idstring | null
  • scheduled_atstring | null (date-time)

    e.g.2026-11-17T09:00:00Z

  • proofstring[]

    e.g.["photo","otp"]

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • notesstring | null

    e.g.Deliver to the loading bay.

  • cargostring | null

    e.g.Dairy, chilled

  • palletsinteger | null

    e.g.12

  • department_idstring | null

    The department the job is planned for

  • requires_kindstring | null
  • dispositionobject | null

    What the receiver did with the load after a breach

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • dispatched_atstring | null (date-time)
  • started_atstring | null (date-time)

    The first arrival at a stop

  • completed_atstring | null (date-time)

    When the job completed or failed

  • cancelled_atstring | null (date-time)
  • stopsobject[]
    Fields of stops
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • seqinteger

      Order in the job, from 1

      e.g.1

    • kindstring

      one ofpickupdrop

    • namestring

      e.g.Al Olaya branch

    • latnumber

      e.g.24.6951

    • lonnumber

      e.g.46.6857

    • radius_minteger

      e.g.150

    • contact_phonestring | null
    • window_fromstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • window_tostring | null (date-time)

      e.g.2026-11-17T11:00:00Z

    • statusstring

      one ofpendingarriveddonefailedskipped

    • eta_atstring | null (date-time)

      Estimated arrival from the vehicle's position

    • arrived_atstring | null (date-time)
    • departed_atstring | null (date-time)
    • done_atstring | null (date-time)

      When the stop was done, failed or skipped

    • service_mininteger

      Minutes spent at the stop

      e.g.15

    • geofence_idstring | null

      The geofence (customer site) the stop was picked from

      e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

  • eventsobject[]
    Fields of events
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring | null
    • codestring

      one ofcreatedupdateddispatchedarriveddeparteddonefailedskippedcompletedcancelled

    • actorstring

      Who acted: user:, agent:, system: or driver:

      e.g.system:fleet

    • latnumber | null

      e.g.24.6951

    • lonnumber | null

      e.g.46.6857

    • notestring | null
    • atstring (date-time)

      e.g.2026-11-17T09:41:00Z

  • proofsobject[]
    Fields of proofs
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • kindstring

      photo, signature: a file kept with the job; otp: the stop's code was given; note: completed without a code

      one ofphotosignatureotpnote

    • received_bystring | null

      Who received the delivery, as the driver wrote it

      e.g.Store manager

    • atstring (date-time)

      e.g.2026-11-17T09:48:00Z

Errors

400401403404409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/jobs/019ac0c4-9c4d-7e5f-a06b-7c8d9e0f1a2b/cancel" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "ref": "J-2611-4821",
  "status": "draft",
  "route_id": "string",
  "vehicle_id": "string",
  "driver_id": "string",
  "scheduled_at": "2026-11-17T09:00:00Z",
  "proof": [
    "photo",
    "otp"
  ],
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "notes": "Deliver to the loading bay.",
  "cargo": "Dairy, chilled",
  "pallets": 12,
  "department_id": "string",
  "requires_kind": "truck",
  "disposition": {
    "outcome": "quarantined",
    "reason": "string",
    "receiver_name": "Store manager",
    "recorded_by": "user:usr_Qm4rT8wZ1",
    "recorded_at": "2026-11-17T10:12:00Z"
  },
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "dispatched_at": "string",
  "started_at": "string",
  "completed_at": "string",
  "cancelled_at": "string",
  "stops": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "seq": 1,
      "kind": "drop",
      "name": "Al Olaya branch",
      "lat": 24.6951,
      "lon": 46.6857,
      "radius_m": 150,
      "contact_phone": "+966551234567",
      "window_from": "2026-11-17T09:00:00Z",
      "window_to": "2026-11-17T11:00:00Z",
      "status": "pending",
      "eta_at": "string",
      "arrived_at": "string",
      "departed_at": "string",
      "done_at": "string",
      "service_min": 15,
      "geofence_id": "019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a"
    }
  ],
  "events": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "string",
      "code": "arrived",
      "actor": "system:fleet",
      "lat": 24.6951,
      "lon": 46.6857,
      "note": "string",
      "at": "2026-11-17T09:41:00Z"
    }
  ],
  "proofs": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "kind": "otp",
      "received_by": "Store manager",
      "at": "2026-11-17T09:48:00Z"
    }
  ]
}

Dispatch a job

POST/v1/jobs/{jobId}/dispatch

Sends a draft job to its driver by WhatsApp link and each stop's contact a tracking link (job.dispatched). The job needs a vehicle; the driver defaults to the vehicle's current driver.

Scopefleet:write

Parameters

  • jobIdstring path required

    e.g.019ac0c4-9c4d-7e5f-a06b-7c8d9e0f1a2b

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • refstring

    The reference shown to drivers and recipients

    e.g.J-2611-4821

  • statusstring

    one ofdraftdispatchedin_progresscompletedfailedcancelled

  • route_idstring | null

    The saved route the job was made from

  • vehicle_idstring | null
  • driver_idstring | null
  • scheduled_atstring | null (date-time)

    e.g.2026-11-17T09:00:00Z

  • proofstring[]

    e.g.["photo","otp"]

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • notesstring | null

    e.g.Deliver to the loading bay.

  • cargostring | null

    e.g.Dairy, chilled

  • palletsinteger | null

    e.g.12

  • department_idstring | null

    The department the job is planned for

  • requires_kindstring | null
  • dispositionobject | null

    What the receiver did with the load after a breach

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • dispatched_atstring | null (date-time)
  • started_atstring | null (date-time)

    The first arrival at a stop

  • completed_atstring | null (date-time)

    When the job completed or failed

  • cancelled_atstring | null (date-time)
  • stopsobject[]
    Fields of stops
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • seqinteger

      Order in the job, from 1

      e.g.1

    • kindstring

      one ofpickupdrop

    • namestring

      e.g.Al Olaya branch

    • latnumber

      e.g.24.6951

    • lonnumber

      e.g.46.6857

    • radius_minteger

      e.g.150

    • contact_phonestring | null
    • window_fromstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • window_tostring | null (date-time)

      e.g.2026-11-17T11:00:00Z

    • statusstring

      one ofpendingarriveddonefailedskipped

    • eta_atstring | null (date-time)

      Estimated arrival from the vehicle's position

    • arrived_atstring | null (date-time)
    • departed_atstring | null (date-time)
    • done_atstring | null (date-time)

      When the stop was done, failed or skipped

    • service_mininteger

      Minutes spent at the stop

      e.g.15

    • geofence_idstring | null

      The geofence (customer site) the stop was picked from

      e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

  • eventsobject[]
    Fields of events
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring | null
    • codestring

      one ofcreatedupdateddispatchedarriveddeparteddonefailedskippedcompletedcancelled

    • actorstring

      Who acted: user:, agent:, system: or driver:

      e.g.system:fleet

    • latnumber | null

      e.g.24.6951

    • lonnumber | null

      e.g.46.6857

    • notestring | null
    • atstring (date-time)

      e.g.2026-11-17T09:41:00Z

  • proofsobject[]
    Fields of proofs
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • kindstring

      photo, signature: a file kept with the job; otp: the stop's code was given; note: completed without a code

      one ofphotosignatureotpnote

    • received_bystring | null

      Who received the delivery, as the driver wrote it

      e.g.Store manager

    • atstring (date-time)

      e.g.2026-11-17T09:48:00Z

  • driver_linkstring | null

    The driver's job link, also sent to the driver on WhatsApp; null when the job was not dispatched

    e.g.https://example.com/drive#019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d.q8XcT0vW

Errors

400401403404409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/jobs/019ac0c4-9c4d-7e5f-a06b-7c8d9e0f1a2b/dispatch" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "ref": "J-2611-4821",
  "status": "draft",
  "route_id": "string",
  "vehicle_id": "string",
  "driver_id": "string",
  "scheduled_at": "2026-11-17T09:00:00Z",
  "proof": [
    "photo",
    "otp"
  ],
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "notes": "Deliver to the loading bay.",
  "cargo": "Dairy, chilled",
  "pallets": 12,
  "department_id": "string",
  "requires_kind": "truck",
  "disposition": {
    "outcome": "quarantined",
    "reason": "string",
    "receiver_name": "Store manager",
    "recorded_by": "user:usr_Qm4rT8wZ1",
    "recorded_at": "2026-11-17T10:12:00Z"
  },
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "dispatched_at": "string",
  "started_at": "string",
  "completed_at": "string",
  "cancelled_at": "string",
  "stops": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "seq": 1,
      "kind": "drop",
      "name": "Al Olaya branch",
      "lat": 24.6951,
      "lon": 46.6857,
      "radius_m": 150,
      "contact_phone": "+966551234567",
      "window_from": "2026-11-17T09:00:00Z",
      "window_to": "2026-11-17T11:00:00Z",
      "status": "pending",
      "eta_at": "string",
      "arrived_at": "string",
      "departed_at": "string",
      "done_at": "string",
      "service_min": 15,
      "geofence_id": "019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a"
    }
  ],
  "events": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "string",
      "code": "arrived",
      "actor": "system:fleet",
      "lat": 24.6951,
      "lon": 46.6857,
      "note": "string",
      "at": "2026-11-17T09:41:00Z"
    }
  ],
  "proofs": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "kind": "otp",
      "received_by": "Store manager",
      "at": "2026-11-17T09:48:00Z"
    }
  ],
  "driver_link": "https://example.com/drive#019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d.q8XcT0vW"
}

List rider runs

GET/v1/rider-runs

Lists the vehicles' trips that had card taps, latest first, over one day or a range of days (Asia/Riyadh; at most [service.riders] max_days, 31, per call): the first and last tap, the cards nobody holds, and each rider with when they boarded and when they got off after their last board (null when the trip's taps end with them on board).

Scopefleet:read

Parameters

  • vehiclestring query

    Only this vehicle's runs

  • daystring (date) query

    Runs with taps on this day in Asia/Riyadh (or from and to)

  • fromstring (date) query

    Runs with taps on or after this day in Asia/Riyadh

  • tostring (date) query

    Runs with taps on or before this day in Asia/Riyadh (defaults to from)

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • vehicle_idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • plate_codestring

      Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

      e.g.2070SKD

    • trip_keystring

      The vehicle trip (ignition on to off) the taps belong to

    • first_atstring (date-time)

      e.g.2026-11-17T06:42:10Z

    • last_atstring (date-time)

      e.g.2026-11-17T07:21:40Z

    • unknown_cardsstring[]

      Cards tapped that no active rider holds

      e.g.["04FF00AA"]

    • ridersobject[]
      Fields of riders
      • rider_idstring

        e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

      • riderstring

        e.g.Sara Al-Qahtani

      • boarded_atstring (date-time)

        e.g.2026-11-17T06:42:10Z

      • alighted_atstring | null (date-time)

        The tap off after the rider's last board; null when they never tapped off

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/rider-runs" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "plate_code": "2070SKD",
      "trip_key": "string",
      "first_at": "2026-11-17T06:42:10Z",
      "last_at": "2026-11-17T07:21:40Z",
      "unknown_cards": [
        "04FF00AA"
      ],
      "riders": [
        {
          "rider_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
          "rider": "Sara Al-Qahtani",
          "boarded_at": "2026-11-17T06:42:10Z",
          "alighted_at": "string"
        }
      ]
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

List rider card taps

GET/v1/rider-taps

Lists card taps on vehicles, latest first, filtered by vehicle, rider and one day or a range of days (Asia/Riyadh; at most [service.riders] max_days, 31, per call): who boarded, who alighted, and cards nobody holds.

Scopefleet:read

Parameters

  • vehiclestring query

    Only taps on this vehicle

  • daystring (date) query

    Only taps on this day in Asia/Riyadh (not with from and to)

  • riderstring query

    Only this rider's taps

  • fromstring (date) query

    Only taps on or after this day in Asia/Riyadh

  • tostring (date) query

    Only taps on or before this day in Asia/Riyadh (defaults to from)

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • atstring (date-time)

      e.g.2026-11-17T06:42:10Z

    • kindstring

      unknown: a card no active rider holds

      one ofboardalightunknown

    • vehicle_idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • plate_codestring

      Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

      e.g.2070SKD

    • rider_idstring | null
    • riderstring | null

      The rider's name

      e.g.Sara Al-Qahtani

    • card_idstring

      e.g.04A1B2C3D4

    • trip_keystring

      The vehicle trip (ignition on to off) the tap belongs to

    • latnumber | null

      e.g.24.7136

    • lonnumber | null

      e.g.46.6753

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/rider-taps" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "at": "2026-11-17T06:42:10Z",
      "kind": "board",
      "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "plate_code": "2070SKD",
      "rider_id": "string",
      "rider": "Sara Al-Qahtani",
      "card_id": "04A1B2C3D4",
      "trip_key": "string",
      "lat": 24.7136,
      "lon": 46.6753
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

List riders

GET/v1/riders

Lists riders (students) by name with their cards and guardians.

Scopefleet:read

Parameters

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • namestring

      e.g.Sara Al-Qahtani

    • card_idstring

      e.g.04A1B2C3D4

    • route_idstring | null
    • guardiansobject[]
      Fields of guardians
      • namestring | null

        e.g.Noura Al-Qahtani

      • phone_e164string

        Saudi telephone number in E.164 (mobile, landline, VoIP, unified)

        e.g.+966551234567

      • notifyboolean

        e.g.true

    • activeboolean

      e.g.true

    • created_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/riders" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "name": "Sara Al-Qahtani",
      "card_id": "04A1B2C3D4",
      "route_id": "string",
      "guardians": [
        {
          "name": "Noura Al-Qahtani",
          "phone_e164": "+966551234567",
          "notify": true
        }
      ],
      "active": true,
      "created_at": "2026-11-17T08:30:00Z"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Create a rider

POST/v1/riders

Adds a rider with the card they tap on the vehicle, their route and the guardians notified when they board and alight.

Scopefleet: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

  • namestring required

    e.g.Sara Al-Qahtani

  • card_idstring required

    The card id as the reader reports it (hex), unique in the account

    e.g.04A1B2C3D4

  • route_idstring | null
  • guardiansobject[]
    Fields of guardians
    • namestring | null

      e.g.Noura Al-Qahtani

    • phone_e164string required

      Saudi telephone number in E.164 (mobile, landline, VoIP, unified)

      e.g.+966551234567

    • notifyboolean

      Message this guardian when the rider boards and alights

      e.g.true

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Sara Al-Qahtani

  • card_idstring

    e.g.04A1B2C3D4

  • route_idstring | null
  • guardiansobject[]
    Fields of guardians
    • namestring | null

      e.g.Noura Al-Qahtani

    • phone_e164string

      Saudi telephone number in E.164 (mobile, landline, VoIP, unified)

      e.g.+966551234567

    • notifyboolean

      e.g.true

  • activeboolean

    e.g.true

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/riders" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Sara Al-Qahtani", "card_id": "04A1B2C3D4"}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Sara Al-Qahtani",
  "card_id": "04A1B2C3D4",
  "route_id": "string",
  "guardians": [
    {
      "name": "Noura Al-Qahtani",
      "phone_e164": "+966551234567",
      "notify": true
    }
  ],
  "active": true,
  "created_at": "2026-11-17T08:30:00Z"
}

Update a rider

PATCH/v1/riders/{riderId}

Changes a rider's name, card (a replaced card), route, guardians (the list sent replaces the list held) or whether they still ride (active false: their card then taps as unknown).

Scopefleet:write

Parameters

  • riderIdstring path required

    e.g.019ac0c4-cf70-7182-d39e-0f1a2b3c4d5e

Request body

  • namestring

    e.g.Sara Al-Qahtani

  • card_idstring

    A replaced card, as the reader reports it (hex), unique in the account

    e.g.04A1B2C3D5

  • route_idstring | null
  • guardiansobject[]
    Fields of guardians
    • namestring | null

      e.g.Noura Al-Qahtani

    • phone_e164string required

      Saudi telephone number in E.164 (mobile, landline, VoIP, unified)

      e.g.+966551234567

    • notifyboolean

      Message this guardian when the rider boards and alights

      e.g.true

  • activeboolean

    false when the rider no longer rides

    e.g.false

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Sara Al-Qahtani

  • card_idstring

    e.g.04A1B2C3D4

  • route_idstring | null
  • guardiansobject[]
    Fields of guardians
    • namestring | null

      e.g.Noura Al-Qahtani

    • phone_e164string

      Saudi telephone number in E.164 (mobile, landline, VoIP, unified)

      e.g.+966551234567

    • notifyboolean

      e.g.true

  • activeboolean

    e.g.true

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403404409429

Example request
curl -X PATCH "https://api.ping.nml.sa/v1/riders/019ac0c4-cf70-7182-d39e-0f1a2b3c4d5e" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Sara Al-Qahtani", "card_id": "04A1B2C3D5", "active": false}'
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Sara Al-Qahtani",
  "card_id": "04A1B2C3D4",
  "route_id": "string",
  "guardians": [
    {
      "name": "Noura Al-Qahtani",
      "phone_e164": "+966551234567",
      "notify": true
    }
  ],
  "active": true,
  "created_at": "2026-11-17T08:30:00Z"
}

List saved routes

GET/v1/routes

Lists saved routes by name, such as a school run or a regular delivery round, with their stops. A department-scoped key sees routes of its vehicles and routes without a vehicle.

Scopefleet:read

Parameters

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • namestring

      e.g.Morning school run

    • vehicle_idstring | null
    • driver_idstring | null
    • stopsobject[]
      Fields of stops
      • seqinteger

        Order in the route, from 1

        e.g.1

      • kindstring

        one ofpickupdrop

      • namestring

        e.g.Al Olaya branch

      • latnumber

        e.g.24.6951

      • lonnumber

        e.g.46.6857

      • radius_minteger

        e.g.150

      • contact_phonestring | null
      • window_fromstring | null (date-time)
      • window_tostring | null (date-time)
      • service_mininteger

        e.g.15

      • geofence_idstring | null
    • created_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/routes" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "name": "Morning school run",
      "vehicle_id": "string",
      "driver_id": "string",
      "stops": [
        {
          "seq": 1,
          "kind": "drop",
          "name": "Al Olaya branch",
          "lat": 24.6951,
          "lon": 46.6857,
          "radius_m": 150,
          "contact_phone": "+966551234567",
          "window_from": "string",
          "window_to": "string",
          "service_min": 15,
          "geofence_id": "string"
        }
      ],
      "created_at": "2026-11-17T08:30:00Z"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Save a route

POST/v1/routes

Saves a route's stops, and optionally its vehicle and driver, to run as a job on demand.

Scopefleet: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

  • namestring required

    e.g.Morning school run

  • vehicle_idstring | null
  • driver_idstring | null
  • stopsobject[] required
    Fields of stops
    • kindstring required

      one ofpickupdrop

    • namestring required

      e.g.Al Olaya branch

    • latnumber required

      Latitude, within Saudi Arabia

      e.g.24.6951

    • lonnumber required

      Longitude, within Saudi Arabia

      e.g.46.6857

    • radius_minteger

      The vehicle has arrived within this distance

      e.g.150

    • contact_phonestring | null

      Receives the tracking link and, with proof otp, the code

    • window_fromstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • window_tostring | null (date-time)

      After window_from

      e.g.2026-11-17T11:00:00Z

    • service_mininteger

      Minutes spent at the stop

      e.g.15

    • geofence_idstring | null

      The geofence (customer site) the stop was picked from

      e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Morning school run

  • vehicle_idstring | null
  • driver_idstring | null
  • stopsobject[]
    Fields of stops
    • seqinteger

      Order in the route, from 1

      e.g.1

    • kindstring

      one ofpickupdrop

    • namestring

      e.g.Al Olaya branch

    • latnumber

      e.g.24.6951

    • lonnumber

      e.g.46.6857

    • radius_minteger

      e.g.150

    • contact_phonestring | null
    • window_fromstring | null (date-time)
    • window_tostring | null (date-time)
    • service_mininteger

      e.g.15

    • geofence_idstring | null
  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403429

Example request
curl -X POST "https://api.ping.nml.sa/v1/routes" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Morning school run", "stops": [{"kind": "drop", "name": "Al Olaya branch", "lat": 24.6951, "lon": 46.6857, "radius_m": 150, "contact_phone": "+966551234567", "window_from": "2026-11-17T09:00:00Z", "window_to": "2026-11-17T11:00:00Z", "service_min": 15, "geofence_id": "019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a"}]}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Morning school run",
  "vehicle_id": "string",
  "driver_id": "string",
  "stops": [
    {
      "seq": 1,
      "kind": "drop",
      "name": "Al Olaya branch",
      "lat": 24.6951,
      "lon": 46.6857,
      "radius_m": 150,
      "contact_phone": "+966551234567",
      "window_from": "string",
      "window_to": "string",
      "service_min": 15,
      "geofence_id": "string"
    }
  ],
  "created_at": "2026-11-17T08:30:00Z"
}

Change a saved route

PATCH/v1/routes/{routeId}

Renames the route, sets or clears its vehicle and driver, or replaces its stops (in the order given). Jobs already made from it are not changed.

Scopefleet:write

Parameters

  • routeIdstring path required

    e.g.019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d

Request body

  • namestring

    e.g.Morning school run

  • vehicle_idstring | null
  • driver_idstring | null
  • stopsobject[]
    Fields of stops
    • kindstring required

      one ofpickupdrop

    • namestring required

      e.g.Al Olaya branch

    • latnumber required

      Latitude, within Saudi Arabia

      e.g.24.6951

    • lonnumber required

      Longitude, within Saudi Arabia

      e.g.46.6857

    • radius_minteger

      The vehicle has arrived within this distance

      e.g.150

    • contact_phonestring | null

      Receives the tracking link and, with proof otp, the code

    • window_fromstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • window_tostring | null (date-time)

      After window_from

      e.g.2026-11-17T11:00:00Z

    • service_mininteger

      Minutes spent at the stop

      e.g.15

    • geofence_idstring | null

      The geofence (customer site) the stop was picked from

      e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Morning school run

  • vehicle_idstring | null
  • driver_idstring | null
  • stopsobject[]
    Fields of stops
    • seqinteger

      Order in the route, from 1

      e.g.1

    • kindstring

      one ofpickupdrop

    • namestring

      e.g.Al Olaya branch

    • latnumber

      e.g.24.6951

    • lonnumber

      e.g.46.6857

    • radius_minteger

      e.g.150

    • contact_phonestring | null
    • window_fromstring | null (date-time)
    • window_tostring | null (date-time)
    • service_mininteger

      e.g.15

    • geofence_idstring | null
  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403404429

Example request
curl -X PATCH "https://api.ping.nml.sa/v1/routes/019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Morning school run"}'
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Morning school run",
  "vehicle_id": "string",
  "driver_id": "string",
  "stops": [
    {
      "seq": 1,
      "kind": "drop",
      "name": "Al Olaya branch",
      "lat": 24.6951,
      "lon": 46.6857,
      "radius_m": 150,
      "contact_phone": "+966551234567",
      "window_from": "string",
      "window_to": "string",
      "service_min": 15,
      "geofence_id": "string"
    }
  ],
  "created_at": "2026-11-17T08:30:00Z"
}

Delete a saved route

DELETE/v1/routes/{routeId}

Only while no active rider rides it (409, code route_has_riders: move them or end their riding first). Jobs made from it and riders who left it keep their history without it.

Scopefleet:write

Parameters

  • routeIdstring path required

    e.g.019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • namestring

    e.g.Morning school run

  • vehicle_idstring | null
  • driver_idstring | null
  • stopsobject[]
    Fields of stops
    • seqinteger

      Order in the route, from 1

      e.g.1

    • kindstring

      one ofpickupdrop

    • namestring

      e.g.Al Olaya branch

    • latnumber

      e.g.24.6951

    • lonnumber

      e.g.46.6857

    • radius_minteger

      e.g.150

    • contact_phonestring | null
    • window_fromstring | null (date-time)
    • window_tostring | null (date-time)
    • service_mininteger

      e.g.15

    • geofence_idstring | null
  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403404409429

Example request
curl -X DELETE "https://api.ping.nml.sa/v1/routes/019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "name": "Morning school run",
  "vehicle_id": "string",
  "driver_id": "string",
  "stops": [
    {
      "seq": 1,
      "kind": "drop",
      "name": "Al Olaya branch",
      "lat": 24.6951,
      "lon": 46.6857,
      "radius_m": 150,
      "contact_phone": "+966551234567",
      "window_from": "string",
      "window_to": "string",
      "service_min": 15,
      "geofence_id": "string"
    }
  ],
  "created_at": "2026-11-17T08:30:00Z"
}

Create a job from a saved route

POST/v1/routes/{routeId}/run

Creates a draft job from the route's stops, vehicle and driver, scheduled now or at scheduled_at, and dispatches it when dispatch is true.

Scopefleet:write Accepts Idempotency-Key

Parameters

  • routeIdstring path required

    e.g.019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d

  • 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

  • scheduled_atstring | null (date-time)

    Defaults to unscheduled (now)

    e.g.2026-11-18T06:30:00Z

  • dispatchboolean

    Dispatch the job at once

    e.g.true

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • refstring

    The reference shown to drivers and recipients

    e.g.J-2611-4821

  • statusstring

    one ofdraftdispatchedin_progresscompletedfailedcancelled

  • route_idstring | null

    The saved route the job was made from

  • vehicle_idstring | null
  • driver_idstring | null
  • scheduled_atstring | null (date-time)

    e.g.2026-11-17T09:00:00Z

  • proofstring[]

    e.g.["photo","otp"]

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • notesstring | null

    e.g.Deliver to the loading bay.

  • cargostring | null

    e.g.Dairy, chilled

  • palletsinteger | null

    e.g.12

  • department_idstring | null

    The department the job is planned for

  • requires_kindstring | null
  • dispositionobject | null

    What the receiver did with the load after a breach

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • dispatched_atstring | null (date-time)
  • started_atstring | null (date-time)

    The first arrival at a stop

  • completed_atstring | null (date-time)

    When the job completed or failed

  • cancelled_atstring | null (date-time)
  • stopsobject[]
    Fields of stops
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • seqinteger

      Order in the job, from 1

      e.g.1

    • kindstring

      one ofpickupdrop

    • namestring

      e.g.Al Olaya branch

    • latnumber

      e.g.24.6951

    • lonnumber

      e.g.46.6857

    • radius_minteger

      e.g.150

    • contact_phonestring | null
    • window_fromstring | null (date-time)

      e.g.2026-11-17T09:00:00Z

    • window_tostring | null (date-time)

      e.g.2026-11-17T11:00:00Z

    • statusstring

      one ofpendingarriveddonefailedskipped

    • eta_atstring | null (date-time)

      Estimated arrival from the vehicle's position

    • arrived_atstring | null (date-time)
    • departed_atstring | null (date-time)
    • done_atstring | null (date-time)

      When the stop was done, failed or skipped

    • service_mininteger

      Minutes spent at the stop

      e.g.15

    • geofence_idstring | null

      The geofence (customer site) the stop was picked from

      e.g.019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a

  • eventsobject[]
    Fields of events
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring | null
    • codestring

      one ofcreatedupdateddispatchedarriveddeparteddonefailedskippedcompletedcancelled

    • actorstring

      Who acted: user:, agent:, system: or driver:

      e.g.system:fleet

    • latnumber | null

      e.g.24.6951

    • lonnumber | null

      e.g.46.6857

    • notestring | null
    • atstring (date-time)

      e.g.2026-11-17T09:41:00Z

  • proofsobject[]
    Fields of proofs
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • stop_idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • kindstring

      photo, signature: a file kept with the job; otp: the stop's code was given; note: completed without a code

      one ofphotosignatureotpnote

    • received_bystring | null

      Who received the delivery, as the driver wrote it

      e.g.Store manager

    • atstring (date-time)

      e.g.2026-11-17T09:48:00Z

  • driver_linkstring | null

    The driver's job link, also sent to the driver on WhatsApp; null when the job was not dispatched

    e.g.https://example.com/drive#019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d.q8XcT0vW

Errors

400401403404409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/routes/019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d/run" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scheduled_at": "2026-11-18T06:30:00Z", "dispatch": true}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "ref": "J-2611-4821",
  "status": "draft",
  "route_id": "string",
  "vehicle_id": "string",
  "driver_id": "string",
  "scheduled_at": "2026-11-17T09:00:00Z",
  "proof": [
    "photo",
    "otp"
  ],
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "notes": "Deliver to the loading bay.",
  "cargo": "Dairy, chilled",
  "pallets": 12,
  "department_id": "string",
  "requires_kind": "truck",
  "disposition": {
    "outcome": "quarantined",
    "reason": "string",
    "receiver_name": "Store manager",
    "recorded_by": "user:usr_Qm4rT8wZ1",
    "recorded_at": "2026-11-17T10:12:00Z"
  },
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "dispatched_at": "string",
  "started_at": "string",
  "completed_at": "string",
  "cancelled_at": "string",
  "stops": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "seq": 1,
      "kind": "drop",
      "name": "Al Olaya branch",
      "lat": 24.6951,
      "lon": 46.6857,
      "radius_m": 150,
      "contact_phone": "+966551234567",
      "window_from": "2026-11-17T09:00:00Z",
      "window_to": "2026-11-17T11:00:00Z",
      "status": "pending",
      "eta_at": "string",
      "arrived_at": "string",
      "departed_at": "string",
      "done_at": "string",
      "service_min": 15,
      "geofence_id": "019ac0c4-8b3c-7d4e-9f5a-6b7c8d9e0f1a"
    }
  ],
  "events": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "string",
      "code": "arrived",
      "actor": "system:fleet",
      "lat": 24.6951,
      "lon": 46.6857,
      "note": "string",
      "at": "2026-11-17T09:41:00Z"
    }
  ],
  "proofs": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "stop_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "kind": "otp",
      "received_by": "Store manager",
      "at": "2026-11-17T09:48:00Z"
    }
  ],
  "driver_link": "https://example.com/drive#019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d.q8XcT0vW"
}

List the account's vehicle requests

GET/v1/vehicle-requests

Newest first; with vehicle_id one vehicle's, with state only those in it. A department-scoped key sees its own vehicles' requests and the additions into its departments.

Scopefleet:read

Parameters

  • vehicle_idstring query

    One vehicle's requests.

  • statestring query

    Only requests in this state.

    e.g.pending

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • kindstring

      change: a vehicle's registered fields; add: a vehicle wanted with no unit (papers only).

      one ofchangeadd

    • statestring

      one ofpendingapprovedrejectedwithdrawn

    • vehicle_idstring | null

      A change's vehicle; an addition's once approved

    • department_idstring | null

      The department an addition goes into

    • plate_codestring

      Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

      e.g.2070SKD

    • fieldsstring[]

      The fields asked

    • askedobject

      A vehicle's registered fields (null: not recorded, or not asked when read beside the fields asked).

      Fields of asked
      • plateprivate_car | private_light_transport | private_heavy_transport | private_small_bus | private_large_bus | public_light_transport | public_heavy_transport | public_small_bus | public_large_bus | taxi | diplomatic | temporary | public_works | export | motorcycle | trailer | historic | null
      • plate_codestring | null
      • vinstring | null
      • kindstring | null
      • usestring | null
      • makestring | null

        e.g.Toyota

      • modelstring | null

        e.g.Hilux

      • yearinteger | null

        e.g.2024

    • wasobject | null

      A change's values of the fields asked when asked (null for an addition)

    • justificationstring
    • filesobject[]
      Fields of files
      • idstring

        e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

      • namestring

        e.g.istimara.pdf

      • content_typestring

        one ofapplication/pdfimage/jpegimage/png

      • bytesinteger
    • asked_bystring

      Who asked (user:<id>, ...)

      e.g.user:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • asked_atstring (date-time)
    • decided_bystring | null

      Who approved or rejected it (PING's staff), or withdrew it

    • decided_atstring | null (date-time)
    • reasonstring | null

      Why it was rejected

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/vehicle-requests" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "kind": "change",
      "state": "pending",
      "vehicle_id": "string",
      "department_id": "string",
      "plate_code": "2070SKD",
      "fields": [
        "vin"
      ],
      "asked": {
        "plate": {
          "number": "1",
          "letters": "SKD",
          "type": "private_car"
        },
        "plate_code": "2070SKD",
        "vin": "1G4AH59H5G1183441",
        "kind": "truck",
        "use": "light_own_goods",
        "make": "Toyota",
        "model": "Hilux",
        "year": 2024
      },
      "was": {
        "plate": {},
        "plate_code": "2070SKD",
        "vin": "1G4AH59H5G1183441",
        "kind": "truck",
        "use": "light_own_goods",
        "make": "Toyota",
        "model": "Hilux",
        "year": 2024
      },
      "justification": "string",
      "files": [
        {
          "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
          "name": "istimara.pdf",
          "content_type": "application/pdf",
          "bytes": 0
        }
      ],
      "asked_by": "user:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "asked_at": "string",
      "decided_by": "string",
      "decided_at": "string",
      "reason": "string"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Ask PING to change a vehicle's registration, or to add a vehicle

POST/v1/vehicle-requests

A vehicle's registered fields (plate, VIN, kind, use, make, model, year) are PING's (ADR 32). kind change asks for the fields given in fields (only those, each kept with its value now; null clears one but the plate and use); kind add asks for a vehicle with no unit (papers only), every registered field given. A justification is required; 0 to 3 supporting files (PDF, JPEG or PNG, base64, limits in fleet's unit.toml [service.requests]). One request waits per vehicle (409). PING's staff approve it, applying every field at once, or reject it with a reason; the asker and the owners are told (vehicle_request.decided). A department-scoped caller asks only for its departments' vehicles, and adds one only into one of its departments.

Scopefleet: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

    change: a vehicle's registered fields; add: a vehicle wanted with no unit (papers only).

    one ofchangeadd

  • vehicle_idstring

    The vehicle a change is for (a change only)

  • department_idstring | null

    The department an added vehicle goes into (an addition only; a department-scoped caller gives one of theirs)

  • fieldsobject required

    The registered fields asked. A change gives only those it asks for (null clears one; plate and use cannot be cleared); an addition gives every one.

    Fields of fields
    • plateobject

      A Saudi plate: its digits, its letters in their Latin form (3, or 2 on a motorcycle) and its type. Unique in the account.

      Fields of plate
      • numberstring required

        Saudi plate number (the digits)

        e.g.1

      • lettersstring required

        Saudi plate letters in their Latin form, read left to right: 3 on vehicles, 2 on motorcycles (the plate's type decides, held by the table that stores a plate)

        e.g.SKD

      • typestring required

        Saudi vehicle plate type

        one ofprivate_carprivate_light_transportprivate_heavy_transportprivate_small_busprivate_large_buspublic_light_transportpublic_heavy_transportpublic_small_buspublic_large_bustaxidiplomatictemporarypublic_worksexportmotorcycletrailerhistoric

    • vinstring | null
    • kindstring | null
    • usestring

      What the vehicle is used for, as the Kingdom's transport regulations tell uses apart. Each fits some kinds of vehicle.

      one ofcompany_carcar_rentalpersonallight_noncommercialexempt_heavypublic_worksheavy_for_hireheavy_own_goodsheavy_noncommerciallight_for_hirelight_own_goodsgoods_vehicle_rentalvehicle_carrying_towingeducationalstaff_buscity_buscharter_busintercity_businternational_busbus_rentaltaximotorcycle_deliverymotorcycle_rentalother

    • makestring | null

      e.g.Toyota

    • modelstring | null

      e.g.Hilux

    • yearinteger | null

      e.g.2024

  • justificationstring required

    Why: what the papers say

    e.g.The Istimara renewed on 2026-11-20 carries the new plate.

  • filesobject[]

    Supporting files (the Istimara, a letter), 0 to 3

    Fields of files
    • namestring required

      e.g.istimara.pdf

    • content_typestring required

      one ofapplication/pdfimage/jpegimage/png

    • datastring required

      The file, base64 (at most [service.requests] max_file_bytes decoded; the request at most max_request_bytes)

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • kindstring

    change: a vehicle's registered fields; add: a vehicle wanted with no unit (papers only).

    one ofchangeadd

  • statestring

    one ofpendingapprovedrejectedwithdrawn

  • vehicle_idstring | null

    A change's vehicle; an addition's once approved

  • department_idstring | null

    The department an addition goes into

  • plate_codestring

    Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

    e.g.2070SKD

  • fieldsstring[]

    The fields asked

  • askedobject

    A vehicle's registered fields (null: not recorded, or not asked when read beside the fields asked).

    Fields of asked
    • plateprivate_car | private_light_transport | private_heavy_transport | private_small_bus | private_large_bus | public_light_transport | public_heavy_transport | public_small_bus | public_large_bus | taxi | diplomatic | temporary | public_works | export | motorcycle | trailer | historic | null
    • plate_codestring | null
    • vinstring | null
    • kindstring | null
    • usestring | null
    • makestring | null

      e.g.Toyota

    • modelstring | null

      e.g.Hilux

    • yearinteger | null

      e.g.2024

  • wasobject | null

    A change's values of the fields asked when asked (null for an addition)

  • justificationstring
  • filesobject[]
    Fields of files
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • namestring

      e.g.istimara.pdf

    • content_typestring

      one ofapplication/pdfimage/jpegimage/png

    • bytesinteger
  • asked_bystring

    Who asked (user:<id>, ...)

    e.g.user:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • asked_atstring (date-time)
  • decided_bystring | null

    Who approved or rejected it (PING's staff), or withdrew it

  • decided_atstring | null (date-time)
  • reasonstring | null

    Why it was rejected

Errors

400401403404409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/vehicle-requests" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind": "change", "fields": {"plate": {"number": "1", "letters": "SKD", "type": "private_car"}, "vin": "1G4AH59H5G1183441", "kind": "truck", "use": "light_own_goods", "make": "Toyota", "model": "Hilux", "year": 2024}, "justification": "The Istimara renewed on 2026-11-20 carries the new plate."}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "kind": "change",
  "state": "pending",
  "vehicle_id": "string",
  "department_id": "string",
  "plate_code": "2070SKD",
  "fields": [
    "vin"
  ],
  "asked": {
    "plate": {
      "number": "1",
      "letters": "SKD",
      "type": "private_car"
    },
    "plate_code": "2070SKD",
    "vin": "1G4AH59H5G1183441",
    "kind": "truck",
    "use": "light_own_goods",
    "make": "Toyota",
    "model": "Hilux",
    "year": 2024
  },
  "was": {
    "plate": {
      "number": "1",
      "letters": "SKD",
      "type": "private_car"
    },
    "plate_code": "2070SKD",
    "vin": "1G4AH59H5G1183441",
    "kind": "truck",
    "use": "light_own_goods",
    "make": "Toyota",
    "model": "Hilux",
    "year": 2024
  },
  "justification": "string",
  "files": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "name": "istimara.pdf",
      "content_type": "application/pdf",
      "bytes": 0
    }
  ],
  "asked_by": "user:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "asked_at": "string",
  "decided_by": "string",
  "decided_at": "string",
  "reason": "string"
}

Get a vehicle request

GET/v1/vehicle-requests/{requestId}

The fields asked with their values when asked, the justification, the files sent (named, not read back) and the decision.

Scopefleet:read

Parameters

  • requestIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9e

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • kindstring

    change: a vehicle's registered fields; add: a vehicle wanted with no unit (papers only).

    one ofchangeadd

  • statestring

    one ofpendingapprovedrejectedwithdrawn

  • vehicle_idstring | null

    A change's vehicle; an addition's once approved

  • department_idstring | null

    The department an addition goes into

  • plate_codestring

    Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

    e.g.2070SKD

  • fieldsstring[]

    The fields asked

  • askedobject

    A vehicle's registered fields (null: not recorded, or not asked when read beside the fields asked).

    Fields of asked
    • plateprivate_car | private_light_transport | private_heavy_transport | private_small_bus | private_large_bus | public_light_transport | public_heavy_transport | public_small_bus | public_large_bus | taxi | diplomatic | temporary | public_works | export | motorcycle | trailer | historic | null
    • plate_codestring | null
    • vinstring | null
    • kindstring | null
    • usestring | null
    • makestring | null

      e.g.Toyota

    • modelstring | null

      e.g.Hilux

    • yearinteger | null

      e.g.2024

  • wasobject | null

    A change's values of the fields asked when asked (null for an addition)

  • justificationstring
  • filesobject[]
    Fields of files
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • namestring

      e.g.istimara.pdf

    • content_typestring

      one ofapplication/pdfimage/jpegimage/png

    • bytesinteger
  • asked_bystring

    Who asked (user:<id>, ...)

    e.g.user:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • asked_atstring (date-time)
  • decided_bystring | null

    Who approved or rejected it (PING's staff), or withdrew it

  • decided_atstring | null (date-time)
  • reasonstring | null

    Why it was rejected

Errors

400401403404429

Example request
curl "https://api.ping.nml.sa/v1/vehicle-requests/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9e" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "kind": "change",
  "state": "pending",
  "vehicle_id": "string",
  "department_id": "string",
  "plate_code": "2070SKD",
  "fields": [
    "vin"
  ],
  "asked": {
    "plate": {
      "number": "1",
      "letters": "SKD",
      "type": "private_car"
    },
    "plate_code": "2070SKD",
    "vin": "1G4AH59H5G1183441",
    "kind": "truck",
    "use": "light_own_goods",
    "make": "Toyota",
    "model": "Hilux",
    "year": 2024
  },
  "was": {
    "plate": {
      "number": "1",
      "letters": "SKD",
      "type": "private_car"
    },
    "plate_code": "2070SKD",
    "vin": "1G4AH59H5G1183441",
    "kind": "truck",
    "use": "light_own_goods",
    "make": "Toyota",
    "model": "Hilux",
    "year": 2024
  },
  "justification": "string",
  "files": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "name": "istimara.pdf",
      "content_type": "application/pdf",
      "bytes": 0
    }
  ],
  "asked_by": "user:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "asked_at": "string",
  "decided_by": "string",
  "decided_at": "string",
  "reason": "string"
}

Withdraw a pending vehicle request

POST/v1/vehicle-requests/{requestId}/withdraw

Only while pending (409 otherwise).

Scopefleet:write

Parameters

  • requestIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9e

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • kindstring

    change: a vehicle's registered fields; add: a vehicle wanted with no unit (papers only).

    one ofchangeadd

  • statestring

    one ofpendingapprovedrejectedwithdrawn

  • vehicle_idstring | null

    A change's vehicle; an addition's once approved

  • department_idstring | null

    The department an addition goes into

  • plate_codestring

    Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

    e.g.2070SKD

  • fieldsstring[]

    The fields asked

  • askedobject

    A vehicle's registered fields (null: not recorded, or not asked when read beside the fields asked).

    Fields of asked
    • plateprivate_car | private_light_transport | private_heavy_transport | private_small_bus | private_large_bus | public_light_transport | public_heavy_transport | public_small_bus | public_large_bus | taxi | diplomatic | temporary | public_works | export | motorcycle | trailer | historic | null
    • plate_codestring | null
    • vinstring | null
    • kindstring | null
    • usestring | null
    • makestring | null

      e.g.Toyota

    • modelstring | null

      e.g.Hilux

    • yearinteger | null

      e.g.2024

  • wasobject | null

    A change's values of the fields asked when asked (null for an addition)

  • justificationstring
  • filesobject[]
    Fields of files
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • namestring

      e.g.istimara.pdf

    • content_typestring

      one ofapplication/pdfimage/jpegimage/png

    • bytesinteger
  • asked_bystring

    Who asked (user:<id>, ...)

    e.g.user:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • asked_atstring (date-time)
  • decided_bystring | null

    Who approved or rejected it (PING's staff), or withdrew it

  • decided_atstring | null (date-time)
  • reasonstring | null

    Why it was rejected

Errors

400401403404409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/vehicle-requests/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9e/withdraw" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "kind": "change",
  "state": "pending",
  "vehicle_id": "string",
  "department_id": "string",
  "plate_code": "2070SKD",
  "fields": [
    "vin"
  ],
  "asked": {
    "plate": {
      "number": "1",
      "letters": "SKD",
      "type": "private_car"
    },
    "plate_code": "2070SKD",
    "vin": "1G4AH59H5G1183441",
    "kind": "truck",
    "use": "light_own_goods",
    "make": "Toyota",
    "model": "Hilux",
    "year": 2024
  },
  "was": {
    "plate": {
      "number": "1",
      "letters": "SKD",
      "type": "private_car"
    },
    "plate_code": "2070SKD",
    "vin": "1G4AH59H5G1183441",
    "kind": "truck",
    "use": "light_own_goods",
    "make": "Toyota",
    "model": "Hilux",
    "year": 2024
  },
  "justification": "string",
  "files": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "name": "istimara.pdf",
      "content_type": "application/pdf",
      "bytes": 0
    }
  ],
  "asked_by": "user:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "asked_at": "string",
  "decided_by": "string",
  "decided_at": "string",
  "reason": "string"
}

List vehicles

GET/v1/vehicles

Lists the account's vehicles by plate: those in service, or with retired=true those taken out of service; plate_code and vin narrow it to those vehicles. A department-scoped key sees only its departments' vehicles.

Scopefleet:read

Parameters

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

  • retiredboolean query

    true lists the vehicles taken out of service instead.

  • plate_codestring[] query

    Only the vehicles with these plates (up to 200; indexed).

  • vinstring query

    Only the vehicle with this VIN (indexed).

    e.g.1G4AH59H5G1183441

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • plateobject

      A Saudi plate: its digits, its letters in their Latin form (3, or 2 on a motorcycle) and its type. Unique in the account.

      Fields of plate
      • numberstring

        Saudi plate number (the digits)

        e.g.1

      • lettersstring

        Saudi plate letters in their Latin form, read left to right: 3 on vehicles, 2 on motorcycles (the plate's type decides, held by the table that stores a plate)

        e.g.SKD

      • typestring

        Saudi vehicle plate type

        one ofprivate_carprivate_light_transportprivate_heavy_transportprivate_small_busprivate_large_buspublic_light_transportpublic_heavy_transportpublic_small_buspublic_large_bustaxidiplomatictemporarypublic_worksexportmotorcycletrailerhistoric

    • plate_codestring

      Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

      e.g.2070SKD

    • fleet_numberstring | null

      The account's own number for the vehicle (door or fleet code), unique in the account when set

      e.g.TRK-089

    • kindstring | null
    • vinstring | null
    • makestring | null

      e.g.Toyota

    • modelstring | null

      e.g.Hilux

    • yearinteger | null

      Model year

      e.g.2024

    • department_idstring | null

      The account department the vehicle belongs to

    • speed_limit_kmhinteger | null

      The vehicle's own speed limit for speeding alerts, km/h

      e.g.120

    • cargo_min_cnumber | null

      Lowest allowed cargo temperature, °C (cold chain)

      e.g.2

    • cargo_max_cnumber | null

      Highest allowed cargo temperature, °C (cold chain)

      e.g.8

    • tank_linteger | null

      Fuel tank size, litres

      e.g.400

    • capacity_palletsinteger | null

      How many pallets the vehicle carries (dispatch load)

      e.g.12

    • fuel_typestring | null
    • usestring

      unset: registered before uses were recorded; set it with updateVehicle.

      one ofcompany_carcar_rentalpersonallight_noncommercialexempt_heavypublic_worksheavy_for_hireheavy_own_goodsheavy_noncommerciallight_for_hirelight_own_goodsgoods_vehicle_rentalvehicle_carrying_towingeducationalstaff_buscity_buscharter_busintercity_businternational_busbus_rentaltaximotorcycle_deliverymotorcycle_rentalotherunset

    • driver_idstring | null

      The driver of the vehicle's current driver session

    • created_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

    • updated_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

    • retired_atstring | null (date-time)

      When it was taken out of service; null while in service

    • retire_reasonstring | null
  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403429

Example request
curl "https://api.ping.nml.sa/v1/vehicles" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "plate": {
        "number": "1",
        "letters": "SKD",
        "type": "private_car"
      },
      "plate_code": "2070SKD",
      "fleet_number": "TRK-089",
      "kind": "truck",
      "vin": "1G4AH59H5G1183441",
      "make": "Toyota",
      "model": "Hilux",
      "year": 2024,
      "department_id": "string",
      "speed_limit_kmh": 120,
      "cargo_min_c": 2,
      "cargo_max_c": 8,
      "tank_l": 400,
      "capacity_pallets": 12,
      "fuel_type": "diesel",
      "use": "light_own_goods",
      "driver_id": "string",
      "created_at": "2026-11-17T08:30:00Z",
      "updated_at": "2026-11-17T08:30:00Z",
      "retired_at": "string",
      "retire_reason": "sold"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Get a vehicle

GET/v1/vehicles/{vehicleId}

Returns one vehicle with its current driver.

Scopefleet:read

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • plateobject

    A Saudi plate: its digits, its letters in their Latin form (3, or 2 on a motorcycle) and its type. Unique in the account.

    Fields of plate
    • numberstring

      Saudi plate number (the digits)

      e.g.1

    • lettersstring

      Saudi plate letters in their Latin form, read left to right: 3 on vehicles, 2 on motorcycles (the plate's type decides, held by the table that stores a plate)

      e.g.SKD

    • typestring

      Saudi vehicle plate type

      one ofprivate_carprivate_light_transportprivate_heavy_transportprivate_small_busprivate_large_buspublic_light_transportpublic_heavy_transportpublic_small_buspublic_large_bustaxidiplomatictemporarypublic_worksexportmotorcycletrailerhistoric

  • plate_codestring

    Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

    e.g.2070SKD

  • fleet_numberstring | null

    The account's own number for the vehicle (door or fleet code), unique in the account when set

    e.g.TRK-089

  • kindstring | null
  • vinstring | null
  • makestring | null

    e.g.Toyota

  • modelstring | null

    e.g.Hilux

  • yearinteger | null

    Model year

    e.g.2024

  • department_idstring | null

    The account department the vehicle belongs to

  • speed_limit_kmhinteger | null

    The vehicle's own speed limit for speeding alerts, km/h

    e.g.120

  • cargo_min_cnumber | null

    Lowest allowed cargo temperature, °C (cold chain)

    e.g.2

  • cargo_max_cnumber | null

    Highest allowed cargo temperature, °C (cold chain)

    e.g.8

  • tank_linteger | null

    Fuel tank size, litres

    e.g.400

  • capacity_palletsinteger | null

    How many pallets the vehicle carries (dispatch load)

    e.g.12

  • fuel_typestring | null
  • usestring

    unset: registered before uses were recorded; set it with updateVehicle.

    one ofcompany_carcar_rentalpersonallight_noncommercialexempt_heavypublic_worksheavy_for_hireheavy_own_goodsheavy_noncommerciallight_for_hirelight_own_goodsgoods_vehicle_rentalvehicle_carrying_towingeducationalstaff_buscity_buscharter_busintercity_businternational_busbus_rentaltaximotorcycle_deliverymotorcycle_rentalotherunset

  • driver_idstring | null

    The driver of the vehicle's current driver session

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • retired_atstring | null (date-time)

    When it was taken out of service; null while in service

  • retire_reasonstring | null

Errors

400401403404429

Example request
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "plate": {
    "number": "1",
    "letters": "SKD",
    "type": "private_car"
  },
  "plate_code": "2070SKD",
  "fleet_number": "TRK-089",
  "kind": "truck",
  "vin": "1G4AH59H5G1183441",
  "make": "Toyota",
  "model": "Hilux",
  "year": 2024,
  "department_id": "string",
  "speed_limit_kmh": 120,
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "tank_l": 400,
  "capacity_pallets": 12,
  "fuel_type": "diesel",
  "use": "light_own_goods",
  "driver_id": "string",
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "retired_at": "string",
  "retire_reason": "sold"
}

Update a vehicle's operational fields

PATCH/v1/vehicles/{vehicleId}

Changes the operational fields sent (fleet number, department, speed limit, cargo range, tank, pallets, fuel type); a field sent as null is cleared. Each changed field is a history entry (a department move its own kind). The registered fields (plate, VIN, kind, use, make, model, year) are PING's: one in the body answers 400 naming requestVehicleChange, which asks PING to change them.

Scopefleet:write

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

Request body

  • fleet_numberstring | null

    e.g.TRK-089

  • department_idstring | null
  • speed_limit_kmhinteger | null

    e.g.100

  • cargo_min_cnumber | null

    e.g.2

  • cargo_max_cnumber | null

    e.g.8

  • tank_linteger | null

    e.g.400

  • capacity_palletsinteger | null

    e.g.12

  • fuel_typestring | null
  • plateobject

    Registered: refused (400); ask with requestVehicleChange

    Fields of plate
    • numberstring required

      Saudi plate number (the digits)

      e.g.1

    • lettersstring required

      Saudi plate letters in their Latin form, read left to right: 3 on vehicles, 2 on motorcycles (the plate's type decides, held by the table that stores a plate)

      e.g.SKD

    • typestring required

      Saudi vehicle plate type

      one ofprivate_carprivate_light_transportprivate_heavy_transportprivate_small_busprivate_large_buspublic_light_transportpublic_heavy_transportpublic_small_buspublic_large_bustaxidiplomatictemporarypublic_worksexportmotorcycletrailerhistoric

  • kindstring | null

    Registered: refused (400); ask with requestVehicleChange

  • vinstring | null

    Registered: refused (400); ask with requestVehicleChange

  • makestring | null

    Registered: refused (400); ask with requestVehicleChange

  • modelstring | null

    Registered: refused (400); ask with requestVehicleChange

  • yearinteger | null

    Registered: refused (400); ask with requestVehicleChange

  • useobject

    Registered: refused (400); ask with requestVehicleChange

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • plateobject

    A Saudi plate: its digits, its letters in their Latin form (3, or 2 on a motorcycle) and its type. Unique in the account.

    Fields of plate
    • numberstring

      Saudi plate number (the digits)

      e.g.1

    • lettersstring

      Saudi plate letters in their Latin form, read left to right: 3 on vehicles, 2 on motorcycles (the plate's type decides, held by the table that stores a plate)

      e.g.SKD

    • typestring

      Saudi vehicle plate type

      one ofprivate_carprivate_light_transportprivate_heavy_transportprivate_small_busprivate_large_buspublic_light_transportpublic_heavy_transportpublic_small_buspublic_large_bustaxidiplomatictemporarypublic_worksexportmotorcycletrailerhistoric

  • plate_codestring

    Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

    e.g.2070SKD

  • fleet_numberstring | null

    The account's own number for the vehicle (door or fleet code), unique in the account when set

    e.g.TRK-089

  • kindstring | null
  • vinstring | null
  • makestring | null

    e.g.Toyota

  • modelstring | null

    e.g.Hilux

  • yearinteger | null

    Model year

    e.g.2024

  • department_idstring | null

    The account department the vehicle belongs to

  • speed_limit_kmhinteger | null

    The vehicle's own speed limit for speeding alerts, km/h

    e.g.120

  • cargo_min_cnumber | null

    Lowest allowed cargo temperature, °C (cold chain)

    e.g.2

  • cargo_max_cnumber | null

    Highest allowed cargo temperature, °C (cold chain)

    e.g.8

  • tank_linteger | null

    Fuel tank size, litres

    e.g.400

  • capacity_palletsinteger | null

    How many pallets the vehicle carries (dispatch load)

    e.g.12

  • fuel_typestring | null
  • usestring

    unset: registered before uses were recorded; set it with updateVehicle.

    one ofcompany_carcar_rentalpersonallight_noncommercialexempt_heavypublic_worksheavy_for_hireheavy_own_goodsheavy_noncommerciallight_for_hirelight_own_goodsgoods_vehicle_rentalvehicle_carrying_towingeducationalstaff_buscity_buscharter_busintercity_businternational_busbus_rentaltaximotorcycle_deliverymotorcycle_rentalotherunset

  • driver_idstring | null

    The driver of the vehicle's current driver session

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • retired_atstring | null (date-time)

    When it was taken out of service; null while in service

  • retire_reasonstring | null

Errors

400401403404409429

  • 503A service it needs (accounts, for the departments) cannot be reached; retry shortly (code: unavailable)
Example request
curl -X PATCH "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fleet_number": "TRK-089", "speed_limit_kmh": 100, "cargo_min_c": 2, "cargo_max_c": 8, "tank_l": 400, "capacity_pallets": 12}'
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "plate": {
    "number": "1",
    "letters": "SKD",
    "type": "private_car"
  },
  "plate_code": "2070SKD",
  "fleet_number": "TRK-089",
  "kind": "truck",
  "vin": "1G4AH59H5G1183441",
  "make": "Toyota",
  "model": "Hilux",
  "year": 2024,
  "department_id": "string",
  "speed_limit_kmh": 120,
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "tank_l": 400,
  "capacity_pallets": 12,
  "fuel_type": "diesel",
  "use": "light_own_goods",
  "driver_id": "string",
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "retired_at": "string",
  "retire_reason": "sold"
}

List a vehicle's documents

GET/v1/vehicles/{vehicleId}/documents

The vehicle's papers: Istimara, operating card, insurance and periodic inspection (FAHAS), each with its number and dates. A paper not recorded yet is left out.

Scopefleet:read

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

Response 200

  • dataobject[]
    Fields of data
    • typestring

      istimara: registration; operating_card: the TGA operating card; insurance: motor insurance; periodic_inspection: FAHAS.

      one ofistimaraoperating_cardinsuranceperiodic_inspection

    • numberstring | null

      e.g.OC-2291847

    • issued_onstring | null (date)

      e.g.2026-01-12

    • expires_onstring | null (date)

      e.g.2027-01-11

    • updated_atstring (date-time)

      e.g.2026-11-17T08:30:00Z

Errors

400401403404429

Example request
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/documents" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "type": "operating_card",
      "number": "OC-2291847",
      "issued_on": "2026-01-12",
      "expires_on": "2027-01-11",
      "updated_at": "2026-11-17T08:30:00Z"
    }
  ]
}

Record a vehicle document

PUT/v1/vehicles/{vehicleId}/documents/{type}

Records or replaces one paper by its type (the operating card's number is TGA's). Recorded in the vehicle's history.

Scopefleet:write

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • typestring path required

    e.g.operating_card

Request body

  • numberstring | null

    e.g.OC-2291847

  • issued_onstring | null (date)

    e.g.2026-01-12

  • expires_onstring | null (date)

    e.g.2027-01-11

Response 200

  • typestring

    istimara: registration; operating_card: the TGA operating card; insurance: motor insurance; periodic_inspection: FAHAS.

    one ofistimaraoperating_cardinsuranceperiodic_inspection

  • numberstring | null

    e.g.OC-2291847

  • issued_onstring | null (date)

    e.g.2026-01-12

  • expires_onstring | null (date)

    e.g.2027-01-11

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403404429

Example request
curl -X PUT "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/documents/operating_card" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number": "OC-2291847", "issued_on": "2026-01-12", "expires_on": "2027-01-11"}'
Example response · 200
{
  "type": "operating_card",
  "number": "OC-2291847",
  "issued_on": "2026-01-12",
  "expires_on": "2027-01-11",
  "updated_at": "2026-11-17T08:30:00Z"
}

Delete a vehicle document recorded by mistake

DELETE/v1/vehicles/{vehicleId}/documents/{type}

Removes the paper of this type; the vehicle's history keeps it (kind document_deleted: its type, number and expiry, and the reason given).

Scopefleet:write

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d

  • typestring path required

    e.g.operating_card

  • reasonstring query

    Why it is deleted (kept in the history)

Response 200

  • typestring

    istimara: registration; operating_card: the TGA operating card; insurance: motor insurance; periodic_inspection: FAHAS.

    one ofistimaraoperating_cardinsuranceperiodic_inspection

  • numberstring | null

    e.g.OC-2291847

  • issued_onstring | null (date)

    e.g.2026-01-12

  • expires_onstring | null (date)

    e.g.2027-01-11

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

Errors

400401403404429

Example request
curl -X DELETE "https://api.ping.nml.sa/v1/vehicles/019ac0c4-be6f-7071-c28d-9e0f1a2b3c4d/documents/operating_card" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "type": "operating_card",
  "number": "OC-2291847",
  "issued_on": "2026-01-12",
  "expires_on": "2027-01-11",
  "updated_at": "2026-11-17T08:30:00Z"
}

Assign a driver to a vehicle

POST/v1/vehicles/{vehicleId}/driver

Starts a manual driver session on the vehicle. It ends the vehicle's open session and the driver's open session on any other vehicle (driver.session_changed for each).

Scopefleet:write Accepts Idempotency-Key

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • 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

  • driver_idstring required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

Response 201

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • vehicle_idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • driver_idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • sourcestring

    manual: assigned through the API or console; ibutton: identified in the vehicle

    one ofmanualibutton

  • started_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • ended_atstring | null (date-time)

    Null while the session is open

Errors

400401403404409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/driver" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"driver_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d"}'
Example response · 201
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "driver_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "source": "manual",
  "started_at": "2026-11-17T08:30:00Z",
  "ended_at": "string"
}

End the vehicle's driver session

DELETE/v1/vehicles/{vehicleId}/driver

Ends the vehicle's open driver session, so no driver is assigned to it. A vehicle with no driver answers 204 as well.

Scopefleet:write

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

Response 204

No driver is assigned to the vehicle.

Errors

400401403404429

Example request
curl -X DELETE "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/driver" \
  -H "Authorization: Bearer $PING_API_KEY"

List a vehicle's history

GET/v1/vehicles/{vehicleId}/history

What happened to the vehicle in the account, newest first: registered, a field changed, department changed, driver assigned, a document recorded, retired. Append-only.

Scopefleet:read

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • limitinteger query

    Items per page, 1 to 200 (default 50).

  • cursorstring query

    The next_cursor of the previous page.

Response 200

  • dataobject[]
    Fields of data
    • idstring

      e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • atstring (date-time)

      e.g.2026-11-17T08:30:00Z

    • kindstring

      one ofregisteredupdateddepartment_changeddriver_assigneddocument_recordeddocument_deletedretired

    • actorstring

      Who did it (user:<id>, agent:<name>, system:<service>)

      e.g.user:usr_4Kd9

    • plate_codestring | null
    • fieldstring | null
    • fromstring | null

      e.g.100

    • tostring | null

      e.g.120

    • from_department_idstring | null
    • to_department_idstring | null
    • driver_idstring | null
    • document_typestring | null
    • expires_onstring | null (date)
    • reasonstring | null
    • notestring | null
    • request_idstring | null

      The vehicle request it applied (registered and updated by an approved request)

  • next_cursorstring | null

    e.g.eyJpZCI6InZlaF83S3EyIn0

Errors

400401403404429

Example request
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/history" \
  -H "Authorization: Bearer $PING_API_KEY"
Example response · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "at": "2026-11-17T08:30:00Z",
      "kind": "department_changed",
      "actor": "user:usr_4Kd9",
      "plate_code": "2070SKD",
      "field": "plate",
      "from": "100",
      "to": "120",
      "from_department_id": "string",
      "to_department_id": "string",
      "driver_id": "string",
      "document_type": "operating_card",
      "expires_on": "string",
      "reason": "sold",
      "note": "string",
      "request_id": "string"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

Take a vehicle out of service

POST/v1/vehicles/{vehicleId}/retire

Retires the vehicle with a reason: it leaves the register and the live map, keeps its history and data, and ends its open driver session.

Scopefleet:write

Parameters

  • vehicleIdstring path required

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

Request body

  • reasonstring required

    one ofsoldscrappedwritten_offreturnedother

  • notestring | null

    e.g.Sold to the dealer with 412,000 km

Response 200

  • idstring

    e.g.019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • plateobject

    A Saudi plate: its digits, its letters in their Latin form (3, or 2 on a motorcycle) and its type. Unique in the account.

    Fields of plate
    • numberstring

      Saudi plate number (the digits)

      e.g.1

    • lettersstring

      Saudi plate letters in their Latin form, read left to right: 3 on vehicles, 2 on motorcycles (the plate's type decides, held by the table that stores a plate)

      e.g.SKD

    • typestring

      Saudi vehicle plate type

      one ofprivate_carprivate_light_transportprivate_heavy_transportprivate_small_busprivate_large_buspublic_light_transportpublic_heavy_transportpublic_small_buspublic_large_bustaxidiplomatictemporarypublic_worksexportmotorcycletrailerhistoric

  • plate_codestring

    Saudi plate as one string, as the dashcam reads it: 1-4 digits then 2-3 letters (Latin form)

    e.g.2070SKD

  • fleet_numberstring | null

    The account's own number for the vehicle (door or fleet code), unique in the account when set

    e.g.TRK-089

  • kindstring | null
  • vinstring | null
  • makestring | null

    e.g.Toyota

  • modelstring | null

    e.g.Hilux

  • yearinteger | null

    Model year

    e.g.2024

  • department_idstring | null

    The account department the vehicle belongs to

  • speed_limit_kmhinteger | null

    The vehicle's own speed limit for speeding alerts, km/h

    e.g.120

  • cargo_min_cnumber | null

    Lowest allowed cargo temperature, °C (cold chain)

    e.g.2

  • cargo_max_cnumber | null

    Highest allowed cargo temperature, °C (cold chain)

    e.g.8

  • tank_linteger | null

    Fuel tank size, litres

    e.g.400

  • capacity_palletsinteger | null

    How many pallets the vehicle carries (dispatch load)

    e.g.12

  • fuel_typestring | null
  • usestring

    unset: registered before uses were recorded; set it with updateVehicle.

    one ofcompany_carcar_rentalpersonallight_noncommercialexempt_heavypublic_worksheavy_for_hireheavy_own_goodsheavy_noncommerciallight_for_hirelight_own_goodsgoods_vehicle_rentalvehicle_carrying_towingeducationalstaff_buscity_buscharter_busintercity_businternational_busbus_rentaltaximotorcycle_deliverymotorcycle_rentalotherunset

  • driver_idstring | null

    The driver of the vehicle's current driver session

  • created_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • updated_atstring (date-time)

    e.g.2026-11-17T08:30:00Z

  • retired_atstring | null (date-time)

    When it was taken out of service; null while in service

  • retire_reasonstring | null

Errors

400401403404409429

Example request
curl -X POST "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/retire" \
  -H "Authorization: Bearer $PING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason": "sold", "note": "Sold to the dealer with 412,000 km"}'
Example response · 200
{
  "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "plate": {
    "number": "1",
    "letters": "SKD",
    "type": "private_car"
  },
  "plate_code": "2070SKD",
  "fleet_number": "TRK-089",
  "kind": "truck",
  "vin": "1G4AH59H5G1183441",
  "make": "Toyota",
  "model": "Hilux",
  "year": 2024,
  "department_id": "string",
  "speed_limit_kmh": 120,
  "cargo_min_c": 2,
  "cargo_max_c": 8,
  "tank_l": 400,
  "capacity_pallets": 12,
  "fuel_type": "diesel",
  "use": "light_own_goods",
  "driver_id": "string",
  "created_at": "2026-11-17T08:30:00Z",
  "updated_at": "2026-11-17T08:30:00Z",
  "retired_at": "string",
  "retire_reason": "sold"
}