Skip to content
API documentation

API errors

Every error the API returns carries a type field pointing at one of the sections below. The wording in a response is always English - protocol is not localised.

The shape of an error

Errors follow RFC 9457 and are served as application/problem+json. type links to the explanation, title is a short English name, status repeats the HTTP status code, detail describes the particular case, and instance is the path the error came from.

json
{
  "type": "https://spotforecast.eu/problems/unknown-zone",
  "title": "Unknown bidding zone",
  "status": 404,
  "detail": "Zone XX is not available",
  "instance": "/v1/forecast"
}

invalid-request

HTTP 400Invalid request

The request carries a parameter the API does not accept. A required parameter may be missing, or a parameter may have an unknown value or the wrong format. The detail field says which parameter it is; its permitted values are listed with the endpoint in the documentation.

no-route

HTTP 404No such endpoint

This address is not part of the API. Check the path, including the /v1 at the start; the full list of endpoints is in openapi.json.

unknown-zone

HTTP 404Unknown bidding zone

We do not know that zone code. Take codes from /v1/zones and copy them exactly, capitals and hyphens included (DK1, IT-NORD).

no-forecast

HTTP 404No forecast for this zone

The zone exists, but we carry settled market prices for it and no forecast. Use /v1/prices for it; which zones have a forecast is what the has_forecast field in /v1/zones says.

no-vintage

HTTP 404No forecast of that vintage

No forecast was published at the requested as_of or before it. Retrying will not help - ask for a more recent as_of.

missing-credentials

HTTP 401Missing API key

The request carries no API key. Send it in the Authorization: Bearer <key> or X-API-Key: <key> header.

invalid-credentials

HTTP 401Invalid API key

We do not know that key, or it has been revoked. Check that you copied it in full; you can create a new one in your account.

plan-limit

HTTP 403Not available on your plan

The request reaches further than your plan allows. What your plan covers is shown in your account.

rate-limit

HTTP 429Rate limit exceeded

The daily request allowance is spent. The Retry-After header says how many seconds to wait, and X-RateLimit-Remaining how many requests are left; the limit is counted per account rather than per key, so holding more keys does not multiply it.

no-data

HTTP 503No data available

We do publish forecasts for this zone, but no model run has landed yet. Retrying is worth it here - unlike a 404, this is a temporary state.

internal

HTTP 500Internal server error

Something failed on our side. Try the request again, and if the trouble persists, get in touch and include the time of the request and the instance field from the response.