> 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 full documentation content, see https://docs.ocpplab.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ocpplab.com/_mcp/server.

# Create chargers in location (durable)

POST https://host.com/ocpp/locations/{location_id}/chargers
Content-Type: application/json

Create multiple charger deployments under the selected location. Returns **202 Accepted** in under a second once the job row is written; each charger is provisioned as its own durable Upstash Workflow step with per-step retries, so a 1000-charger batch completes without holding the HTTP connection open. Poll `GET {status_url}` every 1-2s until `status == READY` (or `FAILED`). The poll payload's `results` column returns the same `created` / `failed` shape the old synchronous endpoint used to return inline.

Reference: https://docs.ocpplab.com/api-reference/ocpplab-gateway-api/location-operations/location-chargers/create

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: OCPPLab SDK
  version: 1.0.0
paths:
  /ocpp/locations/{location_id}/chargers:
    post:
      operationId: create
      summary: Create chargers in location (durable)
      description: >-
        Create multiple charger deployments under the selected location. Returns
        **202 Accepted** in under a second once the job row is written; each
        charger is provisioned as its own durable Upstash Workflow step with
        per-step retries, so a 1000-charger batch completes without holding the
        HTTP connection open. Poll `GET {status_url}` every 1-2s until `status
        == READY` (or `FAILED`). The poll payload's `results` column returns the
        same `created` / `failed` shape the old synchronous endpoint used to
        return inline.
      tags:
        - subpackage_locationChargers
      parameters:
        - name: location_id
          in: path
          description: Internal location identifier returned by the location CRUD API.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '202':
          description: Bulk charger provisioning accepted; poll status_url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationChargerBulkAcceptedResponse'
        '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: Location not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '422':
          description: Duplicate charger identities in request body
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '503':
          description: Workflow queue unavailable
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ChargerGroup'
servers:
  - url: https://host.com
components:
  schemas:
    ChargerTemplate:
      type: object
      properties:
        brand_slug:
          type: string
        model_slug:
          type: string
        connector_type:
          type: string
        ocpp_version:
          type: string
          default: OCPP1.6
        ws_url:
          type: string
        identity_prefix:
          type:
            - string
            - 'null'
          description: Prepended to each identity suffix to form the full charger identity.
        template_name:
          type:
            - string
            - 'null'
          description: >-
            Base display name. Combined with the suffix as charge_point_name
            (e.g. 'Bay 001').
      required:
        - brand_slug
        - model_slug
        - connector_type
        - ws_url
      description: Shared charger properties applied to every charger in a group.
      title: ChargerTemplate
    ChargerGroup:
      type: object
      properties:
        template:
          $ref: '#/components/schemas/ChargerTemplate'
        charger_ids:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Explicit identity suffixes. Truncated to chargers_number when
            longer.
        chargers_number:
          type:
            - integer
            - 'null'
          description: >-
            Total chargers to create. Pads with random hex suffixes when
            charger_ids is shorter.
      required:
        - template
      description: >-
        One group of chargers sharing the same template.


        Provide ``charger_ids``, ``chargers_number``, or both:


        - ``charger_ids`` only — creates exactly those chargers.

        - ``chargers_number`` only — generates that many chargers with random
        hex suffixes.

        - Both — uses ``charger_ids`` first, pads with random hex to reach
        ``chargers_number``,
          or truncates ``charger_ids`` if longer than ``chargers_number``.
      title: ChargerGroup
    ChargerProvisioningStatus:
      type: string
      enum:
        - PENDING
        - PROVISIONING
        - READY
        - FAILED
      description: |-
        Terminal + in-flight states for async charger provisioning.

        Mirrors ``CpoProvisioningStatus`` so callers observe the same shape
        for both durable flows. ``PENDING`` is the transient state between
        the 202 response and the workflow's first webhook.
      title: ChargerProvisioningStatus
    LocationChargerBulkAcceptedResponse:
      type: object
      properties:
        job_id:
          type: string
        status:
          $ref: '#/components/schemas/ChargerProvisioningStatus'
        workflow_run_id:
          type:
            - string
            - 'null'
        status_url:
          type: string
      required:
        - job_id
        - status
        - status_url
      description: |-
        202 response from the async bulk-charger-create endpoint.

        Returned by ``POST /ocpp/locations/{location_id}/chargers`` before
        the workflow finishes provisioning ECS containers for each charger.
        Clients poll ``status_url`` until the state settles on ``READY`` or
        ``FAILED``.
      title: LocationChargerBulkAcceptedResponse
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

```

## SDK Code Examples

```python chargers_number=5 with 2 explicit ids — uses ids first, pads 3 with random hex
import requests

url = "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers"

