routes

Get routes with pagination and optional filtering for unassigned routes and date range. Returns routes with their drive dates - routes can appear multiple times for different dates. When unassigned_only is False, returns all routes (no assignment filter). When unassigned_only is True, returns only routes that are unassigned for the given route group.

Requires a driver or admin caller. Admins may scope to any driver via driver_id (or omit it for all routes). Drivers are always scoped to their own routes: omitting driver_id returns their own routes, and requesting another driver's is rejected.

get/api/routes

Request

  • The document declares no server URL.
  • Auth: HTTP bearer

Query parameters

unassigned_onlyboolean

If true, only return unassigned routes. If false, return all routes regardless of assignment status.

start_datestring date nullable

Filter route groups from this date

end_datestring date nullable

Filter route groups until this date

order'asc' | 'desc'

Order by drive_date: 'asc' (default, oldest-first) for the upcoming feed, 'desc' (most-recent-first) for the past feed.

searchstring nullable

Case-insensitive filter on the assigned driver's name, the route's name, or its route group's name

weekdayDriveDaysOfWeekEnum[] nullable

Filter by one or more weekdays of the drive date

delivery_typestring[] nullable

Filter by one or more delivery types

route_statusRouteStatusEnum[] nullable

Filter by one or more route statuses

driver_assignment_statusDriverAssignmentStatusEnum[] nullable

Filter by one or more driver assignment statuses

pageinteger

Page number (1-indexed)

page_sizeinteger

Number of items per page

driver_idstring uuid nullable

Filter routes by assigned driver. Admins may pass any driver_id, or omit it to get all routes. Drivers are always scoped to themselves: omitting it returns their own routes, and passing another driver's id is rejected with 403.

Response

Successful Response

pageinteger required
page_sizeinteger required
totalinteger required
total_pagesinteger required

Changes