كل الموارد

بيانات التتبع

المواقع والمسارات والرحلات والتوقفات والإحصاءات اليومية والسجل الزمني ووسائط الكاميرات.

عنوان الأساسhttps://api.ping.nml.sa/v111 عملية

الانتقال إلى عملية

الأخطاء المشتركة

تُرجع عمليات هذه الصفحة هذه الأخطاء بصيغة واحدة، وتذكر كل عملية الأخطاء التي تُرجعها.

  • 400The request is invalid (code: invalid_request), with field errors.
  • 401The API key is missing, unknown, expired or revoked (code: unauthorized).
  • 403The API key lacks the scope this operation needs (code: forbidden).
  • 404No such resource in this account, or outside the key's data scope (code: not_found).
  • 429The key's rate limit is reached (code: rate_limited). Retry after the Retry-After header's seconds.

تقييم القيادة لكل مركبة خلال فترة.

GET/v1/driving-scores

Distance, driving and idle time, harsh driving and overspeeding events, and a 0 to 100 score per vehicle (or per driver with `by=driver`), over the Riyadh calendar days from `from` to `to` inclusive, at most 92 days, or per Riyadh week (Sunday first) with `per=week`. Without dates, the last 7 days. Trips count by their start; events count with the trip they happened in. A trip's driver is the driver whose iButton key or card the device read, else the driver assigned to the vehicle when it started.

النطاقtelemetry:read

المعاملات

  • fromstring (date) الاستعلام

    First day (Riyadh), YYYY-MM-DD.

    مثال:2026-11-01

  • tostring (date) الاستعلام

    Last day (Riyadh), YYYY-MM-DD, inclusive.

    مثال:2026-11-07

  • bystring الاستعلام

    Score each vehicle (default) or each driver.

    مثال:driver

  • perstring الاستعلام

    One score over the whole period (default) or one per week.

    مثال:week

الاستجابة 200

  • fromstring (date)

    مثال:2026-11-10

  • tostring (date)

    مثال:2026-11-16

  • bystring

    أحد:vehicledriver

  • perstring

    أحد:periodweek

  • dataobject[]

    One entry per vehicle (or driver) with trips in the period (per week, per week with trips), by week then id.

    حقول data
    • vehicle_idstring | null

      The vehicle; null when scoring by driver.

    • driver_idstring | null

      The driver when scoring by driver; null there for trips no driver was known for, and always null by vehicle.

      مثال:null

    • weekstring | null (date)

      The Sunday the Riyadh week starts with, per week; null over the period.

      مثال:null

    • distance_mnumber

      مثال:412300

    • driving_sinteger

      مثال:41200

    • idle_sinteger

      مثال:3600

    • harsh_accelerationinteger

      Harsh acceleration events the device reported.

      مثال:1

    • harsh_brakinginteger

      مثال:2

    • harsh_corneringinteger

      مثال:0

    • overspeedinteger

      Overspeeding events (the device's own speed limit).

      مثال:1

    • scoreinteger | null

      0 to 100, higher is safer: harsh and overspeeding events per 100 km and the share of idling. Null under the minimum distance.

      مثال:86

الأخطاء

400401403429

مثال الطلب
curl "https://api.ping.nml.sa/v1/driving-scores" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "from": "2026-11-10",
  "to": "2026-11-16",
  "by": "vehicle",
  "per": "period",
  "data": [
    {
      "vehicle_id": "string",
      "driver_id": null,
      "week": null,
      "distance_m": 412300,
      "driving_s": 41200,
      "idle_s": 3600,
      "harsh_acceleration": 1,
      "harsh_braking": 2,
      "harsh_cornering": 0,
      "overspeed": 1,
      "score": 86
    }
  ]
}

تنزيل صورة أو مقطع.

GET/v1/media/{mediaId}/file

The photo (JPEG) or clip (MP4) itself, for an account that owned the vehicle when it was taken. A file not yet received answers 404.

النطاقtelemetry:read

المعاملات

  • mediaIdstring المسار مطلوب

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

الاستجابة 200

The file. image/jpeg

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/media/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/file" \
  -H "Authorization: Bearer $PING_API_KEY"

