Introduction
This documentation provides all the information needed to work with the GivEnergy APIs
Base URL
https://api.givenergy.cloud/v1
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_API_KEY}"
All authenticated endpoints are marked with a requires authentication badge in the documentation below. This is also explained in the Badges section of this document
You can retrieve your token by visiting Account Settings and clicking Generate in the 'GivEnergy API Key' section
Headers
Always ensure to have the following headers set with every request. If these headers are not included the response may not return valid data
Accept: application/json
Content-Type: application/json
Badges
Badge | Description |
requires account permission | Your account must be able to do this to use this API endpoint |
account type: account | Your account must be at least this type to use this API endpoint |
requires authentication | You must provide a valid API key to use this API endpoint |
paginated | This endpoint returns additional pagination metadata. See Pagination for more information |
dynamically validated | This endpoint's parameters are dynamically validated. See Dynamic Validation for more information |
Request Parameters
Most requests require 1 or more parameters to be passed into the request to search for specific data or to refine the data that is received
This section of the documentation describes to how to enter these parameters, how they are validated and what might happen
Parameter Types
Most endpoints found in this document provide details about which URL parameters
, Query Parameters
and Body Parameters
may be passed into the request
URL Parameters
are passed directly into the URL, and are indicated by a variable name inside curly brackets. For example:
inverter/{inverter}/data-points/{date}
where an inverter serial number must replace {inverter} and an ISO8601-date must replace {date}
inverter/XXXXXXXXXX/data-points/2022-01-06
Query Parameters
are appended to the end of the URL, following a question mark (?
) and a list of ampersand (&
) delimited key=value
pairs,
where key
is the name of the parameter and value
is its value. For example:
https://api.givenergy.cloud/v1/inverter/XXXXXXXXXX/data-points/2022-01-06?page=1&pageSize=20
includes parameter page
with a value of 1
Body Parameters
are passed into the request body. Examples may be seen for each request in the 'Example request' section
Validation
Documented Validation
Most endpoints provide simple validation rules in the URL parameters
, Query Parameters
or Body Parameters
For example
URL Parameters
a-url-parameter
string optional
Denotes that the URL parameter must be a string, and that it can be optional. A list of data types can be found in the Data Types section of this document
Dynamic Validation
Some endpoints require and validate parameters differently depending on the content of other parameters.
Some endpoints may also return validation input required for a different endpoint, for example:
calling the Get Setting Presets
endpoint will return a parameters
property which is a list of parameters
that must be entered in the body of the Modify Preset
endpoint in order to properly make the request
These endpoints will be marked with a dynamically validated badge
Due to the way that these endpoints are validated and handled, their dynamic content may change at any time. Well-defined endpoint parameters and response data will never change in this way
The parameters will be a json object, where each key is the property and its corresponding value adheres to the following format:
Property | Description |
---|---|
description | The description of the parameter |
validation | An array of validation rules for this parameter |
An example of this can be seen in the code section
{
"data": [
{
"id": 0,
"name": "Eco",
"description": "This mode will dynamically charge and discharge your batteries to minimise your import from the grid",
"parameters": {
"enabled": {
"description": "Enable or disable the preset",
"validation": [
"required",
"boolean"
]
}
}
},
...
]
}
The array of validation rules will either be one the types described in Data Types or one of the following:
Name | Description |
---|---|
optional | The parameter is not required |
required | The parameter is required |
min:value | The value must be at least value |
max:value | The value must be no larger than value |
numeric | The value must be numeric (integer or decimal) |
Validation Errors
If any invalid url, query or body parameters are passed into the request and a 422 status code is returned, data will be returned with the following format:
Property | Description |
---|---|
message | A description of the validation error. Typically "The given data was invalid." |
errors | An object of key => value errors, where key is the validation property that has errors, and value is an array of failed validation messages |
{
"message": "The given data was invalid.",
"errors": {
"value": [
"The value field is required."
]
}
}
Response Codes
The GivEnergy API uses conventional HTTP response codes to indicate the success or failure of an API request. The table below contains a summary of the typical response codes:
Code | Description |
---|---|
200 | The response was successful |
201 | The response was successful and a resource was created |
400 | Valid data was given but the request has failed |
401 | No valid API Key was given |
403 | Your account is not authorised to visit this endpoint or view this resource |
404 | The request endpoint or resource could not be found |
422 | The payload has missing required parameters or invalid data was given |
429 | Too many attempts |
500 | The request failed due to an internal server error |
502 | The request failed due to an internal server error |
503 | The API is offline for maintenance |
504 | The request took too long to process |
Response Format
Responses will always return a JSON object as long as the correct headers are set
Any successful response (status 2XX) will have its relevant data returned in the data
property on the JSON object
See the 'Example Response' section for each endpoint to see how the response might look
Paginated responses will include additional data. See Pagination for more information
Response data will be different if invalid request data is provided. See Validation for more information
Remote Control Codes
When performing read or write commands to a device, a response value will be returned
When sending a command to a single device, the response value, a message and a boolean indicating if the response was successful will also be returned
When sending a command to multiple devices at once, only the response value will be returned. The response value may be either the value sent to the device, a different value (indicating that the device modified its value, but not to the one received) or one of the below error codes:
Code | Description | Potentially Successful? |
---|---|---|
-1 | The device did not respond before the request timed out | Yes |
-2 | The device is offline | No |
-3 | The device does not exist or your account does not have access to the device | No |
-4 | There were one or more validation errors. Additional information may be available | No |
-5 | There was a server error | Yes |
-6 | There was no response from the server | Yes |
Data Types
Type | Description | Examples |
---|---|---|
ISO8601-type | Type is either date or datetime See this link for more information | date 2022-01-01 datetime 2022-01-01T12:34:56Z |
datetime | A generic datetime, formatted YYYY-MM-DD hh:mm:ss. This data type is typically used when fetching data from endpoints that operate based on the system or user's local time | 2022-01-01 06:30:00 |
type,delimited | A string of comma-separated values where type is the type of each value | 1,2,3 yes,no,maybe |
string | A simple string | Hello! |
integer | A whole number | 1 100 -5000 |
decimal,precision | A decimal number with precision number of digits after the decimal point | decimal,1 1.5 decimal,6 0.000001 decimal,0 5 |
type[] | An array of values with type type | integer[] [1, 2, 3] string[] ["yes", "no", "maybe"] |
object | A valid JSON object | { "some": "json", "data": { "that": { "can": "be nested" }, "and": [ "include", "arrays", "of", "data" ] } } |
boolean | A simple boolean. A string of "true" or "false" is invalid | 1 0 true false |
Pagination
Paginated responses are typically returned when the data being requested is part of a collection, for example retrieving a list of user accounts or hardware associated with a particular user
Paginated results always include links
and meta
properties which contain the following information
Links
The following data is returned on the links
object with the response data
Property | Description |
---|---|
first | The link to the first page of paginated results |
last | The link to the last page of paginated results |
prev | The link to the previous page of paginated results |
next | The link to the next page of paginated results |
Meta
The following data is returned on the meta
object with the response data
Property | Description |
---|---|
current_page | The currently visited page's page number |
from | The number of the first record in this page, in comparison to all records |
last_page | The number of the last page in the collection |
path | The current uri, without any additional pagination query parameters |
per_page | The number of records returned with this response |
to | The number of the last record in this page, in comparison to all records |
total | The total number of records |
{
"data": [
...
],
"links": {
"first": "https://api.givenergy.cloud/v1/inverter/XXXXXXXXXX/events?page=1",
"last": "https://api.givenergy.cloud/v1/inverter/XXXXXXXXXX/events?page=3",
"prev": null,
"next": "https://api.givenergy.cloud/v1/inverter/XXXXXXXXXX/events?page=2",
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 3,
"path": "https://api.givenergy.cloud/v1/inverter/XXXXXXXXXX/events",
"per_page": 15,
"to": 15,
"total": 35
}
}
Account
Get Your Account Information
requires authentication
Retrieves your account information
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/account" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/account"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/account'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/account',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1224,
"name": "francesca.holmes",
"role": "ENGINEER",
"email": "joshua94@martin.com",
"address": "Flat 60\nKyle Lights",
"country": "SOUTH_KOREA",
"telephone_number": "0738 286 7656",
"timezone": "GMT +13"
}
}
Received response:
Request failed with error:
Get Account Information by ID
requires authentication account type: engineer+ requires account read permission
Retrieves the information of a specific account by its ID
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/account/consequatur" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/account/consequatur"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/account/consequatur'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/account/consequatur',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1225,
"name": "lewis.campbell",
"role": "OWNER",
"email": "adam98@yahoo.com",
"address": "56 Edwards Glen",
"country": "FRANCE",
"telephone_number": "(0075) 381 2360",
"timezone": "GMT -9"
}
}
Received response:
Request failed with error:
Get Account Dongles by ID
requires authentication account type: engineer+ requires account read permission
Retrieves a list of dongles for an account by its ID
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/account/admin/devices?page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/account/admin/devices"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/account/admin/devices'
params = {
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/account/admin/devices',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"serial_number": "49niih5fqc",
"type": "GPRS",
"commission_date": "1996-11-13T12:06:47Z",
"inverter": {
"serial": "WV6012O901",
"status": "LOST",
"last_online": "1998-09-03T17:38:30Z",
"last_updated": "1979-11-01T01:55:45Z",
"commission_date": "1979-06-26T13:21:02Z",
"info": {
"battery_type": "LITHIUM",
"model": "All-In-One"
},
"warranty": {
"type": "Standard",
"expiry_date": "1984-06-26T13:21:02Z"
},
"firmware_version": {
"ARM": 420,
"DSP": 426
},
"connections": {
"batteries": [
{
"serial": "ki1513g952",
"firmware_version": "22210",
"capacity": {
"full": 191.39,
"design": 186
},
"cell_count": 16,
"has_usb": false
}
]
}
}
},
{
"serial_number": "36kfdj9sne",
"type": "GPRS",
"commission_date": "1982-05-28T17:30:58Z",
"inverter": {
"serial": "CW1714G171",
"status": "UNKNOWN",
"last_online": "1999-05-17T00:11:35Z",
"last_updated": "1992-03-03T09:38:29Z",
"commission_date": "1975-06-30T15:24:13Z",
"info": {
"battery_type": "LITHIUM",
"model": "GIV-HY4.6"
},
"warranty": {
"type": "Standard",
"expiry_date": "1980-06-30T15:24:13Z"
},
"firmware_version": {
"ARM": 420,
"DSP": 426
},
"connections": {
"batteries": [
{
"serial": "bu9791j003",
"firmware_version": "59730",
"capacity": {
"full": 129.45,
"design": 160
},
"cell_count": 16,
"has_usb": false
}
]
}
}
}
]
}
Received response:
Request failed with error:
Get Account Information by Username
requires authentication account type: engineer+
Retrieves the information of a specific account by its username
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/account/search/consequatur" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/account/search/consequatur"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/account/search/consequatur'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/account/search/consequatur',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1234,
"name": "kelly44",
"role": "ADMIN",
"email": "hall.noah@gmail.co.uk",
"address": "Flat 31\nKing Lake",
"country": "SAINT_KITTS_AND_NEVIS",
"telephone_number": "(0064) 295 7686",
"timezone": "GMT +4"
}
}
Received response:
Request failed with error:
Get Your Account Children Information
requires authentication account type: engineer+ requires account read permission
Retrieves a list of accounts that your account has access to
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/account-children?page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/account-children"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/account-children'
params = {
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/account-children',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1235,
"name": "wright.dylan",
"role": "ADMIN",
"email": "maisie88@gmail.com",
"address": "48 Anderson Square",
"country": "NORTH_KOREA",
"telephone_number": "06063 382394",
"timezone": "GMT -3"
},
{
"id": 1236,
"name": "julie.richardson",
"role": "EXTERNAL",
"email": "samantha56@hotmail.com",
"address": "3 Grace Ferry",
"country": "SRI_LANKA",
"telephone_number": "+44(0)9295459343",
"timezone": "GMT +12"
}
]
}
Received response:
Request failed with error:
Get Account Children Information by ID
requires authentication account type: company+ requires account read permission
Retrieves a list of accounts that the specified account has access to
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/account-children/admin?page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/account-children/admin"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/account-children/admin'
params = {
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/account-children/admin',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1237,
"name": "rose.phoebe",
"role": "OWNER",
"email": "adams.scott@gmail.com",
"address": "80 Collins Land",
"country": "MICRONESIA",
"telephone_number": "+44(0)316836121",
"timezone": "GMT -4"
},
{
"id": 1238,
"name": "owen67",
"role": "VIEWER",
"email": "arthur94@gmail.com",
"address": "33 Sean Valley",
"country": "SVALBARD_AND_JAN_MAYAN",
"telephone_number": "+44(0)4011 038979",
"timezone": "GMT +9"
}
]
}
Received response:
Request failed with error:
Communication Device
Get Your Communication Devices
requires authentication
View a collection of communication devices you have access to
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/communication-device?page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/communication-device"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/communication-device'
params = {
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/communication-device',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"serial_number": "56ynla1zgh",
"type": "WIFI",
"commission_date": "2004-03-19T02:57:39Z",
"inverter": {
"serial": "GJ2852J509",
"status": "WAITING",
"last_online": "2011-11-17T23:46:45Z",
"last_updated": "2007-08-10T18:19:26Z",
"commission_date": "2016-10-01T15:03:33Z",
"info": {
"battery_type": "LITHIUM",
"model": "GIV-3HY-6"
},
"warranty": {
"type": "Standard",
"expiry_date": "2021-10-01T15:03:33Z"
},
"firmware_version": {
"ARM": 420,
"DSP": 426
},
"connections": {
"batteries": []
}
}
},
{
"serial_number": "02vuiw7lez",
"type": "GPRS",
"commission_date": "2005-02-16T22:07:53Z",
"inverter": {
"serial": "MC1890Z446",
"status": "UNKNOWN",
"last_online": "1988-10-14T10:16:51Z",
"last_updated": "1989-12-25T05:17:28Z",
"commission_date": "1996-12-30T17:17:41Z",
"info": {
"battery_type": "LEAD_ACID",
"model": "Gateway"
},
"warranty": {
"type": "Standard",
"expiry_date": "2001-12-30T17:17:41Z"
},
"firmware_version": {
"ARM": 420,
"DSP": 426
},
"connections": {
"batteries": [
{
"serial": "ze4806o415",
"firmware_version": "55660",
"capacity": {
"full": 149.56,
"design": 160
},
"cell_count": 16,
"has_usb": false
}
]
}
}
}
]
}
Received response:
Request failed with error:
Get Communication Device Information by Serial Number
requires authentication
Get a communication device's information by serial number
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/communication-device/41zoqm0atd" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/communication-device/41zoqm0atd"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/communication-device/41zoqm0atd'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/communication-device/41zoqm0atd',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"serial_number": "12tqtq2xba",
"type": "WIFI",
"commission_date": "1973-06-08T04:47:46Z",
"inverter": {
"serial": "XO7968E671",
"status": "NORMAL",
"last_online": "2019-07-24T16:57:12Z",
"last_updated": "1978-05-10T15:30:23Z",
"commission_date": "2013-03-11T02:56:54Z",
"info": {
"battery_type": "LEAD_ACID",
"model": "Gateway"
},
"warranty": {
"type": "Standard",
"expiry_date": "2018-03-11T02:56:54Z"
},
"firmware_version": {
"ARM": 420,
"DSP": 426
},
"connections": {
"batteries": [
{
"serial": "wl3175e468",
"firmware_version": "64755",
"capacity": {
"full": 180.75,
"design": 186
},
"cell_count": 16,
"has_usb": true
}
]
}
}
}
}
Received response:
Request failed with error:
Energy Flow Data
Get Energy Flow Data
requires authentication requires inverter read permission
Fetches the energy flow data for a given inverter between 2 times
Grouping IDs
Grouping ID | Name | Description |
---|---|---|
0 | Half Hourly | Groups the data into 30-minute intervals |
1 | Daily | Groups the data into 24-hour intervals |
2 | Monthly | Groups the data into monthly intervals |
3 | Yearly | Groups the data into yearly intervals |
4 | Total | Groups the data into a single interval, spanning from the start time to the end time |
Type IDs
Type ID | Name | Description |
---|---|---|
0 | PV to Home | The amount of energy generated by the solar panels to be used immediately for local consumption |
1 | PV to Battery | The amount of energy generated by the solar panels that has been used to charge the battery |
2 | PV to Grid | The amount of energy generated by the solar panels that has been exported to the grid |
3 | Grid to Home | The amount of energy imported from the grid that has been used immediately for local consumption |
4 | Grid to Battery | The amount of energy imported from the grid that has been used to charge the battery |
5 | Battery to Home | The amount of energy discharged by the battery that has been used for local consumption |
6 | Battery to Grid | The amount of energy discharged by the battery that has been exported to the grid |
Example request:
curl --request POST \
"https://api.givenergy.cloud/v1/inverter/consequatur/energy-flows" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start_time\": \"2022-01-01\",
\"end_time\": \"2022-01-01\",
\"grouping\": 0,
\"types\": [
0,
1,
2,
5
]
}"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/energy-flows"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start_time": "2022-01-01",
"end_time": "2022-01-01",
"grouping": 0,
"types": [
0,
1,
2,
5
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/energy-flows'
payload = {
"start_time": "2022-01-01",
"end_time": "2022-01-01",
"grouping": 0,
"types": [
0,
1,
2,
5
]
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.givenergy.cloud/v1/inverter/consequatur/energy-flows',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'start_time' => '2022-01-01',
'end_time' => '2022-01-01',
'grouping' => 0,
'types' => [
0,
1,
2,
5,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
"start_time": "2022-01-01 00:00",
"end_time": "2022-01-01 00:30",
"data": [
"0": 4.5,
"1": 8.3,
"2": 1.2,
"5": 7.3
],
...
]
}
Received response:
Request failed with error:
Response
Response Fields
data
object[]
The response data
data[].start_time
datetime
The start time of that energy flow record
data[].end_time
datetime
The end time of that energy flow record
data[].data
object
An object where the property is the type and the value is the amount of energy for that period in Kilowatt-Hours (kWh).
For example, { "0": 1, "4": 2 }
means type 0 (PV to Home) has a value of 1 and type 4 (Grid to Battery) has a value of 2. The value has a maximum precision of 2 decimal places
Inverter Control
Presets
Get Setting Presets
requires authentication
Retrieves a list of available setting presets for a given inverter
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/inverter/consequatur/presets" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/presets"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/presets'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/inverter/consequatur/presets',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 0,
"name": "Eco",
"description": "This mode will dynamically charge and discharge your batteries to minimise your import from the grid",
"parameters": {
"enabled": {
"description": "Enable or disable the preset",
"validation": [
"required",
"boolean"
]
}
}
},
...
]
}
Received response:
Request failed with error:
Modify Preset
requires authentication
dynamically validated
Modify one or more inverter settings using a given preset
Example request:
curl --request POST \
"https://api.givenergy.cloud/v1/inverter/consequatur/presets/consequatur" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/presets/consequatur"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/presets/consequatur'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.givenergy.cloud/v1/inverter/consequatur/presets/consequatur',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"success": true,
"message": "Read Successfully"
}
}
Received response:
Request failed with error:
Single
Get Settings List
requires authentication requires inverter read permission
Returns a set of inverter settings available to your account
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/inverter/consequatur/settings" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/settings"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/settings'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/inverter/consequatur/settings',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 306,
"name": "DC Discharge 3 End Time"
}
}
Received response:
Request failed with error:
Read Setting
requires authentication requires inverter read permission requires setting permission
Read a specific setting on the inverter
Example request:
curl --request POST \
"https://api.givenergy.cloud/v1/inverter/consequatur/settings/1/read" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/settings/1/read"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/settings/1/read'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.givenergy.cloud/v1/inverter/consequatur/settings/1/read',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"value": "Unknown (32469)"
}
}
Received response:
Request failed with error:
Modify Setting
requires authentication requires inverter read permission requires setting permission
Write a value to the setting on the inverter
Example request:
curl --request POST \
"https://api.givenergy.cloud/v1/inverter/consequatur/settings/1/write" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"value\": \"consequatur\"
}"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/settings/1/write"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"value": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/settings/1/write'
payload = {
"value": "consequatur"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.givenergy.cloud/v1/inverter/consequatur/settings/1/write',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'value' => 'consequatur',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"value": 326.13,
"success": true,
"message": "Read Successfully"
}
}
Received response:
Request failed with error:
Multiple
Modify Setting (Multiple)
requires authentication requires inverter read permission requires setting permission
Write a value to a setting on multiple inverters
Example request:
curl --request POST \
"https://api.givenergy.cloud/v1/multi-control/write" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"inverter_serials\": [
\"SERIAL_1\",
\"SERIAL_2\"
],
\"setting_id\": 17,
\"value\": \"1\"
}"
const url = new URL(
"https://api.givenergy.cloud/v1/multi-control/write"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"inverter_serials": [
"SERIAL_1",
"SERIAL_2"
],
"setting_id": 17,
"value": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/multi-control/write'
payload = {
"inverter_serials": [
"SERIAL_1",
"SERIAL_2"
],
"setting_id": 17,
"value": "1"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.givenergy.cloud/v1/multi-control/write',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'inverter_serials' => [
'SERIAL_1',
'SERIAL_2',
],
'setting_id' => 17,
'value' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"SERIAL_1": {
"response": 1,
},
"SERIAL_2": {
"response": -2,
}
}
Received response:
Request failed with error:
Read Setting (Multiple)
requires authentication requires inverter read permission requires setting permission
Read a specific setting on multiple inverters
Example request:
curl --request POST \
"https://api.givenergy.cloud/v1/multi-control/read" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"inverter_serials\": [
\"SERIAL_1\",
\"SERIAL_2\"
],
\"setting_id\": 17
}"
const url = new URL(
"https://api.givenergy.cloud/v1/multi-control/read"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"inverter_serials": [
"SERIAL_1",
"SERIAL_2"
],
"setting_id": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/multi-control/read'
payload = {
"inverter_serials": [
"SERIAL_1",
"SERIAL_2"
],
"setting_id": 17
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.givenergy.cloud/v1/multi-control/read',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'inverter_serials' => [
'SERIAL_1',
'SERIAL_2',
],
'setting_id' => 17,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"SERIAL_1": {
"response": 1,
},
"SERIAL_2": {
"response": -2,
}
}
Received response:
Request failed with error:
Inverter Data
Get Latest System Data
requires authentication requires inverter read permission
Retrieves the latest system data from the inverter
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/inverter/consequatur/system-data/latest" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/system-data/latest"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/system-data/latest'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/inverter/consequatur/system-data/latest',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"time": "1985-03-17T05:09:59Z",
"solar": {
"power": 3762,
"arrays": [
{
"array": 1,
"voltage": 202.9,
"current": 788.7,
"power": 393
},
{
"array": 2,
"voltage": 626.5,
"current": 206.8,
"power": 2245
}
]
},
"grid": {
"voltage": 1509.2,
"current": 4814,
"power": -4863,
"frequency": 221.3
},
"battery": {
"percent": 65,
"power": 1344,
"temperature": 2.6
},
"inverter": {
"temperature": 43.5,
"power": 86477,
"output_voltage": 237.4,
"output_frequency": 50.74,
"eps_power": 4785
},
"consumption": 36915
}
}
Received response:
Request failed with error:
Get Latest Meter Data
requires authentication requires inverter read permission
Retrieves the latest meter data from the inverter
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/inverter/consequatur/meter-data/latest" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/meter-data/latest"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/meter-data/latest'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/inverter/consequatur/meter-data/latest',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"time": "1985-03-17T05:09:59Z",
"today": {
"solar": 4527.3,
"grid": {
"import": 753.8,
"export": 83.4
},
"battery": {
"charge": 60633.8,
"discharge": 46612.4
},
"consumption": 5197.7
},
"total": {
"solar": 50373.8,
"grid": {
"import": 643,
"export": 6029.2
},
"battery": {
"charge": 44461.3,
"discharge": 44461.3
},
"consumption": 14376.7
}
}
}
Received response:
Request failed with error:
Get Events
requires authentication requires inverter read permission
Retrieves a list of faults that were triggered from the inverter and when they were cleared
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/inverter/HN0695L505/events?start=consequatur&end=consequatur&cleared=&page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cleared\": false,
\"start\": \"2017-09-24\",
\"end\": \"2104-06-27\"
}"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/HN0695L505/events"
);
const params = {
"start": "consequatur",
"end": "consequatur",
"cleared": "0",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cleared": false,
"start": "2017-09-24",
"end": "2104-06-27"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/HN0695L505/events'
payload = {
"cleared": false,
"start": "2017-09-24",
"end": "2104-06-27"
}
params = {
'start': 'consequatur',
'end': 'consequatur',
'cleared': '0',
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/inverter/HN0695L505/events',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'start'=> 'consequatur',
'end'=> 'consequatur',
'cleared'=> '0',
'page'=> '1',
],
'json' => [
'cleared' => false,
'start' => '2017-09-24',
'end' => '2104-06-27',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"event": "BMS Discharger Over Current",
"start_time": "2003-03-24T07:18:12Z",
"end_time": null
},
{
"event": "GFCI Fault",
"start_time": "2012-09-21T08:40:26Z",
"end_time": null
}
]
}
Received response:
Request failed with error:
Get Data Points
requires authentication requires inverter read permission
Displays the entire data packet set from the chosen date
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/inverter/consequatur/data-points/consequatur?page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/inverter/consequatur/data-points/consequatur"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/inverter/consequatur/data-points/consequatur'
params = {
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/inverter/consequatur/data-points/consequatur',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"time": "1996-06-18T04:05:32Z",
"power": {
"solar": {
"power": 4703,
"arrays": [
{
"array": 1,
"voltage": 198.6,
"current": 3.3,
"power": 491
},
{
"array": 2,
"voltage": 170.8,
"current": 10,
"power": 2806
}
]
},
"grid": {
"voltage": 128.3,
"current": 98.1,
"power": 19821,
"frequency": 49.25
},
"battery": {
"percent": 79,
"power": -2289,
"temperature": 12
},
"consumption": {
"power": 22636
},
"inverter": {
"temperature": 50,
"power": -9476,
"output_voltage": 144.7,
"output_frequency": 49.69,
"eps_power": 24672
}
},
"today": {
"solar": 4373.9,
"grid": {
"import": 3168.4,
"export": 5384.4
},
"battery": {
"charge": 8691.3,
"discharge": 4350.4
},
"consumption": 5673.7
},
"total": {
"solar": 4353.3,
"grid": {
"import": 4625.8,
"export": 7045.8
},
"battery": {
"charge": 1034.1,
"discharge": 1034.1
},
"consumption": -11905.4
}
},
{
"time": "1986-03-12T20:30:33Z",
"power": {
"solar": {
"power": 3634,
"arrays": [
{
"array": 1,
"voltage": 109.6,
"current": 1.5,
"power": 3533
},
{
"array": 2,
"voltage": 426.7,
"current": 13.8,
"power": 832
}
]
},
"grid": {
"voltage": 189.4,
"current": 77.9,
"power": 17053,
"frequency": 50.26
},
"battery": {
"percent": 22,
"power": 379,
"temperature": 7.2
},
"consumption": {
"power": 33627
},
"inverter": {
"temperature": 0.2,
"power": -9984,
"output_voltage": 225.5,
"output_frequency": 50.16,
"eps_power": 64755
}
},
"today": {
"solar": 5190.3,
"grid": {
"import": 3814.8,
"export": 7184.3
},
"battery": {
"charge": 311.5,
"discharge": 8626.8
},
"consumption": 2322.7
},
"total": {
"solar": 1730.7,
"grid": {
"import": 4372,
"export": 1752.7
},
"battery": {
"charge": 704.3,
"discharge": 704.3
},
"consumption": -2249.1
}
}
]
}
Received response:
Request failed with error:
Site
Get Your Sites
requires authentication
Retrieves a list of your sites
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/site?page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/site"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/site'
params = {
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/site',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 619,
"name": "Jeremy Hill",
"account": "jmorgan",
"date_created": "1987-09-06",
"country": "ICELAND",
"timezone": "GMT",
"latitude": 79.284177,
"longitude": 1.10994,
"type": "SINGLE_PHASE",
"products": []
},
{
"id": 620,
"name": "Tyler James",
"account": "julie69",
"date_created": "2005-08-03",
"country": "ANGOLA",
"timezone": "GMT",
"latitude": 22.101047,
"longitude": 165.168636,
"type": "THREE_PHASE",
"products": []
}
]
}
Received response:
Request failed with error:
Get Single Site by ID
requires authentication requires site read permission
Gather a single site's information
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/site/1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/site/1"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/site/1'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/site/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 621,
"name": "Jeremy Hill",
"account": "brichards",
"date_created": "1987-09-06",
"country": "ICELAND",
"timezone": "GMT",
"latitude": 79.284177,
"longitude": 1.10994,
"type": "SINGLE_PHASE",
"products": []
}
}
Received response:
Request failed with error:
Smart Device
Device
Get Your Smart Devices
requires authentication
List the smart devices registered to your account
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/smart-device?page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/smart-device"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/smart-device'
params = {
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/smart-device',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"uuid": "df7b611f-fca6-4153-b6fd-3ed8b5201846",
"alias": "veniam",
"other_data": {
"graph_color": "#f0c27c",
"hardware_id": "P",
"local_key": "J"
}
},
{
"uuid": "109e226f-7446-444f-90b0-3787c0df7502",
"alias": "a",
"other_data": {
"graph_color": "#3d2fa3",
"hardware_id": "O",
"local_key": "F"
}
}
]
}
Received response:
Request failed with error:
Create Smart Device
requires authentication
Register a new smart device to your account
Example request:
curl --request POST \
"https://api.givenergy.cloud/v1/smart-device" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"serial_number\": \"consequatur\",
\"alias\": \"consequatur\",
\"product_name\": \"consequatur\",
\"manufacturer\": \"consequatur\",
\"other_data\": []
}"
const url = new URL(
"https://api.givenergy.cloud/v1/smart-device"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"serial_number": "consequatur",
"alias": "consequatur",
"product_name": "consequatur",
"manufacturer": "consequatur",
"other_data": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/smart-device'
payload = {
"serial_number": "consequatur",
"alias": "consequatur",
"product_name": "consequatur",
"manufacturer": "consequatur",
"other_data": []
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.givenergy.cloud/v1/smart-device',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'serial_number' => 'consequatur',
'alias' => 'consequatur',
'product_name' => 'consequatur',
'manufacturer' => 'consequatur',
'other_data' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"uuid": "146b2b94-d0ac-4745-8580-700c04ba1394",
"alias": "iste",
"other_data": {
"graph_color": "#22c331",
"hardware_id": "e",
"local_key": "/"
}
},
{
"uuid": "cb136ccf-d352-4ab6-9b85-a276031a749d",
"alias": "totam",
"other_data": {
"graph_color": "#6ff903",
"hardware_id": "I",
"local_key": "r"
}
}
]
}
Received response:
Request failed with error:
Get Smart Device by ID
requires authentication
Get a smart device's information
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/smart-device/consequatur" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/smart-device/consequatur"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/smart-device/consequatur'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/smart-device/consequatur',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"uuid": "e2ba285c-dd4a-4c08-9dae-a7aded1dfe19",
"alias": "veniam",
"other_data": {
"graph_color": "#f0c27c",
"hardware_id": "P",
"local_key": "J"
}
},
{
"uuid": "565b1c65-fe00-412e-bbae-28596f0c696b",
"alias": "rerum",
"other_data": {
"graph_color": "#d76b2c",
"hardware_id": "!",
"local_key": "{"
}
}
]
}
Received response:
Request failed with error:
Data
Get Smart Device Data Points by ID
requires authentication
Get a list of a smart device's data points
Example request:
curl --request GET \
--get "https://api.givenergy.cloud/v1/smart-device/66529e01-d113-3473-8d6f-9e11e09332ea/data?page=1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.givenergy.cloud/v1/smart-device/66529e01-d113-3473-8d6f-9e11e09332ea/data"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/smart-device/66529e01-d113-3473-8d6f-9e11e09332ea/data'
params = {
'page': '1',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.givenergy.cloud/v1/smart-device/66529e01-d113-3473-8d6f-9e11e09332ea/data',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"time": "2018-08-10T20:39:08Z",
"power": 489
},
{
"time": "1982-11-26T12:07:16Z",
"power": 342
}
]
}
Received response:
Request failed with error:
Create Smart Device Data Point
requires authentication
Store a data point against a smart device
Example request:
curl --request POST \
"https://api.givenergy.cloud/v1/smart-device/66529e01-d113-3473-8d6f-9e11e09332ea/data" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"time\": \"consequatur\",
\"power\": 17
}"
const url = new URL(
"https://api.givenergy.cloud/v1/smart-device/66529e01-d113-3473-8d6f-9e11e09332ea/data"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"time": "consequatur",
"power": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://api.givenergy.cloud/v1/smart-device/66529e01-d113-3473-8d6f-9e11e09332ea/data'
payload = {
"time": "consequatur",
"power": 17
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.givenergy.cloud/v1/smart-device/66529e01-d113-3473-8d6f-9e11e09332ea/data',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'time' => 'consequatur',
'power' => 17,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"time": "1979-12-21T12:02:15Z",
"power": 622
},
{
"time": "2002-05-20T16:09:07Z",
"power": 453
}
]
}
Received response:
Request failed with error:
Changelog
v1.10.2 (2023-05-12)
- Endpoints
- Get Account Dongles by ID
- Fixed
inverter.connections.batteries
not being present in the response data
- Fixed
- Get Account Dongles by ID
- Meta
- Fixed
inverter.connections.batteries
not being present in the response examples for the following endpoints:- Get Account Dongles by ID
- Get Your Communication Devices
- Get Communication Device Information by Serial Number
- Fixed
v1.10.1 (2022-12-06)
- Meta
- Improved documentation generation techniques
- There was a surprising amount of backend work required to make these changes - if you spot anything wrong, please let us know!
- Added the ability to further group endpoints inside groups (subgroups)
- Included subgroups for several endpoints
- Changelog section is now shown in the side bar
- Renamed 'Remote Control' section to 'Remote Control Codes'
- Improved documentation generation techniques
v1.10.0 (2022-11-23)
- Endpoints
- Inverter Control Read/Write Multiple
- Added a maximum length of 1000 to the
inverter_serials
body parameter
- Added a maximum length of 1000 to the
- Smart Device
- Fixed example responses
- Inverter Control Read/Write Multiple
v1.9.3 (2022-09-26)
- Endpoints
- Get Communication Device by Serial Number
- Fixed an issue where the device's inverter and batteries were not being returned
- Get Communication Device by Serial Number
v1.9.2 (2022-07-11)
- Endpoints
- All With Inverter Data
- The response data
last_online
andlast_updated
properties now return the correct time
- The response data
- All With Inverter Data
v1.9.1 (2022-07-06)
- Endpoints
- Get Your Sites
- The response data
account
property now returns the correct value
- The response data
- Get Your Sites
v1.9.0 (2022-06-27)
- Endpoints
- Modify Preset
- The response data now includes the relevant error code if the command fails
- Modify Preset
v1.8.0 (2022-05-09)
- Endpoints
- Energy Flow Data
- Added Get Energy Flow Data endpoint
- Get Inverter Data
- Added additional validation for the
date
query parameter - Improved data point timezone resolution for certain historical data
- Added additional validation for the
- Energy Flow Data
- Meta
- Added
datetime
data type - Renamed
json
data type toobject
to avoid type ambiguity
- Added
v1.7.0 (2022-05-03)
- Endpoints
- Get Your Sites
- Added
site_id
to the response data for each site
- Added
- Site Data Endpoints
products
now correctly returns an array of objects instead of a single object
- Get Your Sites
v1.6.0 (2022-04-19)
-
Endpoints
- Inverter Control
- Added Modify Setting (Multiple) and Read Setting (Multiple) endpoints
- Account
- Added Get Account Dongles by ID endpoint
- Inverter Control
-
Meta
- Added Remote Control section
v1.5.2 (2022-04-04)
- Endpoints
- Some With Timestamps
- Fixed timestamps displaying as Zulu time but actually being local system time
- Some With Timestamps
v1.5.1 (2022-03-08)
- Endpoints
- All With Pagination
- Fixed
pageSize
URL parameter not being respected correctly
- Fixed
- All With Pagination
v1.5.0 (2022-03-08)
- Endpoints
- Get Data Points
- Added
inverter.temperature
,inverter.power
,inverter.output_voltage
,inverter.output_temperature
andinverter.eps_power
to the response data
- Added
- Get Data Points
v1.4.1 (2022-03-08)
- Endpoints
- Get Communication Device Information by Serial Number
- Fixed erroneous 404 response for some account types
- Get Communication Device Information by Serial Number
v1.4.0 (2022-03-04)
- Endpoints
- Get Latest System Data
- Fixed
battery.temperature
showing inverter temperature - Added
inverter.temperature
,inverter.power
,inverter.output_voltage
,inverter.output_frequency
,inverter.eps_power
to the response data
- Fixed
- Get Your Account Children & Get Account Children By ID
- Fixed documentation showing single object as response instead of array of objects
- Get Account Children Information by ID
- Specified that the
account
parameter is the account ID
- Specified that the
- All With Pagination
- Updated pagination
page
andpageSize
query parameters type tointeger
instead ofstring
- Updated pagination
- Get Your Communication Devices
- Added missing paginated badge
- Get Latest System Data
v1.3.1 (2022-03-03)
- Endpoints
- Get Data Points
- Removed erroneous
time
parameter - Clarified that the
date
parameter assumes the inverter's local time
- Removed erroneous
- Get Data Points
v1.3.0 (2022-03-02)
- Endpoints
- All With Date/Time Response Values
- Date/time response values are now ISO8601 formatted (or null, where applicable)
- All With Date/Time Response Values
v1.2.0 (2022-02-28)
- Endpoints
- Inverter Data
- All Data Endpoints
- Fixed rounding errors on decimal values
- Fixed some properties always returning null
- Get Latest System Data
- Removed
grid.import
/grid.export
, replaced withgrid.power
(these values were always returning null) - Removed
battery.charge
/battery.charge
, replaced withbattery.power
(these values were always returning null)
- Removed
- All Data Endpoints
- Inverter Control
- Fixed some users not being able to read/write settings
- Inverter Data
v1.1.0 (2022-02-24)
-
Endpoints
- Inverter Control
- Get Setting Presets
- Added
parameters
property to response data
- Added
- Read/Modify Setting
- Removed erroneous
id
URL Parameter
- Removed erroneous
- Get Setting Presets
- Inverter Control
-
Meta
- Added Request Parameters Section
- Moved Validation Errors from Response Format to Request Parameters
- Added dynamically validated Badge
v1.0.0 (2022-02-21)
Initial Release
-
Endpoints
- Added Account Endpoints
- Get Your Account Information
- Get Account Information by ID
- Get Account Information by Username
- Get Your Account Children Information
- Get Account Children Information by ID
- Added Communication Device Endpoints
- Get Your Communication Devices
- Get Communication Device Information by Serial Number
- Added Inverter Control Endpoints
- Get Setting Presets
- Modify Preset
- Get Settings List
- Read Setting
- Write Setting
- Added Inverter Data Endpoints
- Get Latest System Data
- Get Latest Meter Data
- Get Events
- Get Data Points
- Added Site Endpoints
- Get Your Sites
- Get Single Site by ID
- Added Smart Device Endpoints
- Get Your Smart Devices
- Create Smart Device
- Get Smart Device by ID
- Create Smart Device Data Point
- Get Smart Device Data Points by ID
- Added Account Endpoints
-
Meta
- Added Introduction Section
- Added Authentication Requests Section
- Added Headers Section
- Added Badges Section
- Added Response Codes Section
- Added Response Format Section
- Added Data Types Section