Errors & Status Codes

Forecast, Decision, Windows and Hours often return HTTP 200 — read forecast_status, access, decision_status in JSON. HTTP 429 = rate limit (Community 120/day). Loxone: O1=12 offline — see offline sections in Forecast / Flex.

SpotpriceAPI splits errors into two kinds: business states (your request worked, but data is limited) come back as HTTP 200 with a status field in JSON. Broken requests (bad parameters, too many calls) use normal HTTP 400 or 429.

Everyday example

You call Decision without a free account. HTTP says 200 OK — looks fine! But decision_status is not_available and the list is empty. Your app must read that field, not only the green HTTP code.

When to use this page

  • Building error handling in your app
  • Getting empty arrays with HTTP 200
  • Debugging 429 or 400 from Windows

Core rule

SituationHTTPWhat to check
Tier too low, missing data200decision_status, forecast_status, access
Bad parameters400error field
Too many requests429rate_limit_exceeded, Retry-After header
Server trouble500Retry later; check /v1/status

Status fields (HTTP 200)

FieldUsed onCommon values
forecast_statusForecast, Decision, Windowsok, degraded, missing
decision_statusDecision, Windows, Hours Demandok, empty, placeholder, incomplete_input, invalid_input, not_available
telemetry_statusPlant Telemetryok, incomplete_input, invalid_input, not_available
pv_statusPV Forecastok, incomplete_input, weather_missing, not_available
weather_statusPlant Weatherok, incomplete_input, weather_missing, not_available

What they mean

ValuePlain EnglishTypical cause
not_availableFeature locked for your tierBasic calling Decision
incomplete_inputRequired field missingNo battery.soc_pct
invalid_inputBad valuesMeter went backwards
emptyValid request, no matching resultWindow has no prices
placeholderToo few prices to decideFewer than 4 priced hours
degradedData old but usableCache older than 3 hours
missingNo forecast at allPipeline issue

HTTP 400 on Decision Windows

errorCause
invalid_rangestart is not before end
incomplete_requestMissing a window (start+end or window_* hours or flex_pack/slot_id merge) or missing count/segments/energy_kwh+max_power_kw. Omitting mode/role defaults to cheapest/consume
invalid_countBad number
invalid_mode / invalid_roleWrong enum
count_too_largeExceeds tier horizon

HTTP 429 example


{
  "error": "rate_limit_exceeded",
  "message": "API rate limit exceeded. Retry after the time indicated in Retry-After.",
  "limit": "community 120/day",
  "limit_scope": "api_key_day",
  "limit_value": 120,
  "used": 120,
  "remaining": 0,
  "retry_after_seconds": 3600
}

Also check header Retry-After.

Step by step: handle errors in your app

1. If HTTP is 429 or 400 — log body, wait, retry (backoff on 429). 2. If HTTP is 200 — read decision_status / forecast_status / telemetry_status first. 3. On not_available — show upgrade hint from response if present. 4. On incomplete_input — read missing[] for which fields to fix. 5. Only then process arrays (forecast[], decision[], slots[], charge_hours[]).

Common mistakes

  • Treating empty decision[] on HTTP 200 as success
  • Retrying 429 immediately without waiting
  • Ignoring degraded — prices may be stale

Next steps

Start with SpotpriceAPI

Register for Community or code samples with your personal key.

Live API status