> 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.

# Send local authorization list

POST https://host.com/ocpp/commands/local-auth-list
Content-Type: application/json

Send a local authorization list update to the selected charger. `list_version` must increase on each update so the charger can detect stale pushes.

Reference: https://docs.ocpplab.com/api-reference/ocpplab-gateway-api/charger-operations/commands/send-local-list

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: OCPPLab SDK
  version: 1.0.0
paths:
  /ocpp/commands/local-auth-list:
    post:
      operationId: send-local-list
      summary: Send local authorization list
      description: >-
        Send a local authorization list update to the selected charger.
        `list_version` must increase on each update so the charger can detect
        stale pushes.
      tags:
        - subpackage_commands
      parameters:
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Local auth list sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocalListMutationResponse'
        '400':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '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: Charger not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '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'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetedLocalAuthListUpdateRequest'
servers:
  - url: https://host.com
components:
  schemas:
    ChargerCommandTarget:
      type: object
      properties:
        charger_id:
          type: string
          description: Target a single charger by deployment ID.
      required:
        - charger_id
      description: >-
        Single-charger target for command endpoints that do not support
        locations.
      title: ChargerCommandTarget
    LocalAuthListEntry:
      type: object
      properties:
        id_tag:
          type: string
        expiry_date:
          type:
            - string
            - 'null'
          format: date-time
        parent_id_tag:
          type:
            - string
            - 'null'
      required:
        - id_tag
      description: One local authorization list entry.
      title: LocalAuthListEntry
    LocalAuthListEvent:
      type: object
      properties:
        list_version:
          type: integer
        entries:
          type: array
          items:
            $ref: '#/components/schemas/LocalAuthListEntry'
      required:
        - list_version
        - entries
      description: Command payload for local authorization list upload.
      title: LocalAuthListEvent
    TargetedLocalAuthListUpdateRequest:
      type: object
      properties:
        target:
          $ref: '#/components/schemas/ChargerCommandTarget'
        event:
          $ref: '#/components/schemas/LocalAuthListEvent'
      required:
        - target
        - event
      description: Request for local authorization list upload command.
      title: TargetedLocalAuthListUpdateRequest
    LocalListMutationResponse:
      type: object
      properties:
        status:
          type:
            - string
            - 'null'
        list_version:
          type:
            - integer
            - 'null'
        entries_received:
          type:
            - integer
            - 'null'
        msg:
          type:
            - string
            - 'null'
        entries_deleted:
          type:
            - integer
            - 'null'
      description: Response body returned by local-auth mutation endpoints.
      title: LocalListMutationResponse
    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

```

## SDK Code Examples

```python The charger accepted the uploaded local list
import requests

url = "https://host.com/ocpp/commands/local-auth-list"

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript The charger accepted the uploaded local list
const url = 'https://host.com/ocpp/commands/local-auth-list';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go The charger accepted the uploaded local list
package main

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

func main() {

	url := "https://host.com/ocpp/commands/local-auth-list"

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

	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 The charger accepted the uploaded local list
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/commands/local-auth-list")

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'

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

```java The charger accepted the uploaded local list
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/commands/local-auth-list")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .asString();
```

```php The charger accepted the uploaded local list
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/commands/local-auth-list', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp The charger accepted the uploaded local list
using RestSharp;

var client = new RestClient("https://host.com/ocpp/commands/local-auth-list");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift The charger accepted the uploaded local list
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/commands/local-auth-list")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

```python Replace the full list with two authorized tags
import requests

url = "https://host.com/ocpp/commands/local-auth-list"

payload = {
    "target": { "charger_id": "dep-123" },
    "event": {
        "list_version": 2,
        "entries": [
            {
                "id_tag": "TAG-RFID-001",
                "expiry_date": "2026-12-31T23:59:59Z"
            },
            {
                "id_tag": "TAG-RFID-002",
                "expiry_date": "2026-06-30T23:59:59Z"
            }
        ]
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Replace the full list with two authorized tags
const url = 'https://host.com/ocpp/commands/local-auth-list';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"target":{"charger_id":"dep-123"},"event":{"list_version":2,"entries":[{"id_tag":"TAG-RFID-001","expiry_date":"2026-12-31T23:59:59Z"},{"id_tag":"TAG-RFID-002","expiry_date":"2026-06-30T23:59:59Z"}]}}'
};

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

```go Replace the full list with two authorized tags
package main

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

func main() {

	url := "https://host.com/ocpp/commands/local-auth-list"

	payload := strings.NewReader("{\n  \"target\": {\n    \"charger_id\": \"dep-123\"\n  },\n  \"event\": {\n    \"list_version\": 2,\n    \"entries\": [\n      {\n        \"id_tag\": \"TAG-RFID-001\",\n        \"expiry_date\": \"2026-12-31T23:59:59Z\"\n      },\n      {\n        \"id_tag\": \"TAG-RFID-002\",\n        \"expiry_date\": \"2026-06-30T23:59:59Z\"\n      }\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 Replace the full list with two authorized tags
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/commands/local-auth-list")

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  \"target\": {\n    \"charger_id\": \"dep-123\"\n  },\n  \"event\": {\n    \"list_version\": 2,\n    \"entries\": [\n      {\n        \"id_tag\": \"TAG-RFID-001\",\n        \"expiry_date\": \"2026-12-31T23:59:59Z\"\n      },\n      {\n        \"id_tag\": \"TAG-RFID-002\",\n        \"expiry_date\": \"2026-06-30T23:59:59Z\"\n      }\n    ]\n  }\n}"

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

```java Replace the full list with two authorized tags
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/commands/local-auth-list")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"target\": {\n    \"charger_id\": \"dep-123\"\n  },\n  \"event\": {\n    \"list_version\": 2,\n    \"entries\": [\n      {\n        \"id_tag\": \"TAG-RFID-001\",\n        \"expiry_date\": \"2026-12-31T23:59:59Z\"\n      },\n      {\n        \"id_tag\": \"TAG-RFID-002\",\n        \"expiry_date\": \"2026-06-30T23:59:59Z\"\n      }\n    ]\n  }\n}")
  .asString();
