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

# OCPP 1.6 Commands — Start, Stop, and Control Sessions

> Send OCPP 1.6 commands to charge points: start and stop transactions, change availability, manage charging profiles, and trigger resets.

The OCPP 1.6 API lets you send standard OCPP 1.6 commands to any charge point connected to Dynamo CSMS. Commands are executed in real time over the existing OCPP WebSocket connection. All endpoints require an organization API key with the `write:charge_points` scope unless noted otherwise.

**Base URL:** `https://api.dynamo-csms.com`

***

## Send generic command

`POST /api/v1/ocpp16/send_command`

Sends any arbitrary OCPP 1.6 command to a charge point. Use the specific command endpoints below when available — this endpoint is intended for commands not covered by dedicated routes.

<ParamField body="charge_point_id" type="string" required>
  The target charge point's unique identifier.
</ParamField>

<ParamField body="command" type="string" required>
  OCPP 1.6 action name (e.g. `"GetConfiguration"`, `"ChangeConfiguration"`, `"GetLocalListVersion"`).
</ParamField>

<ParamField body="payload" type="object" required>
  Command-specific payload as defined in the OCPP 1.6 specification.
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/send_command \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "command": "GetConfiguration",
    "payload": {
      "key": ["HeartbeatInterval", "MeterValueSampleInterval"]
    }
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "command": "GetConfiguration",
  "status": "Accepted",
  "response": {
    "configurationKey": [
      {
        "key": "HeartbeatInterval",
        "readonly": false,
        "value": "30"
      },
      {
        "key": "MeterValueSampleInterval",
        "readonly": false,
        "value": "30"
      }
    ],
    "unknownKey": []
  },
  "sent_at": "2024-03-10T15:00:00Z",
  "response_time_ms": 218
}
```

<ResponseField name="status" type="string">
  OCPP response status from the charge point. Typically `Accepted`, `Rejected`, or `NotImplemented`.
</ResponseField>

<ResponseField name="response" type="object">
  Raw OCPP response payload from the charge point.
</ResponseField>

<ResponseField name="response_time_ms" type="integer">
  Round-trip latency in milliseconds between the API and the charge point.
</ResponseField>

***

## Remote start transaction

`POST /api/v1/ocpp16/remote_start_transaction`

Instructs the charge point to start a charging session on the specified connector, as if an RFID card with the given `id_tag` was presented at the hardware.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="id_tag" type="string" required>
  The RFID identifier or user token to authorize the session (max 20 characters).
</ParamField>

<ParamField body="connector_id" type="integer">
  Connector number to start on. If omitted, the charge point selects an available connector.
</ParamField>

<ParamField body="charging_profile" type="object">
  Optional OCPP `ChargingProfile` to apply to the session. Controls power limits and schedules.
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/remote_start_transaction \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "charge_point_id": "CP-SITE42-001",
      "id_tag": "RFID-USER-4A2F",
      "connector_id": 1
    }'
  ```

  ```python Python theme={null}
  import requests

  requests.post(
      "https://api.dynamo-csms.com/api/v1/ocpp16/remote_start_transaction",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={
          "charge_point_id": "CP-SITE42-001",
          "id_tag": "RFID-USER-4A2F",
          "connector_id": 1,
      },
  )
  ```
</CodeGroup>

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "connector_id": 1,
  "id_tag": "RFID-USER-4A2F",
  "status": "Accepted",
  "sent_at": "2024-03-10T15:05:00Z"
}
```

A status of `Accepted` means the charge point acknowledged the command. The session will start once the charge point sends a `StartTransaction` message — subscribe to webhooks or poll `active_transactions` to confirm.

***

## Remote stop transaction

`POST /api/v1/ocpp16/remote_stop_transaction`

Remotely stops an active charging session.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="transaction_id" type="integer" required>
  The OCPP transaction ID of the session to stop. Retrieve this from the active transactions endpoint.
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/remote_stop_transaction \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "transaction_id": 10042
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "transaction_id": 10042,
  "status": "Accepted",
  "sent_at": "2024-03-10T16:00:00Z"
}
```

***

## Change availability

`POST /api/v1/ocpp16/change_availability`

Changes the availability of a connector or the entire charge point.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="connector_id" type="integer" required>
  Connector to change. Use `0` to apply the change to all connectors on the charge point.
</ParamField>

