Skip to main content
POST
/
v1
/
homes
/
{id}
/
bill
/
monthly
calculate monthly bill
curl --request POST \
  --url https://api.example.com/v1/homes/{id}/bill/monthly \
  --header 'Content-Type: application/json' \
  --header 'x-ws-api-key: <api-key>' \
  --data '
{
  "usage": [
    [
      123
    ]
  ],
  "month": 6,
  "export": [
    [
      123
    ]
  ],
  "year": 2050,
  "debug": true
}
'
{
  "totalBill": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.wattshift.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-ws-api-key
string
header
required

Headers

x-ws-api-key
string

WattShift API Key

Path Parameters

id
string
required

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 number of days in the specified month.

Minimum array length: 1
month
integer
required

Month number (1-12, where 1 = January, 12 = December)

Required range: 1 < x < 12
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.

year
integer

Year (4 digits). If not provided, defaults to current year.

Required range: 2000 < x < 2100
debug
boolean

Enable debug mode to return additional information

Response

200 - application/json
totalBill
number
required