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

# Advanced Onboarding

> Decompose onboarding into initialise + enrol when you need to do work between the two steps

`onboard` covers the standard flow in a single call. If you need to do work between site creation and enrolment, you can call the constituent endpoints — `initialise` and `enrol` — separately.

## How it works

The flow splits into two API calls:

1. **Initialise** — creates/upserts the site and assets, and returns eligibility information. No enrolment side effects.
2. **Enrol** — the commitment point. Allows scheduling and begins market participation.

<Accordion title="View sequence diagram">
  ```mermaid theme={null}
  %%{init: {'theme': 'neutral'}}%%
  sequenceDiagram
      participant Client
      participant Axle API

      Note over Client,Axle API: Step 1: Initialise
      Client->>Axle API: POST /entities/site/initialise
      Axle API-->>Client: site_id, asset_ids, eligibility

      Note over Client: Review eligibility internally

      Note over Client,Axle API: Step 2: Enrol
      Client->>Axle API: POST /entities/site/{site_id}/enrol
      Axle API-->>Client: {status: "enrolled"}

      alt Flex Lite
          Client->>Axle API: POST /entities/asset/{asset_id}/event/plug-in-schedule
          Axle API-->>Client: Returns modified charging schedule
      else Smart Charging
          Client->>Axle API: POST /entities/asset/{asset_id}/event/intent
          Client->>Axle API: POST /entities/asset/{asset_id}/event/plug-in
          Axle API-->>Client: OCPP SetChargingProfile (async)
      end
  ```
</Accordion>

Reach for this flow if you need to do something between site creation and enrolment. Otherwise, most use cases should be covered by `onboard`.

<Tip>
  To reverse enrolment, use the [`unenrol`](/workflows/flex-lite/api-reference/unenrol) endpoint — this stops the specified proposition without deleting the site, leaving other propositions and the option for the *same* user to re-enrol later intact. To remove the site entirely, use [`offboard`](/workflows/flex-lite/api-reference/offboard) instead.
</Tip>

<CardGroup cols={3}>
  <Card title="Initialise" icon="rectangle-terminal" href="/workflows/flex-lite/api-reference/initialise">
    Create/upsert site and assets
  </Card>

  <Card title="Enrol" icon="rectangle-terminal" href="/workflows/flex-lite/api-reference/enrol">
    Enrol site in a proposition
  </Card>

  <Card title="Unenrol" icon="rectangle-terminal" href="/workflows/flex-lite/api-reference/unenrol">
    Unenrol from a proposition
  </Card>
</CardGroup>
