This guide will help you get started with the Energy Coordination API. It will walk you through the process of authenticating with the API, registering a user and some resources, subscribing to events, and sending a report.
The base URL for the API is
We have a Postman Collection with all the endpoints from the API, as well as a folder that follows along with this guide. You can download the Postman Collection here.
We use OAuth2 for authentication. If don't have a client ID and secret, you can create those in the Spark Portal.
Get an access token by sending a POST request to
https://auth.identity.volue.com/connect/token as follows:
curl --location 'https://auth.identity.volue.com/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<your_client_id>' \
Then you can use the access token to authenticate with the API by sending it in the
Authorization header in subsequent requests to the Energy Coordination API:
Authorization: Bearer <access_token>
The token is valid for 60 minutes so you will need to refresh it periodically.
If you are using the Postman Collection, you can set up the authentication by following these steps:
- Go to the
Variablestab in the Collection
- Set the
client_secretvariables to your client ID and secret
- Click the
Get New Access Tokenbutton
1. Registering a User
User object represents a user or customer of your service. Use it to register
Resources that your user owns to let us know who should get incentives based on your
You can create users via
POST /users, the response is a
userId that you can use to refer to the user in subsequent requests.
2. Registering a Vehicle
Resources can either be registered to a fixed location, or be free standing resources that move around such as vehicles.
You can create vehicles via
POST /users/:userId/vehicles, the payload should be information identifying a unique vehicle:
3. Registering a Location
Location object represents a specific location that belongs to one of your users.
This is the information we give to DSOs so they can correctly send out incentives to your users.
You can create locations via
4. Registering a Location Bound Resource
Resource object represents a specific resource that your user owns.
You can create resources that are bound to a fixed specific location via
POST /users/:userId/locations/:locationId/resources, the payload should be information identifying a unique resource: