Sections

  • Basics

  • API reference

  • Release notes

  • Deprecations

Sign in / Sign up
    • System

    • Day

    • Night

  • Sign in / Sign up
Subscribe to navigation updates
Mutate to update a navigation session

Query a navigation session

When you have obtained a navigation id through the startNavigation mutation, you can query for its current state.

Query

To query the navigation details you will need to provide the navigation ID as an argument. For doing turn-by-turn navigation we strongly recommend you to use the subscription service. A subscription provides you with updates on the navigation session whilst a navigation query only gives you a snapshot of the current state.

Arguments

id • non_null • ID

Required

ID of the navigation session to retrieve

Other fields

id • non_null • ID

Required

ID of the navigation session

route_id • scalar • String

The current route used for navigation

route_alternative_id • scalar • String

The current route alternative used for navigation

state • enum • NavigationState

The state of a navigation session. The status can be driving, charging, finished, or error

driving

Vehicle is driving

charging

Vehicle is charging

finished

Navigation session is completed (either manually or automatically 48 hours after the last update)

error

Failed to update navigation session due to route error or not found

state_of_charge • scalar • Float

State of charge at the last known location

last_known_location • object • Point

Last known location

type • non_null • PointType

Required

Point type

Point

coordinates • list • Float

The coordinates array with longitude as first value and latitude as second one

next_station • object • NavigationStation

Next charging station

station_id • scalar • String

The ID as string of the charging station

station_location • object • Point

GPS location of the charging station

type • non_null • PointType

Required

Point type

Point

coordinates • list • Float

The coordinates array with longitude as first value and latitude as second one

via • list • Point

An array with all GPS locations of via points until the next charging station

type • non_null • PointType

Required

Point type

Point

coordinates • list • Float

The coordinates array with longitude as first value and latitude as second one

estimated_state_of_charge • scalar • Float

Estimated state of charge, in kWh, at arrival on the next charging station

estimated_consumption • scalar • Float

Estimated consumption, in kWh, from last the known location until the next charging station

estimated_duration • scalar • Int

Estimated duration, in seconds, from the last known location until the next charging station

alternative_stations • list • NavigationStation

A set of alternative charging stations to next station

station_id • scalar • String

The ID as string of the charging station

station_location • object • Point

GPS location of the charging station

type • non_null • PointType

Required

Point type

Point

coordinates • list • Float

The coordinates array with longitude as first value and latitude as second one

via • list • Point

An array with all GPS locations of via points until the next charging station

type • non_null • PointType

Required

Point type

Point

coordinates • list • Float

The coordinates array with longitude as first value and latitude as second one

estimated_state_of_charge • scalar • Float

Estimated state of charge, in kWh, at arrival on the next charging station

estimated_consumption • scalar • Float

Estimated consumption, in kWh, from last the known location until the next charging station

estimated_duration • scalar • Int

Estimated duration, in seconds, from the last known location until the next charging station

instructions • scalar • JSON

Navigation instructions

Show arguments

instructions_format • non_null • InstructionsFormat

Required

Turn by turn instructions format for a route

Chargetrip

Chargetrip raw instructions

MapboxV5

Mapbox instructions mapping

language • enum • MappingLanguage

Preferred navigation instructions language. Default: en

en

English(US)

precision • scalar • Int

Number of decimals used for the Google Polyline encoding Algorithm. Allowed values are 5 or 6, the default is 5

Response

If successful, the HTTP status code in the response header is 200 and the response body contains the attributes you requested.

If unsuccessful, the header status code is an error code and the response body contains an error response object. The error response object can be any of the ones below.

Errors and warnings

Error

NAVIGATION_INVALID_MAPPING_LANGUAGE

Mapping language is not valid

Error

NAVIGATION_INVALID_MAPPING_PROVIDER

Mapping provider is not valid

Error

NAVIGATION_INVALID_ROUTE_STATUS

Cannot generate instructions mapping for route with status '$ROUTESTATUS'

Error

NAVIGATION_NOT_FOUND

No navigation session was found with the provided ID

Error

NAVIGATION_TRANSLATOR_NOT_FOUND

Translator for language "$LANGUAGE" was not found or loaded in the translators list

Error

ROUTE_POLYLINE_INVALID_DECIMALS

Value for decimals number is not valid. Allowed values are 5 or 6

Request

  • 01
  • 02
  • 03
  • 04
  • 05
  • 06
  • 07
  • 08
  • 09
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
          query navigation {  navigation(id: "624e918b89403385e0eb97d0") {    route_id    route_alternative_id    state    state_of_charge    last_known_location {      type      coordinates    }    next_station {      station_id      station_location {        type        coordinates      }      via {        type        coordinates      }      estimated_state_of_charge      estimated_duration      estimated_consumption    }    alternative_stations {      station_id      station_location {        type        coordinates      }      via {        type        coordinates      }      estimated_state_of_charge      estimated_consumption      estimated_duration    }    instructions(instructions_format: MapboxV5, language: en, precision: 6)  }}
        
Playground

Response

  • 01
  • 02
  • 03
  • 04
  • 05
  • 06
  • 07
  • 08
  • 09
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
          {  "data": {    "navigation": {      "route_id": "624e92170ccb0eeb800aa9cc",      "route_alternative_id": "624e9217ed4e70241b3092b5",      "state": "driving",      "state_of_charge": 60.5,      "last_known_location": {        "type": "Point",        "coordinates": [          9.9936818,          53.5510846        ]      },      "next_station": {        "station_id": null,        "station_location": {          "type": "Point",          "coordinates": [            8.806422,            53.073635          ]        },        "via": [],        "estimated_state_of_charge": 29.59827119941316,        "estimated_duration": 3955,        "estimated_consumption": 30.90172880058684      },      "alternative_stations": [],      "instructions": {        "routes": [          {            // Note: Instructions are removed from this example response          }        ]      }    }  }}
        
  • Basics

    API Basics

    GraphQL Basics

    EV basics

  • API reference

    API

    Cars

    Stations

    Routes

    Navigation

    Vehicle connectivity

    Tile service

  • Products

    Website

    Dashboard

    Help center

    SDKs

  • Tooling

    Playground

    Voyager

    Examples

    API Status

  • Legal

    Terms & Conditions

    Privacy Policy

    SLA

    Cookie Policy

Mission Statement

State of charge

Try Chargetrip Go

© Chargetrip 2022

Build with love in

Amsterdam ❤️

API reference

  • API

  • Cars

  • Stations

  • Routes

  • Navigation

  • Vehicle connectivity

  • Tile service

Sections

  • Quick setup guide

  • Pagination

  • Introduction

  • Query cars

  • Query car details

  • Query premium car details

  • Introduction

  • Query stations

  • Query station details

  • Query stations around a GeoJSON point

  • Query station reviews

  • Mutate to create a station review

  • Query station operators

  • Query station operator details

  • Query station tariffs

  • Query station tariff details

  • Query station amenities

  • Query station statistics

  • Introduction

  • Mutate to create a new route

  • Subscribe to route updates

  • Query route details

  • Query route path

  • 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

  • Introduction

  • Telemetry

  • Introduction

  • Properties

  • Filters

  • Integration