HomeGuidesRecipesAPI ReferenceChangelog
Log In
API Reference

Data Definitions

Calculated Cost

The CalculatedCost object contains the results of the calculation. The totalCost field holds the overall cost while the details of the calculation are contained within a list of Calculated Cost Item(s).

NameTypeFieldsDescription
masterTariffIdLongMUnique Arcadia ID for the master tariff of this calculation's tariff.
tariffNameStringMThe name of this tariff.
totalCostDecimalMTotal summed up cost of all cost items (see below).
fromDateTimeDateTimeMThe start date and time of this calculation.
toDateTimeDateTimeMThe end date and time of this calculation.
accuracyDecimal [0,100]MA decimal value between 0 and 100 represents the accuracy of the calculation. As more "best guess" assumptions are made, the calculation will become less accurate and the accuracy field will be smaller.
currencyString The currency is represented in the calculation.
summaryMap<String,Decimal or Map> Summary of cost and usage totals and sub-totals. Map key is a String and its value is a Decimal, or sometimes a nested Map (in turn a String and Decimal) See below for details of the Keys
itemsArray of  Calculated Cost ItemMBreakdown of the summary data with variable granularity and grouping.
assumptionsArray of PropertyData The properties, modeling assumptions, and other key info used in the calculation.
calculatedCostIdStringMUnique identifier for this calculation.
{
    "masterTariffId": 522,
    "tariffName": "Residential",
    "totalCost": 762.97,
    "fromDateTime": "2013-12-01T00:00:00-08:00",
    "toDateTime": "2014-01-01T00:00:00-08:00",
    "accuracy": 1,
    "currency": "USD",
    "summary": {
      "subTotalCost": 709.74,
      "preTaxMinimumCost": 15.00,
      "preTaxMaximumCost": 1722.41,
      "taxCost": 53.23,
      "totalCost": 762.97,
      "adjustedTotalCost": 763.40,
      "nonBypassableCost": 26.98,
      "kWh": 1419.48,
      "kW": 202.04
    },
    "items": [...],
    "assumptions": [...],
    "calculatedCostId": "67afe5d7-19f1-4c35-8e83-6868f6402da8",
}

CALCULATED COST SUMMARY MAP

The summary section gives various totals and sub-totals that make up the calculated costs, as well as some summary information about usage. Here are the most common values as well as some information about when you will see them included in the results:

Summary KeyDescription of ValueWhen included?
subTotalCostPre-tax totalAlways
preTaxMinimumCostPre-tax minimum costsIf minimums=true and rates with MINIMUM chargeClass
preTaxMaximumCostPre-tax maximum costsRare. If minimums=true and rates with MAXIMUM chargeClass
taxCostCost of all taxesIf rates with TAX chargeType
totalCostPost-tax costs, taking into account minimums or maximums but before-after-tax costsAlways. Matches the calcs totalCost
adjustedTotalCostTotal Costs including any costs that come after tax (tax-exempt costs)Rare. If rates with an AFTER_TAX value in chargeClass
nonBypassableCostPortion of the pre-tax costs that cannot be by-passedCalifornia. Rates with NON_BYPASSABLE value in chargeClass
kWhTotal kWhs for the calculation rangeAlways
kWPeak Demand for the calculation rangeHas none-zero value if there were DEMAND rates

Calculated Cost Item

The calculated cost items contain the details of the calculations. There is one CalculatedCostItem object for each tariff rate that is included in the calculation.

NameTypeFieldsDescription
tariffIdLongEUnique Arcadia ID for the tariff associated with this cost item.
tariffRateIdLongMUnique Arcadia ID for the tariff rate associated with this cost item.
tariffRateBandIdLongMUnique Arcadia ID for the band associated with this cost item.
rateSequenceNumberIntegerMThe sequence number of the rate group that the tariff rate belongs to.
rateGroupNameStringMThe name of the group this rate belongs to.
rateNameStringMThe name of this rate.
fromDateTimeDateTimeMThe start date and time of the period applicable for this cost item.
toDateTimeDateTimeMThe end date and time of the period applicable for this cost item.
quantityKeyStringMThe key for the quantity this calculated cost item refers to. Possible values include: fixedconsumptionminimum, and demand.
quantityKeyDescriptionStringEThe textual description of the quantity key specified by quantityKey.
rateTypeStringMThe type of rate this charge is. Current values include COST_PER_UNIT which is a cost for each unit of quantity consumed (e.g. $0.10 per kWh), and PERCENTAGE which is a percent of another cost (e.g. 10% of your bill). BLOCK and BLOCK_SELL_BACK are also supported. See Block and Index Rates
rateAmountDecimalMThe monetary amount of the rate associated with this cost item.
tierLowerLimitDecimalEFor a tiered rate, the minimum quantity needed to invoke this tier.
tierUpperLimitDecimalEFor a tiered rate, the maximum quantity at which this tier is invoked.
itemQuantityDecimalMTotal quantity used for this item's charge. This will typically be 1 but will have different values for charges related to the number of units of some items (e.g. number of billing meters at a facility).
costDecimalMThis is the total cost for this line item.
rateProrationDecimalEThe amount this rate is being prorated compared to the full rate amount.
chargeTypeString The type of rate: CONSUMPTION_BASEDDEMAND_BASEDFIXED_TYPEQUANTITYMINIMUMTAX or NET_EXCESS_GENERATION.
chargeClassString The class of rate: TRANSMISSIONDISTRIBUTIONSUPPLYTAXCONTRACTEDUSER_ADJUSTEDAFTER_TAX, or OTHER.
periodStringMThe Time of Use type: OFF_PEAKPARTIAL_PEAKON_PEAK or CRITICAL_PEAK.
demandIntervalDateTimeMFor demand charges, the time from which demand is measured.
durationInteger The duration in milliseconds (Optional)
touIdLong The unique Arcadia ID of the time of use associated with this cost item. (Optional)
touNameString Human-readable name of the time of use specified by touId. (Optional)
seasonIdLong The unique Arcadia ID of the season in which the time of use period is situated, which can affect the rate. (Optional)
seasonNameString Human-readable name for the season in which the time of use period is situated. (Optional)
formulaStringEThe formula associated with the quantityKey.
transactionTypeEnumerationETransaction type categories: BUYSELLNETBUY_IMPORT or SELL_EXPORT
{
  "tariffId": 3163175,
  "tariffRateId": 17091206,
  "tariffRateBandId": 10341335,
  "rateSequenceNumber": 3,
  "rateGroupName": "Transmission",
  "rateName": "Reliability Service Charge",
  "fromDateTime": "2013-12-01T00:00:00-08:00",
  "toDateTime": "2014-01-01T00:00:00-08:00",
  "quantityKey": "consumption",
  "rateType": "COST_PER_UNIT",
  "rateAmount": -0.00015,
  "itemQuantity": 1000,
  "cost": -0.15,
  "chargeType": "CONSUMPTION_BASED"
}

Property Data

The PropertyData object is used both as an input object, as part of the propertyInputs list, and also as an output object when returned in the assumptions list.

Every valid keyName that you can use in a PropertyData is available via our Property Key API. This will tell you its meta-data, such as its title, description, data type, and possible values.

PropertyData has the following data structure:

NameTypeFieldsDescription
keyNameStringMThe key name of the property associated with this input. The most common one will be consumption (which is the kWh for the period), and second most common is demand (kW), but can also be applicability properties like cityLimits or hasElectricVehicle (Required on input)
displayNameStringMA display-friendly name for this property. (Output only)
descriptionStringEA text description of this property. (Output only)
fromDateTimeDateTimeMThe start of the period where this property is applicable.(Optional, Default= fromDateTime for the calculation request )
toDateTimeDateTimeMThe end of the period where this property is applicable.(Optional, Default= toDateTime for the calculation request )
periodStringMThe Time of Use  type: OFF_PEAKPARTIAL_PEAKON_PEAK or CRITICAL_PEAK. As input, can alternatively be specified as a Date Period
dataTypeEnumerationMThe type of this property. Possible values are: STRINGCHOICEBOOLEANDATEDECIMALINTEGER, and FORMULA (Output only)
dataValueStringMThe value to use for this property. Can be input as the native type, but when populated will be returned as a string. (Required on input when not using dataSeries)
dataSeriesArray of Decimal Used for properties that have many values, such as consumption time series data. (Required on input when not using dataValue). When used in conjunction with exportDataSeries, the dataSeries represents the imports from the grid with exports to the grid defined in the exportDataSeries
exportDataSeriesArray of Decimal Used to specify the time series data for power exported to the grid. This is used in conjunction with the dataSeries to create a series of import and export readings for tariffs with real-time netting (instantaneous netting).
durationInteger Used with dataSeries to specify the time span corresponding to each value in the dataSeries. (Required on input when using dataSeries)
dataFactorDecimal For applicable properties (like usage data) scales the inputs by the value provided (Optional, Input Only)
operatorEnumeration For profile data only. Specifies how profiles should be joined. Possible values are + and -.
unitStringMWhere applicable, this is the unit of the value. Most common are: "kWh" - for keys of consumption, "kW" - for keys of demand. (Optional)
accuracyDecimal [0,100]MEstimated accuracy of the property value. Properties that you set explicitly will have an accuracy value of 100. (Output only)

