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

# Power update

POST https://host.com/ocpp/commands/power-update
Content-Type: application/json

Update the active charging power in watts for the specified connector. The charger adjusts the offered power to the EV. Use this to simulate smart-charging or load-management scenarios. Targets a single charger, selected chargers in a location, or all chargers in a location.

Reference: https://docs.ocpplab.com/api-reference/ocpplab-gateway-api/charger-operations/commands/power-update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: OCPPLab SDK
  version: 1.0.0
paths:
  /ocpp/commands/power-update:
    post:
      operationId: power-update
      summary: Power update
      description: >-
        Update the active charging power in watts for the specified connector.
        The charger adjusts the offered power to the EV. Use this to simulate
        smart-charging or load-management scenarios. Targets a single charger,
        selected chargers in a location, or all chargers in a location.
      tags:
        - subpackage_commands
      parameters:
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '202':
          description: Command accepted and queued for the target charger(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationCommandResponse'
        '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 or location not found
          content:
            application/json:
              schema:
                description: Any type
        '422':
          description: Invalid target — provide either charger_id or location_id, not both
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnifiedPowerUpdateRequest'
servers:
  - url: https://host.com
components:
  schemas:
    CommandTarget:
      type: object
      properties:
        charger_id:
          type:
            - string
            - 'null'
          description: Target a single charger by deployment ID.
        location_id:
          type:
            - string
            - 'null'
          description: Target all or selected chargers in a location.
        charger_ids:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Subset of chargers within the location. Null = all chargers. Only
            valid with location_id.
      description: >-
        Target for a unified command.


        Provide exactly one of ``charger_id`` or ``location_id``.

        ``charger_ids`` is an optional subset filter — only valid with
        ``location_id``.


        Examples::

            {"charger_id": "dep-123"}
            {"location_id": "loc-456"}
            {"location_id": "loc-456", "charger_ids": ["dep-1", "dep-2"]}
      title: CommandTarget
    PowerUpdateCommandEvent:
      type: object
      properties:
        power_w:
          type: integer
        evse_id:
          type: integer
          default: 1
        connector_id:
          type: integer
          default: 1
      required:
        - power_w
      description: Command payload for power-update.
      title: PowerUpdateCommandEvent
    UnifiedPowerUpdateRequest:
      type: object
      properties:
        target:
          $ref: '#/components/schemas/CommandTarget'
        event:
          $ref: '#/components/schemas/PowerUpdateCommandEvent'
      required:
        - target
        - event
      description: Request for power-update command.
      title: UnifiedPowerUpdateRequest
    QueuedCommandResponse:
      type: object
      properties:
        id:
          type: string
        event_type:
          type: string
        ocpp_version:
          type: string
        payload:
          type: object
          additionalProperties:
            description: Any type
          description: Command payload sent to the simulator queue.
      required:
        - id
        - event_type
        - ocpp_version
        - payload
      description: Queued command payload returned by simulator action endpoints.
      title: QueuedCommandResponse
    LocationQueuedCommandResult:
      type: object
      properties:
        charger_id:
          type: string
        identity:
          type: string
        command:
          $ref: '#/components/schemas/QueuedCommandResponse'
      required:
        - charger_id
        - identity
        - command
      description: One queued command result item for a location-scoped command request.
      title: LocationQueuedCommandResult
    LocationCommandFailure:
      type: object
      properties:
        identity:
          type:
            - string
            - 'null'
        error:
          type: string
      required:
        - error
      description: Failed charger result returned by location command endpoints.
      title: LocationCommandFailure
    LocationCommandResponse:
      type: object
      properties:
        targeted_count:
          type: integer
        queued_count:
          type: integer
        failed_count:
          type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/LocationQueuedCommandResult'
        failed:
          type: array
          items:
            $ref: '#/components/schemas/LocationCommandFailure'
      required:
        - targeted_count
        - queued_count
        - failed_count
        - results
        - failed
      description: Response body returned by location-scoped charger command endpoints.
      title: LocationCommandResponse
    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 Power-update queued for one targeted charger
import requests

url = "https://host.com/ocpp/commands/power-update"

payload = {
    "target": { "charger_id": "dep-789" },
    "event": {
        "power_w": 11000,
        "evse_id": 1,
        "connector_id": 1
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Power-update queued for one targeted charger
const url = 'https://host.com/ocpp/commands/power-update';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"target":{"charger_id":"dep-789"},"event":{"power_w":11000,"evse_id":1,"connector_id":1}}'
};

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

```go Power-update queued for one targeted charger
package main

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

func main() {

	url := "https://host.com/ocpp/commands/power-update"

	payload := strings.NewReader("{\n  \"target\": {\n    \"charger_id\": \"dep-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\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 Power-update queued for one targeted charger
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/commands/power-update")

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-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}"

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

```java Power-update queued for one targeted charger
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/commands/power-update")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"target\": {\n    \"charger_id\": \"dep-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}")
  .asString();
