HomeGuidesAPI ReferenceChangelog
Log In
API Reference

Account Calculation with {providerAccountId}

To run a new calculation, you will POST a payload containing the calculation criteria and inputs, and a CalculatedCost object will be returned. Note that these parameters are part of the request body, not the query string.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Run an account cost calculation using your providerAccountId.

Use this endpoint when you identify accounts with your own IDs. To run a calculation using the Arcadia-generated account identifier, use Run Account Cost Calculation with accountId.

Send calculation criteria and inputs in the request body. The response returns a CalculatedCost object with the total cost, line-item cost details, summary values, assumptions, and a requestId for support.

Resource URI

POST /rest/v1/accounts/pid/{providerAccountId}/calculate

Path parameters

ParameterTypeDescription
providerAccountIdStringYour unique identifier for the Account object. Required.

Common request body fields

FieldTypeDescription
fromDateTimeDateTimeStart date and time for the calculation. Required.
toDateTimeDateTimeEnd date and time for the calculation. Required.
masterTariffIdLongMaster tariff to use. If omitted, defaults to the most likely tariff for the account address. Optional.
detailLevelStringLevel of detail for returned cost items, such as RATE, CHARGE_TYPE, or TOTAL. Optional.
groupByStringAggregation period for calculation details, such as MONTH, DAY, or HOUR. Optional.
includeDefaultProfileBooleanWhether to use the default profile on the account. Defaults to true. Optional.
profileIdStringExplicit profile to use for the calculation. Optional.
dataFactorNumberConstant scalar applied to all profiles used in the calculation. Optional.
billingPeriodBooleanSet to true when the date range represents an actual billing cycle. Optional.
minimumsBooleanWhether to enforce minimum charges. Optional.
applyUtilityTaxBooleanWhen true, attempts to apply a utility tax for the account address. Defaults to false. Optional.
calcNetExcessGenerationBooleanIncludes net metering totals in the calculation summary. Optional.
excludeChargeClassArrayCharge classes to exclude, such as TRANSMISSION, DISTRIBUTION, SUPPLY, TAX, CONTRACTED, USER_ADJUSTED, AFTER_TAX, or OTHER. Optional.
tariffEffectiveOnDateUse one specific tariff version for the calculation. Optional.
autoBaselineBooleanEnables intelligent baselining to move usage data to a different time period. Optional.
useIntelligentBaseliningBooleanControls interpolation and extrapolation when autoBaseline=true. Optional.
customTimeOfUseIntervalsArrayCustom time-of-use intervals to use in the calculation. Optional.
propertyInputsArrayPropertyData values to use or override for this calculation. Optional.
rateInputsArrayTariff rate values used to override existing rates during the calculation. Optional.

For the full data model, account cost calculation workflow, request-body parameter details, and detailed examples, see Account Cost Calculation.

Example

POST /rest/v1/accounts/pid/api-eg-015/calculate

This sample POST request uses the providerAccountId from the endpoint path.

{  
  "fromDateTime" : "2013-01-08",  
  "toDateTime" : "2014-01-12",  
  "billingPeriod": true,  
  "minimums" : true,  
  "detailLevel" : "RATE",  
  "groupBy" : "MONTH"  
}  

A successful response returns a standard response payload with type set to CalculatedCost, a requestId, and one calculated cost result.

