For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
DocsAPI Reference
Dashboard
LogoLogo
DocsAPI Reference
  • OCPPLAB Gateway API
        • GETList locations in a network
        • POSTBulk-create OCPI locations (durable)
        • GETGet bulk location-create job status
        • GETGet OCPI location
        • DELDelete OCPI location
        • PATCHUpdate OCPI location
OCPPLAB Gateway APIOCPIOcpi Locations

Bulk-create OCPI locations (durable)

||View as Markdown|
POST
https://host.com/ocpi/cpos/:cpo_id/locations
POST
/ocpi/cpos/:cpo_id/locations
1import requests
2
3url = "https://host.com/ocpi/cpos/cpo_id/locations"
4
5payload = { "locations": [
6 {
7 "name": "Brussels Midi Hub",
8 "address": "Place Victor Horta 1",
9 "city": "Brussels",
10 "country": "BE",
11 "coordinates": {
12 "latitude": 50.8357,
13 "longitude": 4.3353
14 },
15 "public": True
16 }
17 ] }
18headers = {
19 "Authorization": "Bearer <token>",
20 "Content-Type": "application/json"
21}
22
23response = requests.post(url, json=payload, headers=headers)
24
25print(response.json())
1{
2 "job_id": "4f6b5e0e-7d1a-4b0a-9c2e-abc123456789",
3 "status": "PROVISIONING",
4 "status_url": "/ocpi/cpos/42/locations/jobs/4f6b5e0e-7d1a-4b0a-9c2e-abc123456789",
5 "workflow_run_id": "wfr_abc123"
6}
Kick off a durable bulk-create of OCPI locations under a CPO. Returns **202 Accepted** in under a second with a `job_id` and `status_url`. Each location's 10-table orchestration (OCPI rows, OCPP rows, topology, per-charger deployment + ECS) runs as a separate Upstash Workflow step with per-step retries on transient failure. Poll `GET {status_url}` every 1-2s until `status == READY` (or `FAILED`). Results include the created location ids.
Was this page helpful?
Previous

List locations in a network

Next

Get bulk location-create job status

Built with

Kick off a durable bulk-create of OCPI locations under a CPO. Returns 202 Accepted in under a second with a job_id and status_url. Each location’s 10-table orchestration (OCPI rows, OCPP rows, topology, per-charger deployment + ECS) runs as a separate Upstash Workflow step with per-step retries on transient failure. Poll GET {status_url} every 1-2s until status == READY (or FAILED). Results include the created location ids.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

cpo_idstringRequiredformat: "^\d+$"

CPO identifier — the stringified integer returned by POST /ocpi/cpos (backed by ocpp.partner_operations.id).

Request

This endpoint expects an object.
locationslist of objectsRequired

Response

Bulk location provisioning accepted; poll status_url

job_idstring
statusenum

State machine for the durable bulk-location async job.

Allowed values:
status_urlstring
workflow_run_idstring or null

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error