Sections

  • Basics
  • API reference
  • Release notes
  • Deprecations
  • Examples
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 • ID

• Required

ID of the navigation session to retrieve

Other fields

id • ID

ID of the navigation session

route_id • ID

The current route used for navigation

route_alternative_id • ID

The current route alternative used for navigation

state • NavigationState

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

Show NavigationState enum values

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 • Float

State of charge at the last known location

Show arguments

unit • StateOfChargeUnit

Default • kilowatt_hour

Show StateOfChargeUnit enum values

kilometer

Return the state of charge in kilometers

mile

Return the state of charge in miles

kilowatt_hour

Return the state of charge in kilowatt hours

percentage

Return the state of charge as a percentage

last_known_location • Point

Last known location

type • PointType

Point type

Show PointType enum values

Point

coordinates • Float

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

next_station • NavigationStation

Next charging station

station_id • ID

The ID as string of the charging station

station_location • Point

GPS location of the charging station

type • PointType

Point type

Show PointType enum values

Point

coordinates • Float

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

via • Point

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

type • PointType

Point type

Show PointType enum values

Point

coordinates • Float

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

estimated_state_of_charge • Float

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

Show arguments

unit • StateOfChargeUnit

Default • kilowatt_hour

Show StateOfChargeUnit enum values

kilometer

Return the state of charge in kilometers

mile

Return the state of charge in miles

kilowatt_hour

Return the state of charge in kilowatt hours

percentage

Return the state of charge as a percentage

estimated_consumption • Float

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

estimated_duration • Int

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

alternative_stations • NavigationStation

A set of alternative charging stations to next station

station_id • ID

The ID as string of the charging station

station_location • Point

GPS location of the charging station

type • PointType

Point type

Show PointType enum values

Point

coordinates • Float

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

via • Point

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

type • PointType

Point type

Show PointType enum values

Point

coordinates • Float

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

estimated_state_of_charge • Float

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

Show arguments

unit • StateOfChargeUnit

Default • kilowatt_hour

Show StateOfChargeUnit enum values

kilometer

Return the state of charge in kilometers

mile

Return the state of charge in miles

kilowatt_hour

Return the state of charge in kilowatt hours

percentage

Return the state of charge as a percentage

estimated_consumption • Float

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

estimated_duration • Int

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

instructions • JSON

Navigation instructions

Response

A response can either contain a data or an errors object. The response header will always return 200 as a status code.

Data object

When successful, a data object will be returned with the requested fields. If there are no fields present the data object will return the operation name with the appropriate return type. If the operation was a query, this output will be an object of the schema’s query root type; if the operation was a mutation, this output will be an object of the schema’s mutation root type.

Error object

If unsuccessful, an errors object will be returned with more details in the extensions object. The error object can contain any of the following objects.

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

  • Basics

    API Basics GraphQL Basics EV basics
  • API reference

    API Vehicles Stations Routes Navigation Vehicle connectivity Tile service Isolines
  • Products

    Website Dashboard Help center SDKs
  • Tooling

    Playground Voyager Examples API Status
  • Legal

    Terms & Conditions Privacy Policy Cookie Policy SLA Security
Mission StatementState of chargeTry Chargetrip Go

© Chargetrip 2023

Build with love in

Amsterdam ❤️

API reference

  • API
  • Vehicles
  • Stations
  • Routes
  • Navigation
  • Vehicle connectivity
  • Tile service
  • Isolines

Sections

  • Quick setup guide
  • Pagination
  • Introduction
  • Query vehicles
  • Query vehicle details
  • Query premium vehicle 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
  • Mutate to create a new connected vehicle
  • Subscribe to a connected vehicle
  • Mutate to authorize a connected vehicle
  • Query connected vehicle list
  • Query data from vehicle
  • Query connected vehicle
  • Mutate to update a connected vehicle
  • Mutate to remove a connected vehicle
  • Introduction
  • Properties
  • Filters
  • Integration
  • Introduction
  • Mutation to create an isoline
  • Subscribe to isoline details
  • Query isoline details