```

```php Replace the full list with two authorized tags
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/commands/local-auth-list', [
  'body' => '{
  "target": {
    "charger_id": "dep-123"
  },
  "event": {
    "list_version": 2,
    "entries": [
      {
        "id_tag": "TAG-RFID-001",
        "expiry_date": "2026-12-31T23:59:59Z"
      },
      {
        "id_tag": "TAG-RFID-002",
        "expiry_date": "2026-06-30T23:59:59Z"
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Replace the full list with two authorized tags
using RestSharp;

var client = new RestClient("https://host.com/ocpp/commands/local-auth-list");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"target\": {\n    \"charger_id\": \"dep-123\"\n  },\n  \"event\": {\n    \"list_version\": 2,\n    \"entries\": [\n      {\n        \"id_tag\": \"TAG-RFID-001\",\n        \"expiry_date\": \"2026-12-31T23:59:59Z\"\n      },\n      {\n        \"id_tag\": \"TAG-RFID-002\",\n        \"expiry_date\": \"2026-06-30T23:59:59Z\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Replace the full list with two authorized tags
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "target": ["charger_id": "dep-123"],
  "event": [
    "list_version": 2,
    "entries": [
      [
        "id_tag": "TAG-RFID-001",
        "expiry_date": "2026-12-31T23:59:59Z"
      ],
      [
        "id_tag": "TAG-RFID-002",
        "expiry_date": "2026-06-30T23:59:59Z"
      ]
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/commands/local-auth-list")! 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 Push a single authorized tag (initial setup)
import requests

url = "https://host.com/ocpp/commands/local-auth-list"

payload = {
    "target": { "charger_id": "dep-123" },
    "event": {
        "list_version": 1,
        "entries": [
            {
                "id_tag": "TAG-RFID-001",
                "expiry_date": "2027-01-01T00:00:00Z"
            }
        ]
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Push a single authorized tag (initial setup)
const url = 'https://host.com/ocpp/commands/local-auth-list';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"target":{"charger_id":"dep-123"},"event":{"list_version":1,"entries":[{"id_tag":"TAG-RFID-001","expiry_date":"2027-01-01T00:00:00Z"}]}}'
};

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

```go Push a single authorized tag (initial setup)
package main

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

func main() {

	url := "https://host.com/ocpp/commands/local-auth-list"

	payload := strings.NewReader("{\n  \"target\": {\n    \"charger_id\": \"dep-123\"\n  },\n  \"event\": {\n    \"list_version\": 1,\n    \"entries\": [\n      {\n        \"id_tag\": \"TAG-RFID-001\",\n        \"expiry_date\": \"2027-01-01T00:00:00Z\"\n      }\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 Push a single authorized tag (initial setup)
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/commands/local-auth-list")

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  \"target\": {\n    \"charger_id\": \"dep-123\"\n  },\n  \"event\": {\n    \"list_version\": 1,\n    \"entries\": [\n      {\n        \"id_tag\": \"TAG-RFID-001\",\n        \"expiry_date\": \"2027-01-01T00:00:00Z\"\n      }\n    ]\n  }\n}"

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

```java Push a single authorized tag (initial setup)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/commands/local-auth-list")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"target\": {\n    \"charger_id\": \"dep-123\"\n  },\n  \"event\": {\n    \"list_version\": 1,\n    \"entries\": [\n      {\n        \"id_tag\": \"TAG-RFID-001\",\n        \"expiry_date\": \"2027-01-01T00:00:00Z\"\n      }\n    ]\n  }\n}")
  .asString();
```

```php Push a single authorized tag (initial setup)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/commands/local-auth-list', [
  'body' => '{
  "target": {
    "charger_id": "dep-123"
  },
  "event": {
    "list_version": 1,
    "entries": [
      {
        "id_tag": "TAG-RFID-001",
        "expiry_date": "2027-01-01T00:00:00Z"
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Push a single authorized tag (initial setup)
using RestSharp;

var client = new RestClient("https://host.com/ocpp/commands/local-auth-list");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"target\": {\n    \"charger_id\": \"dep-123\"\n  },\n  \"event\": {\n    \"list_version\": 1,\n    \"entries\": [\n      {\n        \"id_tag\": \"TAG-RFID-001\",\n        \"expiry_date\": \"2027-01-01T00:00:00Z\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Push a single authorized tag (initial setup)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "target": ["charger_id": "dep-123"],
  "event": [
    "list_version": 1,
    "entries": [
      [
        "id_tag": "TAG-RFID-001",
        "expiry_date": "2027-01-01T00:00:00Z"
      ]
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/commands/local-auth-list")! 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()
```