StaexFleet quick start

StaexFleet is a fleet management system that gets geolocation data from GPS trackers. The data is end-to-end encrypted and delivered to your servers in JSON format via HTTP POST request. We will configure your GPS trackers to send the data to the provided HTTPS URLs.

The HTTPS POST request looks like the following.

POST / HTTP/1.1
content-type: application/json
host: your-server.tld
content-length: 1100

[
  {
    "id": "43bc4f423976ffc3ef47c626f1d8d0a6",
    "device_id": "st-7028906584",
    "timestamp": 1715629621,
    "latitude": 52.4537,
    "longitude": 13.3852,
    "speed": 1.0,
    "direction": 77.0
  },
  ...
]

The body of the request is a JSON array each item of which is a record obtained from a GPS tracker. Record fields are documented here.

Request failure handling

We buffer records on the intermediate server and send them to your server in batches periodically. If the request fails it will be retried in the next period until the data is fully sent. We assume that you either process all records from a single request or none of the records are processed. If you process only some of the records and then fail, in the next batch we will send you records that might already be in your database. In this case we recommend updating the existing records (although they should be exactly the same that we sent in previous unsuccessful batches).

Chronology

The records from a particular device are always sent in chronological order. We make best effort to maintain this order across all your devices, however, if some of them send the data late (due to intermittent connectivity issues for example) then the order might deviate from the chronological.

Test your server

Use the following command to send test data to your server.

curl https://your-server.tld/some/path \
    -H 'Content-Type: application/json' \
    -d '[{
    "id":"43bc4f423976ffc3ef47c626f1d8d0a6",
    "device_id":"st-7028906584",
    "timestamp":1715629621,
    "latitude":52.4537,
    "longitude":13.3852,
    "speed":1.0,
    "direction":77.0
}]'

See also