آخر موقع معروف لكل مركبة.

GET/v1/positions/last

The latest position and state of every vehicle the account owns now, from the device installed in it. Vehicles with no position since their device was installed are left out. Ordered by vehicle id.

النطاقtelemetry:read

المعاملات

  • limitinteger الاستعلام

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

  • cursorstring الاستعلام

    The next_cursor of the previous page.

الاستجابة 200

  • dataobject[]
    حقول data
    • vehicle_idstring

      مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • fix_timestring (date-time)

      When the device took the position (GNSS time).

      مثال:2026-11-17T08:42:10Z

    • latnumber

      Latitude, WGS 84.

      مثال:24.7136

    • lonnumber

      Longitude, WGS 84.

      مثال:46.6753

    • speed_kmhinteger | null

      مثال:62

    • course_deginteger | null

      Heading, degrees clockwise from north.

      مثال:274

    • ignitionboolean | null

      Ignition on; null when the device does not report it.

      مثال:true

    • movingboolean | null

      مثال:true

    • connectedboolean

      The device holds an open connection now.

      مثال:true

    • last_seen_atstring (date-time)

      When the device last sent data.

      مثال:2026-11-17T08:42:12Z

    • odometer_minteger | null

      Odometer in metres, as the device reports it.

      مثال:128450300

    • engine_sinteger | null

      Total engine hours in seconds, as the device reports them.

      مثال:4518000

    • state_sincestring | null (date-time)

      When the current state began: moving, idling (ignition on, not moving) or parked (ignition off).

      مثال:2026-11-17T08:31:40Z

    • deviceobject

      The device installed in the vehicle.

      حقول device
      • idstring

        مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

      • imeistring

        International Mobile Equipment Identity

        مثال:490154203237518

      • modelstring

        مثال:FMC130

    • signalsobject[]

      The latest value of each measurement signal the device reports (fuel_level_pct, fuel_used_l, engine_hours_h, external_voltage_v, battery_voltage_v, gsm_signal, eco_score, cargo_temp_c ...), by key.

      حقول signals
      • keystring

        A measurement signal (infra/devices/io/signals.toml; eventual IO such as harsh driving is a driving event instead). Flags read 0 or 1.

        أحد:fuel_used_lfuel_level_pctengine_hours_hengine_rpmfault_codesseatbelt_driverdoor_opencargo_temp_ccargo_temp_2_cexternal_voltage_vbattery_voltage_vgsm_signaleco_score

      • valuenumber

        مثال:64

      • atstring (date-time)

        Fix time of the record that carried it.

        مثال:2026-11-17T08:40:00Z

  • next_cursorstring | null

    مثال:eyJpZCI6InZlaF83S3EyIn0

الأخطاء

400401403429

