Commands
Send control commands to chargers
POST /chargers/{charger_id}/sockets/{socket_id}/start Start a charging session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required | |
wait | query | boolean | Wait for charger response before returning | |
timeout | query | integer | Max seconds to wait for charger response (requires wait=true) |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
id_tag | string | required | Identifier of the user/card authorizing the session |
Responses
200 Command accepted (sync mode)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending (async mode or sync timeout)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
422 Request understood but cannot be processed (e.g., invalid state) application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X POST "https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/start" \
-H "Authorization: Bearer $AMPR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id_tag": "string"
}' const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/start', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id_tag": "string"
}),
});
const data = await res.json(); POST /chargers/{charger_id}/sockets/{socket_id}/stop Stop an active charging session
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required | |
wait | query | boolean | Wait for charger response before returning | |
timeout | query | integer | Max seconds to wait for charger response (requires wait=true) |
Responses
200 Command accepted (sync mode)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
422 Request understood but cannot be processed (e.g., invalid state) application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X POST "https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/stop" \
-H "Authorization: Bearer $AMPR_API_KEY" const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/stop', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
},
});
const data = await res.json(); POST /chargers/{charger_id}/sockets/{socket_id}/unlock Unlock a connector (release cable)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required | |
wait | query | boolean | Wait for charger response before returning | |
timeout | query | integer | Max seconds to wait for charger response (requires wait=true) |
Responses
200 Command accepted
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X POST "https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/unlock" \
-H "Authorization: Bearer $AMPR_API_KEY" const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/unlock', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
},
});
const data = await res.json(); POST /chargers/{charger_id}/sockets/{socket_id}/charging-profile Set a charging profile on a connector
Dispatches an OCPP 1.6 SetChargingProfile request setting a current limit on a connector. Used by Dynamic Load Balancing to enforce per-connector ceilings (TxDefaultProfile baseline or transaction-scoped TxProfile). The charging rate unit is amps; the profile pins a single phase (single-phase worst-case model).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required | |
wait | query | boolean | Wait for charger response before returning | |
timeout | query | integer | Max seconds to wait for charger response (requires wait=true) |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
limit_a | integer | required | Current ceiling in whole amps for the connector. 0 suspends an active session (a reversible pause). |
transaction_id | integer | OCPP transaction id. When present the profile is a transaction-scoped TxProfile; when absent it is a TxDefaultProfile baseline. |
Responses
200 Command accepted (sync mode)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending (async mode or sync timeout)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
422 Request understood but cannot be processed (e.g., invalid state) application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X POST "https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/charging-profile" \
-H "Authorization: Bearer $AMPR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit_a": 16,
"transaction_id": 0
}' const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/charging-profile', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"limit_a": 16,
"transaction_id": 0
}),
});
const data = await res.json(); POST /chargers/{charger_id}/sockets/{socket_id}/clear-charging-profile Clear the transaction charging profile on a connector
Dispatches an OCPP 1.6 ClearChargingProfile request removing the transaction-scoped TxProfile from a connector, filtered by `chargingProfilePurpose = TxProfile`. The managed TxDefaultProfile baseline is a different purpose and is intentionally spared, so the connector reverts to its baseline default rather than to no limit.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required | |
wait | query | boolean | Wait for charger response before returning | |
timeout | query | integer | Max seconds to wait for charger response (requires wait=true) |
Responses
200 Command accepted (sync mode)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending (async mode or sync timeout)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X POST "https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/clear-charging-profile" \
-H "Authorization: Bearer $AMPR_API_KEY" const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example/clear-charging-profile', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
},
});
const data = await res.json(); POST /chargers/{charger_id}/reset Reset a charger (soft or hard)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
wait | query | boolean | Wait for charger response before returning | |
timeout | query | integer | Max seconds to wait for charger response (requires wait=true) |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
type | enum
| required |
Responses
200 Command accepted
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X POST "https://api.ampr.dev/v1/chargers/chg_example/reset" \
-H "Authorization: Bearer $AMPR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "Soft"
}' const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/reset', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"type": "Soft"
}),
});
const data = await res.json(); GET /chargers/{charger_id}/firmware Read current firmware-update status
Returns the charger's most recent firmware-update state, driven by inbound OCPP FirmwareStatusNotification messages. `firmware_update_status` is null until the charger reports progress.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required |
Responses
200 Current firmware-update state
| Property | Type | Required | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | FirmwareStatus | ||||||||||||||||||
| |||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X GET "https://api.ampr.dev/v1/chargers/chg_example/firmware" \
-H "Authorization: Bearer $AMPR_API_KEY" const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/firmware', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
},
});
const data = await res.json(); POST /chargers/{charger_id}/firmware Push a firmware update to a charger
Dispatches an OCPP 1.6 UpdateFirmware request telling the charger to fetch and install a firmware image from `location`. Ampr never fetches the URL; the charger dereferences it. Progress is observed via FirmwareStatusNotification (see GET) and the `charger.firmware_status` webhook.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
wait | query | boolean | Wait for charger response before returning | |
timeout | query | integer | Max seconds to wait for charger response (requires wait=true) |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
location | stringformat: uri | required | Absolute http(s) URL the charger fetches the firmware image from. |
retrieveDate | stringformat: date-time | When the charger should start retrieving the firmware. | |
retries | integer | Number of download retry attempts. | |
retryInterval | integer | Seconds between retry attempts. |
Responses
200 Command accepted (sync mode)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending (async mode or sync timeout)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
422 Request understood but cannot be processed (e.g., invalid state) application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X POST "https://api.ampr.dev/v1/chargers/chg_example/firmware" \
-H "Authorization: Bearer $AMPR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"location": "https://firmware.example.com/rolec/v2.1.bin",
"retrieveDate": "2026-01-01T00:00:00Z",
"retries": 0,
"retryInterval": 0
}' const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/firmware', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"location": "https://firmware.example.com/rolec/v2.1.bin",
"retrieveDate": "2026-01-01T00:00:00Z",
"retries": 0,
"retryInterval": 0
}),
});
const data = await res.json();