Tracking

Updating order status and courier coordinates

Updating the order status

To change the status of the order, you need to make a request to the API using the POST method to the following endpoint:

https://api.maplink.global/tracking/v1/orders/{{trackingId}}/status

Where the term {{trackingId}} must be replaced by the ID of the order to be updated.

An example of a request can be seen below:

{
    "value": "ON_THE_WAY",
    "label": "Em trânsito"
}

Where:

  • value – Values
    possible: ["PREPARING", "ON_THE_WAY", "DONE", "NOT_DONE", "CANCELLED"].
  • label – Personalized text to be displayed on the tracking page.

Updating the delivery person’s coordinates

To update the coordinates, you need to make a request to the API using the POST method to the following endpoint:

https://api.maplink.global/tracking/v1/orders/{{trackingId}}/driver

Where the term {{trackingId}} must be replaced by the ID of the order to be updated.

The coordinates on the tracking page are updated every 15 seconds.

Updates sent in less than 15 seconds will not be reflected on the tracking page.

An example of a request can be seen below:

{
    "name": "Maplink BR",
    "image": "https://example.com",
    "currentLocation": {
        "lat": -22.72725697031394,
        "lon": -47.636846753567944
    }
}

Where:

  • name – (Optional) Driver’s name
  • image – (Optional) URL of the driver’s photo to be displayed on the site
  • currentLocation – Object with the driver’s current coordinates.
    • lat – Latitude coordinate in decimal degrees.
    • lon – Longitude coordinate in decimal degrees.