GPS Tracs API

Read where your vehicles and people are, their trips and alerts, and create tasks, from your own software. This is the reference: every call, what to send and what comes back.

Base address
https://track.gpstracs.com
Format
JSON over HTTPS
Sign-in
Authorization: Bearer gtk_…
Limit
120 calls a minute for each key
Updated
24 November 2026

Getting started

  1. Create a key. Sign in to the portal as the account owner and open Settings › API keys. Keep the key read-only unless your system has to create or change things. It is shown once.
  2. Send it with every call, in the Authorization header. A key in the address is refused.
  3. Check it with the first call below. The answer names the account the key belongs to.
Your first call
curl https://track.gpstracs.com/api/v2/me \
  -H "Authorization: Bearer gtk_your_key"

Keep the key on your server, in an environment variable or a secrets store. Never put it in a web page or a phone app: anyone who has the page has the key. The API sends no cross-origin headers for that reason.

The rules of every call

Answers and errors

Every answer is JSON. A call that worked has "status": 1. One that did not has "status": 0 with a message, or an errors object naming each field that was wrong.

CodeMeaningWhat to do
200It worked.Read the answer.
401No key, an unknown or revoked key, or a key sent in the address.Send a valid key in the Authorization header.
402The account's subscription has run out.Renew it in the portal.
403The key may not make this call: it is read-only, the call is outside what keys reach, or the plan does not include the feature.Use a full-access key for changes. Keys never reach passwords, the team or payments.
422Something you sent is missing or wrong, or the object or task does not exist.Read errors: it names the field.
429More than 120 calls in a minute with one key.Wait for the seconds in the Retry-After header, then go on.
500Something failed on our side.Try again shortly; the status page says if there is an outage.
A refused call
{
  "status": 0,
  "errors": {
    "device_id": "The device id field is required."
  }
}

Times

The API speaks about time in two ways, and says which in every field.

  • For programs: fields named fix_time, time_utc, start_utc and end_utc are UTC in RFC 3339, for example 2026-11-18T09:41:07Z. Store and compare these.
  • For people: fields named time, start and end are in the account's time zone, as the portal shows them.
  • What you send: from_date, from_time, to_date and to_time are in the account's time zone, so "yesterday" means the account's yesterday.

Units

A position's speed_kmh is always km/h, and altitude is in metres. Speeds and distances in history follow the account: km/h and km, or mph and miles when unit_of_distance is mi (see the account). Trips name their units in distance_unit and speed_unit. Coordinates are decimal degrees (WGS 84).

Pages

Long lists come in pages. Ask for one with page (from 1); the answer's pagination says which page it is, the last page, the total and the page size. Read until page equals last_page.

Limits

Each key may make 120 calls a minute. Beyond that the answer is 429 with Retry-After: 60; nothing is lost, the call was simply not made. For a live view, read the objects list every 10 to 30 seconds rather than one call for each object. A history period covers at most 31 days.

What you can rely on

The fields in this reference are a promise: we do not rename or remove one without saying so under Changes first. Answers may carry fields that are not listed here. They serve the portal and can change, so do not build on them; ignore what you do not know. New fields and new kinds of alert can appear at any time.

Account

GET/api/v2/meAny key

The account behind a key

Says which account a key belongs to. Call it first: if it answers, the key works.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
user.idintegerThe account.
user.emailtextThe owner's sign-in address.
user.account_emailtextThe same address: the account the data belongs to.
user.roletextAlways owner for a key.
user.langtextThe account's language, for example en.
user.unit_of_distancetextkm or mi. Speeds in history are km/h or mph accordingly.
user.unit_of_altitudetextThe account's unit for altitude.
user.expiredtrue / falseTrue when the subscription has run out: other calls then answer 402.
Example
curl https://track.gpstracs.com/api/v2/me \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "user": {
    "id": 7,
    "email": "[email protected]",
    "account_email": "[email protected]",
    "role": "owner",
    "lang": "en",
    "unit_of_distance": "km",
    "unit_of_altitude": "mt",
    "expired": false
  }
}

Objects and positions

An object is anything on the map: a vehicle or an asset with a tracker, or a phone that reports during a shift.

GET/api/v2/devicesAny key

Every object, with where it is now

