Update GPS tracking position
POST/truckers/deliveries/tracking/:service_code
This endpoint registers the vehicle's current GPS position for an ongoing delivery and updates the tracking status.
Key Functionalities:
- Registers precise GPS coordinates (latitude, longitude)
- Stores the exact timestamp of the position (UTC)
- Updates the carrier's last known position
- Automatically associates the position with the specified delivery
- Maintains a position history for traceability
Primary Use Cases:
- Real-time tracking during transport
- Generation of optimized routes based on current position
- Calculation of dynamic estimated times of arrival (ETA)
- Geographic verification for loading/unloading processes
- Fleet monitoring and asset management
Validations and Requirements:
- Only works for deliveries in the 'collected' status
- GPS coordinates must be valid (lat: -90 to 90, lng: -180 to 180)
- Timestamp must be current (no more than 5 minutes difference)
- Maximum of 1 update per minute to prevent spam
Example Flow:
- Mobile app obtains the device's GPS position
- Sends the position to the endpoint every 2-5 minutes
- System updates the position and recalculates the ETA
- Company can view the position in real-time
Technical Notes:
- Coordinates are stored in GeoJSON format
- Timestamp is automatically converted to UTC
- Old positions are archived after 30 days
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 429
Position registered successfully.
Response Headers
X-RateLimit-Remaining
Number of remaining updates in the current period
Example:
58Invalid request
Response Headers
Unauthorized
Response Headers
Authorization or validation error. Occurs when the user lacks permissions or the data is invalid.
Response Headers
Not found
Response Headers
Too many requests. The update limit is 60 per hour. Please wait before submitting new positions.
Response Headers
Retry-After
Seconds until another request can be made
Example:
60