> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Enrollment

> Connect page that shows a VPP enrollment's state and timeline, and where the user leaves the program.

This page shows the state of a program enrollment, and it is where the user leaves the program. It is reached from [VPP summary](/docs/energy-api/reference/connect/vpp/summary.md) with `ENROLLMENT`.

While the enrollment is active, the user can ask to leave. Connect asks them to confirm and shows `earned_to_date`. The request then waits for the VPP operator's approval, for `notice_days` at the longest, and hosted Connect reads "Your request to leave is with Pick. It can take up to 30 days." A pending request to join or leave can be cancelled.

> [tab] Active
>
> ![](https://mintcdn.com/flatpeak-d495c19e/2B6nWUU4-c2pSD3E/images/busbar/connect/vpp-enrollment-status-active.png?fit=max\&auto=format\&n=2B6nWUU4-c2pSD3E\&q=85\&s=51a79427a96cb4c1b6bbb1a05b572412)

> [tab] Leaving
>
> ![](https://mintcdn.com/flatpeak-d495c19e/2B6nWUU4-c2pSD3E/images/busbar/connect/vpp-enrollment-status-leaving.png?fit=max\&auto=format\&n=2B6nWUU4-c2pSD3E\&q=85\&s=b951b88f96fd63787c5cc61036d0c6db)

> [tab] Progress
>
> ![](https://mintcdn.com/flatpeak-d495c19e/2B6nWUU4-c2pSD3E/images/busbar/connect/vpp-enrollment-status-actions.png?fit=max\&auto=format\&n=2B6nWUU4-c2pSD3E\&q=85\&s=cf76095cfecae6618c6f8454aa0804cd)

> [tab] Code
>
> ```json Connect response highlight={33} theme={"system"}
> {
>     "connect_session": "cos_6587fa4362341be5b524de3b",
>     "route": "enrollment",
>     "live_mode": true,
>     "actions": [
>         "UNENROLL",
>         "CANCEL_UNENROLLMENT",
>         "ENROLL",
>         "BACK",
>         "CLOSE"
>     ],
>     "data": {
>         "device_type": "BATTERY_STORAGE",
>         "location": {
>             "timezone": "America/Denver",
>             "currency_code": "USD"
>         },
>         "operator": {
>             "id": "opr_8587fa49c7e5297ccc6c57e5",
>             "display_name": "Pick",
>             "logo_url": "https://s.flatpeak.com/83b06a60e38c2.png",
>             "support_email": "help@pick.com"
>         },
>         "program": {
>             "id": "vpr_6a1f8e375db9de605baadd46",
>             "display_name": "Community Powershare",
>             "url": "https://pick.com/programs/community-powershare"
>         },
>         "earned_to_date": 402.27,
>         "notice_days": 30,
>         "enrollment": {
>             "id": "enr_7c2f1a9e4b0d8f3a6e2c5d10",
>             "enrollment_state": "LEAVING",
>             "enrollment_step": "UNENROLLING",
>             "enrollment_state_timeline": [
>                 {
>                     "state": "LEAVING",
>                     "step": "UNENROLLING",
>                     "step_status": "IN_PROGRESS",
>                     "description": "Your request to leave is with Pick. It can take up to 30 days.",
>                     "time_expected": null,
>                     "time_occurred": "2026-05-02T11:12:21Z"
>                 },
>                 {
>                     "state": "ENDED",
>                     "step": "UNENROLLED",
>                     "step_status": "PENDING",
>                     "description": "Your device is no longer dispatching.",
>                     "time_expected": "2026-06-01T11:12:21Z",
>                     "time_occurred": null
>                 }
>             ]
>         }
>     }
> }
> ```
>
> ```bash Your POST to Connect (leave) theme={"system"}
> curl --request POST \
>   --url https://connect.flatpeak.com \
>   --header 'Content-Type: application/json' \
>   --data '{
>   "connect_session": "cos_6587fa4362341be5b524de3b",
>   "route": "enrollment",
>   "action": "UNENROLL"
> }'
> ```
>
> #### Actions
>
> The `actions` array lists the ones available in the enrollment's current state.
>
> | Action | Result |
> | :- | :- |
> | `UNENROLL` | Asks to leave the program. The request waits for the VPP operator's approval. Offered while the enrollment is active. |
> | `CANCEL_UNENROLLMENT` | Cancels a pending request to leave. |
> | `ENROLL` | Asks to join the program, or to join it again. |
> | `BACK` | Returns the previous page. If there is none, returns `callback_url`. |
> | `CLOSE` | Returns the `callback_url` set on the Connect session. |
>
> #### The `data` object
>
> | Field | Description |
> | :- | :- |
> | `earned_to_date` | Total rewards the user has earned from this program, in `location.currency_code`. Show it when the user confirms leaving. |
> | `notice_days` | Maximum number of days the VPP operator may take to approve a request to leave, from the `terms` the enrollment joined with. An unanswered request ends when they have passed. |
> | `enrollment.enrollment_state` | The current state. |
> | `enrollment.enrollment_step` | The current step. |
> | `enrollment.enrollment_state_timeline` | Completed steps, the current step (`step_status` `IN_PROGRESS`) and the steps expected to follow, in order. |
>
> #### Timeline entries
>
> | Field | Description |
> | :- | :- |
> | `state` | The state the step belongs to: `PENDING`, `ACTIVE`, `SUSPENDED`, `LEAVING`, `ENDED` or `REJECTED`. |
> | `step` | The step, for example `AWAITING_TARIFF` or `UNENROLLING`. See [enrollment states](/docs/energy-api/guides/vpp/enrollment-states.md) for every step and the message to show. |
> | `step_status` | `COMPLETE`, `IN_PROGRESS`, `PENDING`, `SKIPPED` or `FAILED`. |
> | `description` | Text to show the user. |
> | `time_occurred` | When the step was reached, RFC 3339. Set for `COMPLETE` and `IN_PROGRESS` steps, `null` otherwise. |
> | `time_expected` | When a `PENDING` step is expected, RFC 3339. `null` when there is no estimate. |
> | `suspension_reasons` | Why the enrollment is suspended. Present and non-empty only when `step` is `SUSPENDED`. |
>
> Render entries in the order returned, and do not sort by date, because a `PENDING` step may have no date.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.