PROPERTY DATA IN REQUESTS PROPERTYINPUTS

As an object used for inputs, you will pass in zero or more PropertyData records to set calculation properties via the propertyInputs parameter. For example, if you tell the calculator that your customer is enrolled in the "SmartRate" program, you would pass in that program's keyName and dataValue:

"propertyInputs": [
    {
        "keyName": "isSmartRateCustomer",
        "dataValue": true
    },
    ...
]

When passing in inputs, we require the keyName and dataValue (for one value) or dataSeries and duration (for multiple). Typically, that's all that is required. However, where necessary, you can set some of the other fields too, such as fromDateTime and toDateTime. You do not need to pass in informational fields such as dataType or description as these are defined by the property's meta-data.

PROPERTY DATA RETURNED IN RESPONSES ASSUMPTIONS

The assumptions in the CalculatedCost response is a list of PropertyData. It will tell you what assumptions were made for a particular calculation and what propertyInputs might need to be added or updated to a rerun of the calculation to make it more accurate. The API will usually return the dataValue or dataSeries of the value that was used if there is one.

In this example, the calculator returned an assumption for isSmartRateCustomer(an optional program that some customers enroll in on this tariff). In this case, the calculator didn't know if they were enrolled (because the accuracy is less than 100 percent) and so assumed they were not enrolled (dataValue of false). If that assumption is wrong (they were enrolled) then this Property Data can be explicitly passed back into the calculator via propertyInputs with a dataValue of true:

"assumptions": [
  {
    "keyName": "isSmartRateCustomer",
    "displayName": "Is SmartRate Customer",
    "description": "The residential SmartRate program is a voluntary rate supplement to the customer's \r\notherwise applicable rate schedule (OAS).\r\nThe customer will be billed for all regular charges applicable under the customer's OAS.  \r\nAdditional charges (based on usage during SmartDay High-Price Periods) and \r\nSmartRate credits will be determined according to the rates specified in this schedule.  The customer must have a SmartMeter system to participate in the residential \r\nSmartRate program",
    "fromDateTime": "2013-01-01T00:00:00-08:00",
    "toDateTime": "2014-01-01T00:00:00-08:00",
    "dataType": "BOOLEAN",
    "dataValue": "false",
    "accuracy": 80
  },
  ...
]

MINIMUM AND MAXIMUM ASSUMPTIONS

When running a calculation with minimums set to true, if the calculation results in minimum charges above the pre-tax total costs, or similarly, maximum charges below the pre-tax total costs, the results will be adjusted up to the minimum cost, or down to the maximum cost, respectfully. When this occurs, you will see an assumption entry for each billing period that this occurred in. In the example below, we see that for the May bill, the pre-tax costs for all transmission, distribution, and supply costs were above the maximum specified in the rates, so the pre-tax costs were adjusted down by $6982.31 (as defined in the dataValue field). Maximums are very rare, but minimums are more common. In the case of a minimum adjustment, the keyName will be mininum and the dataValue will be the amount added to the pre-tax costs to meet the minimum specified in the tariff's rates.

"assumptions": [
  {
      "keyName": "maximum",
      "description": "TRANSMISSION,DISTRIBUTION,SUPPLY",
      "dataType": "DECIMAL",
      "fromDateTime": "2020-05-24T00:00:00-07:00",
      "toDateTime": "2020-06-23T01:00:00-07:00",
      "dataValue": "6982.31",
      "accuracy": 100
  },
  ...
]

Request ID

In the top-level response object a requestId field is returned from this request. The requestId value is generated randomly for each request. The primary use case of the requestId is to submit it along with a support ticket when there is a question regarding a particular calculation result.

{
  "status": "success",
  "count": 1,
  "type": "CalculatedCost",
  "requestId": "b9418ae1-af32-473a-b86a-b308fdbd48d1",
  "results": [...]
}

Run a Calculation

To run a new calculation, you will POST a payload containing the calculation criteria and inputs, and a CalculatedCost object will be returned.

Resource URI

POST /rest/v1/ondemand/calculate

Request Parameters

Along with the required security parameters, the following parameters are available as part of the request:

NameTypeDescription
masterTariffIdLongUnique Arcadia ID for the master tariff of this tariff version. (Required)
fromDateTimeDateTimeStarting date and time for this calculation. (Required)
toDateTimeDateTimeEnd date and time for this calculation. (Required)
propertyInputsArray of PropertyDataThis is where you'll specify the usage data and applicabilities for the calculation.
expectedMapSet expectations on calculation results (totalCostadjustedTotalCostkWhkW) to enable accuracy validation. (Optional) See an example
billingPeriodBooleanA true or false flag. If the dates of the calculation represent an actual billing cycle, then you should set this to true. This will give you precise values for items like fixed charges. When it's not set, or set to false, these charges will be prorated across the number of days in the calculation. (Optional, Default=false)
detailLevelEnumerationToggles the level of detail for the calculation result. Examples (Optional, Default=ALL)
groupByEnumerationThis controls how the calculation details are grouped. Examples (Optional, Defaults to the natural grouping for the rates)
minimumsBooleanThis field enables enforcing minimum charges on this calculation. (Optional, Default=false)
excludeChargeClassCommand Separated StringSpecifies a charge class to exclude from the calculation results. Available options are TRANSMISSIONDISTRIBUTIONSUPPLYTAXCONTRACTEDUSER_ADJUSTEDAFTER_TAX, and OTHER. (Optional)
zipCodeString(Optional and usually not needed) See below for the cases when you need location data. When populating this field you should also populate country too.
countryISO Country CodeUse this when passing in a zipCode or postCode, and set it to the ISO Country Code of your zipCode since some countries use the same format (Use with zipCode)
addressAddressAn alternative to using zipCode and country. (Optional and usually not needed)
tariffEffectiveOnDateTimeThis field enables doing a calculation with a single, specified version of a given tariff. For example, if the user specifies that they want to use the 2016-01-01 version of PG&E's E-1 tariff, any calculation, whether it's for 2013, 2015, or 2016, would use the rate data from that version and only that version of the tariff. (Optional)
rateInputsArray of TariffRateThe rate input values are used to override existing rates on the tariff during the calculation. This enables modeling and/or setting customer-specific rates during a calculation. (Optional)
applyUtilityTaxBooleanWhen true, the calculation attempts to apply a utility tax to the provided location. (Optional, Default = true when zipCode and country, or address provided, false otherwise)

ADDRESS

You don't usually need to provide any location information with the On-Demand Cost Calculator. However, in some cases, there is a requirement to have a zipcode and countryto look up location-specific information. Examples include:

  • when the tariff has rates that vary by baseline region and you aren't specifying the baselinesterritoryId
  • you are a Utility customer and want to apply utility taxes for a location to the results

The best way to specify the location is to explicitly provide a zipCode and a country (see above). However, if you don't have these but have some other address fields or maybe geographic coordinates, you can use the address fields below. We will use our Geocoding service (currently Google) to look up the zipCode and a country.

NameTypeDescription
addressStringStringFull free text string representing address. This is the property that is usually passed in. Zip will suffice but the full address is better.
addressNameStringA name associated with the address (e.g. Headquarters). Not usually set.
address1StringFirst part of the address. Usually populated by our address validation from the addressString passed in.
address2StringSecond part of the address. Usually populated by our address validation from the addressString passed in.
cityStringCity of the address. Usually populated by our address validation from the addressString passed in.
stateStringState of the address. Usually populated by our address validation from the addressString passed in.
zipStringPostcode or ZIP code of the address. Usually populated by our address validation from the addressString passed in.
countryStringUsually the ISO Country Code of the address. Usually populated by our address validation from the addressString passed in.
lonDoubleLongitude of the address. We'll populate this by geo-tagging the address.
latDoubleLatitude of the address. We'll populate this by geo-tagging the address.