All objects of the account with their latest position. Poll it for a live view: every 10 to 30 seconds is plenty.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
items[]listOne entry for each object.
items[].idintegerThe object. Use it as device_id in the other calls.
items[].nametextIts name in the portal.
items[].imeitextThe tracker's identifier.
items[].platewhen there is onetextNumber plate, when one was entered.
items[].modelwhen there is onetextVehicle model, when one was entered.
items[].activetrue / falseWhether the object is ticked to show on the map.
items[].groupwhen there is oneobjectThe group it is in: id and title. Absent when ungrouped.
items[].statustextonline (moving), ack (in contact, standing still) or offline (not heard from).
items[].timetextWhen it was last heard from, in the account's time zone: 2026-11-18 09:41:07. Or Not connected (never reported) or Expired.
items[].stop_secondsintegerSeconds since it last moved.
items[].driverwhen there is onetextThe driver assigned now, when there is one.
items[].addresswhen there is onetextThe address of the position, when it is known.
items[].positionobjectThe latest position, or null for an object that never reported.
items[].position.latnumberLatitude, decimal degrees.
items[].position.lngnumberLongitude, decimal degrees.
items[].position.speed_kmhnumberSpeed in km/h, whatever the account's units.
items[].position.coursenumberHeading in degrees, 0 is north.
items[].position.altitudenumberAltitude in metres.
items[].position.fix_timetextWhen the position was taken, UTC, RFC 3339.
items[].position.accuracywhen there is onenumberAccuracy in metres, when the device gives it (phones do).
Example
curl https://track.gpstracs.com/api/v2/devices \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "items": [
    {
      "id": 61,
      "name": "Truck 01",
      "imei": "358480086858802",
      "plate": "AB-123-CD",
      "active": true,
      "group": {
        "id": 4,
        "title": "North depot"
      },
      "status": "online",
      "time": "2026-11-18 12:41:07",
      "stop_seconds": 0,
      "driver": "Ayşe D.",
      "position": {
        "lat": 25.2854,
        "lng": 51.531,
        "speed_kmh": 48,
        "course": 182,
        "altitude": 12,
        "fix_time": "2026-11-18T09:41:07Z"
      }
    }
  ]
}
GET/api/v2/history/positionsAny key

Stored positions of one object

Every position an object reported in a period, oldest first, in pages.

What you send

NameTypeWhat it is
device_idrequiredintegerThe object, as id from the objects list.
from_daterequireddateFirst day, YYYY-MM-DD, in the account's time zone.
from_timerequiredtimeTime on that day, HH:MM or HH:MM:SS.
to_daterequireddateLast day, YYYY-MM-DD.
to_timerequiredtimeTime on that day. The period may cover at most 31 days.
limitintegerPositions on a page: 50 (default), 100, 200 or 400.
sortingtextdesc for newest first.
pageintegerThe page to return, from 1. See pages.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
items[]listThe positions of this page.
items[].idintegerThe position.
items[].fix_timetextWhen it was taken, UTC, RFC 3339. Use this one in programs.
items[].timetextThe same moment in the account's time zone and date notation, as the portal shows it.
items[].latitudenumberLatitude, decimal degrees.
items[].longitudenumberLongitude, decimal degrees.
items[].altitudenumberAltitude in metres, rounded.
items[].speednumberSpeed in the account's unit (km/h, or mph when unit_of_distance is mi), rounded.
items[].coursenumberHeading in degrees.
pagination.pageintegerThe page returned.
pagination.last_pageintegerThe last page there is.
pagination.totalintegerHow many items there are in all.
pagination.per_pageintegerItems on a page.
Example
curl "https://track.gpstracs.com/api/v2/history/positions?device_id=61&from_date=2026-11-17&from_time=00:00&to_date=2026-11-17&to_time=23:59" \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "items": [
    {
      "id": 90412233,
      "fix_time": "2026-11-17T05:12:40Z",
      "time": "2026-11-17 08:12:40",
      "latitude": 25.2811,
      "longitude": 51.5204,
      "altitude": 9,
      "speed": 42,
      "course": 96
    }
  ],
  "pagination": {
    "page": 1,
    "last_page": 38,
    "total": 1874,
    "per_page": 50
  }
}
GET/api/v2/history/tripsAny key

Trips, with distance and duration

The journeys of one or all objects in a period: each drive from setting off to stopping, with its distance, duration and top speed, newest first.

What you send

