This API is a user-based API, which means that all the data you can retrieve or send via the API is somehow connected to an existing user. Let’s say a user wants to find all available charging stations within a 5-kilometer radius and wants to then charge their vehicle at one of these charging stations. There are a few preconditions required to make this work, such as being an active user, having a valid contract for the station and the user’s preferred method of paying for the charging session. See below for information on the steps required to make this work.
The technology behind this API is GraphQL. GraphQL is an API query language for fulfilling queries with existing data. GraphQL provides a complete and understandable description of the data in your API, giving clients the power to ask for exactly what they need and nothing more.
The first step in using this API is to understand the authentication mechanism. Valid authentication tokens are a prerequisite to gain access to the API. There are two options for acquiring these tokens.
If the Auth0 feature is enabled for you, an application can use Auth0 to authenticate users. Assuming you have successfully authenticated with Auth0, you will have an access token. This access token can be used as an authorization bearer token in order to get access to our GraphQL API. An access token has a lifetime of 60 minutes - so if a user session takes longer than 60 minutes, you will have to reauthenticate with Auth0 to get a new access token. For more information on Auth0, please refer to the Auth0 documentation.