Examples

Example 1 - Calculate last month's bill

Example where you pass in the tariff and usage data for last month's billing period.
In this case, the usage data is hourly consumption numbers, passed in as a contiguous data series.

Request

POST /rest/v1/ondemand/calculate
{  
  "fromDateTime": "2016-07-13T00:00:00-07:00",  
  "toDateTime": "2016-08-11T00:00:00-07:00",  
  "masterTariffId": 522,  
  "groupBy": "MONTH",  
  "detailLevel": "RATE",  
  "billingPeriod": true,  
  "propertyInputs": [{  
    "keyName": "consumption",  
    "fromDateTime": "2016-07-13T00:00:00-07:00",  
    "duration": 3600000,  
    "dataSeries": [ 1.58, 1.58, 1.58, 1.58, 1.59, 1.60, 1.61, 1.62, 1.63, 1.63, 1.64, 1.64, 1.66, 1.68, 1.70, 1.73, 1.75, 1.76, 1.78, 1.80, 1.80, 1.81, 1.81, 1.81, 1.84, 1.88, 1.91, 1.95, 1.97, 1.98, 2.00, 2.01, 2.02, 2.03, 2.04, 2.05, 2.06, 2.07, 2.08, 2.09, 2.09, 2.11, 2.12, 2.13, 2.13, 2.11, 2.09, 2.08, 2.07, 2.05, 2.03, 2.02, 2.01, 2.01, 2.01, 2.01, 2.02, 2.02, 2.03, 2.04, 2.02, 1.99, 1.96, 1.92, 1.90, 1.89, 1.88, 1.86, 1.85, 1.83, 1.82, 1.79, 1.77, 1.74, 1.71, 1.67, 1.65, 1.63, 1.61, 1.60, 1.58, 1.55, 1.53, 1.51, 1.51, 1.51, 1.52, 1.52, 1.54, 1.56, 1.58, 1.60, 1.60, 1.59, 1.58, 1.58, 1.58, 1.59, 1.59, 1.60, 1.61, 1.63, 1.65, 1.67, 1.67, 1.67, 1.67, 1.67, 1.69, 1.72, 1.74, 1.77, 1.78, 1.79, 1.79, 1.80, 1.80, 1.79, 1.79, 1.78, 1.81, 1.85, 1.89, 1.94, 1.96, 1.97, 1.98, 2.00, 2.01, 2.02, 2.04, 2.05, 2.06, 2.06, 2.07, 2.07, 2.08, 2.09, 2.11, 2.12, 2.12, 2.12, 2.12, 2.12, 2.12, 2.11, 2.09, 2.08, 2.08, 2.08, 2.08, 2.08, 2.07, 2.07, 2.06, 2.05, 2.03, 2.00, 1.97, 1.94, 1.91, 1.90, 1.88, 1.86, 1.84, 1.83, 1.82, 1.81, 1.78, 1.74, 1.70, 1.66, 1.65, 1.64, 1.64, 1.63, 1.61, 1.57, 1.54, 1.51, 1.51, 1.51, 1.52, 1.52, 1.54, 1.56, 1.58, 1.60, 1.60, 1.59, 1.58, 1.57, 1.54, 1.54, 1.54, 1.54, 1.55, 1.56, 1.56, 1.57, 1.58, 1.57, 1.57, 1.57, 1.58, 1.61, 1.63, 1.65, 1.68, 1.71, 1.73, 1.76, 1.78, 1.79, 1.80, 1.81, 1.83, 1.85, 1.88, 1.90, 1.91, 1.92, 1.92, 1.93, 1.93, 1.93, 1.92, 1.91, 1.92, 1.93, 1.93, 1.94, 1.95, 1.97, 1.99, 2.01, 2.01, 2.00, 1.99, 1.98, 1.97, 1.97, 1.96, 1.96, 1.96, 1.95, 1.95, 1.94, 1.95, 1.96, 1.97, 1.98, 1.97, 1.96, 1.94, 1.92, 1.90, 1.89, 1.87, 1.86, 1.84, 1.81, 1.79, 1.76, 1.74, 1.72, 1.71, 1.69, 1.66, 1.64, 1.61, 1.58, 1.56, 1.54, 1.52, 1.49, 1.48, 1.49, 1.49, 1.50, 1.52, 1.53, 1.55, 1.57, 1.57, 1.56, 1.55, 1.53, 1.51, 1.51, 1.52, 1.52, 1.53, 1.53, 1.54, 1.55, 1.55, 1.55, 1.55, 1.55, 1.56, 1.58, 1.61, 1.62, 1.65, 1.67, 1.70, 1.73, 1.74, 1.74, 1.75, 1.76, 1.77, 1.80, 1.82, 1.85, 1.86, 1.86, 1.86, 1.86, 1.86, 1.86, 1.85, 1.85, 1.85, 1.86, 1.86, 1.87, 1.88, 1.90, 1.91, 1.93, 1.93, 1.92, 1.91, 1.90, 1.90, 1.89, 1.89, 1.88, 1.88, 1.88, 1.88, 1.87, 1.88, 1.90, 1.91, 1.93, 1.92, 1.90, 1.88, 1.86, 1.85, 1.84, 1.83, 1.82, 1.80, 1.78, 1.76, 1.73, 1.71, 1.69, 1.68, 1.66, 1.64, 1.61, 1.58, 1.55, 1.52, 1.50, 1.48, 1.46, 1.46, 1.46, 1.47, 1.47, 1.49, 1.51, 1.53, 1.55, 1.54, 1.53, 1.52, 1.50, 1.48, 1.48, 1.49, 1.50, 1.51, 1.51, 1.52, 1.52, 1.52, 1.52, 1.52, 1.52, 1.54, 1.56, 1.58, 1.60, 1.62, 1.64, 1.66, 1.69, 1.70, 1.70, 1.70, 1.70, 1.72, 1.74, 1.77, 1.79, 1.80, 1.80, 1.80, 1.80, 1.80, 1.79, 1.79, 1.78, 1.78, 1.79, 1.79, 1.80, 1.81, 1.82, 1.83, 1.85, 1.85, 1.84, 1.83, 1.83, 1.82, 1.82, 1.81, 1.80, 1.80, 1.80, 1.80, 1.80, 1.82, 1.83, 1.85, 1.87, 1.86, 1.85, 1.83, 1.81, 1.80, 1.79, 1.79, 1.78, 1.76, 1.74, 1.73, 1.71, 1.69, 1.67, 1.65, 1.63, 1.61, 1.57, 1.54, 1.51, 1.49, 1.47, 1.45, 1.43, 1.43, 1.44, 1.44, 1.45, 1.46, 1.48, 1.50, 1.52, 1.52, 1.51, 1.49, 1.49, 1.52, 1.53, 1.53, 1.54, 1.55, 1.55, 1.56, 1.56, 1.57, 1.57, 1.57, 1.57, 1.58, 1.60, 1.62, 1.64, 1.66, 1.68, 1.70, 1.73, 1.73, 1.73, 1.74, 1.74, 1.76, 1.78, 1.80, 1.83, 1.84, 1.84, 1.84, 1.85, 1.84, 1.84, 1.83, 1.83, 1.83, 1.83, 1.84, 1.85, 1.86, 1.86, 1.88, 1.89, 1.89, 1.88, 1.87, 1.86, 1.86, 1.85, 1.85, 1.84, 1.84, 1.84, 1.84, 1.84, 1.85, 1.87, 1.88, 1.90, 1.89, 1.88, 1.86, 1.84, 1.83, 1.82, 1.82, 1.81, 1.79, 1.77, 1.75, 1.73, 1.71, 1.69, 1.68, 1.66, 1.63, 1.60, 1.57, 1.55, 1.52, 1.50, 1.48, 1.46, 1.46, 1.47, 1.48, 1.48, 1.50, 1.52, 1.54, 1.55, 1.56, 1.54, 1.53, 1.54, 1.57, 1.57, 1.58, 1.58, 1.59, 1.59, 1.60, 1.60, 1.61, 1.61, 1.61, 1.61, 1.62, 1.64, 1.66, 1.68, 1.70, 1.72, 1.74, 1.76, 1.76, 1.77, 1.77, 1.78, 1.79, 1.82, 1.84, 1.86, 1.88, 1.88, 1.88, 1.89, 1.89, 1.88, 1.88, 1.88, 1.88, 1.88, 1.88, 1.89, 1.90, 1.91, 1.92, 1.93, 1.93, 1.91, 1.91, 1.90, 1.89, 1.89, 1.89, 1.88, 1.88, 1.88, 1.88, 1.88, 1.89, 1.90, 1.92, 1.93, 1.92, 1.91, 1.89, 1.87, 1.86, 1.85, 1.85, 1.84, 1.82, 1.80, 1.78, 1.76, 1.74, 1.72, 1.70, 1.68, 1.66, 1.63, 1.61, 1.58, 1.56, 1.54, 1.52, 1.49, 1.49, 1.50, 1.51, 1.52, 1.53, 1.55, 1.57, 1.59, 1.59, 1.58, 1.58, 1.57, 1.58, 1.58, 1.58, 1.58, 1.59, 1.60, 1.62, 1.63, 1.64, 1.64, 1.63, 1.63, 1.64, 1.67, 1.70, 1.73, 1.74, 1.76, 1.77, 1.78, 1.79, 1.79, 1.78, 1.78, 1.80, 1.83, 1.86, 1.90, 1.91, 1.92, 1.92, 1.93, 1.93, 1.94, 1.94, 1.95, 1.96, 1.97, 1.98, 1.99, 1.99, 2.01, 2.01, 2.02, 2.02, 2.01, 2.01, 2.00, 2.00],  
    "unit":"kWh"  
  }]  
}  

