The Tracking API covers two concerns: GPS pings recorded by drivers during active assignments, and geofences that define delivery corridors or restricted zones. Pings are stored in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JorLOrT/rappi2/llms.txt
Use this file to discover all available pages before exploring further.
gps_tracking MongoDB collection with a 2dsphere index on location. Geofences are stored in the geocercas collection and can be queried for spatial containment.
All endpoints require a valid Bearer token. GPS endpoints use the
tracking resource; geofence endpoints use the geocercas resource.GPS endpoints
Record GPS ping
POST /tracking/ping
Stores a single GPS position emitted by a driver’s device. If timestamp is omitted, the server time is used.
Permission: tracking:write
Active assignment ID this ping belongs to.
Driver (conductor) ID.
Vehicle licence plate.
Longitude (
-180 to 180).Latitude (
-90 to 90).Current speed in km/h.
Bearing in degrees (
0–360).GPS accuracy radius in metres.
ISO 8601 datetime. Defaults to server time when omitted.
List pings for assignment
GET /tracking/asignacion/{asignacion_id}
Returns up to limit pings for an assignment, ordered by timestamp descending.
Permission: tracking:read
Assignment ID.
ISO 8601 datetime — return only pings at or after this time.
ISO 8601 datetime — return only pings at or before this time.
Maximum number of pings to return (max
2000).Get most recent ping
GET /tracking/asignacion/{asignacion_id}/ultimo
Returns the single most recent GPS ping for an assignment.
Permission: tracking:read
Assignment ID.
Assignment statistics
GET /tracking/asignacion/{asignacion_id}/estadisticas
Computes total distance (via the Haversine formula over sequential pings), duration, and average speed for an assignment.
Permission: tracking:read
Assignment ID.
Assignment ID.
Total number of pings recorded.
Distance in metres.
Distance in kilometres.
Elapsed time in seconds between the first and last ping.
Elapsed time in minutes.
Average speed in km/h.
null when duration is zero.Timestamp of the first recorded ping.
Timestamp of the most recent recorded ping.
Find nearby drivers
GET /tracking/conductores-cerca
Uses a MongoDB $geoNear aggregation over the gps_tracking collection to return the most recent ping of each driver within radio_m metres whose last ping falls within the ventana_min time window.
Permission: tracking:read
Centre longitude (
-180 to 180).Centre latitude (
-90 to 90).Search radius in metres (
10–50000).Only consider drivers whose last ping is within this many minutes (
1–60).Geofence endpoints
Create geofence
POST /geocercas
Creates a polygon geofence stored in the geocercas MongoDB collection. Geometry must be a valid GeoJSON Polygon coordinate array.
Permission: geocercas:write
Geofence type:
ruta_buffer, zona_entrega, or prohibida.GeoJSON Polygon coordinates: an array of rings, each ring being an array of
[lon, lat] pairs. The first and last positions of each ring must be identical (closed ring).Route ID to link this geofence to.
Order ID to link this geofence to.
Buffer tolerance in metres used when generating this geofence programmatically.
Whether the geofence is active.
List geofences
GET /geocercas
Returns all geofences, optionally filtered by route or active status.
Permission: geocercas:read
Filter by route ID.
Filter by active status.
Geofences containing a point
GET /geocercas/contiene
Returns all active geofences whose polygon contains the given point. Uses MongoDB $geoIntersects.
Permission: geocercas:read
Longitude of the point to test (
-180 to 180).Latitude of the point to test (
-90 to 90).Get geofence
GET /geocercas/{geocerca_id}
Retrieve a single geofence by its MongoDB ObjectId.
Permission: geocercas:read
MongoDB ObjectId of the geofence.
Update geofence
PATCH /geocercas/{geocerca_id}
Partially update a geofence’s type, coordinates, tolerance, or active status.
Permission: geocercas:write
MongoDB ObjectId of the geofence.
New type:
ruta_buffer, zona_entrega, or prohibida.Replacement GeoJSON Polygon coordinates.
Updated buffer tolerance in metres.
Enable or disable the geofence.
Delete (deactivate) geofence
DELETE /geocercas/{geocerca_id}
Sets activa = false on the geofence. The document is retained in MongoDB.
Permission: geocercas:delete
This is a soft delete — the geofence is deactivated, not removed from the database.
MongoDB ObjectId of the geofence.
Geofence response schema
MongoDB ObjectId as a hex string.
Route linked to this geofence.
Order linked to this geofence.
One of
ruta_buffer, zona_entrega, prohibida.GeoJSON Polygon object with
type and coordinates.Buffer tolerance applied when the geofence was generated automatically.
Whether the geofence is currently active.
ISO 8601 creation timestamp.