Site Power Limits

Site power limits control the total power output from all chargers on a site.

  • Capacity limit: A hard cap. Flipturn will not allow the site to exceed this limit. Use for physical constraints (e.g. meter or transformer limits). Cannot be exceeded even by manual overrides.

  • Cost limit: A soft cap. Use to avoid time of use rates or demand charges. Can be exceeded by a manual charging session override, setting an override schedule on a charger, or if the total minimum power for all vehicles plugged in exceeds the limit.

A site can have both a cost and a capacity limit. When both are set, the cost limit is applied first, and the capacity limit acts as a ceiling if more power is required by overrides than the cost limit allows.

POST /api/site/{site-id}/limits

Creates a new site power limit. Replaces the current limit of that type. Can be set either as a flat limit or as a schedule that varies among time of day or days of the week.

Path parameters

  • site-id: Flipturn site ID. Can be determined using the sites endpoint.

Request body option A: flat limit

{
  sitePowerLimitSchedule: {
    type: 'cost' | 'capacity'; // See definitions above
    limit: number;
    chargingRateUnit: 'W'; // Required to be 'W' for now, will support other units in the future
  }
}

Request example

This example will set a flat capacity limit of 100 kW on the site.

Request body option B: daily or weekly schedule

Here's a detailed description of all the fields:

  • type: "cost" or "capacity". See the description of these above.

  • schedules: Array of schedules that define limits for different days of the week. They must cover all days of the week, with each day appearing in exactly one schedule. Each schedule contains:

    • daysOfWeek: Array of integers 1–7 for when this schedule applies (Monday = 1, Sunday = 7).

    • chargingRateUnit: Must be "W" for now, other units will be supported in the future.

    • chargingSchedulePeriods: Array of limits that apply to each day in this schedule. Each period defines:

      • startPeriod: When this limit takes effect each day, measured in seconds from midnight. For example, 0 = 12:00 AM (midnight) and 64800 = 6:00 PM (18:00). Each schedule must include a period with startPeriod: 0.

      • limit: The limit for this period in units specified by chargingRateUnit.

Request example

This example sets a cost-based schedule:

  • Weekdays, Mon–Fri, allow 100 kW except between 4:00 PM and 9:00 PM when the limit is 0, to avoid on-peak rates

  • Weekends, Sat–Sun, allow 100 kW all day

Note that when the cost limit is set to 0, it will still allow vehicles to charge at minimum power, usually 8 A for L2 chargers and 5 kW for DC.

Response

Example response

GET /api/site/{site-id}/limits

Returns the active power limits for the site (cost and/or capacity). The response can contain up to one schedule per type. Will return an empty array if no schedules are set.

Path parameters

  • site-id: Flipturn site ID.

Response

Example Request and Response

Request:

Response:

DELETE /api/site/{site-id}/limits/{schedule-id}

Clears the site power limit for the given schedule.

Path parameters

  • site-id: Site ID

  • schedule-id: Schedule ID

Response

  • 204: No response body, if delete is successful.

Errors

  • 404: Site or schedule not found. Use GET to see the current schedules.

Example

Request:

Response: 204 No Content (empty body).

Last updated