Response

The result of the calculation is returned in one CalculatedCost object. Each tariff rate within this tariff is calculated and returned in its own calculated cost item. The sum of all the calculated cost items is the totalCost, contained in the parent calculated cost.

{  
  "status": "success",  
  "count": 1,  
  "type": "CalculatedCost",  
  "requestId": "92f92a95-7cd3-43d7-b514-8617ca8c5ee0",  
  "results": [  
    {  
      "masterTariffId": 522,  
      "tariffName": "Residential",  
      "totalCost": 336.2,  
      "fromDateTime": "2016-07-13T00:00:00-07:00",  
      "toDateTime": "2016-08-11T00:00:00-07:00",  
      "currency": "USD",  
      "summary": {  
        "subTotalCost": 336.2,  
        "taxCost": 0,  
        "totalCost": 336.2,  
        "adjustedTotalCost": 336.55,  
        "kWh": 1217.68,  
        "kW": 0  
      },  
      "accuracy": 1,  
      "items": [  
        {  
          "tariffRateId": 17565366,  
          "tariffRateBandId": 11063709,  
          "rateSequenceNumber": 17,  
          "rateGroupName": "Conservation Incentive Adjustment",  
          "rateName": "Conservation Incentive Adjustment  (Summer - Territory P)",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.04852916,  
          "itemQuantity": 1217.68,  
          "cost": 59.09298755,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565386,  
          "tariffRateBandId": 11063805,  
          "rateSequenceNumber": 18,  
          "rateGroupName": "Generation",  
          "rateName": "Generation Charge",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.09684,  
          "itemQuantity": 1217.68,  
          "cost": 117.9201312,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "SUPPLY"  
        },  
        {  
          "tariffRateId": 17565389,  
          "tariffRateBandId": 11063808,  
          "rateSequenceNumber": 19,  
          "rateGroupName": "Transmission",  
          "rateName": "Reliability Service Charge",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00023,  
          "itemQuantity": 1217.68,  
          "cost": 0.2800664,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "TRANSMISSION"  
        },  
        {  
          "tariffRateId": 17565387,  
          "tariffRateBandId": 11063806,  
          "rateSequenceNumber": 19,  
          "rateGroupName": "Transmission",  
          "rateName": "Transmission",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.02144,  
          "itemQuantity": 1217.68,  
          "cost": 26.1070592,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "TRANSMISSION"  
        },  
        {  
          "tariffRateId": 17565388,  
          "tariffRateBandId": 11063807,  
          "rateSequenceNumber": 19,  
          "rateGroupName": "Transmission",  
          "rateName": "Transmission Rate Adjustments",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.0001,  
          "itemQuantity": 1217.68,  
          "cost": 0.121768,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "TRANSMISSION"  
        },  
        {  
          "tariffRateId": 17565391,  
          "tariffRateBandId": 11063810,  
          "rateSequenceNumber": 20,  
          "rateGroupName": "Distribution",  
          "rateName": "Distribution Charge",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.08339,  
          "itemQuantity": 1217.68,  
          "cost": 101.5423352,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565390,  
          "tariffRateBandId": 11063809,  
          "rateSequenceNumber": 20,  
          "rateGroupName": "Distribution",  
          "rateName": "New System Generation Charge",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00255,  
          "itemQuantity": 1217.68,  
          "cost": 3.105084,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565392,  
          "tariffRateBandId": 11063811,  
          "rateSequenceNumber": 21,  
          "rateGroupName": "Public Purpose Programs",  
          "rateName": "Public Purpose Programs",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.01405,  
          "itemQuantity": 1217.68,  
          "cost": 17.108404,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565393,  
          "tariffRateBandId": 11063812,  
          "rateSequenceNumber": 22,  
          "rateGroupName": "Nuclear Decommissioning",  
          "rateName": "Nuclear Decommissioning",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00022,  
          "itemQuantity": 1217.68,  
          "cost": 0.2678896,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565394,  
          "tariffRateBandId": 11063813,  
          "rateSequenceNumber": 23,  
          "rateGroupName": "DWR Bond Charge",  
          "rateName": "DWR Bond Charge",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00539,  
          "itemQuantity": 1217.68,  
          "cost": 6.5632952,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565395,  
          "tariffRateBandId": 11063814,  
          "rateSequenceNumber": 24,  
          "rateGroupName": "Ongoing CTC",  
          "rateName": "Ongoing CTC",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00338,  
          "itemQuantity": 1217.68,  
          "cost": 4.1157584,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565396,  
          "tariffRateBandId": 11063815,  
          "rateSequenceNumber": 25,  
          "rateGroupName": "Energy Cost Recovery Amount",  
          "rateName": "Energy Cost Recovery Amount",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": -0.00002,  
          "itemQuantity": 1217.68,  
          "cost": -0.0243536,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565397,  
          "tariffRateBandId": 11063817,  
          "rateSequenceNumber": 26,  
          "rateGroupName": "Greenhouse Gas Volumetric Return",  
          "rateName": "Greenhouse Gas Volumetric Return (Summer - Territory P)",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 1217.68,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17368253,  
          "tariffRateBandId": 10770115,  
          "rateSequenceNumber": 30,  
          "rateGroupName": "Energy Surcharge",  
          "rateName": "Energy Surcharge",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00029,  
          "itemQuantity": 1217.68,  
          "cost": 0.3531272,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "AFTER_TAX"  
        },  
        {  
          "tariffRateId": 17492212,  
          "tariffRateBandId": 10994649,  
          "rateSequenceNumber": 32,  
          "rateGroupName": "Green Tariff (GT) Program Charges",  
          "rateName": "Generation Credit",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 1217.68,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17492214,  
          "tariffRateBandId": 10994653,  
          "rateSequenceNumber": 32,  
          "rateGroupName": "Green Tariff (GT) Program Charges",  
          "rateName": "PCIA",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 1217.68,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17492213,  
          "tariffRateBandId": 10994651,  
          "rateSequenceNumber": 32,  
          "rateGroupName": "Green Tariff (GT) Program Charges",  
          "rateName": "Program Charge",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 1217.68,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17492211,  
          "tariffRateBandId": 10994647,  
          "rateSequenceNumber": 32,  
          "rateGroupName": "Green Tariff (GT) Program Charges",  
          "rateName": "Solar Charge",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 1217.68,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION"  
        },  
        {  
          "tariffRateId": 17565451,  
          "tariffRateBandId": 11063917,  
          "rateSequenceNumber": 33,  
          "rateGroupName": "California Climate Credit",  
          "rateName": "California Climate Credit",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "quantityKey": "fixed",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 0,  
          "cost": 0,  
          "chargeType": "FIXED_PRICE",  
          "chargeClass": "AFTER_TAX"  
        }  
      ],  
      "assumptions": [  
        {  
          "keyName": "tariffId",  
          "dataType": "INTEGER",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "3258081"  
        },  
        {  
          "keyName": "territoryId",  
          "dataType": "INTEGER",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "3534",  
          "accuracy": 80  
        },  
        {  
          "keyName": "dailyMedicalAllowance",  
          "displayName": "Daily Medical Allowance ",  
          "description": "Residential customers on a medical allowance get additional quantities of energy at the lowest (baseline) price. The medical allowance is a daily value. ",  
          "dataType": "DECIMAL",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "0",  
          "accuracy": 80  
        },  
        {  
          "keyName": "hasCAEnergySurchargeExemption",  
          "displayName": "Has Energy Surcharge Exemption",  
          "description": "Exemptions for CA Energy Surcharge apply to the following:\r\n1. Federal Agencies\r\n2. American National Red Cross facilities\r\n3. Energy consumed on Indian reservations\r\n4. Foreign consular employees\r\n5. Federal Credit Unions",  
          "dataType": "BOOLEAN",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "false",  
          "accuracy": 80  
        },  
        {  
          "keyName": "smartMeterOptOut",  
          "displayName": "Has Smart Meter Opt-Out",  
          "description": "Customers  who elect to opt-out of receiving a smart meter and choose to retain a non-smart meter, are subject to the Smart Meter Opt-Out fees.\r\n\r\nSmart Meter Opt-Out Customers are subject to one-time, up-front fee and a recurring monthly fee ",  
          "dataType": "BOOLEAN",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "false",  
          "accuracy": 80  
        },  
        {  
          "keyName": "isSmartRateCustomer",  
          "displayName": "Is SmartRate Customer",  
          "description": "The residential SmartRate program is a voluntary rate supplement to the customer's \r\notherwise applicable rate schedule (OAS).\r\nThe customer will be billed for all regular charges applicable under the customer's OAS.  \r\nAdditional charges (based on usage during SmartDay High-Price Periods) and \r\nSmartRate credits will be determined according to the rates specified in this schedule.  The customer must have a SmartMeter system to participate in the residential \r\nSmartRate program",  
          "dataType": "BOOLEAN",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "false",  
          "accuracy": 80  
        },  
        {  
          "keyName": "utilityEmployee",  
          "displayName": "Is Utility Employee",  
          "description": "Applicable to domestic service utility employees ",  
          "dataType": "BOOLEAN",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "false",  
          "accuracy": 80  
        },  
        {  
          "keyName": "powerChargeIndifferenceAdjustmentVintageYear",  
          "displayName": "Power Charge Indifference Adjustment  Vintage Year ",  
          "description": "The adjustment (either a \r\ncharge or credit) is intended to ensure that customers that purchase electricity from \r\nnon-utility suppliers pay their share of cost for generation acquired prior to 2003",  
          "dataType": "STRING",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "None",  
          "accuracy": 80  
        },  
        {  
          "keyName": "solarChoiceCustomerCategory",  
          "displayName": "Solar Choice Customer Category",  
          "description": "The customer is a solar choice customer  taking service under Schedule E-GT. The customer will pay the applicable Program Charge based on the year service under this schedule was started. ",  
          "dataType": "STRING",  
          "fromDateTime": "2016-07-13T00:00:00-07:00",  
          "toDateTime": "2016-08-11T00:00:00-07:00",  
          "dataValue": "None",  
          "accuracy": 80  
        }  
      ],  
      "calculatedCostId": "1212281e-d0cd-4a4c-b785-be152022d456"  
    }  
  ]  
}  

