API Reference
API Reference

Use this endpoint to fetch your routes information under a workspace for a specific date

A GET request to the /routes endpoint with the query parameters workspaceId and date retrieves a list of routes planned within a specific workspace on a given date in Routific. Below is an example of the response payload containing route data.

{
  "data": [
    {
      "uuid": "246612f0-f160-4649-bb16-292ebaa43555",
      "name": "Route 11",
      "date": "2024-09-25",
      "driver": {
        "name": "John Doe"
      },
      "timeline": {
        "uri":"/v1/routes/246612f0-f160-4649-bb16-292ebaa43555/timeline"
      },
      "status": "planned",
      "workspaceId": 47,
      "workingTimeInSeconds": 2700,
      "distanceInKilometers": 4991,
      "ordersCount": 3
    }
  ],
  "metadata": {
    "nextPage": "/v1/routes?workspaceId=1&date=2020-10-28&page=2",
    "totalPages": 2,
    "totalItems": 52
  }
}

The response includes high-level data for each route: route uuids, assigned driver, status, and the latest statistics. You can use the route uuids to make subsequent API calls to the /timeline endpoint to fetch details for each route.

DATA Fields

FieldTypeDescription
uuidStringUnique identifier of the route.
nameStringName of the route.
dateStringDate when the route is planned for. Format: yyyy-mm-dd.
driver.nameStringName of the driver assigned to the route. A null value will be returned if no driver is assigned.
timeline.uriStringThe URI to access additional details about a route's timeline like the sequence of stops and their associated ETAs.
statusStringCurrent status of the route. Possible values: planned, published, executing, and completed.
workspaceIdIntegerID of the workspace where the route belongs.
workingTimeInSecondsIntegerTotal working time for the route in seconds.
distanceInKilometersIntegerTotal distance covered by the route in kilometers.
ordersCountIntegerNumber of orders assigned to the route.

📘

Is the working time planned or actual?

Its both, but it depends on the status of the route. Here's what you can expect based on the status of the route:

Planned and Published: For these two route states we return the planned working time based on our estimates of travel time, traffic information, etc.

Executing: We return an aggregate total working time that's a mix of both planned and actual times because when a route in being executed we only have the actual timings for the route that has already been completed.

Completed: We return the actual working time of the route based on the actual arrival and departure times of all the stops and events within the route.

METADATA fields

You can ignore the metadata fields if you have less than 50 routes. If your day involves more than 50 routes, you’ll need to use the nextPage field within the metadata object to retrieve additional routes for the day.

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
Credentials
Header
Click Try It! to start a request and see the response here!