Sofar logo
Sofar logo
Api
Activate a license POSTClaim a license for a controller POSTGet licenses linked to a controller by nodeId GETGet licenses for a customer GET
License
POST
/v1/license/activate

Authorization

accessBearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Update an existing device PUT

A user can only execute this call is he is a member of an authorizing role such that this role has a monitors relation with monitorManagement rights. Alternatively, the user must be member of a set of roles with monitors relations for the specified device, such that the set of device properties which these relations allow to edit are a subset of the device properties which are specified in the current request.

Claim a license for a controller POST

Link a license to a controller by creating an entry in license_datalink

key*string

The license key to activate

Length1 <= length <= 50
activationIso?string

Optional activation timestamp (ISO 8601 string)

Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.eniris.be/v1/license/activate" \  -H "Content-Type: application/json" \  -d '{    "key": "string"  }'
{
  "success": true,
  "license": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "key": "string",
    "gridKw": null,
    "solarKw": null,
    "batteryKw": null,
    "evKw": null,
    "creationDate": "2019-08-24T14:15:22Z",





{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Missing or misformatted query parameter or body"
}
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Failed to verify token"
}
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "User does not have sufficient rights"
}
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Resource not found"
}

Set the activation date for a license to the current timestamp

In the value field below, fill in the access token. It has a 10 minutes validity period. A valid token can be obtained via the /accesstoken endpoint (call), AFTER authorization with refreshBearerAuth and the refresh token.

"activationDate"
:
null
,
"duration": 0,
"deactivationDate": null,
"type": "residential"
}
}