مثال الطلب
curl "https://api.ping.nml.sa/v1/positions/last" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "data": [
    {
      "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "fix_time": "2026-11-17T08:42:10Z",
      "lat": 24.7136,
      "lon": 46.6753,
      "speed_kmh": 62,
      "course_deg": 274,
      "ignition": true,
      "moving": true,
      "connected": true,
      "last_seen_at": "2026-11-17T08:42:12Z",
      "odometer_m": 128450300,
      "engine_s": 4518000,
      "state_since": "2026-11-17T08:31:40Z",
      "device": {
        "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
        "imei": "490154203237518",
        "model": "FMC130"
      },
      "signals": [
        {
          "key": "fuel_level_pct",
          "value": 64,
          "at": "2026-11-17T08:40:00Z"
        }
      ]
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

المسافة اليومية للمركبة وزمن القيادة والتباطؤ وتشغيل المحرك.

GET/v1/vehicles/{vehicleId}/daily-stats

One entry per day with data, by the Riyadh calendar day (UTC+3), from `from` to `to` inclusive, at most 92 days. Without them, the last 7 days.

النطاقtelemetry:read

المعاملات

  • vehicleIdstring المسار مطلوب

    The vehicle id.

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date) الاستعلام

    First day (Riyadh), YYYY-MM-DD.

    مثال:2026-11-01

  • tostring (date) الاستعلام

    Last day (Riyadh), YYYY-MM-DD, inclusive.

    مثال:2026-11-07

الاستجابة 200

  • vehicle_idstring

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date)

    مثال:2026-11-10

  • tostring (date)

    مثال:2026-11-16

  • dataobject[]

    Days with data, oldest first.

    حقول data
    • datestring (date)

      The Riyadh calendar day.

      مثال:2026-11-16

    • distance_mnumber

      Distance over valid positions, metres.

      مثال:84210

    • driving_sinteger

      Driving time of the trips that started that day, seconds.

      مثال:9120

    • idle_sinteger

      Idle time of the trips that started that day, seconds.

      مثال:1410

    • engine_sinteger | null

      Engine time from the device's engine hours counter, seconds; null when the device does not report it.

      مثال:11200

    • max_speed_kmhinteger | null

      مثال:118

    • tripsinteger

      مثال:7

    • harsh_eventsinteger

      Harsh acceleration, braking and cornering events that day.

      مثال:3

    • overspeedinteger

      Overspeeding events that day.

      مثال:1

    • fuel_used_lnumber | null

      Fuel used that day, from the engine's fuel counter; null when the device does not report it.

      مثال:31.8

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/daily-stats" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "from": "2026-11-10",
  "to": "2026-11-16",
  "data": [
    {
      "date": "2026-11-16",
      "distance_m": 84210,
      "driving_s": 9120,
      "idle_s": 1410,
      "engine_s": 11200,
      "max_speed_kmh": 118,
      "trips": 7,
      "harsh_events": 3,
      "overspeed": 1,
      "fuel_used_l": 31.8
    }
  ]
}

التزود بالوقود وانخفاضاته للمركبة.

GET/v1/vehicles/{vehicleId}/fuel-events

Refuels and drops found in the tank level: a rise or a fall past the thresholds (services/telemetry/unit.toml [service.fuel]) while the vehicle stands, newest first. Without from and to, the last 7 days; at most 31 days.

النطاقtelemetry:read

المعاملات

  • vehicleIdstring المسار مطلوب

    The vehicle id.

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date-time) الاستعلام

    Start of the period, RFC 3339 (inclusive). Default: 7 days before to.

    مثال:2026-11-10T00:00:00Z

  • tostring (date-time) الاستعلام

    End of the period, RFC 3339 (exclusive). Default: now.

    مثال:2026-11-17T00:00:00Z

الاستجابة 200

  • vehicle_idstring

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date-time)

    مثال:2026-11-10T00:00:00Z

  • tostring (date-time)

    مثال:2026-11-17T00:00:00Z

  • dataobject[]

    Newest first.

    حقول data
    • atstring (date-time)

      When the level began to change.

      مثال:2026-11-17T06:05:00Z

    • kindstring

      أحد:refueldrop

    • from_pctnumber

      مثال:22

    • to_pctnumber

      مثال:96

    • latnumber | null

      مثال:24.7136

    • lonnumber | null

      مثال:46.6753

    • ignitionboolean | null

      The ignition was on at some point while the level changed; null when the device does not report it. A drop with the engine off is one the theft check keeps.

      مثال:false

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/fuel-events" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "from": "2026-11-10T00:00:00Z",
  "to": "2026-11-17T00:00:00Z",
  "data": [
    {
      "at": "2026-11-17T06:05:00Z",
      "kind": "refuel",
      "from_pct": 22,
      "to_pct": 96,
      "lat": 24.7136,
      "lon": 46.6753,
      "ignition": false
    }
  ]
}

قائمة الصور والمقاطع من كاميرات المركبة.

GET/v1/vehicles/{vehicleId}/media

Photos and clips from the vehicle's cameras (FMC650 with DualCam or DashCam), newest first, with what triggered them and their status. Download a stored file with getMediaFile.

النطاقtelemetry:read

المعاملات

  • vehicleIdstring المسار مطلوب

    The vehicle id.

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date-time) الاستعلام

    Start of the period, RFC 3339 (inclusive). Default: 7 days before to.

    مثال:2026-11-10T00:00:00Z

  • tostring (date-time) الاستعلام

    End of the period, RFC 3339 (exclusive). Default: now.

    مثال:2026-11-17T00:00:00Z

  • limitinteger الاستعلام

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

  • cursorstring الاستعلام

    The next_cursor of the previous page.

