Skip to main content

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:

  1. Mobile app obtains the device's GPS position
  2. Sends the position to the endpoint every 2-5 minutes
  3. System updates the position and recalculates the ETA
  4. 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

Position registered successfully.

Response Headers
    X-RateLimit-Remaining

    Number of remaining updates in the current period

    Example: 58