Skip to main content
POST
calculate period bill with inline home context

Authorizations

x-ws-api-key
string
header
required

WattShift API key

Headers

x-ws-api-key
string

WattShift API Key

Body

application/json
home
object
required

Home context for bill impact; persisted only for the duration of the request

startDate
string
required

Start date of the billing period (YYYY-MM-DD or ISO 8601 datetime format). Must be before endDate.

endDate
string
required

End date of the billing period (YYYY-MM-DD or ISO 8601 datetime format). Must be after startDate.

usage
number[][]

Array of daily usage arrays. Required when useDefaultUsage is false or omitted.

export
number[][]

Optional array of daily export arrays (solar export to grid). Each inner array must have 96 values (15-minute intervals). Number of days must match usage array length.

debug
boolean

Enable debug mode to return additional information

useDefaultUsage
boolean

When true, generates usage from Palmetto baseline data using home zipcode and optional solarCapacityKw instead of inline usage arrays. Defaults to false.

Response

billTotal
number
required

Total bill amount for the calculation.

startDate
string
required
endDate
string
required
totalBill
number
gridServicesRev
number

Optional grid services revenue for the calculation.

exportCompensationCredit
number

Optional export compensation credit applied from resolved NEM/NBT export prices.

CO2e
number

Optional carbon dioxide equivalent emissions impact.

debugInfo
any