NameTypeWhat it is
device_idintegerOne object. Repeat the parameter for several. Without it: every object of the account, up to 200.
from_daterequireddateFirst day, YYYY-MM-DD, in the account's time zone.
from_timerequiredtimeTime on that day, HH:MM or HH:MM:SS.
to_daterequireddateLast day, YYYY-MM-DD.
to_timerequiredtimeTime on that day. The period may cover at most 31 days.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
trips[]listOne entry for each trip.
trips[].device_idintegerThe object.
trips[].devicetextIts name.
trips[].start_utctextWhen it set off, UTC, RFC 3339.
trips[].end_utctextWhen it stopped, UTC, RFC 3339.
trips[].starttextThe start in the account's time zone, YYYY-MM-DD HH:MM:SS.
trips[].endtextThe end in the account's time zone.
trips[].secondsintegerHow long the trip took.
trips[].durationtextThe same, written for people: 1h 12min.
trips[].distancenumberDistance driven, in distance_unit.
trips[].top_speednumberHighest speed, in speed_unit.
trips[].start_latnumberWhere it started: latitude.
trips[].start_lngnumberWhere it started: longitude.
trips[].end_latnumberWhere it ended: latitude.
trips[].end_lngnumberWhere it ended: longitude.
trips[].driverwhen there is onetextThe driver, when one was recorded for the trip.
trips[].stop_beforewhen there is oneintegerSeconds the object stood before this trip, when known.
objects[]listA summary for each object asked for.
objects[].idintegerThe object.
objects[].nametextIts name.
objects[].tripsintegerNumber of trips in the period.
objects[].distancenumberTotal distance, in distance_unit.
objects[].drive_secintegerTotal driving time in seconds.
distance_unittextThe unit of every distance in this answer, for example km.
speed_unittextThe unit of every speed in this answer, for example kph.
Example
curl "https://track.gpstracs.com/api/v2/history/trips?from_date=2026-11-17&from_time=00:00&to_date=2026-11-17&to_time=23:59" \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "trips": [
    {
      "device_id": 61,
      "device": "Truck 01",
      "start_utc": "2026-11-17T05:12:40Z",
      "end_utc": "2026-11-17T06:24:55Z",
      "start": "2026-11-17 08:12:40",
      "end": "2026-11-17 09:24:55",
      "seconds": 4335,
      "duration": "1h 12min",
      "distance": 58.4,
      "top_speed": 96,
      "start_lat": 25.1701,
      "start_lng": 51.4502,
      "end_lat": 25.3237,
      "end_lng": 51.531,
      "driver": "Ayşe D.",
      "stop_before": 1260
    }
  ],
  "objects": [
    {
      "id": 61,
      "name": "Truck 01",
      "trips": 1,
      "distance": 58.4,
      "drive_sec": 4335
    }
  ],
  "distance_unit": "km",
  "speed_unit": "kph"
}
GET/api/v2/monitor/addressAny key

The address of a place

Turns a latitude and longitude into an address, in the account's language.

What you send

NameTypeWhat it is
latrequirednumberLatitude, −90 to 90.
lngrequirednumberLongitude, −180 to 180.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
addresstextThe address. When none can be found the answer has status 0 and a message instead.
Example
curl "https://track.gpstracs.com/api/v2/monitor/address?lat=25.2854&lng=51.531" \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "address": "Al Corniche Street, Doha, Qatar"
}

Alerts

To be told the moment an alert fires, use a webhook. To catch up or to check you missed nothing, read them here.

GET/api/v2/monitor/eventsAny key

Alerts that fired

The alerts of the last days, newest first: speeding, a geofence crossed, an SOS, a tracker gone quiet. At most 200.

What you send

NameTypeWhat it is
daysintegerHow many days back: 2 by default, at most 30.
device_idintegerOnly the alerts of one object.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
items[]listOne entry for each alert.
items[].idintegerThe alert event.
items[].time_utctextWhen it fired, UTC, RFC 3339.
items[].timetextThe same moment in the account's time zone and date notation.
items[].device_idintegerThe object.
items[].device_nametextIts name.
items[].typetextWhat kind: overspeed, zone_in, zone_out (a geofence entered or left), stop_duration, idle_duration, offline_duration, ignition_duration, time_duration, distance, driver, fuel_fill, fuel_theft, task_complete, sos, custom and others. Treat an unknown value as a new kind, not as an error.
items[].messagetextThe alert in words, in the account's language.
items[].speednumberSpeed at that moment, in the account's unit.
items[].latitudenumberWhere it happened: latitude.
items[].longitudenumberWhere it happened: longitude.
Example
curl "https://track.gpstracs.com/api/v2/monitor/events?days=7" \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "items": [
    {
      "id": 5521,
      "time_utc": "2026-11-18T09:41:07Z",
      "time": "2026-11-18 12:41:07",
      "device_id": 61,
      "device_name": "Truck 01",
      "type": "overspeed",
      "message": "Overspeed (90 kph)",
      "speed": 97,
      "latitude": 25.2854,
      "longitude": 51.531
    }
  ]
}