payload = [
    {
        "template": {
            "brand_slug": "schneider",
            "model_slug": "evlink-pro-ac-22kw",
            "connector_type": "CCS2",
            "ws_url": "wss://ocpp.ocpplab.com",
            "ocpp_version": "OCPP1.6",
            "identity_prefix": "SITE_A_",
            "template_name": "Charger"
        },
        "charger_ids": ["001", "002"],
        "chargers_number": 5
    }
]
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript chargers_number=5 with 2 explicit ids — uses ids first, pads 3 with random hex
const url = 'https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '[{"template":{"brand_slug":"schneider","model_slug":"evlink-pro-ac-22kw","connector_type":"CCS2","ws_url":"wss://ocpp.ocpplab.com","ocpp_version":"OCPP1.6","identity_prefix":"SITE_A_","template_name":"Charger"},"charger_ids":["001","002"],"chargers_number":5}]'
};

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

```go chargers_number=5 with 2 explicit ids — uses ids first, pads 3 with random hex
package main

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

func main() {

	url := "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers"

	payload := strings.NewReader("[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Charger\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\"\n    ],\n    \"chargers_number\": 5\n  }\n]")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby chargers_number=5 with 2 explicit ids — uses ids first, pads 3 with random hex
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Charger\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\"\n    ],\n    \"chargers_number\": 5\n  }\n]"

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

```java chargers_number=5 with 2 explicit ids — uses ids first, pads 3 with random hex
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Charger\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\"\n    ],\n    \"chargers_number\": 5\n  }\n]")
  .asString();
```

```php chargers_number=5 with 2 explicit ids — uses ids first, pads 3 with random hex
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers', [
  'body' => '[
  {
    "template": {
      "brand_slug": "schneider",
      "model_slug": "evlink-pro-ac-22kw",
      "connector_type": "CCS2",
      "ws_url": "wss://ocpp.ocpplab.com",
      "ocpp_version": "OCPP1.6",
      "identity_prefix": "SITE_A_",
      "template_name": "Charger"
    },
    "charger_ids": [
      "001",
      "002"
    ],
    "chargers_number": 5
  }
]',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp chargers_number=5 with 2 explicit ids — uses ids first, pads 3 with random hex
using RestSharp;