{  
  "status": "success",  
  "count": 1,  
  "type": "CalculatedCost",  
  "requestId": "52da5704-a951-4104-ae27-bf0cce98334d",  
  "results": [  
    {  
      "masterTariffId": 522,  
      "tariffName": "Residential",  
      "totalCost": 59.19,  
      "fromDateTime": "2013-01-08T00:00:00-08:00",  
      "toDateTime": "2014-01-12T00:00:00-08:00",  
      "currency": "USD",  
      "summary": {  
        "ELECTRICITY": {  
          "kWh": 0,  
          "kW": 0  
        },  
        "subTotalCost": 54.55,  
        "taxCost": 4.64,  
        "totalCost": 59.19,  
        "adjustedTotalCost": 59.19,  
        "kWh": 0,  
        "kW": 0  
      },  
      "accuracy": 1,  
      "items": [  
        {  
          "tariffRateId": 17023273,  
          "tariffRateBandId": 10237697,  
          "rateSequenceNumber": 1,  
          "rateGroupName": "Generation",  
          "rateName": "Generation Charge",  
          "fromDateTime": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08:00",  
          "quantityKey": "consumption",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.07884,  
          "itemQuantity": 0,  
          "cost": 0,  
          "chargeClass": "SUPPLY"  
        },  
        {  
          "tariffRateId": 17109049,  
          "tariffRateBandId": 10375380,  
          "rateSequenceNumber": 999,  
          "rateGroupName": "Minimum Charge",  
          "rateName": "Minimum Charge",  
          "fromDateTime": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08:00",  
          "quantityKey": "minimum",  
          "rateType": "COST_PER_UNIT",  
          "rateAmount": 0.14784,  
          "itemQuantity": 11,  
          "cost": 1.62624  
        },  
        {  
          "tariffRateId": 0,  
          "rateSequenceNumber": 10000,  
          "rateGroupName": "TAX",  
          "rateName": "Utility Tax",  
          "fromDateTime": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08:00",  
          "quantityKey": "percentage",  
          "rateType": "PERCENTAGE",  
          "rateAmount": 0.085,  
          "itemQuantity": 709.18848,  
          "cost": 4.6370016  
        },  
      // Additional cost items omitted.
      ],  
      "assumptions": [  
        {  
          "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": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08: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": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08: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": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08: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": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08:00",  
          "dataValue": "false",  
          "accuracy": 80  
        },  
        {  
          "keyName": "utilityEmployee",  
          "displayName": "Is Utility Employee",  
          "description": "Applicable to domestic service utility employees ",  
          "dataType": "BOOLEAN",  
          "fromDateTime": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08: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": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08:00",  
          "dataValue": "None",  
          "accuracy": 80  
        },  
        {  
          "keyName": "tariffId",  
          "dataType": "INTEGER",  
          "fromDateTime": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2013-05-01T00:00:00-07:00",  
          "dataValue": "3155887",  
          "accuracy": 100  
        },  
        {  
          "keyName": "tariffId",  
          "dataType": "INTEGER",  
          "fromDateTime": "2013-05-01T00:00:00-07:00",  
          "toDateTime": "2013-10-01T00:00:00-07:00",  
          "dataValue": "3160193",  
          "accuracy": 100  
        },  
        {  
          "keyName": "tariffId",  
          "dataType": "INTEGER",  
          "fromDateTime": "2013-10-01T00:00:00-07:00",  
          "toDateTime": "2014-01-01T00:00:00-08:00",  
          "dataValue": "3163175",  
          "accuracy": 100  
        },  
        {  
          "keyName": "tariffId",  
          "dataType": "INTEGER",  
          "fromDateTime": "2014-01-01T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08:00",  
          "dataValue": "3164509",  
          "accuracy": 100  
        },  
        {  
          "keyName": "minimum",  
          "dataType": "STRING",  
          "fromDateTime": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08:00",  
          "dataValue": "true",  
          "accuracy": 100  
        },  
        {  
          "keyName": "profileId",  
          "displayName": "2014 CA Electricity Residential TOU Profile",  
          "description": "ELECTRICITY_RESIDENTIAL_CA_2014_TOU",  
          "dataType": "STRING",  
          "dataValue": "5539691a368c25bd8b993673",  
          "accuracy": 100  
        },  
        {  
          "keyName": "territoryId",  
          "displayName": "Territory",  
          "description": "Territory where tariff is operational",  
          "dataType": "INTEGER",  
          "fromDateTime": "2013-01-08T00:00:00-08:00",  
          "toDateTime": "2014-01-12T00:00:00-08:00",  
          "dataValue": "3538",  
          "accuracy": 100  
        }  
      ]  
    }  
  ]  
}  

To get different result aggregations, modify the groupBy and detailLevel values. For example, using "groupBy":"HOUR" and "detailLevel":"CHARGE_TYPE" returns costs and usage broken down by charge type for each hour:

"items": [  
    {  
      "fromDateTime": "2013-01-08T00:00:00-08:00",  
      "toDateTime": "2013-01-08T01:00:00-08:00",  
      "quantityKey": "minimum",  
      "rateAmount": 0.00616,  
      "itemQuantity": 1,  
      "cost": 0.00616  
    },  
    {  
      "fromDateTime": "2013-01-08T00:00:00-08:00",  
      "toDateTime": "2013-01-08T01:00:00-08:00",  
      "quantityKey": "tax",  
      "rateAmount": 0.0000096,  
      "itemQuantity": 54.55296,  
      "cost": 0.0005236  
    },  
    // Additional items omitted.
]  
Path Params
string
required

This is your unique identifier chosen to represent this Account object.

Body Params
int64
required

Unique Arcadia ID for the master tariff of this tariff. (Optional, Default is the most likely tariff for the account address)

date
required

Starting date and time for this calculation. (Required)

date
required

End date and time for this calculation. (Required)

string
enum
Defaults to RATE

Toggles the level of details for the calculation result. Explanation (Optional, Default=ALL)

Allowed:
string
enum
Defaults to ALL

This controls how the calculation details are grouped. Explanation (Optional, Defaults to the natural grouping for the rates)

Allowed:
boolean
Defaults to true

Use the default profile on the account.

string

Use an explicit Profile for this calculation.

double

Specify a constant scalar to be applied to all profiles used in this calculation. Can also be used in propertyInputs to modify a single profile when multiple are used.

string
Defaults to false

A 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.

boolean

This field enables enforcing minimum charges on this calculation.

boolean
Defaults to false

When true, the calculation attempts to apply a utility tax for the address associated with this account.

boolean

This field includes net metering totals in the summary section of the calculation.

excludeChargeClass
array of strings

Specifies a charge class to exclude from the calculation results. Available options are TRANSMISSION, DISTRIBUTION, SUPPLY, TAX, CONTRACTED, USER_ADJUSTED, AFTER_TAX, and OTHER.(Optional)

excludeChargeClass
date

This 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.

boolean

This field enables intelligent baselining feature, which allow you to move usage data to a different time period. (Optional, Default=false)

boolean

This field works in conjunction with autoBaseline (above) and determines how to interpolate and extrapolate usage data when that is set to true. Read intelligent baselining for details.

customTimeOfUseIntervals
array of objects

Define your own time-of-use interval to be used in the calculation.

customTimeOfUseIntervals
propertyInputs
array of objects

Array of PropertyData to use in the calculation.

propertyInputs
rateInputs
array of objects

The 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)

rateInputs
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json