```

```php Power-update queued for one targeted charger
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/commands/power-update', [
  'body' => '{
  "target": {
    "charger_id": "dep-789"
  },
  "event": {
    "power_w": 11000,
    "evse_id": 1,
    "connector_id": 1
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Power-update queued for one targeted charger
using RestSharp;

var client = new RestClient("https://host.com/ocpp/commands/power-update");
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-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Power-update queued for one targeted charger
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "target": ["charger_id": "dep-789"],
  "event": [
    "power_w": 11000,
    "evse_id": 1,
    "connector_id": 1
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/commands/power-update")! 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 Power update — single charger (7.4 kW AC)
import requests

url = "https://host.com/ocpp/commands/power-update"

payload = {
    "target": { "charger_id": "dep-789" },
    "event": {
        "power_w": 11000,
        "evse_id": 1,
        "connector_id": 1
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Power update — single charger (7.4 kW AC)
const url = 'https://host.com/ocpp/commands/power-update';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"target":{"charger_id":"dep-789"},"event":{"power_w":11000,"evse_id":1,"connector_id":1}}'
};

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

```go Power update — single charger (7.4 kW AC)
package main

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

func main() {

	url := "https://host.com/ocpp/commands/power-update"

	payload := strings.NewReader("{\n  \"target\": {\n    \"charger_id\": \"dep-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\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 Power update — single charger (7.4 kW AC)
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/commands/power-update")

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-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}"

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

```java Power update — single charger (7.4 kW AC)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/commands/power-update")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"target\": {\n    \"charger_id\": \"dep-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}")
  .asString();
```

```php Power update — single charger (7.4 kW AC)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/commands/power-update', [
  'body' => '{
  "target": {
    "charger_id": "dep-789"
  },
  "event": {
    "power_w": 11000,
    "evse_id": 1,
    "connector_id": 1
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Power update — single charger (7.4 kW AC)
using RestSharp;

var client = new RestClient("https://host.com/ocpp/commands/power-update");
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-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Power update — single charger (7.4 kW AC)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "target": ["charger_id": "dep-789"],
  "event": [
    "power_w": 11000,
    "evse_id": 1,
    "connector_id": 1
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/commands/power-update")! 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 Power update — all location chargers at full 22 kW
import requests

url = "https://host.com/ocpp/commands/power-update"

payload = {
    "target": { "charger_id": "dep-789" },
    "event": {
        "power_w": 11000,
        "evse_id": 1,
        "connector_id": 1
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Power update — all location chargers at full 22 kW
const url = 'https://host.com/ocpp/commands/power-update';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"target":{"charger_id":"dep-789"},"event":{"power_w":11000,"evse_id":1,"connector_id":1}}'
};

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

```go Power update — all location chargers at full 22 kW
package main

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

func main() {

	url := "https://host.com/ocpp/commands/power-update"

	payload := strings.NewReader("{\n  \"target\": {\n    \"charger_id\": \"dep-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\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 Power update — all location chargers at full 22 kW
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/commands/power-update")

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-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}"

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

```java Power update — all location chargers at full 22 kW
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/commands/power-update")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"target\": {\n    \"charger_id\": \"dep-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}")
  .asString();
```

```php Power update — all location chargers at full 22 kW
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/commands/power-update', [
  'body' => '{
  "target": {
    "charger_id": "dep-789"
  },
  "event": {
    "power_w": 11000,
    "evse_id": 1,
    "connector_id": 1
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Power update — all location chargers at full 22 kW
using RestSharp;

var client = new RestClient("https://host.com/ocpp/commands/power-update");
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-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Power update — all location chargers at full 22 kW
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "target": ["charger_id": "dep-789"],
  "event": [
    "power_w": 11000,
    "evse_id": 1,
    "connector_id": 1
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/ocpp/commands/power-update")! 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 Power update — selected chargers throttled to 11 kW
import requests

url = "https://host.com/ocpp/commands/power-update"

payload = {
    "target": { "charger_id": "dep-789" },
    "event": {
        "power_w": 11000,
        "evse_id": 1,
        "connector_id": 1
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Power update — selected chargers throttled to 11 kW
const url = 'https://host.com/ocpp/commands/power-update';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"target":{"charger_id":"dep-789"},"event":{"power_w":11000,"evse_id":1,"connector_id":1}}'
};

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

```go Power update — selected chargers throttled to 11 kW
package main

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

func main() {

	url := "https://host.com/ocpp/commands/power-update"

	payload := strings.NewReader("{\n  \"target\": {\n    \"charger_id\": \"dep-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\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 Power update — selected chargers throttled to 11 kW
require 'uri'
require 'net/http'

url = URI("https://host.com/ocpp/commands/power-update")

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-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}"

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

```java Power update — selected chargers throttled to 11 kW
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/ocpp/commands/power-update")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"target\": {\n    \"charger_id\": \"dep-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}")
  .asString();
```

```php Power update — selected chargers throttled to 11 kW
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/ocpp/commands/power-update', [
  'body' => '{
  "target": {
    "charger_id": "dep-789"
  },
  "event": {
    "power_w": 11000,
    "evse_id": 1,
    "connector_id": 1
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Power update — selected chargers throttled to 11 kW
using RestSharp;

var client = new RestClient("https://host.com/ocpp/commands/power-update");
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-789\"\n  },\n  \"event\": {\n    \"power_w\": 11000,\n    \"evse_id\": 1,\n    \"connector_id\": 1\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Power update — selected chargers throttled to 11 kW
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "target": ["charger_id": "dep-789"],
  "event": [
    "power_w": 11000,
    "evse_id": 1,
    "connector_id": 1
  ]
] as [String : Any]

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

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