To navigate

    To select

    algolia
    Developers Sign in Sign up
    Home
    Getting Started
    API Basics
    # Getting started
    # Authorization
    # Security
    # Status & Error Codes
    # Subscriptions
    Other Basics
    # GraphQL Basics
    # EV Basics
    API Reference
    API
    # Quick setup guide
    # Pagination
    Cars
    # Introduction
    # Query cars
    # Query car details
    # Query premium car details
    Stations
    # Introduction
    # Query stations
    # Query station details
    # Query stations around a GeoJSON point
    # Query station reviews
    # Mutate to create a station review
    # Subscribe to station updates
    # Query station operators
    # Query station operator details
    # Query station tariffs
    # Query station tariff details
    # Query station amenities
    # Query station statistics
    Routes
    # Introduction
    # Mutate to create a new route
    # Subscribe to route updates
    # Query route details
    # Query route path
    Navigation
    # Introduction
    # Mutate to start a new navigation session
    # Subscribe to navigation updates
    # Query navigation session
    # Mutate to update a navigation session
    # Mutate to recalculate navigation
    # Mutate to finish navigation
    Connected Car Data
    # Introduction
    # Telemetry
    Tile Service
    # Introduction
    # Properties
    # Filters
    # Integration
    Release notes
    Deprecations
    Help center
    Playground
    Voyager
    Examples
    Github
    Website
    Documentation
    Sign up
    Dark mode

    Subscribe to route updates

    When you have obtained a route ID through the route mutation, you can start a route subscription to obtain your polyline and other route details. Because longer routes take some time to finish you can use a GraphQL subscription as described in the introduction.

    Explore on the playground

    Subscription

    The subscription service needs to be initiated with a route ID. From there on it will start calculating and, based on your interval, provide you with a route status. For all possible statuses, see the response section of this document.

    Last but not least, if your route supported any additional options you can now request them on the subscription response, as described here;

    Support alternative stations along a route

    If your route mutation included the stationsAlongRouteRadius with a valid distance, you can now request the station details. To do so, you will need to add the stationsAlongRoute field with its appropriate children.

    Support stations as waypoint

    If your route mutation included stations in the via parameter, you will receive a route with additional stations as waypoints. These station as waypoints can be found inside the route.leg.

    Get additional properties

    Our route destination, origin and stations have an optional properties attribute any of our route queries. You can use this to fetch a complete address, the current temperature (temp) and air pressure at that location.

    Using percentages

    You can configure this query to use percentages for the state of charge and final state of charge. This way client-side conversions are no longer needed. Please be aware that the percentages are based upon the usableCarBattery or the capacity included inside this mutation.

    Arguments

  • id • non_null
    Required
  • Frequently used fields

  • route • object • RouteAlternative

    Recommended route

  • status • enum • RouteStatus

    Route status

  • Other fields

  • alternatives • list • [RouteAlternative]

    Available alternatives

  • ev • object • RequestEv

    EV specific data for a route request

  • user • object • RequestUser
    Deprecated
  • routeRequest • object • RequestRoute

    Route request data

  • app • object • RouteApp

    Application who requested a route

  • Response

    If successful, the HTTP status code in the response header is 200 and the response body contains the attributes you requested. The most important value here is the status field. This will tell you what data is available.

    Status Description

    Pending

    Route is waiting to be processed

    Processing

    Route is being calculated

    Done

    Route has successfully been processed and data is available

    Not_Found

    Route could not be found

    Error

    Route could not be calculated due to an error

    Subscription
    subscription routeUpdatedById {  routeUpdatedById(id: "5e300e71f7e26f726afd3d71") {    status    # add more fields here  }}
    Response
    {  "data": {    "route": {      "status": "pending"    }  }}