الاستجابة 200

  • dataobject[]
    حقول data
    • idstring

      مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • vehicle_idstring

      مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • kindstring

      أحد:photoclip

    • camerastring

      أحد:frontrear

    • triggerstring

      The alert rule template that asked for it (crash, panic, towing), or manual for a request from the console.

      مثال:crash

    • statusstring

      stored files can be downloaded.

      أحد:requestedreceivingstoredfailed

    • content_typestring

      أحد:image/jpegvideo/mp4

    • requested_atstring (date-time)

      مثال:2026-11-17T06:48:31Z

    • taken_atstring | null (date-time)

      When the camera took it; null until the device reports it.

      مثال:2026-11-17T06:48:30Z

    • bytesinteger | null

      مثال:184320

  • next_cursorstring | null

    مثال:eyJpZCI6InZlaF83S3EyIn0

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/media" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "data": [
    {
      "id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "kind": "photo",
      "camera": "front",
      "trigger": "crash",
      "status": "stored",
      "content_type": "image/jpeg",
      "requested_at": "2026-11-17T06:48:31Z",
      "taken_at": "2026-11-17T06:48:30Z",
      "bytes": 184320
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

سجل قراءة من قراءات المركبة.

GET/v1/vehicles/{vehicleId}/signals/{key}

One measurement signal (fuel_level_pct, external_voltage_v, cargo_temp_c ...) between two times, averaged per step (default 300 s), oldest first, at most 7 days per request.

النطاقtelemetry:read

المعاملات

  • vehicleIdstring المسار مطلوب

    The vehicle id.

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • keystring المسار مطلوب

    The measurement signal (infra/devices/io/signals.toml).

    مثال:fuel_level_pct

  • fromstring (date-time) الاستعلام مطلوب

    Start of the window, RFC 3339 (inclusive).

    مثال:2026-11-17T00:00:00Z

  • tostring (date-time) الاستعلام مطلوب

    End of the window, RFC 3339 (exclusive).

    مثال:2026-11-17T12:00:00Z

  • stepinteger الاستعلام

    Seconds per point, 60 to 3600.

الاستجابة 200

  • vehicle_idstring

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • keystring

    A measurement signal (infra/devices/io/signals.toml; eventual IO such as harsh driving is a driving event instead). Flags read 0 or 1.

    أحد:fuel_used_lfuel_level_pctengine_hours_hengine_rpmfault_codesseatbelt_driverdoor_opencargo_temp_ccargo_temp_2_cexternal_voltage_vbattery_voltage_vgsm_signaleco_score

  • step_sinteger

    مثال:300

  • dataobject[]

    Oldest first; steps without a reading are left out.

    حقول data
    • atstring (date-time)

      مثال:2026-11-17T06:05:00Z

    • valuenumber

      مثال:64.5

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/signals/fuel_level_pct?from=2026-11-17T00:00:00Z&to=2026-11-17T12:00:00Z" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "key": "fuel_level_pct",
  "step_s": 300,
  "data": [
    {
      "at": "2026-11-17T06:05:00Z",
      "value": 64.5
    }
  ]
}

توقفات المركبة خلال فترة مع مدتها وموقعها.

GET/v1/vehicles/{vehicleId}/stops

Stops that start in the period, newest first, with their duration, location and idling time. Without `from` and `to`, the last 7 days.

النطاقtelemetry:read

المعاملات

  • vehicleIdstring المسار مطلوب

    The vehicle id.

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date-time) الاستعلام

    Start of the period, RFC 3339 (inclusive). Default: 7 days before to.

    مثال:2026-11-10T00:00:00Z

  • tostring (date-time) الاستعلام

    End of the period, RFC 3339 (exclusive). Default: now.

    مثال:2026-11-17T00:00:00Z

  • limitinteger الاستعلام

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

  • cursorstring الاستعلام

    The next_cursor of the previous page.