Places and drivers

GET/api/v2/geofencesAny key

Geofences

The places drawn on the map, by group. A group lists its first 100 geofences; ask for the rest with group_id and page.

What you send

NameTypeWhat it is
stextOnly geofences whose name contains this text.
group_idintegerOne group's geofences, 100 on a page (0 is the ungrouped ones). The answer is then items and has_more instead of groups.
pageintegerThe page to return, from 1. See pages.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
groups[]listThe groups that have geofences. Group 0 holds the ungrouped ones.
groups[].idintegerThe group.
groups[].titletextIts name.
groups[].countintegerHow many geofences it has.
groups[].has_moretrue / falseTrue when it has more than the 100 listed.
groups[].geofences[]listIts geofences.
groups[].geofences[].idintegerThe geofence.
groups[].geofences[].nametextIts name.
groups[].geofences[].activetrue / falseWhether it is shown on the map.
groups[].geofences[].typetextpolygon or circle.
groups[].geofences[].polygon_colortextIts colour, for example #d000df.
groups[].geofences[].group_idintegerThe group it is in, 0 for none.
groups[].geofences[].coordinates[]listThe corners of a polygon, each lat and lng.
groups[].geofences[].centerobjectThe centre of a circle (lat, lng), null for a polygon.
groups[].geofences[].radiusnumberThe radius of a circle in metres, null for a polygon.
Example
curl https://track.gpstracs.com/api/v2/geofences \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "groups": [
    {
      "id": 0,
      "title": "Ungrouped",
      "count": 1,
      "has_more": false,
      "geofences": [
        {
          "id": 12,
          "name": "North delivery zone",
          "active": true,
          "type": "polygon",
          "polygon_color": "#1d4e89",
          "group_id": 0,
          "coordinates": [
            {
              "lat": 25.33,
              "lng": 51.5
            },
            {
              "lat": 25.33,
              "lng": 51.55
            },
            {
              "lat": 25.3,
              "lng": 51.55
            }
          ],
          "center": null,
          "radius": null
        }
      ]
    }
  ]
}
GET/api/v2/me/driversAny key

Drivers

The drivers of the account, 15 on a page, newest first.

What you send

NameTypeWhat it is
pageintegerThe page to return, from 1. See pages.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
items[]listThe drivers of this page.
items[].idintegerThe driver.
items[].nametextTheir name.
items[].device_idintegerThe object they are assigned to now, or null.
items[].device_nametextIts name, or empty.
items[].rfidtextThe key fob or card that identifies them, when one is set.
items[].phonetextPhone number, when entered.
items[].emailtextEmail address, when entered.
items[].descriptiontextNotes.
pagination.pageintegerThe page returned.
pagination.last_pageintegerThe last page there is.
pagination.totalintegerHow many items there are in all.
pagination.per_pageintegerItems on a page.
Example
curl https://track.gpstracs.com/api/v2/me/drivers \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "items": [
    {
      "id": 3,
      "name": "Ayşe D.",
      "device_id": 61,
      "device_name": "Truck 01",
      "rfid": "0A1B2C3D",
      "phone": "",
      "email": "",
      "description": ""
    }
  ],
  "pagination": {
    "page": 1,
    "last_page": 1,
    "total": 1,
    "per_page": 15
  }
}

Tasks

A task is a job for one object: a delivery, a visit, a pick-up. It appears in the driver's or field worker's app, and its status changes as they work. Tasks need a plan that includes them.

GET/api/v2/tasksAny key

Tasks

The tasks of the account, 10 on a page, newest first.

What you send

