Skip to main content
POST
calculate period bill using a specific rate plan

Authorizations

x-ws-api-key
string
header
required

WattShift API key

Headers

x-ws-api-key
string

WattShift API Key

Path Parameters

ratePlanId
string
required

MongoDB rate plan id

Body

application/json
usage
number[][]
required

Array of daily usage arrays. Each inner array must have 96 values (15-minute intervals). Number of days must match the date range between startDate and endDate.

Minimum array length: 1
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.

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

Response

billTotal
number
required

Total bill amount for the rate plan period.

startDate
string
required
endDate
string
required
debugInfo
any
exportCompensationCredit
number

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