API
Connect your tracking system to Tawasul
Tracking systems send vehicle positions and sensor readings to Tawasul through a JSON API over HTTPS. These guides cover authentication, sending positions, errors and request limits.
API base URL
https://tawasulone.com/api/v1
Guides
-
Authentication and keys
One key per data source, sent in the Authorization header.
-
Company keys
A key your company administrator issues in the portal, to read your company's data from your own systems.
-
App sign-in
How a company app signs a person in, keeps the session going and signs out.
-
Market apps
How the shipper and carrier apps of the transport market sign in and call the market's own API, with its scopes and families.
-
Sending positions
Send a batch of readings in one request, safely retried.
-
Webhooks
Events your systems receive as they happen, how to check them, and how to look after your addresses with a key.
-
Safe retries
The Idempotency-Key header, so a request repeated after a lost answer does nothing twice.
-
Errors
One shape for every response, and a stable code for each error.
-
Request limits
Per-minute limits per key and per address, with headers showing what is left.
-
API reference
Every operation with its headers, fields and responses, with examples.
What changed in the API
- — Scheduled reports: create and edit accept period (previous, the last complete period, the default; or to_date, from the start of the current week, month, quarter or year to yesterday); any other value answers 422. The list returns period.
- — Scheduled reports: create and edit accept contacts (up to 5 external contact uuids, only for reports that may leave the company, and only when the platform and the company allow it; 403 otherwise). The list returns contacts_count, and contacts (uuids) for keys whose owner may view contacts.
- — Scheduled reports: a new pause code, failing, in the pause field, set when a schedule stops itself after three failed sends in a row.
- — Report charts by company key: GET /api/v1/reports/{key}/charts gives the charts the portal draws for the report with the same filters, under the reports read scope, never a chart grouped by a named driver, and at most twenty charts.
- — Report files by company key under reporting:report_files:write: ask for a file of a report with a reason, follow its state and download it for the key's owner alone. It works only once the administration turns it on; it is off by default.
- — Report views can now be saved with a company key under reporting:report_views:write: save the read's own filters under a name, rename, make default, delete and pin to the portal home; they open in the portal as if saved there.
- — Scheduled reports can now be managed with a company key under reporting:report_schedules:write: create, edit, pause, resume, delete and ask for a test mail that reaches the key's owner alone, under the portal's own rules, with recipients by their public ids and an hourly and daily cap per key and per company.
- — New list: GET /api/v1/report-schedules gives the company's scheduled reports under reporting:report_schedules:read, for a key whose owner may manage them: the report, when it is sent, its format, how many people receive it without their names, its state and the pause as a closed code.
- — Reading a report with a company key (GET /api/v1/reports/{key}) now takes the panel's driver, grouping, search, sort and comparison filters, and a query key the endpoint does not list now answers 422 instead of being ignored.
Coming soon
- Connecting tracking platforms by configuration, without code
- Importing positions from a file