Retrieve timeline information for a single route
A GET request to the /routes/{routeUuid}/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.
Request URL
get https://api.plan.routific.com/v2/routes//timeline
How do I know my route's uuid?
You can get your route uuids by calling the Fetch routes endpoint.
Request Payload
//none
Sample Response Payload
Below is a sample response payload illustrating the timeline details.
{
"items": [
{
"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",
"customerOrderNumber": "external-1",
"uri": "/v2/orders/e494bee9-8f01-42b6-9ef2-b61bca2df8f3"
}
]
}
],
"nextCursor": "aWQ6MTA5OTc5NA"
}
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 event objects. Each event has the following fields:
| Field | Type | Description |
|---|---|---|
| items | Array | Contains a list of timeline of events in chronological order for a given route. |
| type | String | Type of event. Possible values: start_location, delivering_stop, end_location, idling, paused. |
| distanceFromPreviousStopInKilometers | Number | What the name says :) |
| plannedArrivalTime | String | Expected/Planned time of arrival at this stop. |
| plannedDepartureTime | String | Expected/Planned time the stop will be completed and departed from. |
| actualArrivalTime | String | Actual time the vehicle arrives at this stop. |
| actualDepartureTime | String | Actual time the stop was completed and departed from. |
| orders | Array | Note 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.uuid | String | Unique identifier of the order. |
| orders.status | String | Current status of the order. Possible values: scheduled, not scheduled, delivered, missed. |
| orders.uri | String | The URL endpoint to access additional details about the order. See Fetch order endpoint. |
| nextCursor | String | The URL for the next page of results. If there are no more pages, this value is null. |

