- Preview
- Code

{
"connect_session": "cos_6587fa4362341be5b524de3b",
"route": "consent",
"live_mode": false,
"actions": [
"ALLOW",
"DENY",
"BACK",
"CLOSE"
],
"data": {
"device_type": "BATTERY_STORAGE",
"location": {
"timezone": "Europe/London",
"currency_code": "GBP"
},
"operator": {
"id": "opr_65de3024be51ded101a3a555",
"display_name": "EDF",
"logo_url": "https://s.flatpeak.com/1ded101a3a555.png"
},
"account": {
"id": "acc_661677911f2197045e6cf1b1",
"display_name": "Nova Inc"
},
"required_scopes":
[
"TELEMETRY",
"CONTROL",
"LOCATION"
]
}
}
curl --request POST \
--url https://connect.flatpeak.com \
--header 'Content-Type: application/json' \
--data '{
"connect_session": "cos_6587fa4362341be5b524de3b",
"route": "consent",
"action": "ALLOW"
}'
Actions
| Action | Result |
|---|---|
ALLOW | Accepts the required scopes. |
DENY | Declines the required scopes. |
BACK | Returns the previous page. |
CLOSE | Returns the callback_url set on the Connect session. |
Consent display
Show each scope inrequired_scopes with the name and description below, word for word unless your legal team advises otherwise.| Scope | Display name | Description |
|---|---|---|
TELEMETRY | Device information | Allow access to your devices’ information, such as their configuration, capacity, performance, and charge levels. |
CONTROL | Device management | Allow access to your devices’ operating settings and plans for charging and dispatch. |
LOCATION | Location | Allow access to your devices’ precise and approximate location data for location-based services. |
SETTINGS | Device settings | Allow reading and updating your devices’ operating settings. |
Errors
| Error code | Description |
|---|---|
action_invalid | The selected action is not valid. |
data_json_invalid | Data does not conform to the JSON schema. |

