Skip to main content
A user enrolls a device in a VPP program through Connect. The enrollment attaches to the device and records the user’s consent. After that, your backend acts on webhooks.

Requirements

Programs

VPP operators create the programs. Flatpeak offers a device the live programs that match its location, device type, the program’s rules, and the finest sampling interval your account declares in the Console. A paused program shows only to devices already enrolled in it. Read what a device can join with list VPP programs. Four parts of the program decide what an enrollment commits you to. Each entry in terms.rewards pays its rate, in the program’s currency_code, on one basis: FIXED per calendar period, EVENT per event delivered in full, DELIVERED_KWH per kWh delivered, or COMMITTED_KWH per kWh of the device’s locked share of an event. Connect shows the rewards on the Join screen. The enrollment keeps a copy of the terms it joined with, under terms, and a later change to the program applies only to later enrollments.

Enroll in Connect

VPP uses the same sessions, launch and callback as the tariff flow.
  1. Create a Connect session with the device_id. Add operator_id to offer one VPP operator’s programs only.
  2. Start it with flow set to VPP: ?connect_session=<connect_session_id>&flow=VPP in a WebView, or "flow": "VPP" on the session_start route through the API.
  3. If you build your own UI, implement the VPP pages.
With flow=VPP, a user with an enrollment lands on VPP summary: review the program, see rewards, skip an event, or unenroll. A user without one lands on VPP Programs.

Managed tariffs

A managed tariff is listed on the Programs page, but the user signs up for it with the VPP operator and consents afterwards.
  1. The user selects the managed tariff. Connect returns session_redirect with redirect_type OPERATOR_SIGNUP. Open redirect_url in the system browser and close Connect. No enrollment exists yet.
  2. The user signs up on the VPP operator’s site.
  3. The VPP operator sends the user back to your app by universal link, with a new Connect session. Start it: Connect shows consent, then creates the enrollment.
Create a VPP enrollment does not accept a managed tariff; it returns 422 operator_signup_required.

After enrollment

Enrollment continues after the Connect session ends.
  1. Subscribe to the VPP events in Console > Webhooks.
  2. Send telemetry at the interval the device’s telemetry group sets.
  3. At step TESTING_DISPATCH, Flatpeak issues a short TEST event. Fetch it, confirm it and deliver it.
  4. From ACTIVE, follow the device’s instructions. See Dispatch.
Every state and step is on Enrollment states. Consent does not expire. consents on the device holds what each VPP operator is granted now, and consent history keeps every grant and revocation, each with an ID the VPP operator sees too.

Unenroll

The user unenrolls in Connect, or you call unenroll a device, and the enrollment moves to LEAVING at step UNENROLLING. The VPP operator then approves the request. It cannot refuse, and the enrollment ends within the notice_days of its terms at the latest. Unenroll before you delete a device. Delete a device returns 409 until the enrollment is ENDED or REJECTED.

History

An ended enrollment is kept, and a later enrollment is a separate object. At most one enrollment per device is non-terminal, and that is the current one. List VPP enrollments returns them all, most recent first.