> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ocpplab.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ocpplab.io/_mcp/server.

# Long-running operations

Deploying chargers and sending them commands takes longer than one HTTP request should wait. These calls return **202 Accepted** at once and finish in the background. Each operation's description in the [API Reference](/api-reference) names what to poll.

| You called                                                                                 | Then poll                                                                      | Until                                                             |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ----------------------------------------------------------------- |
| `evcharger.location.create`, `evcharger.deploymentRuntimeOps.operate` with a `location_id` | `evcharger.deploymentRuntimeOps.status({ identity: [...] })`                   | every `stage` is `online`, or an `outcome` is `failed` or `stuck` |
| any `evcharger.commands.*`                                                                 | `evcharger.commands.getStatus({ command_id })` for each `results[].command.id` | `status` is `applied`, `rejected`, `expired` or `failed`          |
| `emsp.commands.send`                                                                       | `emsp.commands.get` with the returned tracking id                              | the command has a final result                                    |
| `proxy.commands.sendOcpp`, `proxy.commands.sendOcpi`                                       | `proxy.commands.getOcppStatus`, `proxy.commands.getOcpiResult`                 | the command has a final result                                    |

## Polling well

* Poll every 2 to 5 seconds, and stop at a deadline you choose.
* A `404` from `commands.getStatus` means the charger has not received the command yet. Keep polling.
* When a deployment's `outcome` is `stuck`, read its `hint`, then call `evcharger.deploymentRuntimeOps.diagnostics` and read `verdict` and `notes`.

> **Note**
>
> Prefer events to polling? Register a [webhook](/api-reference) for the event types you need.

## Retries and 202s

The SDKs send a `POST` that can act twice only once, even after a `503`: the first attempt may already have deployed the charger. Check the status before you retry it yourself. See [Errors and retries](/sdks/errors-and-retries).