> ## 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.

# Migrating to Smart Charging

> Upgrade from Flex Lite to Smart Charging for full schedule control and higher revenue

If you've already integrated Flex Lite and want to unlock higher revenue and full schedule optimisation, this guide covers exactly what changes when upgrading to Smart Charging.

## Why upgrade?

| | Flex Lite | Smart Charging |
| - | - | - |
| **Scheduling model** | Inserts pauses into *your* schedule | Axle generates the *entire* schedule |
| **Optimisation window** | Single 30-min pause | Full charging session |
| **Re-scheduling** | One-shot (at plug-in) | Continuous — Axle re-optimises as prices change |
| **Revenue potential** | Lower | Higher — more flexible capacity to sell |

> [!TIP]
>
> Smart Charging maximises flexibility revenue because Axle controls the full charging window, not just a single pause.

## What changes

> [accordion] What's added
>
> * **Tariff data** — send the user's energy tariff so Axle can cost-optimise charging
> * **Intent** — send the user's energy requirement (kWh) and ready-by time, which sets the minimum requirements for the schedule Axle will build
> * **Separate plug-in / plug-out events** — replace the combined `plug-in-schedule` call so Axle knows the charging window
> * **Schedule endpoint** — Axle calls your API with an OCPP schedule payload whenever a new schedule is generated
> * **Half-hourly readings** — report consumption so Axle can verify delivery and calculate rewards

> [accordion] What's removed
>
> * **`plug-in-schedule` endpoint** — replaced by separate plug-in event + async schedule delivery
> * **Schedule in API response** — schedules arrive via a call to your API with an OCPP schedule payload, not in the plug-in response

> [accordion] What stays the same
>
> * **Authentication** — same OAuth token flow
> * **Site & asset model** — same entities, same IDs
> * **Onboarding** — same `onboard-site-and-asset` (or advanced `initialise` / `enrol`) flow, though Smart Charging uses the `full_asset_schedule_control` proposition instead of `limited_pause`
> * **Offboarding** — same `offboard-site-and-assets` endpoint
> * **Payments** — same rewards and transaction endpoints

## Integration steps