Example 2 - Calculate with expected values

This example passes in values for Total Cost, Adjusted Total Cost, and Total kWh (typically comes from the billing data or CIS system). This triggers Signal's real-time calculation QA process.
Note that the consumption input is set as a single value, not a series like the previous example.

Request

POST /rest/v1/ondemand/calculate
{  
  "fromDateTime": "2016-07-10T00:00:00-05:00",  
  "toDateTime": "2016-08-12T00:00:00-05:00",  
  "masterTariffId": 512,  
  "groupBy": "ALL",  
  "detailLevel": "TOTAL",  
  "billingPeriod": true,  
  "minimums": true,  
  "expected": {  
    "totalCost": 170.20,  
    "adjustedTotalCost":170.18,  
    "kWh": 1266.48  
  },  
  "propertyInputs": [  
  {  
    "keyName" : "consumption",  
    "unit" : "kWh",  
    "dataValue" : 1266.48  
  },  
  {  
    "keyName" : "cityLimits",  
    "dataValue" : "Inside"  
  },  
  {  
    "keyName" : "isLowIncomeSeniorCitizen953",  
    "dataValue" : false  
  }]  
} 

Response

{  
  "status": "success",  
  "count": 1,  
  "type": "CalculatedCost",  
  "requestId": "d0c96efc-7058-40f8-802b-48f6480ae411",  
  "results": [  
    {  
      "masterTariffId": 512,  
      "tariffName": "Residential",  
      "totalCost": 170.22,  
      "fromDateTime": "2016-07-10T01:00:00-04:00",  
      "toDateTime": "2016-08-12T01:00:00-04:00",  
      "currency": "USD",  
      "summary": {  
        "subTotalCost": 170.22,  
        "taxCost": 0,  
        "totalCost": 170.22,  
        "adjustedTotalCost": 170.22,  
        "kWh": 1266.48,  
        "kW": 0  
      },  
      "accuracy": 1,  
      "items": [  
        {  
          "fromDateTime": "2016-07-10T01:00:00-04:00",  
          "toDateTime": "2016-08-12T01:00:00-04:00",  
          "quantityKey": "consumption",  
          "rateAmount": 0.13440682,  
          "itemQuantity": 1266.48,  
          "cost": 170.22354375  
        }  
      ],  
      "assumptions": [  
        {  
          "keyName": "tariffId",  
          "dataType": "INTEGER",  
          "fromDateTime": "2016-07-10T01:00:00-04:00",  
          "toDateTime": "2016-08-12T01:00:00-04:00",  
          "dataValue": "3258294"  
        },  
        {  
          "keyName": "isLowIncomeSeniorCitizen953",  
          "displayName": "Is Low Income Senior Citizen",  
          "description": "Customers who are at least 62 years of age or older or be a disabled person as evidenced by receiving Supplemental Security Income (SSI) or State Supplemental Payment (SSP) and whose total gross annual income for all persons in the applicant's household may not exceed seventy-five (75) percent of the most recent median income levels.",  
          "dataType": "BOOLEAN",  
          "fromDateTime": "2016-07-10T01:00:00-04:00",  
          "toDateTime": "2016-08-12T01:00:00-04:00",  
          "dataValue": "false",  
          "accuracy": 100  
        },  
        {  
          "keyName": "cityLimits",  
          "displayName": "Service Area (Inside/outside city limits)",  
          "description": "Has service inside or outside city limits",  
          "dataType": "STRING",  
          "fromDateTime": "2016-07-10T01:00:00-04:00",  
          "toDateTime": "2016-08-12T01:00:00-04:00",  
          "dataValue": "Inside",  
          "accuracy": 100  
        }  
      ]  
    }  
    "calculatedCostId": "1212281e-d0cd-4a4c-b785-be152022d456"  
  ]  
}  

Example 3 - Calculate by passing in periods

In the following examples, we pass in consumption data using periods (for time of use bucketed values).

3a: Passing period as an enumeration

Periods can be passed in as enumeration values corresponding to the tariff labels for time-of-use periods:

