---
title: List Routes
description: List Routes
url: /api/routes/listRoutes
---

# List Routes

`GET /routes`

````yaml
openapi: 3.1.0
info:
  title: Spoke API
  version: v1
servers:
  - url: https://api.spoke.com/public/v1
security:
  - BasicAuth: []
paths:
  /routes:
    get:
      operationId: listRoutes
      summary: List Routes
      tags:
        - Routes
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 255
          in: query
          name: pageToken
          required: false
          description: The page token to continue from.
        - schema:
            default: 20
            type: number
            minimum: 1
            maximum: 20
          in: query
          name: maxPageSize
          required: false
          description: The maximum number of routes to return.
        - schema:
            type: object
            properties:
              startsGte:
                description: Search for routes that start on or after this date, inclusive. The date must be in the format YYYY-MM-DD.
                type: string
                pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
              startsLte:
                description: Search for routes that start on or before this date, inclusive. The date must be in the format YYYY-MM-DD.
                type: string
                pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
            additionalProperties: false
          in: query
          name: filter
          required: false
          description: "The filter to apply to the list of routes. The filter params are passed like this: `?filter[startsGte]=2026-10-01` or like this: `?filter.startsGte=2026-10-01`"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  routes:
                    type: array
                    items:
                      $ref: "#/components/schemas/routeSchema"
                    description: The routes.
                  nextPageToken:
                    description: The next page token.
                    type:
                      - "null"
                      - string
                required:
                  - routes
                  - nextPageToken
                definitions:
                  routeSchema:
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^routes\/[a-zA-Z0-9---_]{1,50}$
                        description: The id of the route, in the format `routes/<id>`.
                      title:
                        type: string
                        description: The title of the route.
                      stopCount:
                        type: number
                        description: The number of stops in the route.
                      driver:
                        anyOf:
                          - type: string
                            pattern: ^drivers\/[a-zA-Z0-9---_]{1,50}$
                          - type: "null"
                        description: The id of the driver.
                      state:
                        anyOf:
                          - type: object
                            properties:
                              completed:
                                type: boolean
                                description: Whether the route is completed.
                              completedAt:
                                description: The timestamp the route was completed at.
                                type:
                                  - number
                                  - "null"
                              distributed:
                                type: boolean
                                description: Whether the route is distributed.
                              distributedAt:
                                description: The timestamp the route was distributed at.
                                type:
                                  - number
                                  - "null"
                              notifiedRecipients:
                                type: boolean
                                description: Whether the recipients were notified.
                              notifiedRecipientsAt:
                                description: The timestamp the recipients were notified at.
                                type:
                                  - number
                                  - "null"
                              started:
                                type: boolean
                                description: Whether the route is started.
                              startedAt:
                                description: The timestamp the route was started at.
                                type:
                                  - number
                                  - "null"
                            required:
                              - completed
                              - completedAt
                              - distributed
                              - distributedAt
                              - notifiedRecipients
                              - notifiedRecipientsAt
                              - started
                              - startedAt
                            additionalProperties: false
                            description: The state of a route.
                          - type: "null"
                        description: The state of the route.
                      plan:
                        anyOf:
                          - type: string
                            pattern: ^plans\/[a-zA-Z0-9---_]{1,50}$
                          - type: "null"
                        description: The id of the related plan.
                    required:
                      - id
                      - title
                      - stopCount
                      - driver
                      - state
                      - plan
                    additionalProperties: false
                    description: A route.
                description: Success
        "400":
          description: Query parameters are invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: Query parameters are invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: Unauthorized
        "500":
          description: An internal server error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: An internal server error occurred
        default:
          description: The default error model
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: The default error model
components:
  schemas:
    driverIdSchema:
      type: string
      pattern: ^drivers\/[a-zA-Z0-9---_]{1,50}$
    planIdSchema:
      type: string
      pattern: ^plans\/[a-zA-Z0-9---_]{1,50}$
    routeIdSchema:
      type: string
      pattern: ^routes\/[a-zA-Z0-9---_]{1,50}$
    routeSchema:
      type: object
      properties:
        id:
          allOf:
            - $ref: "#/components/schemas/routeIdSchema"
          description: The id of the route, in the format `routes/<id>`.
        title:
          type: string
          description: The title of the route.
        stopCount:
          type: number
          description: The number of stops in the route.
        driver:
          anyOf:
            - $ref: "#/components/schemas/driverIdSchema"
            - type: "null"
          description: The id of the driver.
        state:
          anyOf:
            - type: object
              properties:
                completed:
                  type: boolean
                  description: Whether the route is completed.
                completedAt:
                  description: The timestamp the route was completed at.
                  type:
                    - number
                    - "null"
                distributed:
                  type: boolean
                  description: Whether the route is distributed.
                distributedAt:
                  description: The timestamp the route was distributed at.
                  type:
                    - number
                    - "null"
                notifiedRecipients:
                  type: boolean
                  description: Whether the recipients were notified.
                notifiedRecipientsAt:
                  description: The timestamp the recipients were notified at.
                  type:
                    - number
                    - "null"
                started:
                  type: boolean
                  description: Whether the route is started.
                startedAt:
                  description: The timestamp the route was started at.
                  type:
                    - number
                    - "null"
              required:
                - completed
                - completedAt
                - distributed
                - distributedAt
                - notifiedRecipients
                - notifiedRecipientsAt
                - started
                - startedAt
              additionalProperties: false
              description: The state of a route.
            - type: "null"
          description: The state of the route.
        plan:
          anyOf:
            - $ref: "#/components/schemas/planIdSchema"
            - type: "null"
          description: The id of the related plan.
      required:
        - id
        - title
        - stopCount
        - driver
        - state
        - plan
      additionalProperties: false
      description: A route.
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: Use the API key as the username and leave the password empty.
````