NameTypeWhat it is
search_device_idintegerOnly the tasks of one object.
search_task_statusinteger1 new, 2 in progress, 9 completed, 3 failed.
search_invoice_numbertextOnly the tasks with this reference.
search_time_fromdate and timeOnly tasks to be delivered from this moment, YYYY-MM-DD HH:MM:SS.
search_time_todate and timeOnly tasks to be delivered by this moment.
pageintegerThe page to return, from 1. See pages.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
items[]listThe tasks of this page.
items[].idintegerThe task.
items[].titletextIts title.
items[].device_nametextThe object it is for.
items[].statusinteger1 new, 2 in progress, 9 completed, 3 failed.
items[].status_nametextThe status in words, in the account's language.
items[].priority_nametextThe priority in words.
items[].invoice_numbertextYour own reference.
items[].pickup_time_fromtextEarliest start, in the account's date notation.
items[].delivery_time_fromtextEarliest arrival, in the account's date notation.
items[].has_signaturetrue / falseTrue when the task was closed with a signature.
pagination.pageintegerThe page returned.
pagination.last_pageintegerThe last page there is.
pagination.totalintegerHow many items there are in all.
pagination.per_pageintegerItems on a page.
Example
curl https://track.gpstracs.com/api/v2/tasks \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "items": [
    {
      "id": 204,
      "title": "Deliver order 10482",
      "device_name": "Truck 01",
      "status": 9,
      "status_name": "Completed",
      "priority_name": "Normal",
      "invoice_number": "10482",
      "pickup_time_from": "2026-11-19 08:00:00",
      "delivery_time_from": "2026-11-19 10:00:00",
      "has_signature": true
    }
  ],
  "pagination": {
    "page": 1,
    "last_page": 1,
    "total": 1,
    "per_page": 10
  }
}
GET/api/v2/tasks/{id}Any key

One task

A task with all its details. The times come back as they were sent.

What you send

NameTypeWhat it is
idrequiredintegerThe task.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
item.idintegerThe task.
item.device_idintegerThe object it is for.
item.titletextIts title.
item.commenttextNotes for the person doing it.
item.invoice_numbertextYour own reference.
item.priorityinteger1 low, 2 normal, 3 high.
item.statusinteger1 new, 2 in progress, 9 completed, 3 failed.
item.pickup_addresstextWhere it starts.
item.pickup_address_latnumberLatitude.
item.pickup_address_lngnumberLongitude.
item.pickup_time_fromtextEarliest start.
item.pickup_time_totextLatest start.
item.delivery_addresstextWhere it ends.
item.delivery_address_latnumberLatitude.
item.delivery_address_lngnumberLongitude.
item.delivery_time_fromtextEarliest arrival.
item.delivery_time_totextLatest arrival.
Example
curl https://track.gpstracs.com/api/v2/tasks/204 \
  -H "Authorization: Bearer gtk_your_key"
Answer
{
  "status": 1,
  "item": {
    "id": 204,
    "status": 1,
    "device_id": 61,
    "title": "Deliver order 10482",
    "priority": 2,
    "invoice_number": "10482",
    "comment": "Ring twice. Fragile.",
    "pickup_address": "Depot North, Industrial Area",
    "pickup_address_lat": 25.1701,
    "pickup_address_lng": 51.4502,
    "pickup_time_from": "2026-11-19 08:00:00",
    "pickup_time_to": "2026-11-19 09:00:00",
    "delivery_address": "12 Marina Street, West Bay",
    "delivery_address_lat": 25.3237,
    "delivery_address_lng": 51.531,
    "delivery_time_from": "2026-11-19 10:00:00",
    "delivery_time_to": "2026-11-19 12:00:00"
  }
}
POST/api/v2/tasksFull-access key

Create a task

Creates a task for an object. It shows in the app of the phone linked to that object. Send JSON.

What you send