Request
POST /rest/v1/ondemand/calculate
{  
    "masterTariffId": 525,  
    "fromDateTime": "2015-12-08T00:00:00-08:00",  
    "toDateTime": "2016-01-03T00:00:00-08:00",  
    "billingPeriod": true,  
    "minimums": true,  
    "groupBy": "MONTH",  
    "detailLevel": "RATE",  
    "fields": "ext",  
    "propertyInputs": [ {  
        "keyName": "consumption",  
        "unit": "kWh",  
        "period": "PARTIAL_PEAK",  
        "dataValue": "300.1"  
    },{  
        "keyName" : "consumption",  
        "unit" : "kWh",  
        "period":"OFF_PEAK",  
        "dataValue":"200.6"  
    }]  
}  
Response
{  
  "status": "success",  
  "count": 1,  
  "type": "CalculatedCost",  
  "requestId": "e149e5c4-8f9c-4fc1-b865-24941d69afd4",  
  "results": [  
    {  
      "masterTariffId": 525,  
      "tariffName": "Residential - Time of Use",  
      "totalCost": 85.99,  
      "fromDateTime": "2015-12-08T00:00:00-08:00",  
      "toDateTime": "2016-01-03T00:00:00-08:00",  
      "currency": "USD",  
      "summary": {  
        "subTotalCost": 85.99,  
        "taxCost": 0,  
        "totalCost": 85.99,  
        "adjustedTotalCost": 86.14,  
        "kWh": 500.7,  
        "kW": 0  
      },  
      "accuracy": 1,  
      "items": [  
        {  
          "tariffRateId": 17368253,  
          "tariffRateBandId": 10770115,  
          "rateSequenceNumber": 0,  
          "rateGroupName": "Energy Surcharge",  
          "rateName": "Energy Surcharge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00029,  
          "itemQuantity": 500.7,  
          "cost": 0.145203,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "AFTER_TAX",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411233,  
          "tariffRateBandId": 10815788,  
          "rateSequenceNumber": 1,  
          "rateGroupName": "Generation",  
          "rateName": "Generation Charge - Winter Off-Peak",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.07707,  
          "itemQuantity": 183.79581152,  
          "cost": 14.16514319,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "SUPPLY",  
          "period": "OFF_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459959,  
          "tariffRateBandId": 10892524,  
          "rateSequenceNumber": 1,  
          "rateGroupName": "Generation",  
          "rateName": "Generation Charge - Winter Off-Peak",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.08243,  
          "itemQuantity": 16.80418848,  
          "cost": 1.38516926,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "SUPPLY",  
          "period": "OFF_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411231,  
          "tariffRateBandId": 10815786,  
          "rateSequenceNumber": 1,  
          "rateGroupName": "Generation",  
          "rateName": "Generation Charge - Winter Part-Peak",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.09116,  
          "itemQuantity": 300.1,  
          "cost": 27.357116,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "SUPPLY",  
          "period": "PARTIAL_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411214,  
          "tariffRateBandId": 10815769,  
          "rateSequenceNumber": 3,  
          "rateGroupName": "California Climate Credit",  
          "rateName": "California Climate Credit",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "fixed",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 0,  
          "cost": 0,  
          "chargeType": "FIXED_PRICE",  
          "chargeClass": "AFTER_TAX",  
          "transactionType": "BUY"  
        },  
        {  
          "tariffRateId": 17459940,  
          "tariffRateBandId": 10892505,  
          "rateSequenceNumber": 3,  
          "rateGroupName": "California Climate Credit",  
          "rateName": "California Climate Credit",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "fixed",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 0,  
          "cost": 0,  
          "chargeType": "FIXED_PRICE",  
          "chargeClass": "AFTER_TAX",  
          "transactionType": "BUY"  
        },  
        {  
          "tariffRateId": 17411215,  
          "tariffRateBandId": 10815770,  
          "rateSequenceNumber": 4,  
          "rateGroupName": "Transmission",  
          "rateName": "Transmission",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.01659,  
          "itemQuantity": 483.89581152,  
          "cost": 8.02783151,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459941,  
          "tariffRateBandId": 10892506,  
          "rateSequenceNumber": 4,  
          "rateGroupName": "Transmission",  
          "rateName": "Transmission",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.01659,  
          "itemQuantity": 16.80418848,  
          "cost": 0.27878149,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411234,  
          "tariffRateBandId": 10815789,  
          "rateSequenceNumber": 5,  
          "rateGroupName": "Distribution",  
          "rateName": "Distribution Charge - Winter Off-Peak",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.04966,  
          "itemQuantity": 183.79581152,  
          "cost": 9.1273,  
          "chargeType": "CONSUMPTION_BASED",  
          "period": "OFF_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459960,  
          "tariffRateBandId": 10892525,  
          "rateSequenceNumber": 5,  
          "rateGroupName": "Distribution",  
          "rateName": "Distribution Charge - Winter Off-Peak",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.0624,  
          "itemQuantity": 16.80418848,  
          "cost": 1.04858136,  
          "chargeType": "CONSUMPTION_BASED",  
          "period": "OFF_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411232,  
          "tariffRateBandId": 10815787,  
          "rateSequenceNumber": 5,  
          "rateGroupName": "Distribution",  
          "rateName": "Distribution Charge - Winter Part-Peak",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.07449,  
          "itemQuantity": 300.1,  
          "cost": 22.354449,  
          "chargeType": "CONSUMPTION_BASED",  
          "period": "PARTIAL_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411216,  
          "tariffRateBandId": 10815771,  
          "rateSequenceNumber": 5,  
          "rateGroupName": "Transmission",  
          "rateName": "Transmission Rate Adjustments",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00085,  
          "itemQuantity": 483.89581152,  
          "cost": 0.41131144,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459942,  
          "tariffRateBandId": 10892507,  
          "rateSequenceNumber": 5,  
          "rateGroupName": "Transmission",  
          "rateName": "Transmission Rate Adjustments",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": -0.00033,  
          "itemQuantity": 16.80418848,  
          "cost": -0.00554538,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411217,  
          "tariffRateBandId": 10815772,  
          "rateSequenceNumber": 6,  
          "rateGroupName": "Transmission",  
          "rateName": "Reliability Service Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00015,  
          "itemQuantity": 483.89581152,  
          "cost": 0.07258437,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459943,  
          "tariffRateBandId": 10892508,  
          "rateSequenceNumber": 6,  
          "rateGroupName": "Transmission",  
          "rateName": "Reliability Service Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00023,  
          "itemQuantity": 16.80418848,  
          "cost": 0.00386496,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411218,  
          "tariffRateBandId": 10815773,  
          "rateSequenceNumber": 7,  
          "rateGroupName": "Distribution",  
          "rateName": "New System Generation Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00302,  
          "itemQuantity": 483.89581152,  
          "cost": 1.46136535,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459944,  
          "tariffRateBandId": 10892509,  
          "rateSequenceNumber": 7,  
          "rateGroupName": "Distribution",  
          "rateName": "New System Generation Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00255,  
          "itemQuantity": 16.80418848,  
          "cost": 0.04285068,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411221,  
          "tariffRateBandId": 10815776,  
          "rateSequenceNumber": 8,  
          "rateGroupName": "DWR Bond Charge",  
          "rateName": "DWR Bond Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00526,  
          "itemQuantity": 483.89581152,  
          "cost": 2.54529197,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411219,  
          "tariffRateBandId": 10815774,  
          "rateSequenceNumber": 8,  
          "rateGroupName": "Public Purpose Programs",  
          "rateName": "Public Purpose Programs",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.01312,  
          "itemQuantity": 483.89581152,  
          "cost": 6.34871305,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459945,  
          "tariffRateBandId": 10892510,  
          "rateSequenceNumber": 8,  
          "rateGroupName": "Public Purpose Programs",  
          "rateName": "Public Purpose Programs",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.01405,  
          "itemQuantity": 16.80418848,  
          "cost": 0.23609885,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459946,  
          "tariffRateBandId": 10892511,  
          "rateSequenceNumber": 9,  
          "rateGroupName": "DWR Bond Charge",  
          "rateName": "DWR Bond Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00539,  
          "itemQuantity": 16.80418848,  
          "cost": 0.09057458,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411220,  
          "tariffRateBandId": 10815775,  
          "rateSequenceNumber": 9,  
          "rateGroupName": "Nuclear Decommissioning",  
          "rateName": "Nuclear Decommissioning",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00097,  
          "itemQuantity": 483.89581152,  
          "cost": 0.46937894,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459947,  
          "tariffRateBandId": 10892512,  
          "rateSequenceNumber": 9,  
          "rateGroupName": "Nuclear Decommissioning",  
          "rateName": "Nuclear Decommissioning",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00022,  
          "itemQuantity": 16.80418848,  
          "cost": 0.00369692,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411222,  
          "tariffRateBandId": 10815777,  
          "rateSequenceNumber": 9,  
          "rateGroupName": "Ongoing CTC",  
          "rateName": "Ongoing CTC",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00067,  
          "itemQuantity": 483.89581152,  
          "cost": 0.32421019,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459948,  
          "tariffRateBandId": 10892513,  
          "rateSequenceNumber": 9,  
          "rateGroupName": "Ongoing CTC",  
          "rateName": "Ongoing CTC",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00338,  
          "itemQuantity": 16.80418848,  
          "cost": 0.05679816,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411223,  
          "tariffRateBandId": 10815778,  
          "rateSequenceNumber": 15,  
          "rateGroupName": "Energy Cost Recovery Amount",  
          "rateName": "Energy Cost Recovery Amount",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": -0.00504,  
          "itemQuantity": 483.89581152,  
          "cost": -2.43883489,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459949,  
          "tariffRateBandId": 10892514,  
          "rateSequenceNumber": 15,  
          "rateGroupName": "Energy Cost Recovery Amount",  
          "rateName": "Energy Cost Recovery Amount",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": -0.00002,  
          "itemQuantity": 16.80418848,  
          "cost": -0.00033608,  
          "chargeType": "CONSUMPTION_BASED",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411241,  
          "tariffRateBandId": 10815816,  
          "rateSequenceNumber": 17,  
          "rateGroupName": "Conservation Incentive Adjustment",  
          "rateName": "Conservation Incentive Adjustment (Winter Off Peak - Territory P)",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.00338252,  
          "itemQuantity": 183.79581152,  
          "cost": 0.62169301,  
          "chargeType": "CONSUMPTION_BASED",  
          "period": "OFF_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459967,  
          "tariffRateBandId": 10892550,  
          "rateSequenceNumber": 17,  
          "rateGroupName": "Conservation Incentive Adjustment",  
          "rateName": "Conservation Incentive Adjustment (Winter Off Peak - Territory P)",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": -0.03355,  
          "itemQuantity": 16.80418848,  
          "cost": -0.56378052,  
          "chargeType": "CONSUMPTION_BASED",  
          "period": "OFF_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411240,  
          "tariffRateBandId": 10815811,  
          "rateSequenceNumber": 17,  
          "rateGroupName": "Conservation Incentive Adjustment",  
          "rateName": "Conservation Incentive Adjustment (Winter Partial Peak - Territory P)",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": -0.01870748,  
          "itemQuantity": 300.1,  
          "cost": -5.61411475,  
          "chargeType": "CONSUMPTION_BASED",  
          "period": "PARTIAL_PEAK",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411239,  
          "tariffRateBandId": 10815808,  
          "rateSequenceNumber": 18,  
          "rateGroupName": "Greenhouse Gas Volumetric Return",  
          "rateName": "Greenhouse Gas Volumetric Return (Winter - Territory P)",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": -0.00375176,  
          "itemQuantity": 483.89581152,  
          "cost": -1.81546095,  
          "chargeType": "CONSUMPTION_BASED",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17459965,  
          "tariffRateBandId": 10892543,  
          "rateSequenceNumber": 18,  
          "rateGroupName": "Greenhouse Gas Volumetric Return",  
          "rateName": "Greenhouse Gas Volumetric Return (Winter - Territory P)",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 16.80418848,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "seasonName": "Winter",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17492212,  
          "tariffRateBandId": 10994649,  
          "rateSequenceNumber": 999,  
          "rateGroupName": "Green Tariff (GT) Program Charges",  
          "rateName": "Generation Credit",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 16.80418848,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "SUPPLY",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17492214,  
          "tariffRateBandId": 10994653,  
          "rateSequenceNumber": 999,  
          "rateGroupName": "Green Tariff (GT) Program Charges",  
          "rateName": "PCIA",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 16.80418848,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17492213,  
          "tariffRateBandId": 10994651,  
          "rateSequenceNumber": 999,  
          "rateGroupName": "Green Tariff (GT) Program Charges",  
          "rateName": "Program Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 16.80418848,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "DISTRIBUTION",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17492211,  
          "tariffRateBandId": 10994647,  
          "rateSequenceNumber": 999,  
          "rateGroupName": "Green Tariff (GT) Program Charges",  
          "rateName": "Solar Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0,  
          "itemQuantity": 16.80418848,  
          "cost": 0,  
          "chargeType": "CONSUMPTION_BASED",  
          "chargeClass": "SUPPLY",  
          "transactionType": "NET"  
        },  
        {  
          "tariffRateId": 17411315,  
          "tariffRateBandId": 10816100,  
          "rateSequenceNumber": 999,  
          "rateGroupName": "Minimum Charge",  
          "rateName": "Minimum Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "minimum",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.32854,  
          "itemQuantity": 24,  
          "cost": 7.88496,  
          "chargeType": "MINIMUM",  
          "transactionType": "BUY"  
        },  
        {  
          "tariffRateId": 17460041,  
          "tariffRateBandId": 10892836,  
          "rateSequenceNumber": 999,  
          "rateGroupName": "Minimum Charge",  
          "rateName": "Minimum Charge",  
          "fromDateTime": "2015-12-08T00:00:00-08:00",  
          "toDateTime": "2016-01-03T00:00:00-08:00",  
          "quantityKey": "minimum",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.32854,  
          "itemQuantity": 2,  
          "cost": 0.65708,  
          "chargeType": "MINIMUM",  
          "transactionType": "BUY"  
        }  
      ],  
      "assumptions": [...],  
      "calculatedCostId": "bcb7f8cd-3ecb-4ae2-a78f-f14f0b947757"  
    }  
  ]  
}  

