GasBuPartnersRegister

API documentation

GasBu Partner Price API

GasBu shows drivers current fuel prices across Europe. This API lets a station operator send the prices of its own stations directly, so drivers always see the price you actually charge. To get access, register as a partner.

Access

You receive an API key from the GasBu team after your stations have been verified. It looks like gbp_… (47 characters). Send it with every request in one of these headers:

Authorization: Bearer gbp_…
X-Api-Key: gbp_…

Keep the key secret. If it leaks, ask us for a new one and we will revoke the old key. Keys can be rotated without downtime: we issue a second key, you deploy it, then we revoke the first.

Base URL: https://api.gasbu.es/partner/v1

Limit: 120 requests per minute and 5,000 price rows per request. One request with all your stations every few minutes, or whenever a price changes, is the intended use.

Your stations — GET /stations

Returns the stations you may write to, the fuel codes we accept and the price currently displayed.

{
  "partner": "Example Network",
  "fuels": ["adblue", "cng", "diesel", "diesel_premium", "gasoline_95_e10", "gasoline_95_e5", "lpg", "…"],
  "fuelAliases": { "NATURAL95": "gasoline_95_e5", "NAFTA": "diesel" },
  "stations": [
    {
      "stationId": "CZ_N17001_61",
      "externalId": "4711",
      "name": "Example Praha Roztylská",
      "address": "Roztylská 1",
      "city": "Praha 4",
      "country": "CZ",
      "currency": "CZK",
      "currentPrices": { "diesel": 38.9, "gasoline_95_e5": 37.4 },
      "currentSource": "partner",
      "currentTimestamp": "2026-09-29T20:19:28Z",
      "lastPushAt": "2026-09-29T20:19:28Z"
    }
  ]
}

Send prices — POST /prices

{
  "prices": [
    { "station": "4711", "fuel": "NATURAL95", "price": 37.40, "validFrom": "2026-09-29T18:00:00+02:00" },
    { "station": "4711", "fuel": "diesel",    "price": 38.90 },
    { "station": "4711", "fuel": "lpg",       "price": null }
  ]
}
FieldRequiredMeaning
stationyesYour station ID (externalId) or our stationId.
fuelyesOur fuel key (see fuel keys) or your own code, if we mapped it for you (fuelAliases).
priceyesPrice per litre (per kilogram for CNG) in the station's local currency (currency), including all taxes, e.g. 38.90 CZK or 1.649 EUR. A decimal comma in a string ("38,90") is accepted. null means the station no longer sells this fuel.
validFromnoISO 8601 time since when the price applies. Default: time of the request. Must not be more than 10 minutes in the future or older than 48 hours.

You can send only the fuels that changed — fuels you do not mention keep their last value. Sending the same prices again is harmless: nothing changes and a newer price reported by a driver is not overwritten. Keep sending prices that did not change, too — that is how we know they still apply (see How your prices are shown).

Response

Always 200 with a summary; a bad row never blocks the valid ones.

{
  "received": 3,
  "updated": 2,
  "unchanged": 0,
  "rejected": 1,
  "stationsUpdated": 1,
  "errors": [
    { "index": 2, "station": "9999", "fuel": "diesel", "reason": "unknown_station" }
  ]
}

index is the zero-based position of the row in your prices array. Reasons:

ReasonMeaning
unknown_stationThe station is not assigned to you (or the ID is wrong).
unknown_fuelA fuel code we do not know — ask us to map your code.
invalid_priceNot a positive number.
price_out_of_rangeImplausible for a litre of fuel (for example a missing decimal point).
invalid_valid_fromvalidFrom is not ISO 8601 with a time zone.
valid_from_in_future / valid_from_too_oldOutside the allowed window.
older_than_currentWe already have a newer price from you for this station.

Errors

StatusMeaning
400Body without a prices array.
401Missing, unknown or revoked key.
403Your partner account is disabled.
413More than 5,000 rows in one request.
429More than 120 requests per minute.

Errors come as {"error": "…"}.

How your prices are shown

Fuel keys

Petrol is always gasoline_95_e5, gasoline_95_e10, gasoline_98_e5 and so on, never a bare gasoline_95. The list in GET /stations is authoritative.

Example

curl -X POST https://api.gasbu.es/partner/v1/prices \
  -H "Authorization: Bearer gbp_…" \
  -H "Content-Type: application/json" \
  -d '{"prices": [{"station": "4711", "fuel": "diesel", "price": 38.90}]}'

Questions: app@gasbu.app