---
title: "Calculate Smart Charging Schedule"
method: POST
path: "/spark/charge_curve/schedule"
tags: ["Spark"]
---

# Calculate Smart Charging Schedule

`POST /spark/charge_curve/schedule`

Provided details around charging duration and a prospective charging window, returns a charging schedule that minimizes costs for a particular `UtilityAccount`.

## Headers

- `Arcadia-Version` string, required

## Request body

- SmartChargeScheduleRequestBodyParams
  - `utility_account_id` integer — (Beta - due to limited coverage) The unique ID of the utility account that this calculation is being run against. Either a `utility_account_id` or `main_tariff_id` is required for a valid request.
  - `main_tariff_id` string — The Genability 'masterTariffId' unique identifier for this tariff. See [Genability documentation](https://developer.genability.com/api-reference/tariff-api/tariff/) for details. Either a `utility_account_id` or `main_tariff_id` is required for a valid request.
  - `start_time` string, date-time, required — ISO8601 timestamp of when the charge begins. Note that the timestamp will be rounded down to the start of latest charge block resolution. For example, if the `charge_block_resolution` is `1h` and the charging session starts at `2021-06-24T14:59:59Z`, the `start_time` used to calculate the curve's cost will be normalized to `2021-06-24T14:00:00Z`. If the `charge_block_resolution` is `15m`, the `start_time` would be normalized to `2021-06-24T14:45:00Z`. This rounding technique eliminates ambiguity around charging that occurs across time-of-use on/mid/off-peak window boundaries.
  - `end_time` string, date-time, required — ISO8601 datetime by which the charge must be complete.
  - `minutes_to_charge_complete` integer, required — The number of minutes of charging required to complete a charge.
  - `charge_block_resolution` '5m' | '10m' | '15m' | '30m' | '1h' — The duration of the charge blocks to use in the returned `charge_block_active` param.

## Response `200`

Success

- SmartChargeScheduleResponse
  - `start_time` string, date-time, required
  - `charge_block_resolution` '5m' | '10m' | '15m' | '30m' | '1h', required — The duration of the charge blocks returned in the `charge_block_active` array.
  - `charge_block_active` object, required
    - `frequency` '5m' | '10m' | '15m' | '30m' | '1h', required — The duration of the charge blocks returned in the `charge_block_active` array.
    - `data` TimeSeriesItem[], required — Whether or not the vehicle should be actively charging during each charging bucket, starting at the `start_time`.
      - `timestamp` string, date-time, required — ISO8601 timestamp indicating time of data collection
      - `value` number, required — Data value of resource

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.dev/arcadia/apis/arcadia-api-reference.md) · [All operations](https://skmtc.dev/arcadia/apis/arcadia-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/arcadia/arcadia-api-reference/revisions/468f1c903722/schema)
