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

# Tutorial

> Onboard a site and pull your first price curve

This tutorial walks you through onboarding your first site with a flexible asset (EV charger, battery, or heat pump) and retrieving a price curve. By the end, you'll have a complete setup ready for price-based optimization.

```mermaid theme={null}
sequenceDiagram
    participant Client
    participant Axle API

    Note over Client,Axle API: Step 1: Onboard
    Client->>Axle API: POST /entities/site/onboard-site-and-asset
    Axle API-->>Client: Returns site_id & asset_id

    Note over Client,Axle API: Step 2: Retrieve price curves
    loop Ongoing optimization
        Client->>Axle API: GET /entities/site/{site_id}/price-curve
        Axle API-->>Client: Returns half-hourly prices
        Note over Client: Optimize asset using price signals
    end

    Note over Client,Axle API: Step 3: Send asset readings
    loop Each settlement period
        Client->>Axle API: POST /data/readings
        Axle API-->>Client: 200 OK
    end

    Note over Client,Axle API: Step 4: Offboard (when needed)
    alt Consumer withdraws consent or moves house
        Client->>Axle API: POST /entities/site/{site_id}/offboard-site-and-assets
        Axle API-->>Client: Site and assets removed
    end
```

## Prerequisites

* An Axle API token (see [Authentication](./api-reference/auth))
* A valid MPAN (electricity meter number) - use the [Find MPAN workflow](/workflows/find-mpan) if needed
* Permission for Axle to [retrieve boundary meter data](/tutorial/telemetry#obtaining-boundary-meter-data) for the site on your behalf
* Basic site information (address, postcode)
* The ability to send half-hourly asset consumption readings (see [Step 3](#step-3-send-asset-readings))

## Step 1: Onboard your site and assets

The onboarding endpoint creates a site, asset, and dispatch consent in a single atomic operation. This ensures your setup is complete and ready for price-responsive operations.

<Card title="Onboard site and asset" icon="rectangle-terminal" href="./api-reference/onboard">
  View the OpenAPI spec with interactive request examples and response schemas.
</Card>

### Example requests by asset type

<AccordionGroup>
  <Accordion title="EV Charger">
    Note that we do not require an explicit dispatch consent for price-curve based operation, so the `dispatch_methods` array is empty.

    ```json theme={null}
    {
      "site": {
        "mpan": "1234567890123",
        "postcode": "SW1A 1AA",
        "street_address": "10 Downing Street",
        "gave_boundary_meter_consent_at": "2025-01-01T12:00:00Z"
      },
      "asset": {
        "external_id": "charger-001",
        "type": "charger",
        "properties": {
          "power_kw": 7.4
        }
      },
      "dispatch_consent": {
        "dispatch_methods": []
      }
    }
    ```
  </Accordion>

  <Accordion title="Battery">
    Note that we do not require an explicit dispatch consent for price-curve based operation, so the `dispatch_methods` array is empty.

    ```json theme={null}
    {
      "site": {
        "mpan": "1234567890123",
        "postcode": "SW1A 1AA",
        "street_address": "10 Downing Street",
        "gave_boundary_meter_consent_at": "2025-01-01T12:00:00Z"
      },
      "asset": {
        "external_id": "battery-001",
        "type": "battery",
        "properties": {
          "power_kw": 5.0,
          "capacity_kwh": 13.5
        }
      },
      "dispatch_consent": {
        "dispatch_methods": []
      }
    }
    ```
  </Accordion>

  <Accordion title="Heat Pump">
    Note that we do not require an explicit dispatch consent for price-curve based operation, so the `dispatch_methods` array is empty.

    ```json theme={null}
    {
      "site": {
        "mpan": "1234567890123",
        "postcode": "SW1A 1AA",
        "street_address": "10 Downing Street",
        "gave_boundary_meter_consent_at": "2025-01-01T12:00:00Z"
      },
      "asset": {
        "external_id": "heatpump-001",
        "type": "heat_pump",
        "properties": {
          "power_kw": 3.5,
          "cop": 3.2
        }
      },
      "dispatch_consent": {
        "dispatch_methods": []
      }
    }
    ```
  </Accordion>
</AccordionGroup>

The API returns `site.id` and `asset.id` values - **save the `site.id`** for the next step.

For more granular control of sites and assets, see the full [Sites API Reference](/api-reference/entities/site/get).

## Step 2: Retrieve the price curve

Once you're site is onboarded, we will register it in the market. Once registered, you can start pulling half-hourly price curves to inform your optimization.

<Note>
  We'll only populate the price curve once the asset is registered in the market; we will not expose prices until the
  asset is able to earn revenue. This typically takes **5 working days**.
</Note>

<Card title="Get site price curve" icon="rectangle-terminal" href="./api-reference/price-curve">
  View the full API documentation with request examples and response schemas.
</Card>

<Info>
  **Price curve timing**

  * **Current day prices**: Available from the current settlement period until 23:00 UK time
  * **Next day prices**: Available from 14:00 UK time
  * **Update frequency**: Check for new prices after 14:00 for next-day optimization
</Info>

## Step 3: Send asset readings

Asset readings are required for every Price Curve integration. Axle uses your half-hourly consumption readings to verify that flexibility was delivered, calculate settlement against the price curve, and reconcile revenue back to your asset.

<Card title="Send asset readings" icon="rectangle-terminal" href="./api-reference/readings">
  Post half-hourly consumption readings for each onboarded asset.
</Card>

The accepted reading types vary by asset (charge power, state of charge, inverter power, temperature, etc.). See [Asset and boundary metering](/tutorial/telemetry) for the full list per asset type and the alternative ways to deliver readings (push to our API, or have us poll yours).

<Note>
  Readings must be submitted by the end of SD+1 (the day after the settlement date). A common approach is to send all readings for a given settlement date at 16:00 the following day. Late or missing readings reduce the revenue we can claim against the price curve for those periods.
</Note>

## Step 4: Offboard sites and assets

When a consumer withdraws consent or disconnects the asset, you should offboard the site to cleanly remove it and all associated assets from the Axle platform.

<Card title="Offboard site and assets" icon="rectangle-terminal" href="./api-reference/offboard">
  View the API documentation for offboarding sites and their associated assets.
</Card>

The offboarding endpoint removes the site and all associated assets in a single operation, ensuring:

* All dispatch consents are revoked
* Market positions are closed out appropriately
* Asset and site data is archived according to retention policies

**More granular control of assets** is available via the [Assets API](/api-reference/entities/asset).
We offer a comprehensive API for asset management, including adding/removing individual assets and updating dispatch consents.