3b: Passing usage in custom periods

We provide a more generalized format for inputting data for arbitrary periods.
In the request below, the first input specifies 300.1 kWh usage at midnight of each weekday.
The second input specifies 200.6 kWh usage at midnight on the weekends.

Request
POST /rest/v1/ondemand/calculate
{  
    "masterTariffId": 525,  
	"fromDateTime": "2015-12-08T00:00:00-08:00",  
	"toDateTime": "2016-01-03T00:00:00-08:00",  
	"billingPeriod": true,  
	"minimums": true,  
	"groupBy": "MONTH",  
	"detailLevel": "RATE",  
    "fields": "ext",  
	"propertyInputs": [ {  
	    "keyName": "consumption",  
	    "unit": "kWh",  
	    "period": "1:5e 0H",  
	    "dataValue": "300.1"  
    },  
    {  
        "keyName" : "consumption",  
        "unit" : "kWh",  
        "period":"6:7e 0H",  
        "dataValue":"200.6"  
    }]  
}

Example 4 - Competitive Electric Supply, Community Choice Aggregation, and other rate overrides

The calculate method accepts rates as inputs, allowing you to set a contracted rate amount on a deregulated tariff or, more generally, to model "what-if" scenarios with a tariff.

4a: Competitive Electric Supply

In deregulated markets, customers can purchase electricity or gas from a third-party supplier rather than the distributing utility. To calculate costs in these scenarios, the calculate method accepts rates as inputs via rateInputs allowing you to define the “contracted” rate or rate structure. This contracted rate can be used within the calculation, overriding the bypassable rates. Contracted rates can include:

rateInputs is an array of TariffRate, and can include one or more rates of any charge type. For example, if you want to set a customer’s supply rate to 5¢/kWh for a calculation, you would pass in the following:

