Inhalte werden geladen...
Inhalte werden geladen...

1.0 Authentication

The zevvy API supports the flows "authorization_code" and "device". The "device flow" is typically used for mobile or embedded applications, while the "authorization_code flow" is used for web applications.

For our application, the "device flow" is usually used.

The following data are required for successful authentication:

  • client_id
  • client_secret 

(If you do not yet have a Client ID, you can contact us for the creation of the Client ID)

You will then receive a response with the following data:

  • device_code
  • user_code
  • client_secret
  • verification_uri
  • verification_uri_complete
  • interval
Code Example
java python javascript shell php

Response
json
Inhalte werden geladen...
Inhalte werden geladen...

1.2 Generate access token

To retrieve an access token, you need to send a request with the following details from the previous request:

  • device_code
  • client_id
  • client_secret

In addition, you must specify the scope and grant_type.

Here are the available scopes:

  • offline_access: Required for the refresh token to have a longer validity duration for long-term use.
  • measurement: Required for managing measurements.
  • register: Required for managing registers.
  • device: Required for managing devices.

Make sure to correctly include these details in your request in order to obtain a valid access token.

Code Example
java python javascript shell php

Response
json

2.0 Create a device in zevvy

With the token from the previous step (<LONG_ACCESS_TOKEN>), the API can now be used, for example, to create a device.

Only the following data need to be sent to the endpoint:

  • Access Token
  • Name
  • Reference (optional)

Please note that the access token is placed in the header and the name (Name) and reference (Reference) should be included as JSON in the body.

Code Example
java python javascript shell php

Response
json

3.0 Example: Charging station with 15-minute values

In the previous example, we looked at how individual devices can be opened in zevvy via API. However, with large volumes of data, it is advantageous if the devices do not have to be created with individual API connections.

Our API automatically detects whether a device or register exists or not. If not, the device or register is automatically created.

For this, we use the "_bulk_create" endpoint.

The following is needed:

  • deviceName
  • registerName

In the example, we use the following values:

  • deviceName: zevvy Test Device Example Charging Station
  • registerName: zevvy Test Register Example Charging Station

Since the device and the register do not yet exist, the API will automatically create both and import the data sent with them.

After import, the devices and registers can be viewed in zevvy and assigned to a measurement point. (See video)


Code Example
java python javascript shell php

Response
json
Inhalte werden geladen...
Inhalte werden geladen...
Inhalte werden geladen...
Inhalte werden geladen...
Inhalte werden geladen...
Inhalte werden geladen...

API Feedback

We value your feedback as it is crucial for improving our API and ensuring it meets your needs. Your insights help us identify areas for improvement and guide our future development. Thank you for taking a moment to share your experience with us.

How easy was it to integrate our API into your project? 
How satisfied are you with the level of support provided?