NameTypeWhat it is
device_idrequiredintegerThe object (vehicle or phone) the task is for.
titlerequiredtextWhat the driver or field worker sees.
priorityrequiredinteger1 low, 2 normal, 3 high.
pickup_addressrequiredtextWhere the task starts.
pickup_address_latrequirednumberIts latitude.
pickup_address_lngrequirednumberIts longitude.
pickup_time_fromrequireddate and timeEarliest start, YYYY-MM-DD HH:MM:SS.
pickup_time_torequireddate and timeLatest start. Not before pickup_time_from.
delivery_addressrequiredtextWhere the task ends.
delivery_address_latrequirednumberIts latitude.
delivery_address_lngrequirednumberIts longitude.
delivery_time_fromrequireddate and timeEarliest arrival, YYYY-MM-DD HH:MM:SS.
delivery_time_torequireddate and timeLatest arrival. Not before delivery_time_from.
commenttextNotes for the person doing it.
invoice_numbertextYour own reference: an order or invoice number. You can search tasks by it.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
idintegerThe new task.
Example
curl -X POST https://track.gpstracs.com/api/v2/tasks \
  -H "Authorization: Bearer gtk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"device_id":61,"title":"Deliver order 10482","priority":2,"invoice_number":"10482","comment":"Ring twice. Fragile.","pickup_address":"Depot North, Industrial Area","pickup_address_lat":25.1701,"pickup_address_lng":51.4502,"pickup_time_from":"2026-11-19 08:00:00","pickup_time_to":"2026-11-19 09:00:00","delivery_address":"12 Marina Street, West Bay","delivery_address_lat":25.3237,"delivery_address_lng":51.531,"delivery_time_from":"2026-11-19 10:00:00","delivery_time_to":"2026-11-19 12:00:00"}'
Answer
{
  "status": 1,
  "id": 204
}
PUT/api/v2/tasks/{id}Full-access key

Change a task

Replaces a task's details. Send every field, as when creating; add status to change it (1 new, 2 in progress, 9 completed, 3 failed).

What you send

NameTypeWhat it is
idrequiredin the pathintegerThe task.
device_idrequiredin the JSON bodyintegerThe object (vehicle or phone) the task is for.
titlerequiredin the JSON bodytextWhat the driver or field worker sees.
priorityrequiredin the JSON bodyinteger1 low, 2 normal, 3 high.
pickup_addressrequiredin the JSON bodytextWhere the task starts.
pickup_address_latrequiredin the JSON bodynumberIts latitude.
pickup_address_lngrequiredin the JSON bodynumberIts longitude.
pickup_time_fromrequiredin the JSON bodydate and timeEarliest start, YYYY-MM-DD HH:MM:SS.
pickup_time_torequiredin the JSON bodydate and timeLatest start. Not before pickup_time_from.
delivery_addressrequiredin the JSON bodytextWhere the task ends.
delivery_address_latrequiredin the JSON bodynumberIts latitude.
delivery_address_lngrequiredin the JSON bodynumberIts longitude.
delivery_time_fromrequiredin the JSON bodydate and timeEarliest arrival, YYYY-MM-DD HH:MM:SS.
delivery_time_torequiredin the JSON bodydate and timeLatest arrival. Not before delivery_time_from.
commentin the JSON bodytextNotes for the person doing it.
invoice_numberin the JSON bodytextYour own reference: an order or invoice number. You can search tasks by it.
statusin the JSON bodyinteger1 new, 2 in progress, 9 completed, 3 failed.

What you get back

FieldTypeWhat it is
statusinteger1 when the call worked.
Example
curl -X PUT https://track.gpstracs.com/api/v2/tasks/204 \
  -H "Authorization: Bearer gtk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"device_id":61,"title":"Deliver order 10482","priority":2,"invoice_number":"10482","comment":"Ring twice. Fragile.","pickup_address":"Depot North, Industrial Area","pickup_address_lat":25.1701,"pickup_address_lng":51.4502,"pickup_time_from":"2026-11-19 08:00:00","pickup_time_to":"2026-11-19 09:00:00","delivery_address":"12 Marina Street, West Bay","delivery_address_lat":25.3237,"delivery_address_lng":51.531,"delivery_time_from":"2026-11-19 10:00:00","delivery_time_to":"2026-11-19 13:00:00"}'
Answer
{
  "status": 1
}

Webhooks

Instead of asking, be told. Add your address to an alert rule (Settings › Alert rules, the Webhook switch), and each time the rule fires we send the alert to your system as a POST with a JSON body.

  • The address must start with https:// and be on the public internet. Up to two addresses for a rule, separated by ;.
  • We wait 6 seconds for your answer. Redirects are not followed. Answer with a 2xx status quickly and do the work afterwards.
  • A delivery that fails is tried again after 1, 5 and 30 minutes, then after 2 and 6 hours: six attempts in all. No answer, 408, 425, 429 (its Retry-After is respected, up to an hour) and 5xx are tried again; any other answer ends the delivery at once.
  • The same alert can therefore reach you more than once, when your answer was lost on the way. X-GPSTracs-Delivery is the same on every attempt of one delivery: remember the ones you handled. X-GPSTracs-Attempt counts from 1, and each attempt is signed afresh with its own timestamp.
  • Every attempt, with what your endpoint answered, is listed in the portal under Settings › Alert rules › Deliveries for 30 days; a failed delivery can be sent again from there.
