GPS upload
Send a taxi's positions every 30 seconds so live traffic can show congestion. For our own taxi app's server only.
This call is for our own taxi app's server. The phones send their positions to that server, and the server forwards
them here, one call per taxi and batch. It needs an ingest-only key: a key that can send positions and read nothing.
Keep it on the server, next to your read key, and never build it into the phone app. Any other key gets
403 forbidden here, and an ingest-only key gets 403 forbidden on every other call. There is no keyless trial for
it.
We match the positions to roads every minute and work out how fast traffic moves. Slow stretches show on
Traffic with source: "gps". No call reads positions back, and we delete them after 3 days.
When to send
- While the driver is online and moving. Pause after about 2 minutes stopped, and start again when the taxi moves.
- Ask the phone for a position every 5 seconds, with high accuracy. Matching needs positions within about 25 m of the road.
- Send the positions in one batch every 30 seconds.
Trip IDs
- Make a random UUID (version 4) when the driver goes online, and send it as
tripwith every batch. Other UUID versions are refused: some carry a device address or a hash of a name. - Make a new one when the driver goes offline, and after 6 hours online.
- Never derive it from the driver, the phone or the taxi. There is no field for a driver or vehicle ID, and the call refuses unknown fields.
Request body
Send JSON with Content-Type: application/json, at most 64 KB. One batch holds one trip's positions.
| Field | Required | Description |
|---|---|---|
trip |
Yes | The trip's UUID, version 4. |
points |
Yes | 1 to 120 positions, oldest first. |
points[].t |
Yes | The GPS fix time in UTC, such as 2026-11-10T08:15:03Z. Up to 6 decimal places of seconds. |
points[].lng, points[].lat |
Yes | Degrees, WGS84. |
points[].acc |
Yes | Horizontal accuracy in metres. |
points[].spd |
No | Speed in m/s, if the phone reports one, or null. |
points[].hdg |
No | Heading in degrees from north, 0 to 360, if the phone reports one, or null. |
Example
curl -s -X POST -H 'Content-Type: application/json' -H "X-API-Key: $DRIVER_APP_KEY" \
-d '{"trip":"6f1c2a9e-3b7d-4c51-9a0e-2d8f4b6c1e73","points":[{"t":"2026-11-10T08:15:03Z","lng":122.56431,"lat":10.71982,"acc":6.5,"spd":7.2,"hdg":274}]}' \
https://quadruper.com/v2/ingest/probesThe answer is 202 Accepted:
{ "accepted": 1, "dropped": 0 }Points we drop
A well-formed batch is stored even when some of its points are not usable. These points are dropped and counted in
dropped:
- older than 10 minutes, or more than 30 seconds in the future (check the phone's clock);
- accuracy worse than 50 m;
- outside the area we cover: Iloilo City with Oton, Pavia and Leganes;
- faster than 50 m/s, as the phone reports it or as the distance from the point before implies.
A batch that arrives after newer positions of the same trip were already matched is stored but not used, and is not
counted in dropped. Send a backlog oldest first so this does not happen.
Limits
| Limit | Value |
|---|---|
| Requests per key | 50 a second, bursts up to 200 |
| Requests per IP address | 60 a second, bursts up to 200 |
| Open connections per IP address | 100 |
| Positions per trip | about 240 a minute per web process |
| Positions for the whole fleet | a ceiling per minute, well above what the fleet sends |
Every upload uses the same key and comes from your server's address. The per-key limit (50 a second) is met first, not
the per-IP one (60 a second); both apply to the same location. 600 taxis every 30 seconds is 20 requests a second,
well under 50. Going over any limit answers 429 rate_limited.
Forward each phone's batch as it arrives, or spread the uploads over the 30 seconds, instead of flushing every phone at
once. Keep fewer than 200 requests in a burst (burst=200) and fewer than 100 open connections (the per-IP cap); the
rest of a larger burst is refused with 429.
Errors and retries
| Status | code |
What to do |
|---|---|---|
| 400 | invalid_request |
The batch is malformed or not oldest first. Fix the app; sending it again fails the same way. |
| 401 | unauthorized |
No key, or a wrong one. |
| 403 | forbidden |
The key is not an ingest-only key, or the method is not POST. |
| 413 | payload_too_large |
Over 64 KB. Send smaller batches. |
| 415 | unsupported_media_type |
Send Content-Type: application/json. |
| 429 | rate_limited |
Over a limit. Keep the batch and retry as below. |
| 500 | internal_error |
Our fault. Keep the batch and retry as below. |
| 503 | unavailable |
Keep the batch and retry as below. |
When a send fails with 429, 500, 503 or no answer:
- keep the batch, and wait before you retry: the
Retry-Afterseconds when the answer has one (10, 30 or 60), otherwise 30 seconds; - always add a random extra wait of up to the same length again, picked anew for each retry. Without it, every taxi retries at the same moment after an outage and the retries fail together;
- keep at most 10 minutes of positions, since older ones are dropped anyway;
- send the oldest batch first, one at a time;
- split a backlog into batches of up to 120 positions.
The other gateway errors are in Errors.
Battery
- Send every 30 seconds, not with every fix. The radio wakes up less often.
- Stop asking for positions while the taxi has been still for 2 minutes, and whenever the driver is offline.
- Back off between retries as above. Never retry in a tight loop.
Consent and privacy
Before launch, the driver app must show drivers a consent and privacy notice, as the Philippine Data Privacy Act requires. It should say that the app sends positions while they are online, that we use them only to show live traffic, that no driver or vehicle ID is sent, and that positions are deleted after 3 days. The app team writes that notice; it is not part of this API.
On our side, no call reads positions back, staff never see single trips, and no backup keeps positions. Our request logs for this call hold no IP address or device name. The traffic summaries we keep hold counts only.