API-documentatie
Foutcodes
Elke fout van de API's heeft een vaste code. Die staat in het veld code van de foutmelding; het veld type linkt naar de uitleg hier. Een code verandert nooit van betekenis, dus bouw je foutafhandeling daarop.
82 foutcodes
De uitleg per code is in het Engels, net als de API-documentatie.
Elk verzoek
- bad_requestHTTP 400
The request could not be read, for example a body that is not valid JSON.
- validation_failedHTTP 400
One or more fields of the request are invalid.
errorslists each field and why. - unauthenticatedHTTP 401
No session, or the session expired or was revoked. Log in again.
- forbiddenHTTP 403
The request is not allowed for this caller.
- not_foundHTTP 404
Nothing exists at this path. In the portal: no member, API key, delegation, request or import with this id in your organization.
- conflictHTTP 409
The change conflicts with the current state: the link or delegation already exists, or would create a cycle.
- payload_too_largeHTTP 413
The body is too large: at most 100 kB of JSON, or 1 MB for a CSV upload.
- unsupported_media_typeHTTP 415
This endpoint does not accept the content type of the body.
- request_rejectedHTTP 405, 406, 411, 412, 416
The request was refused for the reason its HTTP status gives. Used for any 4xx without a more specific code.
- rate_limitedHTTP 429
Too many requests. The limits: currently 600 a minute per API key (by default), 60 failed API key attempts a minute per address, and per-address limits on portal logins and sign-ups. Wait for the seconds in
Retry-After. - internal_errorHTTP 500
An unexpected error in the register. The response shows no internals; quote the
requestIdso the register can find it in its logs. On a price line: nothing of that report was recorded, and sending it again is safe. - service_unavailableHTTP 502, 503, 504
The register is temporarily unavailable. Try again in a few minutes.
API-sleutels
- api_key_missingHTTP 401
No API key was sent, or not as
Authorization: Bearer <key>. - api_key_invalidHTTP 401
The API key does not exist. Check that you sent the whole key.
- api_key_revokedHTTP 401
The API key has been revoked. Create a new one in the portal.
- api_key_scope_missingHTTP 403
The API key lacks a scope this endpoint needs:
data:readfor the Consumer API,prices:writeorstations:writefor the Reporting API. - organization_not_activeHTTP 403
The organization is pending or suspended. Its API keys are refused; in the portal it can do only some things.
Consumer API: zoekvragen en klachten
- invalid_parameterHTTP 400
A query parameter is invalid.
detailanderrorssay which and why. - invalid_coordinatesHTTP 400
A latitude, longitude or bounding box is not valid.
- invalid_timestampHTTP 400
A moment is not an ISO 8601 timestamp with offset, such as
2026-11-24T12:00:00+01:00. In a query string, encode+as%2B. - unknown_codeHTTP 400
A fuel, brand or facility code in the query does not exist. The reference endpoints list the codes.
- invalid_cursorHTTP 400
The cursor was not issued by this API, or belongs to another query. Pass
meta.nextCursorunchanged, with the same other parameters. - invalid_station_idHTTP 400
The station id in the path is not a UUID.
- external_ref_in_useHTTP 409
Your API key already used this
externalReffor a complaint about another station. Use a new reference. - stream_limit_reachedHTTP 429
The API key already has its maximum of open price-change streams (2), or this server has no room for another stream. Close one, or poll
GET /v1/price-changes.retryAfterSecondssays when to try again.
Stations en prijzen
- station_not_foundHTTP 404
The station does not exist, or you may not act on it. Both answer the same.
- ambiguous_station_refHTTP 409
The
ref:matches stations of more than one organization you act for. Use the station id. - station_closedHTTP 409, 410
The station is closed for good. The Reporting API and the portal answer 409 and take no more prices; the Consumer API answers 410 Gone.
- fuel_not_at_stationHTTP 404, 422
The station does not sell this fuel, or the fuel code does not exist.
- fuel_discontinuedHTTP 409
The station no longer sells this fuel (
discontinued). Make it available again in the portal first. - price_not_foundHTTP 404
The price does not exist, or it belongs to a station you may not act on.
- price_already_voidedHTTP 409
The price was already voided.
- invalid_replacementHTTP 422
The replacement price of a void breaks a price rule. Nothing was voided;
replacementholds the line result. - invalid_status_transitionHTTP 409
The station's status does not allow this change. Through the Reporting API you can only switch between
activeandtemporarily_closed; going live and closing for good happen in the portal. - invalid_master_dataHTTP 422
The station data is not valid.
errorslists the fields.
Afgewezen prijsregels
- future_valid_fromHTTP geen
validFromlies more than two minutes ahead of the register clock. Report a price when it takes effect, not before. - duplicate_fuelHTTP geen
The same fuel occurs more than once in one report. Only the first line is processed.
- invalid_priceHTTP geen
The price is not a positive amount with at most three decimals.
- unknown_fuelHTTP geen
The fuel code does not exist.
- price_out_of_boundsHTTP geen
The price lies outside the plausible range of the fuel (
minPricetomaxPrice). Usually a typo or a wrong unit. - conflicting_priceHTTP geen
Another price is already recorded for this product at exactly this
validFrom. Void that price first, or void it with your price as replacement. - no_current_priceHTTP geen
A reconfirmation names a product that has no current price. Report a price instead.
Portaal
- invalid_credentialsHTTP 401
Wrong e-mail address or password, or the account is locked or disabled (all answer the same).
- invalid_two_factor_codeHTTP 401
Wrong or reused two-factor code, or the login challenge expired.
- account_lockedHTTP geen
An account was locked after repeated failed logins (the response stays
invalid_credentials). - csrf_failedHTTP 403
The CSRF header is missing or wrong, or the request came from another site.
- organization_not_foundHTTP 404
No such organization, or you are not a member.
- insufficient_roleHTTP 403
Your role in the organization is too low for this action.
- insufficient_station_rightsHTTP 403
You may see this station but not do this to it (delegation scope or role).
- admin_requiredHTTP 403
The route needs a register administrator.
- email_takenHTTP 409
The e-mail address already has an account.
- organization_existsHTTP 409
An organization of this kind with this KvK number is already registered.
- invalid_tokenHTTP 400
The link (invitation, reset, verification) is unknown, used or expired.
- wrong_passwordHTTP 400
The current password is wrong (change password, disable 2FA).
- last_ownerHTTP 409
The change would leave the organization without an active owner.
- already_memberHTTP 409
The person is already a member.
- invalid_csvHTTP 422
The CSV file cannot be read at all (no header, wrong columns, too many rows).
- import_not_committableHTTP 409
The import was committed already, has expired, or has errors (see
skipRejected). - two_factor_stateHTTP 409
Two-factor authentication is already on, already off, or has no enrolment pending.
Beheeromgeving
- two_factor_requiredHTTP 403
A register administrator without two-factor authentication. Turn it on at
/portal/account(enrolUrl), then try again. - invalid_organization_transitionHTTP 409
The organization's status does not allow this decision (approve an active one, suspend a pending one, ...).
- reference_code_in_useHTTP 409
The code of a fuel type, brand or facility (or the unit or category of a fuel type) is used by stations or prices and cannot change.
- reporting_policy_fixedHTTP 409
A reporting policy that took effect cannot change or be withdrawn, and a new one must start in the future.
- already_reviewedHTTP 409
The work list item was reviewed or voided already, or the price was voided by its reporter.
- complaint_closedHTTP 409
The complaint is resolved or rejected already.
- incident_in_futureHTTP 422
An incident notice starts now or in the past: something that does not work yet cannot be reported. Only maintenance can be announced ahead.
Website-API
- public_prices_disabledHTTP 404
The register has switched off prices on its public website. Information services publish them through the Consumer API.
Werking van het register (alleen in logs)
- startup_failedHTTP geen
The process could not start (FATAL, exit code 1).
- process_crashedHTTP geen
An uncaught exception or unhandled rejection stopped the process (FATAL, exit code 1).
- log_write_failedHTTP geen
A log event could not be serialised; this line replaces it.
- job_failedHTTP geen
A command-line run (migrate, seed, org:approve, simulator) or scheduled job failed.
- migration_failedHTTP geen
A SQL migration failed and was rolled back.
- migration_checksum_mismatchHTTP geen
An applied migration file was changed afterwards.
- mail_send_failedHTTP geen
A mail could not be handed to the SMTP server or the dev outbox; the change it reports on stands.
- snapshot_stream_failedHTTP geen
A snapshot download failed after streaming had started; the connection was cut.
- api_usage_write_failedHTTP geen
API usage counters could not be written; they are retried.
- settings_unavailableHTTP geen
A system setting could not be read; the built-in default is used.
- simulated_action_failedHTTP geen
The simulator could not complete one simulated action (a report, void or availability change); the run goes on.
- unexpected_api_answerHTTP geen
The simulator got an answer it has no rule for: an unknown code, an unexpected status or response shape.
- session_touch_failedHTTP geen
The last-seen moment of a session could not be updated.
- rate_limit_store_unavailableHTTP geen
The shared rate-limit counters (Postgres) could not be reached; this api instance counts in its own memory until they can.
- address_search_unavailableHTTP geen
The PDOK address service did not answer in time or answered with an error; the site search offers the register only for a short while.
Zo ziet een foutmelding eruit
Elke fout komt terug als JSON met het content-type application/problem+json (de standaard RFC 9457). Een verzoek zonder API-sleutel krijgt bijvoorbeeld:
{
"type": "https://openbrandstof.nl/problems/api_key_missing",
"title": "Unauthorized",
"status": 401,
"detail": "An API key is required: send it as Authorization: Bearer <key>.",
"code": "api_key_missing",
"instance": "/v1/prices",
"requestId": "0193a5b2-7c41-7e0a-9d3f-2b6c8e1f4a57"
}type- Link naar de uitleg van deze foutcode op deze site.
title- Korte omschrijving, vaak de naam van de HTTP-status.
status- De HTTP-status van het antwoord.
detail- Wat er bij dit verzoek misging en wat je moet aanpassen.
code- De vaste foutcode. Bouw je foutafhandeling hierop, niet op
titleofdetail. instance- Het pad van je verzoek.
requestId- Het id van je verzoek, ook te vinden in de header
X-Request-Id. errors- Alleen bij ongeldige invoer: per veld wat er niet klopt.
Stuur bij een vraag de requestId mee; daarmee vindt het register je verzoek direct terug in de logs.
Alles over de API's staat in de documentatie van de Consumer API en de documentatie van de Reporting API.