Commands
Send control commands to chargers
POST /chargers/{charger_id}/sockets/{socket_id}/start Start a charging session
Dispatches an OCPP 1.6 RemoteStartTransaction for the selected numeric connector. A synchronous response reports the charger's command status; later session and charging records provide evidence that charging began.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required | |
wait | query | boolean | When true, wait for and interpret the charger's action-specific OCPP acknowledgement before returning. When false, return the submitted command immediately with `202` and `status: pending`; this beta API does not provide a command polling endpoint or a later command-result webhook for that path. | |
timeout | query | integer | Maximum seconds to wait for the charger acknowledgement when `wait=true`. Expiry produces `status: timeout`; persistence or Redis failures are server errors, not timeouts. |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
id_tag | string | required | Exact OCPP 1.6 driver/card identifier authorizing the session. The value is sent unchanged and must use the shared Ampr UID character set. |
Responses
200 Synchronous charger reply received; inspect data.status for acceptance or rejection
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending (async mode or sync timeout)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
400 Invalid JSON body or invalid id_tag type, length, or characters application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
422 Connector state or stored charger protocol does not permit this OCPP 1.6 remote start application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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
Dispatches an OCPP 1.6 RemoteStopTransaction using the selected socket's current active session and exact OCPP transaction ID. A synchronous reply reports command status; later session and charging records provide evidence that charging stopped.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required | |
wait | query | boolean | When true, wait for and interpret the charger's action-specific OCPP acknowledgement before returning. When false, return the submitted command immediately with `202` and `status: pending`; this beta API does not provide a command polling endpoint or a later command-result webhook for that path. | |
timeout | query | integer | Maximum seconds to wait for the charger acknowledgement when `wait=true`. Expiry produces `status: timeout`; persistence or Redis failures are server errors, not timeouts. |
Responses
200 Synchronous charger reply received; inspect data.status for acceptance or rejection
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
422 No matching active OCPP 1.6 current session with an integer transaction ID, or the stored charger protocol does not permit this command path application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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)
Dispatches an OCPP 1.6 UnlockConnector command for the selected numeric connector. A synchronous reply reports the charger's command status.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required | |
wait | query | boolean | When true, wait for and interpret the charger's action-specific OCPP acknowledgement before returning. When false, return the submitted command immediately with `202` and `status: pending`; this beta API does not provide a command polling endpoint or a later command-result webhook for that path. | |
timeout | query | integer | Maximum seconds to wait for the charger acknowledgement when `wait=true`. Expiry produces `status: timeout`; persistence or Redis failures are server errors, not timeouts. |
Responses
200 Synchronous charger reply received; inspect data.status for acceptance or rejection
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
422 Stored charger protocol does not permit this OCPP 1.6 command path application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | When true, wait for and interpret the charger's action-specific OCPP acknowledgement before returning. When false, return the submitted command immediately with `202` and `status: pending`; this beta API does not provide a command polling endpoint or a later command-result webhook for that path. | |
timeout | query | integer | Maximum seconds to wait for the charger acknowledgement when `wait=true`. Expiry produces `status: timeout`; persistence or Redis failures are server errors, not timeouts. |
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 | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending (async mode or sync timeout)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | When true, wait for and interpret the charger's action-specific OCPP acknowledgement before returning. When false, return the submitted command immediately with `202` and `status: pending`; this beta API does not provide a command polling endpoint or a later command-result webhook for that path. | |
timeout | query | integer | Maximum seconds to wait for the charger acknowledgement when `wait=true`. Expiry produces `status: timeout`; persistence or Redis failures are server errors, not timeouts. |
Responses
200 Command accepted (sync mode)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending (async mode or sync timeout)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | When true, wait for and interpret the charger's action-specific OCPP acknowledgement before returning. When false, return the submitted command immediately with `202` and `status: pending`; this beta API does not provide a command polling endpoint or a later command-result webhook for that path. | |
timeout | query | integer | Maximum seconds to wait for the charger acknowledgement when `wait=true`. Expiry produces `status: timeout`; persistence or Redis failures are server errors, not timeouts. |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
type | enum
| required |
Responses
200 Command accepted
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | When true, wait for and interpret the charger's action-specific OCPP acknowledgement before returning. When false, return the submitted command immediately with `202` and `status: pending`; this beta API does not provide a command polling endpoint or a later command-result webhook for that path. | |
timeout | query | integer | Maximum seconds to wait for the charger acknowledgement when `wait=true`. Expiry produces `status: timeout`; persistence or Redis failures are server errors, not timeouts. |
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 | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
202 Command pending (async mode or sync timeout)
| Property | Type | Required | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Command | A submitted charger command. A terminal status reports the command's OCPP acknowledgement, not completion of the requested physical action. Session, socket and firmware-status resources provide subsequent outcome evidence. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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 | ||
code | string | Stable machine-readable problem code, present on problems a client is expected to branch on (for example `org_payments_not_ready`, `driver_erased`, `token_already_linked`, `payment_method_not_active`, `idempotency_key_required`, `idempotency_key_reused`, `provider_unavailable`, `publishable_key_not_configured`). |
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();