Skip to main content
POST
/
v1
/
homes
/
{id}
/
battery
/
estimate_savings
get battery estimated savings
curl --request POST \
  --url https://api.example.com/v1/homes/{id}/battery/estimate_savings \
  --header 'Content-Type: application/json' \
  --header 'x-ws-api-key: <api-key>' \
  --data '
{
  "days": 1,
  "solarCapacity": 5,
  "maxCapacityKiloWattHours": 13.5,
  "chargingPowerKiloWatts": 5,
  "dischargingPowerKiloWatts": 5,
  "chargingEfficiency": 0.95,
  "dischargingEfficiency": 0.95,
  "currentSOC": 0.5,
  "minPreferredSOC": 0.2,
  "maxPreferredSOC": 0.9,
  "months": [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12
  ]
}
'
{
  "request_id": "req_123",
  "error_code": "VALIDATION_FAILED",
  "message": "Request validation failed.",
  "field_errors": [
    {
      "field": "zipcode",
      "message": "zipcode is invalid"
    }
  ]
}

Authorizations

x-ws-api-key
string
header
required

WattShift API key

Headers

x-ws-api-key
string

WattShift API Key

Path Parameters

id
string
required

Body

application/json
days
number
required
solarCapacity
number | null
required
maxCapacityKiloWattHours
number
required
chargingPowerKiloWatts
number
required
dischargingPowerKiloWatts
number
required
chargingEfficiency
number
required
dischargingEfficiency
number
required
currentSOC
number
required
minPreferredSOC
number
required
maxPreferredSOC
number
required
dispatchHoursPerDay
object[][] | null
numBiddingHours
number | null
leap
enum<string> | null
Available options:
CAISO,
NYISO
months
integer[] | null

Optional calendar months to include, using 1-12 month numbers. Omit or pass null for all months.

Calendar month number, 1-12 where 1 = January and 12 = December.

Required range: 1 < x < 12

Response

Validation failure

request_id
string
required
Example:

"req_123"

error_code
enum<string>
required
Available options:
AUTH_MISSING_API_KEY,
AUTH_INVALID_API_KEY,
AUTH_EXPIRED_CREDENTIAL,
AUTH_REVOKED_CREDENTIAL,
AUTH_INSUFFICIENT_SCOPE,
VALIDATION_FAILED,
RATE_LIMITED,
NOT_FOUND,
FORBIDDEN,
PRODUCTION_ACCESS_DENIED,
INTERNAL_ERROR
Example:

"VALIDATION_FAILED"

message
string
required
Example:

"Request validation failed."

recovery_action
string
Example:

"Provide the x-ws-api-key header. If this contradicts the public docs, submit feedback through /v1/feedback."

field_errors
object[]
retry_after_seconds
number
Example:

3600