الاستجابة 200

  • dataobject[]
    حقول data
    • vehicle_idstring

      مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • started_atstring (date-time)

      مثال:2026-11-17T06:48:30Z

    • ended_atstring (date-time)

      مثال:2026-11-17T07:20:00Z

    • duration_sinteger

      مثال:1890

    • latnumber

      مثال:24.6877

    • lonnumber

      مثال:46.7219

    • ignition_on_sinteger

      Idling inside the stop: ignition on, seconds.

      مثال:240

  • next_cursorstring | null

    مثال:eyJpZCI6InZlaF83S3EyIn0

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/stops" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "data": [
    {
      "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "started_at": "2026-11-17T06:48:30Z",
      "ended_at": "2026-11-17T07:20:00Z",
      "duration_s": 1890,
      "lat": 24.6877,
      "lon": 46.7219,
      "ignition_on_s": 240
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

السجل الزمني للمركبة: الإشعال والحركة والرحلات والتوقفات والاتصال.

GET/v1/vehicles/{vehicleId}/timeline

Ignition and motion changes, trip and stop boundaries, harsh driving, overspeeding, crash, towing, jamming and power-cut events, and device connections in one time-ordered list, at most 24 hours per request. Alarms are read with the rules API.

النطاقtelemetry:read

المعاملات

  • vehicleIdstring المسار مطلوب

    The vehicle id.

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date-time) الاستعلام مطلوب

    Start of the window, RFC 3339 (inclusive).

    مثال:2026-11-17T00:00:00Z

  • tostring (date-time) الاستعلام مطلوب

    End of the window, RFC 3339 (exclusive).

    مثال:2026-11-17T12:00:00Z

الاستجابة 200

  • vehicle_idstring

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date-time)

    مثال:2026-11-17T00:00:00Z

  • tostring (date-time)

    مثال:2026-11-17T12:00:00Z

  • eventsobject[]

    Oldest first.

    حقول events
    • atstring (date-time)

      مثال:2026-11-17T06:48:30Z

    • kindstring

      أحد:ignition_onignition_offmotion_startmotion_stoptrip_starttrip_endstop_startstop_enddevice_connecteddevice_disconnectedharsh_accelerationharsh_brakingharsh_corneringoverspeedcrashtowingjammingunplug

    • latnumber | null

      مثال:24.6877

    • lonnumber | null

      مثال:46.7219

    • valuenumber | null

      Harsh driving force in g, overspeeding speed in km/h, crash trace type; null for other kinds.

      مثال:null

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/timeline?from=2026-11-17T00:00:00Z&to=2026-11-17T12:00:00Z" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
  "from": "2026-11-17T00:00:00Z",
  "to": "2026-11-17T12:00:00Z",
  "events": [
    {
      "at": "2026-11-17T06:48:30Z",
      "kind": "ignition_off",
      "lat": 24.6877,
      "lon": 46.7219,
      "value": null
    }
  ]
}

مسار المركبة بين وقتين.

GET/v1/vehicles/{vehicleId}/track

The vehicle's positions from `from` (inclusive) to `to` (exclusive), oldest first, at most 7 days per request. Positions flagged as invalid (no fix or an impossible jump) are kept with valid = false.

النطاقtelemetry:read

المعاملات

  • vehicleIdstring المسار مطلوب

    The vehicle id.

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date-time) الاستعلام مطلوب

    Start of the window, RFC 3339 (inclusive).

    مثال:2026-11-17T00:00:00Z

  • tostring (date-time) الاستعلام مطلوب

    End of the window, RFC 3339 (exclusive).

    مثال:2026-11-17T12:00:00Z

  • limitinteger الاستعلام

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

  • cursorstring الاستعلام

    The next_cursor of the previous page.

