> ## Documentation Index
> Fetch the complete documentation index at: https://dynamo-csms.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sites API — Manage Physical Charging Locations

> Create and manage physical charging sites, link chargers to locations, add energy assets like solar or battery, and query live site summaries.

The sites API lets you model your physical infrastructure. Each site represents a location — a car park, depot, or forecourt — with a defined power capacity. You can link chargers to sites, attach energy assets, and retrieve a live summary of everything connected at that location.

## Create a site

`POST /api/v1/sites`

<ParamField body="name" type="string" required>
  Display name for the site (e.g. "King Street Depot").
</ParamField>

<ParamField body="address" type="string" required>
  Full street address of the site.
</ParamField>

<ParamField body="max_power_kw" type="number" required>
  Maximum available grid power in kilowatts. Smart charging uses this value as the ceiling for load balancing.
</ParamField>

<ParamField body="lat" type="number" required>
  Latitude in decimal degrees.
</ParamField>

<ParamField body="lng" type="number" required>
  Longitude in decimal degrees.
</ParamField>

```bash theme={null}
curl -X POST "https://api.dynamo-csms.com/api/v1/sites" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "King Street Depot",
    "address": "14 King Street, Manchester, M2 6AQ",
    "max_power_kw": 150,
    "lat": 53.4808,
    "lng": -2.2426
  }'
```

```json theme={null}
{
  "site_id": "site_01HZ4K8XVPQR3TY5N6M",
  "name": "King Street Depot",
  "address": "14 King Street, Manchester, M2 6AQ",
  "max_power_kw": 150,
  "lat": 53.4808,
  "lng": -2.2426,
  "created_at": "2024-06-01T09:00:00Z",
  "charger_count": 0
}
```

<ResponseField name="site_id" type="string" required>
  Unique identifier for the created site.
</ResponseField>

<ResponseField name="name" type="string">
  Display name of the site.
</ResponseField>

<ResponseField name="address" type="string">
  Full street address.
</ResponseField>

<ResponseField name="max_power_kw" type="number">
  Configured grid power ceiling in kilowatts.
</ResponseField>

<ResponseField name="lat" type="number">
  Latitude.
</ResponseField>

<ResponseField name="lng" type="number">
  Longitude.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of when the site was created.
</ResponseField>

<ResponseField name="charger_count" type="number">
  Number of chargers currently linked to this site.
</ResponseField>

***

## List sites

`GET /api/v1/sites`

Returns all sites in your organisation.

<ParamField query="limit" type="number" default="50">
  Maximum number of sites to return. Max 200.
</ParamField>

<ParamField query="offset" type="number" default="0">
  Pagination offset.
</ParamField>

```bash theme={null}
curl "https://api.dynamo-csms.com/api/v1/sites?limit=10&offset=0" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "sites": [
    {
      "site_id": "site_01HZ4K8XVPQR3TY5N6M",
      "name": "King Street Depot",
      "address": "14 King Street, Manchester, M2 6AQ",
      "max_power_kw": 150,
      "lat": 53.4808,
      "lng": -2.2426,
      "charger_count": 8,
      "created_at": "2024-06-01T09:00:00Z"
    }
  ],
  "total": 1,
  "limit": 10,
  "offset": 0
}
```

***

## Get a site

`GET /api/v1/sites/{site_id}`

<ParamField path="site_id" type="string" required>
  The unique identifier of the site.
</ParamField>

```bash theme={null}
curl "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

***

## Update a site

`PATCH /api/v1/sites/{site_id}`

All fields are optional. Only the fields you include will be updated.

<ParamField path="site_id" type="string" required>
  The unique identifier of the site.
</ParamField>

<ParamField body="name" type="string">
  New display name.
</ParamField>

<ParamField body="address" type="string">
  New address.
</ParamField>

<ParamField body="max_power_kw" type="number">
  Updated power ceiling. Smart charging rebalances automatically when this changes.
</ParamField>

<ParamField body="lat" type="number">
  Updated latitude.
</ParamField>

<ParamField body="lng" type="number">
  Updated longitude.
</ParamField>

```bash theme={null}
curl -X PATCH "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"max_power_kw": 200}'
```

***

## Delete a site

`DELETE /api/v1/sites/{site_id}`

<Warning>
  Deleting a site does not delete the chargers linked to it. Chargers are unlinked and remain in your fleet.
</Warning>

<ParamField path="site_id" type="string" required>
  The unique identifier of the site.
</ParamField>

```bash theme={null}
curl -X DELETE "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Returns `204 No Content` on success.

***

## Link a charger to a site

`POST /api/v1/sites/{site_id}/chargers/{charge_point_id}/link`

Associates a charger with a site so it participates in site-level power management and reporting.

<ParamField path="site_id" type="string" required>
  The site to link the charger to.
</ParamField>

<ParamField path="charge_point_id" type="string" required>
  The OCPP identity of the charger.
</ParamField>

```bash theme={null}
curl -X POST "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M/chargers/CP-001/link" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "site_id": "site_01HZ4K8XVPQR3TY5N6M",
  "charge_point_id": "CP-001",
  "linked_at": "2024-06-01T10:15:00Z"
}
```

