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

# Get CPO provisioning status

GET https://host.com/ocpi/cpos/{cpo_id}/status

Lightweight poll endpoint for the async create flow. Returns the current state (PENDING / PROVISIONING / READY / FAILED), the workflow run id for debugging, and `error` when the workflow terminated unsuccessfully.

Reference: https://docs.ocpplab.com/api-reference/ocpplab-gateway-api/ocpi/ocpi-cpos/get-status

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: OCPPLab SDK
  version: 1.0.0
paths:
  /ocpi/cpos/{cpo_id}/status:
    get:
      operationId: get-status
      summary: Get CPO provisioning status
      description: >-
        Lightweight poll endpoint for the async create flow. Returns the current
        state (PENDING / PROVISIONING / READY / FAILED), the workflow run id for
        debugging, and `error` when the workflow terminated unsuccessfully.
      tags:
        - subpackage_ocpiCpos
      parameters:
        - name: cpo_id
          in: path
          description: >-
            CPO identifier. Backed by `ocpp.partner_operations.id` (string,
            positive integer).
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Status retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CpoStatusResponse'
        '401':
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '403':
          description: Insufficient permissions or missing required claims
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '404':
          description: CPO not found
          content:
            application/json:
              schema:
                description: Any type
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
servers:
  - url: https://host.com
    description: Default
components:
  schemas:
    CpoProvisioningStatus:
      type: string
      enum:
        - PENDING
        - PROVISIONING
        - READY
        - FAILED
      description: Durable provisioning states the status endpoint can report.
      title: CpoProvisioningStatus
    ProvisioningErrorDetail:
      type: object
      properties:
        code:
          type: string
          description: >-
            Stable machine-readable identifier for the failure class. Safe to
            branch on. Known codes grow over time; unknown codes should be
            treated as `unknown_error`.
        message:
          type: string
          description: >-
            Human-readable explanation of what went wrong. Trimmed to ~2000
            chars so DB writes stay predictable.
        step:
          type:
            - string
            - 'null'
          description: >-
            Durable-workflow step name that failed, when the failure handler can
            attribute it. Example: `charger-1-0-02`.
        param:
          type:
            - string
            - 'null'
          description: >-
            Request parameter responsible for the failure, when applicable (e.g.
            an invalid `ocpp_version` override).
        doc_url:
          type:
            - string
            - 'null'
          description: URL pointing at a reference page for this failure code.
        retryable:
          type: boolean
          default: false
          description: >-
            True when a fresh request (same payload) has a reasonable chance of
            succeeding. False for deterministic validation-type failures.
      required:
        - code
        - message
      description: >-
        Structured failure detail returned alongside a FAILED provisioning
        status.


        Populated on any async-provisioning status endpoint (CPO bundle, bulk

        locations, charger deployment) when the final state is ``FAILED``.

        Designed so clients can branch on ``code`` programmatically instead of

        regex-matching a string, and so ``retryable`` tells them whether a

        fresh attempt is likely to help.
      title: ProvisioningErrorDetail
    ProvisioningProgress:
      type: object
      properties:
        current_step:
          type:
            - string
            - 'null'
          description: >-
            Name of the durable workflow step that last wrote to this row.
            Coarse today (e.g. `mark-provisioning` stays set across the whole
            per-charger fan-out); more granular markers planned.
      description: >-
        Mid-workflow progress snapshot exposed on async-provisioning status
        endpoints.


        Populated while ``status`` is ``PROVISIONING`` so a polling client

        can tell which phase is currently active. Left null when the

        workflow hasn't started yet (PENDING with no step recorded) or for

        rows created before per-step progress existed.


        ``current_step`` is the granular field shipping today. Reserved for

        future extension: ``chargers_ready`` / ``chargers_total`` once the

        fan-out service wires counts through.
      title: ProvisioningProgress
    CpoStatusResponse:
      type: object
      properties:
        cpo_id:
          type: string
        status:
          $ref: '#/components/schemas/CpoProvisioningStatus'
        workflow_run_id:
          type:
            - string
            - 'null'
        error:
          oneOf:
            - $ref: '#/components/schemas/ProvisioningErrorDetail'
            - type: 'null'
          description: >-
            Populated when status=FAILED. Clients can branch on `error.code` and
            use `error.retryable` to decide whether to re-submit.
        progress:
          oneOf:
            - $ref: '#/components/schemas/ProvisioningProgress'
            - type: 'null'
          description: >-
            Mid-workflow progress snapshot while status=PROVISIONING. Null for
            PENDING rows and legacy rows with no step history.
        provisioned_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        status_url:
          type: string
      required:
        - cpo_id
        - status
        - status_url
      description: Shape returned by `GET /ocpi/cpos/{id}/status`.
      title: CpoStatusResponse
    HttpErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message returned by the API.
      required:
        - detail
      description: Standard HTTP error payload returned by the API.
      title: HttpErrorResponse
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationErrorCtx:
      type: object
      properties: {}
      title: ValidationErrorCtx
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
        input:
          description: Any type
        ctx:
          $ref: '#/components/schemas/ValidationErrorCtx'
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

```

## Examples



**Response**

```json
{
  "cpo_id": "101",
  "status": "PROVISIONING",
  "status_url": "/ocpi/cpos/101/status",
  "workflow_run_id": "wfr_01HK3TPDX...",
  "progress": {
    "current_step": "mark-provisioning"
  },
  "created_at": "2026-04-21T20:00:00Z",
  "updated_at": "2026-04-21T20:00:05Z"
}
```

**SDK Code**

```python
import requests

url = "https://host.com/ocpi/cpos/42/status"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://host.com/ocpi/cpos/42/status';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://host.com/ocpi/cpos/42/status"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpi/cpos/42/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://host.com/ocpi/cpos/42/status")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://host.com/ocpi/cpos/42/status', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://host.com/ocpi/cpos/42/status");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpi/cpos/42/status")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```