flow VPP.
- Overview
- Settings
- VPP Event Manage
- VPP Event Opt-out
- Code




{
"connect_session": "cos_6587fa4362341be5b524de3b",
"route": "vpp_summary",
"live_mode": true,
"actions": [
"CONNECT_TARIFF",
"CHANGE_PERIOD",
"REWARDS",
"ENROLLMENT",
"OPT_OUT",
"PERSONAL_DETAILS",
"PROGRAMS",
"BACK",
"CLOSE"
],
"data": {
"device_type": "BATTERY_STORAGE",
"tariff_connected": false,
"location": {
"timezone": "America/Denver",
"currency_code": "USD"
},
"program": {
"operator": { "id": "opr_8587fa49c7e5297ccc6c57e5", "display_name": "Pick" },
"id": "vpr_6a1f8e375db9de605baadd46",
"display_name": "Community Powershare",
"url": "https://pick.com/programs/community-powershare",
"enrollment_state": "SUSPENDED",
"terms": { "opt_out_policy": "ALLOWED" }
},
"upcoming_event": {
"vpp_event_id": "vpe_7d2a4c6e9b1f3a5c8e0d2f4b",
"start_time": "2026-08-25T18:00:00Z",
"end_time": "2026-08-25T20:00:00Z",
"event_type": "ECONOMIC",
"opt_out_allowed": true,
"opted_out": false
},
"performance": {
"period_type": "MONTH",
"period_start": "2025-02-01",
"period_end": "2025-02-28",
"available_period_types": [
"DAY",
"MONTH",
"YEAR"
],
"has_previous": true,
"has_next": false,
"dispatched_kwh": 54.7,
"series": [
{
"date": "2025-02-01",
"dispatched_kwh": 5.15
},
{
"date": "2025-02-02",
"dispatched_kwh": 2.57
},
{
"date": "2025-02-03",
"dispatched_kwh": 4.6
}
]
}
}
}
curl --request POST \
--url https://connect.flatpeak.com \
--header 'Content-Type: application/json' \
--data '{
"connect_session": "cos_6587fa4362341be5b524de3b",
"route": "vpp_summary",
"action": "CHANGE_PERIOD",
"action_context": {
"period_type": "DAY",
"period_start": "2025-01-14"
}
}'
Tariff connection
Whentariff_connected is false, the program cannot price the device’s dispatch. Show the tariff prompt with CONNECT_TARIFF and disable enrollment. The rest of the page stays available.Actions
| Action | Result |
|---|---|
CONNECT_TARIFF | Starts the tariff connection flow. |
CHANGE_PERIOD | Changes the reporting period. Pass period_type and period_start in action_context. |
REWARDS | Returns Rewards. |
ENROLLMENT | Returns Enrollment. |
OPT_OUT | Opts the device out of the event in upcoming_event. Offered only when upcoming_event.opt_out_allowed is true. |
OPT_IN | Returns the device to the event the user skipped. Offered in place of OPT_OUT while upcoming_event.opted_out is true and the event’s allocation has not locked. |
PERSONAL_DETAILS | Returns Personal details, where the user updates their contact details. |
PROGRAMS | Returns Programs. |
BACK | Returns the previous page. If there is none, returns callback_url. |
CLOSE | Returns the callback_url set on the Connect session. |
Enrollment state
See enrollment states for every state and the message to show.NOT_ENROLLED is also returned, when the device has never enrolled in the program.Rewards
Your backend reads the same reward entries with list device rewards, so you can show earnings in your app outside Connect.Next event and opt-out
upcoming_event is the next scheduled or active VPP event for the device, or null. opt_out_allowed is true only while skipping is permitted, which follows terms.opt_out_policy and the event’s allocation lock.A skipped event earns nothing and is recorded as declined; it does not count as a failure. Your backend sees the same state through opt a device out of a VPP event and the OPTED_OUT delivery status.Suggested copy: title “Skip this event?”, body “Your battery won’t take part in this grid event, and you won’t earn from it. You stay enrolled in the program.”, confirm “Skip this event”, dismiss “Keep taking part”. Use the noun for the device type.Errors
| Error code | Description |
|---|---|
data_json_invalid | Data does not conform to the JSON schema. |