<ParamField body="type" type="string" required>
  New availability state. Must be one of:

  * `"Operative"` — connector accepts new sessions
  * `"Inoperative"` — connector rejects new sessions (e.g. for maintenance)
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/change_availability \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "connector_id": 2,
    "type": "Inoperative"
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "connector_id": 2,
  "type": "Inoperative",
  "status": "Accepted",
  "sent_at": "2024-03-10T15:10:00Z"
}
```

If the connector is currently in a session, the charge point may return `"Scheduled"` — the change will take effect when the session ends.

***

## Set charging profile

`POST /api/v1/ocpp16/set_charging_profile`

Applies an OCPP charging profile to a connector to limit or schedule charging power.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="connector_id" type="integer" required>
  Target connector. Use `0` to set a charge-point-wide profile.
</ParamField>

<ParamField body="charging_profile" type="object" required>
  OCPP 1.6 `ChargingProfile` object.

  <Expandable title="charging_profile fields">
    <ParamField body="charging_profile.chargingProfileId" type="integer" required>
      Unique profile ID (chosen by you).
    </ParamField>

    <ParamField body="charging_profile.stackLevel" type="integer" required>
      Profile priority. Higher values take precedence.
    </ParamField>

    <ParamField body="charging_profile.chargingProfilePurpose" type="string" required>
      One of: `ChargePointMaxProfile`, `TxDefaultProfile`, `TxProfile`.
    </ParamField>

    <ParamField body="charging_profile.chargingProfileKind" type="string" required>
      One of: `Absolute`, `Recurring`, `Relative`.
    </ParamField>

    <ParamField body="charging_profile.chargingSchedule" type="object" required>
      Schedule definition including `chargingRateUnit` (`"A"` or `"W"`) and `chargingSchedulePeriod` array.
    </ParamField>
  </Expandable>
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/set_charging_profile \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "connector_id": 1,
    "charging_profile": {
      "chargingProfileId": 101,
      "stackLevel": 0,
      "chargingProfilePurpose": "TxDefaultProfile",
      "chargingProfileKind": "Absolute",
      "chargingSchedule": {
        "chargingRateUnit": "W",
        "chargingSchedulePeriod": [
          {"startPeriod": 0, "limit": 7400},
          {"startPeriod": 3600, "limit": 11000}
        ]
      }
    }
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "connector_id": 1,
  "charging_profile_id": 101,
  "status": "Accepted",
  "sent_at": "2024-03-10T15:15:00Z"
}
```

***

## Clear charging profile

`POST /api/v1/ocpp16/clear_charging_profile`

Removes a previously set charging profile from the charge point.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="id" type="integer">
  The `chargingProfileId` to remove. If omitted, all profiles matching the optional filter fields are cleared.
</ParamField>

<ParamField body="connector_id" type="integer">
  Limit clearing to a specific connector.
</ParamField>

<ParamField body="charging_profile_purpose" type="string">
  Limit clearing to profiles with this purpose.
</ParamField>

<ParamField body="stack_level" type="integer">
  Limit clearing to profiles at this stack level.
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/clear_charging_profile \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "id": 101
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "status": "Accepted",
  "sent_at": "2024-03-10T15:20:00Z"
}
```

***

## Reset charge point

`POST /api/v1/ocpp16/reset`

Sends a reset command to the charge point.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="type" type="string" required>
  Reset type:

  * `"Soft"` — the charge point finishes active sessions before restarting
  * `"Hard"` — immediate restart, active sessions are terminated
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/reset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "type": "Soft"
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "type": "Soft",
  "status": "Accepted",
  "sent_at": "2024-03-10T15:25:00Z"
}
```

***

## Trigger message

`POST /api/v1/ocpp16/trigger_message`

Requests the charge point to send a specific OCPP message immediately, rather than waiting for its scheduled interval.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="requested_message" type="string" required>
  The OCPP message type to trigger. Valid values: `BootNotification`, `DiagnosticsStatusNotification`, `FirmwareStatusNotification`, `Heartbeat`, `MeterValues`, `StatusNotification`.
</ParamField>

<ParamField body="connector_id" type="integer">
  Required for `MeterValues` and `StatusNotification` — specifies which connector to trigger the message for.
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/trigger_message \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "requested_message": "StatusNotification",
    "connector_id": 1
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "requested_message": "StatusNotification",
  "status": "Accepted",
  "sent_at": "2024-03-10T15:30:00Z"
}
```

***

## Reserve connector

`POST /api/v1/ocpp16/reserve_now`

Places a reservation on a specific connector for a given user tag, preventing other users from starting sessions until the reservation expires or is cancelled.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="connector_id" type="integer" required>
  Connector to reserve. Must be `> 0`.
</ParamField>

<ParamField body="expiry_date" type="string" required>
  ISO 8601 datetime when the reservation expires (e.g. `"2024-03-10T17:00:00Z"`).
</ParamField>

<ParamField body="id_tag" type="string" required>
  RFID tag or user identifier that the reservation is for.
</ParamField>

<ParamField body="reservation_id" type="integer" required>
  A unique integer identifier for this reservation (chosen by you, used to cancel it later).
</ParamField>

<ParamField body="parent_id_tag" type="string">
  Optional parent RFID tag for group reservations.
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/reserve_now \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "connector_id": 1,
    "expiry_date": "2024-03-10T17:00:00Z",
    "id_tag": "RFID-USER-4A2F",
    "reservation_id": 5001
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "connector_id": 1,
  "reservation_id": 5001,
  "status": "Accepted",
  "expires_at": "2024-03-10T17:00:00Z",
  "sent_at": "2024-03-10T15:35:00Z"
}
```