var client = new RestClient("https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Charger\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\"\n    ],\n    \"chargers_number\": 5\n  }\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift chargers_number=5 with 2 explicit ids — uses ids first, pads 3 with random hex
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  [
    "template": [
      "brand_slug": "schneider",
      "model_slug": "evlink-pro-ac-22kw",
      "connector_type": "CCS2",
      "ws_url": "wss://ocpp.ocpplab.com",
      "ocpp_version": "OCPP1.6",
      "identity_prefix": "SITE_A_",
      "template_name": "Charger"
    ],
    "charger_ids": ["001", "002"],
    "chargers_number": 5
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

```python Two groups with different templates in one request
import requests

url = "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers"

payload = [
    {
        "template": {
            "brand_slug": "schneider",
            "model_slug": "evlink-pro-ac-22kw",
            "connector_type": "CCS2",
            "ws_url": "wss://ocpp.ocpplab.com",
            "ocpp_version": "OCPP1.6",
            "identity_prefix": "SITE_A_",
            "template_name": "Fast Charger"
        },
        "chargers_number": 3
    },
    {
        "template": {
            "brand_slug": "wallbox",
            "model_slug": "wallbox-pulsar-plus",
            "connector_type": "Type2",
            "ws_url": "wss://ocpp.ocpplab.com",
            "ocpp_version": "OCPP1.6",
            "identity_prefix": "SITE_B_",
            "template_name": "Bay"
        },
        "charger_ids": ["001", "002"]
    }
]
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Two groups with different templates in one request
const url = 'https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '[{"template":{"brand_slug":"schneider","model_slug":"evlink-pro-ac-22kw","connector_type":"CCS2","ws_url":"wss://ocpp.ocpplab.com","ocpp_version":"OCPP1.6","identity_prefix":"SITE_A_","template_name":"Fast Charger"},"chargers_number":3},{"template":{"brand_slug":"wallbox","model_slug":"wallbox-pulsar-plus","connector_type":"Type2","ws_url":"wss://ocpp.ocpplab.com","ocpp_version":"OCPP1.6","identity_prefix":"SITE_B_","template_name":"Bay"},"charger_ids":["001","002"]}]'
};

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

```go Two groups with different templates in one request
package main

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

func main() {

	url := "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers"

	payload := strings.NewReader("[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Fast Charger\"\n    },\n    \"chargers_number\": 3\n  },\n  {\n    \"template\": {\n      \"brand_slug\": \"wallbox\",\n      \"model_slug\": \"wallbox-pulsar-plus\",\n      \"connector_type\": \"Type2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_B_\",\n      \"template_name\": \"Bay\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\"\n    ]\n  }\n]")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Two groups with different templates in one request
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Fast Charger\"\n    },\n    \"chargers_number\": 3\n  },\n  {\n    \"template\": {\n      \"brand_slug\": \"wallbox\",\n      \"model_slug\": \"wallbox-pulsar-plus\",\n      \"connector_type\": \"Type2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_B_\",\n      \"template_name\": \"Bay\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\"\n    ]\n  }\n]"

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

```java Two groups with different templates in one request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Fast Charger\"\n    },\n    \"chargers_number\": 3\n  },\n  {\n    \"template\": {\n      \"brand_slug\": \"wallbox\",\n      \"model_slug\": \"wallbox-pulsar-plus\",\n      \"connector_type\": \"Type2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_B_\",\n      \"template_name\": \"Bay\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\"\n    ]\n  }\n]")
  .asString();
```

```php Two groups with different templates in one request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers', [
  'body' => '[
  {
    "template": {
      "brand_slug": "schneider",
      "model_slug": "evlink-pro-ac-22kw",
      "connector_type": "CCS2",
      "ws_url": "wss://ocpp.ocpplab.com",
      "ocpp_version": "OCPP1.6",
      "identity_prefix": "SITE_A_",
      "template_name": "Fast Charger"
    },
    "chargers_number": 3
  },
  {
    "template": {
      "brand_slug": "wallbox",
      "model_slug": "wallbox-pulsar-plus",
      "connector_type": "Type2",
      "ws_url": "wss://ocpp.ocpplab.com",
      "ocpp_version": "OCPP1.6",
      "identity_prefix": "SITE_B_",
      "template_name": "Bay"
    },
    "charger_ids": [
      "001",
      "002"
    ]
  }
]',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Two groups with different templates in one request
using RestSharp;

var client = new RestClient("https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Fast Charger\"\n    },\n    \"chargers_number\": 3\n  },\n  {\n    \"template\": {\n      \"brand_slug\": \"wallbox\",\n      \"model_slug\": \"wallbox-pulsar-plus\",\n      \"connector_type\": \"Type2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_B_\",\n      \"template_name\": \"Bay\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\"\n    ]\n  }\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Two groups with different templates in one request
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  [
    "template": [
      "brand_slug": "schneider",
      "model_slug": "evlink-pro-ac-22kw",
      "connector_type": "CCS2",
      "ws_url": "wss://ocpp.ocpplab.com",
      "ocpp_version": "OCPP1.6",
      "identity_prefix": "SITE_A_",
      "template_name": "Fast Charger"
    ],
    "chargers_number": 3
  ],
  [
    "template": [
      "brand_slug": "wallbox",
      "model_slug": "wallbox-pulsar-plus",
      "connector_type": "Type2",
      "ws_url": "wss://ocpp.ocpplab.com",
      "ocpp_version": "OCPP1.6",
      "identity_prefix": "SITE_B_",
      "template_name": "Bay"
    ],
    "charger_ids": ["001", "002"]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

```python
import requests

url = "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers"

payload = [
    {
        "template": {
            "brand_slug": "schneider",
            "model_slug": "evlink-pro-ac-22kw",
            "connector_type": "CCS2",
            "ws_url": "wss://ocpp.ocpplab.com",
            "ocpp_version": "OCPP1.6",
            "identity_prefix": "SITE_A_",
            "template_name": "Bay"
        },
        "charger_ids": ["001", "002", "003"]
    }
]
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '[{"template":{"brand_slug":"schneider","model_slug":"evlink-pro-ac-22kw","connector_type":"CCS2","ws_url":"wss://ocpp.ocpplab.com","ocpp_version":"OCPP1.6","identity_prefix":"SITE_A_","template_name":"Bay"},"charger_ids":["001","002","003"]}]'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers"

	payload := strings.NewReader("[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Bay\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\",\n      \"003\"\n    ]\n  }\n]")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Bay\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\",\n      \"003\"\n    ]\n  }\n]"

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.post("https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Bay\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\",\n      \"003\"\n    ]\n  }\n]")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers', [
  'body' => '[
  {
    "template": {
      "brand_slug": "schneider",
      "model_slug": "evlink-pro-ac-22kw",
      "connector_type": "CCS2",
      "ws_url": "wss://ocpp.ocpplab.com",
      "ocpp_version": "OCPP1.6",
      "identity_prefix": "SITE_A_",
      "template_name": "Bay"
    },
    "charger_ids": [
      "001",
      "002",
      "003"
    ]
  }
]',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  {\n    \"template\": {\n      \"brand_slug\": \"schneider\",\n      \"model_slug\": \"evlink-pro-ac-22kw\",\n      \"connector_type\": \"CCS2\",\n      \"ws_url\": \"wss://ocpp.ocpplab.com\",\n      \"ocpp_version\": \"OCPP1.6\",\n      \"identity_prefix\": \"SITE_A_\",\n      \"template_name\": \"Bay\"\n    },\n    \"charger_ids\": [\n      \"001\",\n      \"002\",\n      \"003\"\n    ]\n  }\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  [
    "template": [
      "brand_slug": "schneider",
      "model_slug": "evlink-pro-ac-22kw",
      "connector_type": "CCS2",
      "ws_url": "wss://ocpp.ocpplab.com",
      "ocpp_version": "OCPP1.6",
      "identity_prefix": "SITE_A_",
      "template_name": "Bay"
    ],
    "charger_ids": ["001", "002", "003"]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/locations/4090477f-a416-4515-a302-97aa344a0a2a/chargers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```