API Reference
API Reference

/routes/{{uuid}}/timeline

Use this endpoint to retrieve both planned and actual route timings, along with the completion statuses of orders

A GET request to the /timeline endpoint retrieves timeline information for a specific route within Routific. The timeline data includes the sequence of stops, the orders associated with each stop, and their corresponding arrival and departure times. Below is a sample response payload illustrating the timeline details.

{
  "data": [
    {
      "type": "start_location",
      "plannedDepartureTime": "2021-07-05T12:00:00-07:00",
      "actualDepartureTime": "2021-07-05T12:00:00-07:00",
      "distanceFromPreviousStopInKilometers": 0
    },
    {
      "type": "delivering_stop",
      "distanceFromPreviousStopInKilometers": 2,
      "plannedArrivalTime": "2021-07-05T12:07:15-07:00",
      "plannedDepartureTime": "2021-07-05T12:17:15-07:00",
      "actualArrivalTime": "2021-07-05T12:07:15-07:00",
      "actualDepartureTime": "2021-07-05T12:17:15-07:00",
      "orders": [
        {
          "uuid": "e494bee9-8f01-42b6-9ef2-b61bca2df8f3",
          "status": "delivered",
          "uri": "/v1/orders/e494bee9-8f01-42b6-9ef2-b61bca2df8f3"
        }
      ]
    }
  ],
  "metadata": {
    "nextPage": null,
    "totalPages": 1,
    "totalItems": 22
  }
}

📘

How do I know my route's uuid?

You can get your route ids by calling the /routes endpoint. For more information on how to fetch route data check out the reference docs here.

📘

Timestamp Format

All timestamps are in ISO 8601 format of YYYY-MM-DDTHH:MM:SS±HH:MM.

The timeline object consists of an array of stop objects. Each stop has the following fields:

DATA Fields

FieldTypeDescription
typeStringType of event. Possible values: start_location, delivering_stop, end_location, idling.
distanceFromPreviousStopInKilometersNumberWhat the name says :)
plannedArrivalTimeStringExpected/Planned time of arrival at this stop.
plannedDepartureTimeStringExpected/Planned time the stop will be completed and departed from.
actualArrivalTimeStringActual time the vehicle arrives at this stop.
actualDepartureTimeStringActual time the stop was completed and departed from.
ordersArrayNote that Routific can aggregate multiple Orders under a single Stop. This is an array of orders associated with a stop. Only delivering_stop timeline event type contains orders.

ORDERS Fields

FieldTypeDescription
uuidStringUnique identifier of the order.
statusStringCurrent status of the order. Possible values: scheduled, not scheduled, delivered, missed
uriStringThe URL endpoint to access additional details about the order.

METADATA Fields

FieldTypeDescription
nextPageStringThe URL for the next page of results. If there are no more pages, this value is NULL
totalPagesIntegerThe total number of pages available for the request
totalItemsIntegerThe total number of items (routes) available.
Language
Authorization
Header
Click Try It! to start a request and see the response here!