Zympler.

Steer a battery

Check the available flexibility and send charge and discharge setpoints.

This guide is for balance responsible parties (BRPs) that steer batteries through Zympler. With external control you decide what the battery does; Zympler only overrides your setpoints when they would exceed the limits of the grid connection.

Before you start:

  • The battery must be switched to external control by Zympler. By default Zympler plans and steers assets itself; email support@zympler.com to arrange external control.
  • Your service account needs access to the location.

1. Check how much room there is

The available battery flexibility tells you, per 15 minutes, how much power the battery can take (to_battery) and deliver (from_battery), in watts:

curl

curl "https://api.zympler.com/v1beta/location/$LOCATION_ID/flexibility-battery" \
  -H "Authorization: Bearer $ZYMPLER_TOKEN"

Rust

let flexibility: Vec<serde_json::Value> = http
    .get(format!("{base}/location/{location_id}/flexibility-battery"))
    .bearer_auth(&token)
    .send().await?.error_for_status()?
    .json().await?;

Python

flexibility = requests.get(
    f"{base}/location/{location_id}/flexibility-battery", headers=headers, timeout=30
).json()

2. Send setpoints

Send a list of intervals, each with an action: either to_battery (charge) or from_battery (discharge) in watts. Intervals are 1 or 15 minutes, less than 7 days ahead, in UTC. This example charges at 50 kW for a quarter of an hour, then discharges at 30 kW:

curl

curl -X POST "https://api.zympler.com/v1beta/assets/$ASSET_ID/control-battery" \
  -H "Authorization: Bearer $ZYMPLER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[
    { "start": "2026-11-17T13:00:00Z", "end": "2026-11-17T13:15:00Z", "action": { "to_battery": 50000 } },
    { "start": "2026-11-17T13:15:00Z", "end": "2026-11-17T13:30:00Z", "action": { "from_battery": 30000 } }
  ]'

Rust

http.post(format!("{base}/assets/{asset_id}/control-battery"))
    .bearer_auth(&token)
    .json(&serde_json::json!([
        { "start": "2026-11-17T13:00:00Z", "end": "2026-11-17T13:15:00Z", "action": { "to_battery": 50000 } },
        { "start": "2026-11-17T13:15:00Z", "end": "2026-11-17T13:30:00Z", "action": { "from_battery": 30000 } }
    ]))
    .send().await?
    .error_for_status()?;

Python

response = requests.post(
    f"{base}/assets/{asset_id}/control-battery",
    headers=headers,
    json=[
        {"start": "2026-11-17T13:00:00Z", "end": "2026-11-17T13:15:00Z", "action": {"to_battery": 50000}},
        {"start": "2026-11-17T13:15:00Z", "end": "2026-11-17T13:30:00Z", "action": {"from_battery": 30000}},
    ],
    timeout=30,
)
response.raise_for_status()

Send setpoints per battery asset, even when a location has several.

3. Check what's planned

GET on the same URL returns the setpoints currently planned for a period, and the Plan endpoints show how the whole site will run.

Search