Possible statuses from the charge point: `Accepted`, `Faulted`, `Occupied`, `Rejected`, `Unavailable`.

***

## Cancel reservation

`POST /api/v1/ocpp16/cancel_reservation`

Cancels an existing reservation on a charge point.

<ParamField body="charge_point_id" type="string" required>
  Target charge point identifier.
</ParamField>

<ParamField body="reservation_id" type="integer" required>
  The `reservation_id` of the reservation to cancel.
</ParamField>

```bash theme={null}
curl -X POST https://api.dynamo-csms.com/api/v1/ocpp16/cancel_reservation \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charge_point_id": "CP-SITE42-001",
    "reservation_id": 5001
  }'
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "reservation_id": 5001,
  "status": "Accepted",
  "sent_at": "2024-03-10T15:40:00Z"
}
```

***

## Get active transactions

`GET /api/v1/ocpp16/active_transactions/{charge_point_id}`

Returns all currently active charging transactions on the specified charge point.

<ParamField path="charge_point_id" type="string" required>
  The charge point to query.
</ParamField>

```bash theme={null}
curl https://api.dynamo-csms.com/api/v1/ocpp16/active_transactions/CP-SITE42-001 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Response `200 OK`**

```json theme={null}
{
  "charge_point_id": "CP-SITE42-001",
  "active_transactions": [
    {
      "transaction_id": 10042,
      "connector_id": 2,
      "id_tag": "RFID-USER-9B3E",
      "start_time": "2024-03-10T14:45:00Z",
      "meter_start": 10500,
      "current_meter_value": 11250,
      "energy_delivered_wh": 750,
      "duration_seconds": 900
    }
  ],
  "total": 1
}
```

<ResponseField name="meter_start" type="integer">
  Meter reading at session start in Wh.
</ResponseField>

<ResponseField name="current_meter_value" type="integer">
  Latest meter reading in Wh.
</ResponseField>

<ResponseField name="energy_delivered_wh" type="integer">
  Energy delivered in this session so far, in Wh.
</ResponseField>

***

## Get all charge point statuses

`GET /api/v1/ocpp16/charge_points/status`

Returns the current OCPP status of all charge points in your organization. Requires `read:charge_points` scope.

<ParamField query="status" type="string">
  Filter by OCPP status: `Available`, `Preparing`, `Charging`, `SuspendedEVSE`, `SuspendedEV`, `Finishing`, `Reserved`, `Unavailable`, `Faulted`.
</ParamField>

<ParamField query="page" type="integer">
  Page number (default: 1).
</ParamField>

<ParamField query="per_page" type="integer">
  Results per page (default: 50, max: 200).
</ParamField>

```bash theme={null}
curl "https://api.dynamo-csms.com/api/v1/ocpp16/charge_points/status?status=Faulted" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Response `200 OK`**

```json theme={null}
{
  "charge_points": [
    {
      "charge_point_id": "CP-SITE42-001",
      "online": true,
      "last_heartbeat_at": "2024-03-10T15:58:30Z",
      "connectors": [
        {
          "connector_id": 1,
          "status": "Available",
          "error_code": "NoError",
          "info": null,
          "timestamp": "2024-03-10T15:55:00Z"
        },
        {
          "connector_id": 2,
          "status": "Faulted",
          "error_code": "GroundFailure",
          "info": "Ground fault detected on connector 2",
          "timestamp": "2024-03-10T15:57:00Z"
        }
      ]
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 50
}
```

***

## Error responses

| Status | Code                   | Meaning                                                                   |
| ------ | ---------------------- | ------------------------------------------------------------------------- |
| `400`  | `validation_error`     | Missing or invalid request field                                          |
| `401`  | `unauthorized`         | Missing or invalid API key                                                |
| `403`  | `forbidden`            | Insufficient scope (`write:charge_points` required for command endpoints) |
| `404`  | `not_found`            | Charge point ID not found in your organization                            |
| `408`  | `timeout`              | Charge point did not respond within the timeout window (10s default)      |
| `422`  | `charge_point_offline` | Charge point is not currently connected via WebSocket                     |
| `422`  | `ocpp_rejected`        | Charge point returned `Rejected` — check charge point logs                |
| `429`  | `rate_limited`         | Too many commands — max 10 commands/second per charge point               |
