Skip to content

Developers

Sending positions

Send readings as a batch with a POST request to:

POST https://tawasulone.com/api/v1/telemetry/ingest

Required headers: Authorization and Content-Type: application/json. Do not compress the body. The Idempotency-Key header is optional.

The body is an object with a non-empty observations list and an optional batch identifier, batch_id. Each batch has a maximum number of readings and a maximum size; going over returns batch_too_large or payload_too_large.

Request
curl -X POST "https://tawasulone.com/api/v1/telemetry/ingest" \
  -H "Authorization: Bearer <YOUR_SOURCE_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: batch-2026-10-18-0001" \
  -d '{"observations":[{"vehicle_external_id":"TRUCK-12","observed_at":"2026-10-18T09:00:00Z","latitude":24.7136,"longitude":46.6753,"speed":62.5,"speed_unit":"kmh","ignition":true}]}'
Response 202
{
    "success": true,
    "data": {
        "receipt_id": "00000000-0000-4000-8000-000000000001",
        "idempotency_key": "batch-2026-10-18-0001",
        "item_count": 1,
        "duplicate": false,
        "received_at": "2026-10-18T09:00:01.000Z",
        "units": {
            "speed": null,
            "confirmed": false
        }
    },
    "error": null,
    "meta": {
        "request_id": "",
        "timestamp": "2026-10-18T09:00:01Z"
    }
}

Required fields in each reading

FieldMeaning
vehicle_external_idThe vehicle's identifier in your system. Send it or imei, at least one of the two.
imeiThe tracking device's IMEI.
observed_atWhen the reading was taken, in ISO 8601 with a time zone, such as 2026-10-18T09:30:00Z. Or send observed_at_epoch_ms instead; exactly one of the two.
latitudeLatitude from -90 to 90.
longitudeLongitude from -180 to 180.
speedSpeed, zero or more.

Optional fields

FieldMeaning
headingDirection of travel in degrees, 0 to 360.
ignitionWhether the engine is on: true or false.
speed_unitSpeed unit: kmh, knots or mph.
temperature_cTemperature in degrees Celsius.
humidity_pctRelative humidity from 0 to 100.
weight_kgWeight in kilograms, a number, not text. It counts as the measured weight only for a vehicle with a declared CAN weight sensor in the panel; it is ignored for calibrated analog sensors and for vehicles without a weight sensor.
weight_mvThe raw weight sensor reading in millivolts.
driver_external_idThe driver's identifier in your system.
native_event_codeThe event code as your device sends it.
event_idThe reading's identifier in your system.

A 202 response means the batch was stored. Matching the vehicle and checking reading quality happen after receipt; readings for an unknown vehicle are held for review, never lost.

Retrying safely

Send a stable key per batch in the Idempotency-Key header or in batch_id: letters, digits and . _ : - up to 100 characters. Sending the same batch again with the same key returns 200 with the first receipt and "duplicate": true, without storing it twice. Different content under a key already used returns 409.

Any invalid reading rejects the whole batch with 422, listing each wrong field and where it is, such as observations.3.latitude.