***

## Unlink a charger from a site

`DELETE /api/v1/sites/{site_id}/chargers/{charge_point_id}`

<ParamField path="site_id" type="string" required>
  The site to unlink the charger from.
</ParamField>

<ParamField path="charge_point_id" type="string" required>
  The OCPP identity of the charger.
</ParamField>

```bash theme={null}
curl -X DELETE "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M/chargers/CP-001" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Returns `204 No Content` on success.

***

## Get site summary

`GET /api/v1/sites/{site_id}/summary`

Returns a live overview of the site, including charger statuses and current power draw.

<ParamField path="site_id" type="string" required>
  The unique identifier of the site.
</ParamField>

```bash theme={null}
curl "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M/summary" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "site_id": "site_01HZ4K8XVPQR3TY5N6M",
  "name": "King Street Depot",
  "max_power_kw": 150,
  "current_power_kw": 87.4,
  "chargers": {
    "total": 8,
    "online": 7,
    "charging": 5,
    "available": 2,
    "faulted": 1
  },
  "active_sessions": 5,
  "energy_assets": [
    {
      "asset_id": "asset_9XM3T",
      "type": "solar",
      "capacity_kw": 50,
      "current_output_kw": 22.1
    }
  ]
}
```

<ResponseField name="site_id" type="string">
  Site identifier.
</ResponseField>

<ResponseField name="max_power_kw" type="number">
  Configured power ceiling.
</ResponseField>

<ResponseField name="current_power_kw" type="number">
  Total power currently being drawn across all chargers at this site.
</ResponseField>

<ResponseField name="chargers" type="object">
  <Expandable title="properties">
    <ResponseField name="total" type="number">Total chargers linked to the site.</ResponseField>
    <ResponseField name="online" type="number">Chargers with an active OCPP connection.</ResponseField>
    <ResponseField name="charging" type="number">Chargers with an active charging session.</ResponseField>
    <ResponseField name="available" type="number">Chargers ready to accept a session.</ResponseField>
    <ResponseField name="faulted" type="number">Chargers reporting a fault.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="energy_assets" type="object[]">
  Energy assets attached to this site and their current output.
</ResponseField>

***

## Add an energy asset

`POST /api/v1/sites/{site_id}/energy-assets`

Attach a solar panel array, battery storage unit, or other energy asset to the site. Assets are factored into smart charging allocation calculations.

<ParamField path="site_id" type="string" required>
  The site to add the asset to.
</ParamField>

<ParamField body="type" type="string" required>
  Asset type. Accepted values: `solar`, `battery`, `wind`, `generator`.
</ParamField>

<ParamField body="name" type="string" required>
  A human-readable label for the asset.
</ParamField>

<ParamField body="capacity_kw" type="number" required>
  Rated capacity of the asset in kilowatts.
</ParamField>

<ParamField body="metadata" type="object">
  Optional key/value pairs for custom asset data (e.g., manufacturer, model).
</ParamField>

```bash theme={null}
curl -X POST "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M/energy-assets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "solar",
    "name": "Rooftop PV Array",
    "capacity_kw": 50,
    "metadata": {
      "manufacturer": "SunPower",
      "install_date": "2023-03-15"
    }
  }'
```

```json theme={null}
{
  "asset_id": "asset_9XM3T",
  "site_id": "site_01HZ4K8XVPQR3TY5N6M",
  "type": "solar",
  "name": "Rooftop PV Array",
  "capacity_kw": 50,
  "created_at": "2024-06-01T11:00:00Z"
}
```

***

## List energy assets

`GET /api/v1/sites/{site_id}/energy-assets`

<ParamField path="site_id" type="string" required>
  The site to list assets for.
</ParamField>

```bash theme={null}
curl "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M/energy-assets" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

***

## Update an energy asset

`PUT /api/v1/sites/{site_id}/energy-assets/{asset_id}`

<ParamField path="site_id" type="string" required>
  The site the asset belongs to.
</ParamField>

<ParamField path="asset_id" type="string" required>
  The unique identifier of the asset.
</ParamField>

<ParamField body="name" type="string">
  Updated display name.
</ParamField>

<ParamField body="capacity_kw" type="number">
  Updated rated capacity.
</ParamField>

<ParamField body="metadata" type="object">
  Updated metadata key/value pairs.
</ParamField>

```bash theme={null}
curl -X PUT "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M/energy-assets/asset_9XM3T" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"capacity_kw": 60}'
```

***

## Delete an energy asset

`DELETE /api/v1/sites/{site_id}/energy-assets/{asset_id}`

<ParamField path="site_id" type="string" required>
  The site the asset belongs to.
</ParamField>

<ParamField path="asset_id" type="string" required>
  The unique identifier of the asset to remove.
</ParamField>

```bash theme={null}
curl -X DELETE "https://api.dynamo-csms.com/api/v1/sites/site_01HZ4K8XVPQR3TY5N6M/energy-assets/asset_9XM3T" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Returns `204 No Content` on success.
