Skip to main content
POST
/
v1
/
utility
/
get
list utilities
curl --request POST \
  --url https://api.example.com/v1/utility/get \
  --header 'Content-Type: application/json' \
  --header 'x-ws-api-key: <api-key>' \
  --data '
{
  "zipcode": "94107",
  "detailLevel": "minimal"
}
'
{
  "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

Body

application/json
pageSize
pageNumber
zipcode
string

zipcode for utility

Pattern: ^(?:0{0,4}[0-9]{1,5}|[0-9]{3})(?:[-\s][0-9]{4})?$
lat
string

latitude for utility rates

long
string

longitude for utility rates

radius

radius within which utility rates are requested

utilityId
string

source id of the utility

effectiveOnDate

timestamp, seconds since 1970-01-01T00:00:00, UTC

isSolarPrioritizedOrder
boolean
detailLevel
enum<string>
Available options:
full,
minimal

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