Step 2: Retrieve Hourly Pre-Solar Cost
Run an hourly Account Cost Calculation for the pre-solar scenario and inspect baseline cost line items.
Retrieve hourly pre-solar cost so you can validate the baseline side of a Savings Analysis.
Use this step to recreate the baseline, or pre-solar, scenario with an Account Cost Calculation. The response returns hourly cost line items that you can compare against the post-solar calculation in the next step.
Pre-solar cost workflow
- Use the account identified in Step 1.
- Confirm the account or request uses the pre-solar tariff.
- Run an Account Cost Calculation for the validation date range.
- Set
detailLeveltoCHARGE_TYPE. - Set
groupBytoHOUR. - Inspect hourly
items[]entries foritemQuantity,rateAmount,cost, andchargeType.
Retrieve hourly pre-solar cost
You can use a providerAccountId (pid) or system-generated account ID.
POST /rest/v1/accounts/pid/example-1/calculate/Or use the system-generated account ID:
POST /rest/v1/accounts/{accountId}/calculate/This request inspects one day in July 2023:
{
"fromDateTime": "2023-07-01",
"toDateTime": "2023-07-02",
"useIntelligentBaselining": "true",
"includeDefaultProfile": "true",
"autoBaseline": "true",
"minimums": "false",
"detailLevel": "CHARGE_TYPE",
"groupBy": "HOUR",
"fields": "EXT"
}| Field | Purpose |
|---|---|
fromDateTime / toDateTime | Sets the validation period. |
useIntelligentBaselining | Allows algorithmic interpolation and extrapolation of usage data. |
includeDefaultProfile | Allows the calculation to use the default ELECTRICITY profile on the account. |
autoBaseline | Enables baseline handling for the calculation. |
minimums | Excludes minimum charge handling for this hourly validation request. |
detailLevel | Returns line items grouped by charge type. |
groupBy | Returns results by hour. |
fields | Includes extended fields in the response. |
If you pass a profile that is not the default account profile, set
includeDefaultProfiletofalse. Otherwise, the calculation may also include the default profile.
Review the response
The following response has been shortened to show the first hourly items[] entries:
{
"status": "success",
"count": 1,
"type": "CalculatedCost",
"requestId": "0a0fb410-8a18-4738-ae16-8b88f050c497",
"results": [
{
"calculatedCostId": "09f878a3-012b-4d45-b866-a66bebfe0de7",
"masterTariffId": 522,
"tariffName": "Residential",
"totalCost": 10.28000000,
"fromDateTime": "2023-07-01T00:00:00-07:00",
"toDateTime": "2023-07-02T00:00:00-07:00",
"currency": "USD",
"summary": {
"ELECTRICITY": {
"kWh": 28.82,
"kW": 3.75
},
"subTotalCost": 10.28,
"taxCost": 0.00,
"totalCost": 10.28,
"adjustedTotalCost": 10.29,
"kWh": 28.82,
"kW": 1.93
},
"accuracy": 100.00000000,
"items": [
{
"fromDateTime": "2023-07-01T00:00:00-07:00",
"toDateTime": "2023-07-01T01:00:00-07:00",
"quantityKey": "fixed",
"rateAmount": 0.00000000,
"itemQuantity": 0.00000000,
"cost": 0.00000000,
"chargeType": "FIXED_PRICE"
},
{
"fromDateTime": "2023-07-01T00:00:00-07:00",
"toDateTime": "2023-07-01T01:00:00-07:00",
"quantityKey": "consumption",
"rateAmount": 0.35701223,
"itemQuantity": 0.86398500,
"cost": 0.30845321,
"chargeType": "CONSUMPTION_BASED"
}
]
}
]
}Each hourly interval can include multiple charge types. In this example, the interval includes both FIXED_PRICE and CONSUMPTION_BASED line items. For validation, focus first on CONSUMPTION_BASED items because they show the relationship between hourly usage, rate, and cost.
What to compare later
Save or export the hourly items[] values so you can compare them against the post-solar calculation in Step 3.
| Field | Why it matters |
|---|---|
fromDateTime / toDateTime | Aligns the pre-solar and post-solar hourly intervals. |
chargeType | Identifies comparable charge buckets. |
itemQuantity | Shows hourly consumption quantity. |
rateAmount | Shows the hourly rate used for that charge line. |
cost | Shows the hourly cost for that charge line. |
Next step
After you retrieve the baseline hourly cost, retrieve hourly post-solar cost.
Updated about 5 hours ago