POSTyour address

What we send

FieldTypeWhat it is
typetextWhat kind of alert: overspeed, zone_in, zone_out (a geofence entered or left), stop_duration, idle_duration, offline_duration, low_battery, sos, custom and others. Treat an unknown value as a new kind, not as an error.
messagetextThe alert in words.
timetextWhen it fired, UTC, YYYY-MM-DD HH:MM:SS.
latitudenumberWhere it happened: latitude.
longitudenumberWhere it happened: longitude.
speednumberSpeed at that moment, km/h.
coursenumberHeading in degrees.
altitudenumberAltitude in metres.
device_idintegerThe object.
deviceobjectThe object: id, name and imei.
alert_idintegerThe alert rule that fired.
geofence_idintegerThe geofence concerned, or null.
geofenceobjectThe geofence: id and name, or null.
addresswhen there is onetextThe address of the position, when it could be looked up.
userobjectThe account the alert belongs to: id, email, phone_number.
Headers
Content-Type: application/json
User-Agent: GPSTracs-Webhook/1
X-GPSTracs-Timestamp: 1794994867
X-GPSTracs-Signature: sha256=5f2c…e91a
X-GPSTracs-Delivery: 48213
X-GPSTracs-Attempt: 1
Body
{
  "type": "overspeed",
  "message": "Overspeed",
  "time": "2026-11-18 09:41:07",
  "latitude": 25.2854,
  "longitude": 51.531,
  "speed": 97,
  "course": 182,
  "altitude": 12,
  "device_id": 61,
  "device": {
    "id": 61,
    "name": "Truck 01",
    "imei": "358480086858802"
  },
  "alert_id": 14,
  "geofence_id": null,
  "geofence": null,
  "address": "Al Corniche Street, Doha, Qatar",
  "user": {
    "id": 7,
    "email": "[email protected]",
    "phone_number": ""
  }
}

Checking that it came from us

Anyone who learns your address could post to it. Every delivery is therefore signed with your webhook signing secret (Settings › API keys). X-GPSTracs-Signature is sha256= followed by the HMAC-SHA256, in hex, of the timestamp, a full stop and the raw body, keyed with the secret. Compute the same and compare; refuse a timestamp more than five minutes old.

Node.js
import crypto from "node:crypto";

// raw: the request body exactly as it arrived, before any JSON parsing
export function isFromGpsTracs(raw, headers, secret) {
  const timestamp = headers["x-gpstracs-timestamp"];
  const sent = String(headers["x-gpstracs-signature"] || "").replace("sha256=", "");
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false; // an old delivery sent again
  const ours = crypto.createHmac("sha256", secret).update(timestamp + "." + raw).digest("hex");
  return sent.length === ours.length &&
    crypto.timingSafeEqual(Buffer.from(sent), Buffer.from(ours));
}

AI assistants (MCP)

The same data is offered to AI assistants through the Model Context Protocol, at one address and with the same API key. An assistant such as Claude can then answer questions about your fleet by calling these reads itself.

The MCP endpoint
https://track.gpstracs.com/api/v2/mcp
Authorization: Bearer gtk_your_key

An assistant that signs in needs no key: it is sent to the portal, where the account owner allows it. A read-only key gives the assistant 19 tools that only read; a full-access key adds create_task. See AI connector for how to connect Claude Code, Cursor, VS Code or your own application, and what leaves your account when you do.

Changes

Every change to a documented field is listed here before it happens.

24 November 2026
A webhook that fails is tried again, up to six times, and every delivery carries X-GPSTracs-Delivery and X-GPSTracs-Attempt. New alert type low_battery. The AI connector accepts sign-in (OAuth) beside API keys and has nine more tools.
18 November 2026
First published. API keys; UTC times added next to the account-clock times (fix_time on positions, start_utc and end_utc on trips, time_utc on alerts); webhooks are signed.

Something missing, or a call that does not answer as written? Write to [email protected].