الاستجابة 200

  • dataobject[]
    حقول data
    • fix_timestring (date-time)

      مثال:2026-11-17T08:42:10Z

    • latnumber

      مثال:24.7136

    • lonnumber

      مثال:46.6753

    • altitude_minteger | null

      مثال:612

    • speed_kmhinteger | null

      مثال:62

    • course_deginteger | null

      Heading, 0 to 359 degrees from north.

      مثال:145

    • satellitesinteger | null

      مثال:11

    • ignitionboolean | null

      مثال:true

    • motionboolean | null

      مثال:true

    • validboolean

      False for a position with no fix, at 0,0, or after an impossible jump.

      مثال:true

  • next_cursorstring | null

    مثال:eyJpZCI6InZlaF83S3EyIn0

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/track?from=2026-11-17T00:00:00Z&to=2026-11-17T12:00:00Z" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "data": [
    {
      "fix_time": "2026-11-17T08:42:10Z",
      "lat": 24.7136,
      "lon": 46.6753,
      "altitude_m": 612,
      "speed_kmh": 62,
      "course_deg": 145,
      "satellites": 11,
      "ignition": true,
      "motion": true,
      "valid": true
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}

رحلات المركبة خلال فترة.

GET/v1/vehicles/{vehicleId}/trips

Trips that start in the period, newest first. A trip runs from ignition on and motion to the stop that ends it. Without `from` and `to`, the last 7 days.

النطاقtelemetry:read

المعاملات

  • vehicleIdstring المسار مطلوب

    The vehicle id.

    مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

  • fromstring (date-time) الاستعلام

    Start of the period, RFC 3339 (inclusive). Default: 7 days before to.

    مثال:2026-11-10T00:00:00Z

  • tostring (date-time) الاستعلام

    End of the period, RFC 3339 (exclusive). Default: now.

    مثال:2026-11-17T00:00:00Z

  • limitinteger الاستعلام

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

  • cursorstring الاستعلام

    The next_cursor of the previous page.

الاستجابة 200

  • dataobject[]
    حقول data
    • vehicle_idstring

      مثال:019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d

    • started_atstring (date-time)

      مثال:2026-11-17T06:10:00Z

    • ended_atstring (date-time)

      مثال:2026-11-17T06:48:30Z

    • start_latnumber | null

      مثال:24.7136

    • start_lonnumber | null

      مثال:46.6753

    • end_latnumber | null

      مثال:24.6877

    • end_lonnumber | null

      مثال:46.7219

    • distance_mnumber

      مثال:18420

    • driving_sinteger

      Time in motion, seconds.

      مثال:1980

    • idle_sinteger

      Time with ignition on and no motion, seconds.

      مثال:330

    • max_speed_kmhinteger | null

      مثال:104

    • harsh_accelerationinteger

      Harsh acceleration events the device reported.

      مثال:1

    • harsh_brakinginteger

      مثال:2

    • harsh_corneringinteger

      مثال:0

    • overspeedinteger

      Overspeeding events (the device's own speed limit).

      مثال:1

    • fuel_used_lnumber | null

      Fuel used over the trip, from the engine's fuel counter; null when the device does not report it.

      مثال:6.4

    • driver_keystring | null

      The driver's iButton key or card (hex) last presented during the trip; null when none was. Matches a fleet driver's ibutton_id.

      مثال:01A2B3C4D5E6F708

    • driver_idstring | null

      The fleet driver: whoever carried that key when the trip started, else the driver assigned to the vehicle then; null when neither is known.

  • next_cursorstring | null

    مثال:eyJpZCI6InZlaF83S3EyIn0

الأخطاء

400401403404429

مثال الطلب
curl "https://api.ping.nml.sa/v1/vehicles/019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d/trips" \
  -H "Authorization: Bearer $PING_API_KEY"
مثال الاستجابة · 200
{
  "data": [
    {
      "vehicle_id": "019ac0c4-6f1e-7a3b-9c2d-4e5f6a7b8c9d",
      "started_at": "2026-11-17T06:10:00Z",
      "ended_at": "2026-11-17T06:48:30Z",
      "start_lat": 24.7136,
      "start_lon": 46.6753,
      "end_lat": 24.6877,
      "end_lon": 46.7219,
      "distance_m": 18420,
      "driving_s": 1980,
      "idle_s": 330,
      "max_speed_kmh": 104,
      "harsh_acceleration": 1,
      "harsh_braking": 2,
      "harsh_cornering": 0,
      "overspeed": 1,
      "fuel_used_l": 6.4,
      "driver_key": "01A2B3C4D5E6F708",
      "driver_id": "string"
    }
  ],
  "next_cursor": "eyJpZCI6InZlaF83S3EyIn0"
}