Request
POST /rest/v1/ondemand/calculate
{  
   "masterTariffId": 522,  
   "fromDateTime":"2015-01-01T00:00:00-07:00",  
   "toDateTime":"2016-01-01T00:00:00-07:00",  
   "groupBy": "MONTH",  
   "detailLevel": "CHARGE_TYPE",  
   "propertyInputs":[  
       {  
            "fromDateTime" : "2015-01-01",  
            "toDateTime" : "2015-02-01",  
            "keyName" : "consumption",  
            "dataValue" : 520  
        },{  
            "fromDateTime" : "2015-02-01",  
            "toDateTime" : "2015-03-01",  
            "keyName" : "consumption",  
            "dataValue" : 980  
        },{  
            "fromDateTime" : "2015-03-01",  
            "toDateTime" : "2015-04-01",  
            "keyName" : "consumption",  
            "dataValue" : 1235  
        },{  
            "fromDateTime" : "2015-04-01",  
            "toDateTime" : "2015-05-01",  
            "keyName" : "consumption",  
            "dataValue" : 1013  
        },       {  
            "fromDateTime" : "2015-05-01",  
            "toDateTime" : "2015-06-01",  
            "keyName" : "consumption",  
            "dataValue" : 520  
        },{  
            "fromDateTime" : "2015-06-01",  
            "toDateTime" : "2015-07-01",  
            "keyName" : "consumption",  
            "dataValue" : 980  
        },{  
            "fromDateTime" : "2015-07-01",  
            "toDateTime" : "2015-08-01",  
            "keyName" : "consumption",  
            "dataValue" : 1235  
        },{  
            "fromDateTime" : "2015-08-01",  
            "toDateTime" : "2015-09-01",  
            "keyName" : "consumption",  
            "dataValue" : 1013  
        },{  
            "fromDateTime" : "2015-09-01",  
            "toDateTime" : "2015-10-01",  
            "keyName" : "consumption",  
            "dataValue" : 784  
        },{  
            "fromDateTime" : "2015-10-01",  
            "toDateTime" : "2015-11-01",  
            "keyName" : "consumption",  
            "dataValue" : 895  
        },{  
            "fromDateTime" : "2015-11-01",  
            "toDateTime" : "2015-12-01",  
            "keyName" : "consumption",  
            "dataValue" : 953  
        },{  
            "fromDateTime" : "2015-12-01",  
            "toDateTime" : "2016-01-01",  
            "keyName" : "consumption",  
            "dataValue" : 1015  
        }],  
    "rateInputs":\[  
        {  
            "fromDateTime":"2015-01-01T00:00:00-07:00",  
            "toDateTime":"2016-01-01T00:00:00-07:00",  
            "chargeClass":"CONTRACTED",  
            "rateBands":[{  
                   "rateAmount":".05"  
            }]  
        }  
    ]  
}  

This call would result in the passed in $0.05 replacing all the contracted (also called bypassable) rates with the override rate amount provided. All non-contracted charges would continue to be calculated as before.

4b: Community Choice Aggregation (CCA)

Community Choice Aggregation (CCA) allows communities to choose to offer their residents alternative electric supply while continuing to have their electricity delivered by their local distribution utility. In such an arrangement the supply charges are from the CCA (e.g. Marin Clean Energy) and the transmission & distribution charges are from the distributing utility (e.g. Pacific Gas & Electric).

While we model CCA tariffs in their entirety, we also enable the calculation from the distributing utility’s point of view. The parameter is excludeChargeClass and you provide the charge class you would like to exclude. For example, to exclude the supply charges for a CCA customer (the distributing utility’s point of view), you make the following call:

Request
POST /rest/v1/ondemand/calculate
{  
    "masterTariffId": 3251054,  
    "fromDateTime": "2016-01-03",  
    "toDateTime": "2016-02-05",  
    "groupBy": "MONTH",  
    "detailLevel": "RATE",  
    "billingPeriod" : true,  
    "excludeChargeClass": "SUPPLY",  
    "propertyInputs" :[  
    {  
        "keyName": "consumption",  
        "unit": "kWh",  
        "dataValue": "1200"  
    }]  
}  

4c: Modeling rate change using factors

Overriding the calculation factor allows the user to model changes to rate amounts or apply discounts to the tariff during the calculation based on the chargeType or chargeClass. For example, to simulate the effect of a 10% increase in the consumption rate amounts, the following would be passed to the calculate method:

Request
POST /rest/v1/ondemand/calculate
{  
    "masterTariffId": 3251054,  
    "fromDateTime": "2011-11-01T00:00:00-05:00",  
    "toDateTime": "2012-01-01T00:00:00-05:00",  
    "propertyInputs":[  
    {  
        "keyName":"consumption",  
        "dataValue":1000  
    }],  
    "rateInputs":[  
    {  
        "chargeType":"CONSUMPTION_BASED",  
        "rateBands":[  
        {  
           "calculationFactor":1.10  
        }]  
    }]  
}  

Example 5 - Calculating rates with tax inputs

Calculations can also be performed with tax rate inputs. Simply pass in the tax rate as a tariff rate input using the chargeType set to "TAX". Tax rates are calculated using the subtotal from the calculated amount. Either a rate percentage or a specific rate dollar amount can be used. Optionally, you can set the rateName and rateGroup so the returned cost items can be broken out.

Request

POST /rest/v1/ondemand/calculate

Example request with tax rate inputs

{  
   "masterTariffId": 522,  
   "fromDateTime": "2016-06-01",  
   "toDateTime": "2016-07-03",  
   "billingPeriod": true,  
   "propertyInputs":[  
    {  
         "keyName":"consumption",  
         "dataValue":1000  
    }],  
   "rateInputs":[  
    {  
         "rateGroupName":"Taxes",  
         "rateName":"Utility Users Tax",  
         "chargeType":"TAX",  
         "rateBands":[  
            {  
               "rateAmount": 0.075,  
               "rateUnit":"PERCENTAGE"  
            }]  
    }]  
}  

Response (snippet)

Item quantity reflects the subtotal amount.

{  
    "tariffRateId": 0,  
    "rateSequenceNumber": 10000,  
    "rateGroupName": "Taxes",  
    "rateName": "Utility Users Tax",  
    "fromDateTime": "2016-06-01T00:00:00-07:00",  
    "toDateTime": "2016-07-03T00:00:00-07:00",  
    "quantityKey": "percentage",  
    "rateType": "PERCENTAGE",  
    "rateAmount": 0.075,  
    "itemQuantity": 233.52446,  
    "cost": 17.5143345,  
    "chargeType": "TAX"  
}  

Example 6 - Overriding Critical Peak Rates in a Calculation

This example demonstrates how to pass in custom critical peak time of use intervals. The purpose of this feature is to run a calculation with a different critical peak than the one otherwise provided by the tariff. Multiple custom critical peak times can be passed in to simulate a varying number of critical peak events. Custom critical peak intervals are passed in to the customTimeOfUseIntervals parameter, which contains a list of time of use intervals to be overriden. The response will then have its critical peak items shift to the interval that was passed in. However, none of the other time of use intervals will change. Note that at this time, only critical peak time of use intervals are supported by this feature.

Request

{  
    "masterTariffId" : 83653,  
    "fromDateTime" : "2015-09-01",  
    "toDateTime" : "2015-09-30",  
    "minimums" : "true",  
    "detailLevel" : "RATE",  
    "groupBy" : "HOUR",  
    "billingPeriod" : "true",  
    "propertyInputs" : [  
        {  
            "fromDateTime" : "2015-09-01",  
            "toDateTime" : "2015-09-30",  
            "keyName" : "consumption",  
            "dataValue" : "2400"  
        },  
        {  
            "keyName" : "pdpProgramEventOption",  
            "dataValue" : "No Limit - Four Hour Window"  
        }  
    ],  
    "customTimeOfUseIntervals": [  
        { "touName": "Critical Peak PDP",  
			"fromDateTime": "2015-09-11T02:00:00-07:00",  
			"toDateTime": "2015-09-11T04:00:00-07:00",  
			"touType": "CRITICAL_PEAK"  
        },  
		{  
			"touName": "Critical Peak PDP",  
			"fromDateTime": "2015-09-12T02:00:00-07:00",  
			"toDateTime": "2015-09-12T04:00:00-07:00",  
			"touType": "CRITICAL_PEAK"  
		},  
		{  
			"touName": "Critical Peak PDP",  
			"fromDateTime": "2015-09-13T02:00:00-07:00",  
			"toDateTime": "2015-09-13T04:00:00-07:00",  
			"touType": "CRITICAL_PEAK"  
		}  
    ]  
}  

Response (snippet)

{  
  "rateInputs":[  
      {  
         "rateName":"Sellback Block and Index Rate",  
         "tariffBookRateName":"Sellback Block and Index Rate",  
         "chargeClass":"CONTRACTED",  
         "chargePeriod":"HOURLY",  
         "transactionType":"BUY",  
         "variableRateKey":"hourlyPricingRealTimePJM",  
         "variableRateSubKey":"51291",  
         "rateBands":[  
            {  
               "hasConsumptionLimit":true,  
               "consumptionUpperLimit":2000,  
               "rateAmount":"0.05",  
               "rateUnit":"BLOCK_SELL_BACK",  
               "isCredit":false  
            },  
            {  
               "hasConsumptionLimit":true,  
               "rateAmount":null,  
               "rateUnit":"COST_PER_UNIT",  
               "isCredit":false  
            }  
         ]  
      }  
   ]  
}