v1

latestOpenAPI 3.1.02026-07-1342111193.6 KB
Spark

Calculate Charge Cost

Provided a charge curve starting at a particular time of day, calculates the electricity cost of that charge curve for a particular UtilityAccount or Genability tariff.

post/spark/charge_curve/cost

Headers

Arcadia-Versionstring required

The Arcadia-Version for the request

Request body

utility_account_idinteger

(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_idstring

The Genability 'masterTariffId' unique identifier for this tariff. See Genability documentation for details. Either a utility_account_id or main_tariff_id is required for a valid request.

start_timestring date-time required

ISO8601 timestamp of when the charge begins. Note that the timestamp will be normalized 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 normalization technique eliminates ambiguity around charging that occurs across time-of-use on/mid/off-peak window boundaries.

charge_block_resolution'5m' | '10m' | '15m' | '30m' | '1h'

The duration of the charge blocks provided in the energy_usage_kwh param.

energy_usage_kwhnumber[] required

The load curve being priced. An array of charge blocks with each block representing the kWh of power consumed or to be consumed in that block.

Example request

{
  "main_tariff_id": "gen_mtid_3331108",
  "start_time": "2021-03-18T22:00:00-07:00",
  "energy_usage_kwh": [
    0,
    0,
    7.2,
    0,
    7.2,
    2.9
  ]
}

Response

Success

utility_account_idinteger nullable
normalized_start_timestring date-time required

The start_time normalized down to the resolution that lines up with any TOU periods on the tariff (generally hourly).

normalized_consumption_kwhnumber[] required

The energy_usage_kwh aggregated into periods that line up with any TOU periods on the tariff (generally hourly).

cost_centsinteger required

Cost of the charging curve on the utility account's tariff, in cents.

Example response

{
  "utility_account_id": 12345,
  "tariff": {
    "main_tariff_id": "gen_mtid_3331108",
    "property_inputs": [
      {
        "id": "territoryId"
      }
    ],
    "supplier_name": "East Bay Community Energy",
    "tariff_code": "EV-2A-TOU",
    "tariff_name": "Residential - Time of Use - Plug-In Electric Vehicle 2",
    "utility_name": "Pacific Gas & Electric",
    "tariff_as_of_date": "2021-03-01"
  },
  "normalized_start_time": "2021-03-18T22:00:00-07:00",
  "normalized_consumption_kwh": [
    0,
    0,
    7.2,
    0,
    7.2,
    2.9
  ],
  "cost_cents": 525
}