These are the changes you need to make on top of your existing Flex Lite integration. For full detail on each step, see the [Smart Charging integration guide](https://docs.axle.energy/workflows/smart-charging/integration.md).

### 1. Send tariff data

Axle needs the user's energy tariff to optimise charging cost. Send it once at enrolment time, then update whenever the tariff changes.

> [card] [Send tariff](https://docs.axle.energy/workflows/smart-charging/api-reference/tariff.md)
>
> Send or update a user's tariff

### 2. Collect and send intent

Collect the user's charging requirement and deadline:

* **kWh** — how much energy to add
* **Ready-by time** — when the vehicle needs to be ready

Send intent once at enrolment time, then update whenever it changes.

> [card] [Send intent](https://docs.axle.energy/workflows/smart-charging/api-reference/intent.md)
>
> Send or update a user's charging intent

### 3. Replace plug-in-schedule with separate events

Instead of a single `plug-in-schedule` call that returns a schedule synchronously, send separate plug-in and plug-out events. Schedules are delivered asynchronously in OCPP format via an API call to your endpoint.

> [card] [Plug-in event](https://docs.axle.energy/workflows/smart-charging/api-reference/plug-in.md)
>
> Notify Axle when a vehicle plugs in

> [card] [Plug-out event](https://docs.axle.energy/workflows/smart-charging/api-reference/plug-out.md)
>
> Notify Axle when a vehicle unplugs

> [!NOTE]
>
> You should also send a plug event when a user is first enrolled to inform Axle of the initial plug state.

### 4. Set up schedule endpoint

Axle sends charging schedules to your platform in OCPP format via an API call. You need to expose an endpoint that can receive and apply these schedules to the charger.

Axle will send a schedule:

* When the user plugs in
* When the user is already plugged in and one of the following events happens:
  * The user's tariff is updated
  * The user's intent changes
  * Axle reoptimises in response to changes in the wider market

> [card] [Example OCPP charging profile](https://docs.axle.energy/api-reference/examples/get-example-ocpp-charging-profile.md)
>
> See the format of schedule pushes from Axle

### 5. Report half-hourly readings

Send consumption readings so Axle can verify delivery and calculate rewards.

> [card] [Send readings](https://docs.axle.energy/workflows/smart-charging/api-reference/readings.md)
>
> Report asset consumption readings

### 6. Enrol users in Smart Charging

Once the above integration work is complete, you can start enabling users. Enrol them in the `full_asset_schedule_control` proposition via the [enrol endpoint](https://docs.axle.energy/workflows/flex-lite/api-reference/enrol.md):

```json theme={null}
{
  "proposition": "full_asset_schedule_control"
}
```

> [!TIP]
>
> Sites can be enrolled in multiple propositions simultaneously, so this won't affect the existing Flex Lite enrolment. Once you've verified Smart Charging is working, unenrol from `limited_pause` via the [unenrol endpoint](https://docs.axle.energy/workflows/flex-lite/api-reference/unenrol.md) to keep things clean and avoid ambiguity.

## Sequence diagram

> [accordion] View end-to-end flow for smart charging integration
>
> ```mermaid theme={null}
> %%{init: {'theme': 'neutral'}}%%
> sequenceDiagram
>     participant Charger
>     participant Your API
>     participant Axle API
>
>     Note over Your API,Axle API: One-time setup per user
>     Your API->>Axle API: POST /entities/site/{site_id}/enrol<br/>{proposition: "full_asset_schedule_control"}
>     Axle API-->>Your API: {status: "enrolled"}
>
>     Your API->>Axle API: POST /entities/asset/{asset_id}/event/tariff
>     Axle API-->>Your API: 200 OK
>
>     Note over Charger,Axle API: Each charging session
>     Charger->>Your API: User plugs in
>     Your API->>Axle API: POST /entities/asset/{asset_id}/event/plug-in
>     Axle API-->>Your API: OCPP SetChargingProfile
>     Your API->>Charger: Apply schedule
>
>     Note over Charger,Axle API: Schedule may be re-sent if<br/>tariff or intent changes, or Axle reoptimises
>
>     Charger->>Your API: User unplugs
>     Your API->>Axle API: POST /entities/asset/{asset_id}/event/plug-out
>
>     Note over Your API,Axle API: Reporting
>     Your API->>Axle API: POST /data/readings<br/>(half-hourly consumption)
>
>     Note over Your API,Axle API: User offboarding
>     Your API->>Axle API: POST /entities/site/{site_id}/unenrol
>     Axle API-->>Your API: {"site_id": "...", "status": "unenrolled"}
> ```

## Migration checklist

Use this to track your migration progress:

**1. Send tariff data**

Send each user's tariff to Axle.

**2. Collect and send intent**

Add UI to collect kWh requirement and ready-by time, and send via the intent endpoint.

**3. Replace plug-in-schedule with separate events**

Switch from `plug-in-schedule` to separate `plug-in` and `plug-out` event calls.

**4. Set up schedule endpoint**

Expose an endpoint to receive and apply OCPP charging profiles from Axle.

**5. Report half-hourly readings**

Report consumption data via the readings endpoint.

**6. Test end-to-end**

Run a full charging session through the sandbox to verify the integration.

**7. Enrol users in Smart Charging**

Enrol each user in `full_asset_schedule_control`. Once verified, unenrol from `limited_pause`.

## Next steps

> [card] [Smart Charging integration guide](https://docs.axle.energy/workflows/smart-charging/integration.md)
>
> Full integration walkthrough

> [card] [Smart Charging API Reference](https://docs.axle.energy/workflows/smart-charging/api-reference/auth.md)
>
> Complete API documentation

> [card] [OCPP example](https://docs.axle.energy/api-reference/examples/get-example-ocpp-charging-profile.md)
>
> Example charging profile payload


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