After a customer is verified, you use their verifiable credential with the consent API to record their consent and gain access to their energy data. This page covers that API integration.Overview#
Take the verifiable credential received on GLOW_IDV_SUCCESS (see the Implementation Guide and Verifiable Credentials pages) and send it to the consent API. The API records consent against the verified customer and returns a consent reference you use for subsequent data access.Verified customer → verifiable credential → consent API → data access
Endpoint & Authentication#
This call is made from your backend, never from the mobile app or website.
It carries organisation-level credentials that must not ship inside a client
binary or be reachable from the browser.
POST https://api.glowmarkt.com/api/v0-1/provision/admin/smart-meter/onboard/idv
| Header | Value |
|---|
Content-Type | application/json |
Authorization | Basic {base64(clientId:clientSecret)} — issued via the Developer Portal |
Terms and Conditions#
In order to grant consent, an energy consumer must to accept the Terms and Conditions for the service.This is not facilitated within the SDK - you will need to present the Terms separately from the SDK, either before or at the point of capturing their consent for you to access their data.Documentation relating to our Terms and Conditions Management APIs exists on a separate page here .Request#
Submit the verifiable credential from GLOW_IDV_SUCCESS as consent.data.verifiableCredential.With regards to the payload, the full explanation of each field is provided here:| Field | Required/Optional | Explanation |
|---|
| username | required | The username is the unique reference in the Glow Platform. This is the foreign key reference. This will usually be an email |
| email | optional | This is the users email |
| directoryId | required | - |
| mpxn | required | The MPxN the user provided. This is the MPxN that the energy consumer has verified against, and will be used to identify and verify their meter point. |
| services | required | The metering services to onboard — code and the meterTypes array to request. |
| tcId | required | The UUID indicating the terms and conditions. Use the /current call to obtain the identifier to include. |
| reference | required | The clear text reference of the terms and conditions |
| acceptedAt | required | The datetime the terms and conditions were accepted. |
| verifiableCredential | required | The jwt token from GLOW_IDV_SUCCESS. |
Response#
A successful response, will have a 200 status code, and the payload looks like this:{
"userId": "UUID",
"applicationId": "3e3e5463-afbd-4f7a-b57f-365e886cf914",
"virtualEntity": {
"veId": "4447b17c-ab62-491c-8085-9ac2b6206346"
}
}
When the API is submitted, the system will check all the provided information and if it finds it to be valid, it will register the user. Once completed smart meter data will automatically be requested and the historical data will be stored on Resources against the userId. The timing of this process is asynchronous.The userId should be stored by the third party application, although it can be looked up in the future against the foreign key.Send the credential only over HTTPS, and treat it as sensitive — don't log it or place it in a URL.