Carburanti v1 / Carburanti
Cost of a refuelling or a trip
POST, because the input (kilometres driven, consumption, quantity) describes the client's activity and has no business in access logs or in the browser history.
POST
https://oneapi.ro/api/carburanti/v1/decont
Request body
Sent as JSON in the request body (Content-Type: application/json) — not in the query string.
NameTypeDescriptionAccepted values
taraoptional
string | null
Country code for the reference price. Defaults to
RO.
ATBEBGCYCZDEDKEEESFIFRGRHRHUIEITLTLULVMTNLPLPTROSESISKUKEUEA
produsrequired
string
Product code. Required: the reimbursement uses the price of the product refuelled.
benzina95motorinamotorina_incalzirepacura_sulf_micpacura_sulf_maregpl
dataoptional
string | null
The date of the price used,
YYYY-MM-DD. Defaults to the most recent week.
litrioptional
number | null
Litres consumed. Either this, or the
km + consum_litri_la_100km pair.
1000000
kmoptional
number | null
Kilometres driven, used together with
consum_litri_la_100km.
1000000
consum_litri_la_100kmoptional
number | null
Average consumption, litres per 100 km.
200
A trip by kilometres
Request body
{
"produs": "motorina",
"km": 420,
"consum_litri_la_100km": 6.5
}
A refuel on a past date
Request body
{
"produs": "benzina95",
"litri": 45,
"data": "2022-03-14"
}
A refuel in another country
Request body
{
"produs": "benzina95",
"litri": 50,
"tara": "HU"
}
A long trip, higher consumption
Request body
{
"produs": "motorina",
"km": 1200,
"consum_litri_la_100km": 7.2
}
Query parameters
This route accepts no query parameters.
How it behaves
- The method is POST because the input describes the client activity — kilometres driven, consumption, quantity — and has no place in access logs or browser history.
- The request body has:
produs(required),tara,data, and eitherlitriorkmtogether withconsum_litri_la_100km. The two paths are mutually exclusive: if both were accepted, one would have to be silently chosen, and the amount in the claim would depend on a convention you cannot see. Body fields do not appear in the parameter table — that one documents the query string only. totalis computed from the published price.din_careis a reconstruction from components, anddin_care.insumeaza_totalulsays whether they actually add up tototal. When it isfalse, do not force the equality: the published price is the right figure, the components are indicative for that week.- Only products with a per-litre price can be settled. Fuel oil, published per tonne, returns
404. - The amount is a calculation basis defensible against a public source, not an invoice and not the price actually paid at a particular station.
What it is for
- Compute the value of a travel claim at the official price of the week it happened, not at today price.
- Verify an expense note: how many litres and what amount it should have been, given the declared mileage and the vehicle consumption.
- Estimate a fleet fuel budget from mileage and average consumption.
Response structure
All fields below live inside data.
FieldTypeDescription
tara
string
Țara folosită.
produs
string
Produsul.
denumire
string
Denumirea lizibilă.
saptamana
string
Săptămâna de preț folosită.
ceruta
string
Data cerută.
moneda
string
Moneda tuturor sumelor din răspuns.
cantitate.litri
number
Litrii folosiți la calcul.
cantitate.dedusa_din_distanta
boolean
true dacă litrii au fost calculați din km și consum.
cantitate.km
number
Distanța trimisă, dacă a fost trimisă.
cantitate.consum_litri_la_100km
number
Consumul trimis, dacă a fost trimis.
pret_pe_litru
number
Prețul publicat pe litru, cu taxe.
total
number
Suma de decontat: litri × preț publicat pe litru.
din_care.fara_taxe
number
Partea fără taxe, reconstruită.
din_care.acciza
number
Acciza inclusă, reconstruită.
din_care.tva
number
TVA-ul inclus, reconstruit.
din_care.insumeaza_totalul
boolean
Dacă cele trei componente adună exact la
total.
din_care.atentie
string
Prezent doar când componentele nu însumează totalul, cu explicația.
reconciliere
object
Aceeași structură ca la
GET /taxe.
sursa
object
Sursa, licența și avertismentul că e preț mediu național.
Response examples
body: {"produs": "motorina", "km": 420, "consum_litri_la_100km": 6.5}
POSThttps://oneapi.ro/api/carburanti/v1/decont
{
"data": {
"tara": "RO",
"produs": "motorina",
"denumire": "Motorină auto",
"saptamana": "2026-09-14",
"ceruta": "2026-09-14",
"moneda": "RON",
"cantitate": {
"litri": 27.3,
"dedusa_din_distanta": true,
"km": 420,
"consum_litri_la_100km": 6.5
},
"pret_pe_litru": 10.512,
"total": 286.98,
"din_care": {
"fara_taxe": 179.75,
"acciza": 57.42,
"tva": 49.81,
"insumeaza_totalul": true
},
"reconciliere": {
"posibila": true,
"pret_publicat": 10511.99,
"abatere_procent": 0,
"se_inchide": true,
"observatie": "Defalcarea reproduce prețul publicat; diferența rămasă vine din rotunjiri și din medierea săptămânală."
},
"sursa": {
"nume": "European Commission — Weekly Oil Bulletin (DG ENER)",
"licenta": "CC BY 4.0 (Decizia 2011/833/UE)",
"observatie": "Preț mediu național pentru săptămâna indicată, nu prețul unei stații anume. Suma e o bază de calcul justificabilă, nu o factură."
}
}
}
body: {"produs": "benzina95", "litri": 45, "data": "2022-03-14"}
POSThttps://oneapi.ro/api/carburanti/v1/decont
{
"data": {
"tara": "RO",
"produs": "benzina95",
"denumire": "Benzină Euro-super 95",
"saptamana": "2022-03-14",
"ceruta": "2022-03-14",
"moneda": "RON",
"cantitate": {
"litri": 45,
"dedusa_din_distanta": false,
"km": null,
"consum_litri_la_100km": null
},
"pret_pe_litru": 7.975,
"total": 358.88,
"din_care": {
"fara_taxe": 216.4,
"acciza": 85.17,
"tva": 57.3,
"insumeaza_totalul": true
},
"reconciliere": {
"posibila": true,
"pret_publicat": 7975.02,
"abatere_procent": 0,
"se_inchide": true,
"observatie": "Defalcarea reproduce prețul publicat; diferența rămasă vine din rotunjiri și din medierea săptămânală."
},
"sursa": {
"nume": "European Commission — Weekly Oil Bulletin (DG ENER)",
"licenta": "CC BY 4.0 (Decizia 2011/833/UE)",
"observatie": "Preț mediu național pentru săptămâna indicată, nu prețul unei stații anume. Suma e o bază de calcul justificabilă, nu o factură."
}
}
}
body: {"produs": "benzina95", "litri": 50, "tara": "HU"}
POSThttps://oneapi.ro/api/carburanti/v1/decont
{
"data": {
"tara": "HU",
"produs": "benzina95",
"denumire": "Benzină Euro-super 95",
"saptamana": "2026-09-14",
"ceruta": "2026-09-14",
"moneda": "HUF",
"cantitate": {
"litri": 50,
"dedusa_din_distanta": false,
"km": null,
"consum_litri_la_100km": null
},
"pret_pe_litru": 626.1483,
"total": 31307.41,
"din_care": {
"fara_taxe": 17524.01,
"acciza": 7127.5,
"tva": 6696.41,
"insumeaza_totalul": true
},
"reconciliere": {
"posibila": true,
"pret_publicat": 626148.28,
"abatere_procent": 0.608,
"se_inchide": true,
"observatie": "Defalcarea reproduce prețul publicat; diferența rămasă vine din rotunjiri și din medierea săptămânală."
},
"sursa": {
"nume": "European Commission — Weekly Oil Bulletin (DG ENER)",
"licenta": "CC BY 4.0 (Decizia 2011/833/UE)",
"observatie": "Preț mediu național pentru săptămâna indicată, nu prețul unei stații anume. Suma e o bază de calcul justificabilă, nu o factură."
}
}
}
body: {"produs": "motorina", "km": 1200, "consum_litri_la_100km": 7.2}
POSThttps://oneapi.ro/api/carburanti/v1/decont
{
"data": {
"tara": "RO",
"produs": "motorina",
"denumire": "Motorină auto",
"saptamana": "2026-09-14",
"ceruta": "2026-09-14",
"moneda": "RON",
"cantitate": {
"litri": 86.4,
"dedusa_din_distanta": true,
"km": 1200,
"consum_litri_la_100km": 7.2
},
"pret_pe_litru": 10.512,
"total": 908.24,
"din_care": {
"fara_taxe": 568.89,
"acciza": 181.72,
"tva": 157.63,
"insumeaza_totalul": true
},
"reconciliere": {
"posibila": true,
"pret_publicat": 10511.99,
"abatere_procent": 0,
"se_inchide": true,
"observatie": "Defalcarea reproduce prețul publicat; diferența rămasă vine din rotunjiri și din medierea săptămânală."
},
"sursa": {
"nume": "European Commission — Weekly Oil Bulletin (DG ENER)",
"licenta": "CC BY 4.0 (Decizia 2011/833/UE)",
"observatie": "Preț mediu național pentru săptămâna indicată, nu prețul unei stații anume. Suma e o bază de calcul justificabilă, nu o factură."
}
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 404 | negasit | No per-litre price for the requested combination, or the product is published per tonne. |
| 422 | validare | produs is missing, or the quantity is not given correctly (neither litri nor the km + consum_litri_la_100km pair, or both at once). |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.
{
"eroare": {
"cod": "validare",
"mesaj": "produs is missing, or the quantity is not given correctly (neither litri nor the km + consum_litri_la_100km pair, or both at once)."
}
}