oneapi
Sign in
Financiar v1 / Calcul

Indexing an amount for inflation

The indexation coefficient between two months, under the consumer price index published by INS, and — if an amount is given — the indexed amount.

The CPI is published as a monthly index against the previous month, so the coefficient is the PRODUCT of the monthly factors. The formula is validated against the INS December/December inflation: 8.19% for 2021, 16.37% for 2022, 6.61% for 2023 — exactly the official figures.

The starting month does not enter the product: its index describes a change that happened before the reference point. A rent set in January is indexed from February onwards.

GET
https://oneapi.ro/api/financiar/v1/calcul/indexare

Query parameters

NameTypeDescriptionAccepted values
sumaoptional string | null Optional. Without it only the coefficient is returned. e.g. 10000e.g. 1000
de_larequired string Required, YYYY-MM. The reference month; it does not enter the product. A full date is also accepted. e.g. 2024-06-15e.g. 2024-01e.g. 2024
pana_laoptional string | null Optional, defaults to the last covered month. e.g. 2025-01
categorieoptional string | null total (default), alimentare, nealimentare or servicii. totalalimentarenealimentareservicii
indiceoptional string | null The series used: ipc (default), constructii, productie-industriala, cost-forta-munca or castig-salarial. The branch is taken from here, not inferred — the two families are computed differently (the CPI is an index against the previous month, the rest have a fixed base). ipcconstructiiproductie-industrialacost-forta-muncacastig-salarial
tipoptional string | null Only with indice=constructii: the type of work (total, constructii_noi, reparatii_capitale, reparatii_curente, cladiri, cladiri_rezidentiale, cladiri_nerezidentiale, constructii_ingineresti). totalconstructii_noireparatii_capitalereparatii_curentecladiricladiri_rezidentialecladiri_nerezidentialeconstructii_ingineresticost_materiale
caenoptional string | null Only with indice=productie-industriala, cost-forta-munca and castig-salarial: any CAEN code, from any revision, brought to what the index series publishes — the class or division/section for producer prices, the section for labour cost, the division or range for earnings. What was used is in meta.caen. e.g. 1011
caen_versiuneoptional string | null Optional: the revision of the caen code — 1, 2 or 3 — when its form is ambiguous (4932 means different things in Rev.2 and Rev.3). Without it, the code is looked up in the series revision first. 123
grupareoptional string | null Only with the same three indices: total, the MIG groupings for producer prices (energie, bunuri_capital…), the ranges for earnings (62-63). Not sent together with caen. e.g. 62-63e.g. energie
piataoptional string | null Only with indice=productie-industriala: total (default), interna or externa. totalinternaexterna
ajustareoptional string | null Only with indice=cost-forta-munca: bruta, zile_lucratoare or zile_si_sezonier. brutazile_lucratoarezile_si_sezonier
componentaoptional string | null Only with indice=cost-forta-munca: total, total_fara_premii, directe or indirecte. totaltotal_fara_premiidirecteindirecte
masuraoptional string | null Only with indice=castig-salarial: brut or net. brutnet
versiuneoptional string | null Only with indice=castig-salarial: the CAEN classification used, rev2 or rev3. rev2rev3

How it behaves

  • The indexation coefficient between two months, according to the consumer price index published by the National Institute of Statistics, and — if an amount is given — the indexed amount. suma is optional: without it only the coefficient is returned.
  • The Romanian CPI is published as a MONTHLY index against the previous month (100.06 = +0.06%), not as a fixed-base index. So the coefficient over a period is the PRODUCT of the monthly factors, not a ratio between two values. The formula is validated against the December-on-December inflation published by INS: the product of January–December gives 8.19% for 2021, 16.37% for 2022 and 6.61% for 2023 — exactly the official figures.
  • The starting month does not enter the product. Its index describes the change against the month before it, that is, a change that happened before the reference point. A rent set in January is indexed from February onwards.
  • The total category is the full basket. The others — alimentare, nealimentare, servicii — index by a specific component, useful when the contract names one explicitly.
  • Careful with denomination: for periods starting before 1 July 2005, the amount given is assumed to be in old lei, and the result is in old lei too (1 RON = 10,000 ROL). The coefficient is unaffected, being dimensionless, but a result of 16 million looks like an error unless you know which currency it is in. The response warns.
  • INS publishes the index roughly two months late, so pana_la cannot exceed the last covered month — meta.acoperire states it on every request.
  • If months are missing from the interval, the coefficient is computed over fewer of them and this is reported: luni against luni_asteptate, plus a warning. Otherwise it would look like a complete indexation.
  • The whole calculation is in exact decimal arithmetic. A product of several hundred floating-point factors accumulates error exactly where the result is a sum of money — over 341 months that is 341 multiplications.
  • indice=constructii uses a DIFFERENT METHOD. The construction cost index has a fixed base (2021 = 100), so the coefficient is the ratio of the two months' indices, not the product of the months between them; the intervening months play no part. The response carries the method used and both index values, so the figure is traceable — it ends up in a price-adjustment clause, that is, in a legal document. Without indice, the CPI is used, as before.
  • indice=productie-industriala uses the same ratio method, on the industrial producer price index. The caen code goes to the class with an index, otherwise to the division or section; without a code, total industry. Which one matters a great deal: from 2020-01 to 2026-06 the total rises 85.6%, metallurgy 60.4%, and paper and cardboard (class 1712) 17.9% — all on the total market.
  • indice=cost-forta-munca uses the quarterly LEVEL series, again by ratio. Its own parameters: caen (any code, brought to its section) or grupare=total, ajustare and componenta. A requested month is anchored on its quarter. ⚠️ The base is 2020 = 100, against 2021 for the other two indices — they cannot be related to one another. Reference 2020-Q1 → 2026-Q1: total ×1.822, construction ×2.110, health ×1.441.
  • indice=castig-salarial is the only one working with LEVELS rather than indices: the coefficient is the direct ratio of the two months' earnings. Its own parameters: masura (gross by default, or net), caen and versiune. Both months must come from the same CAEN revision — a ratio across the 2025 break would mix two definitions of the same activity, so it is refused with an explanation.
  • Activity is requested the same way across the platform. caen takes any CAEN code, at any level and from any revision, and the route brings it to what the series publishes — climbing to a parent or translating it through the official INS correspondence; meta.caen states the requested code, the one used and whether it was climbed or converted. grupare is for the source aggregates that are not CAEN codes.

What it is for

  • Indexing a rent or an annuity for inflation.
  • Updating a maintenance allowance.
  • Bringing an old claim to today's value.

Response structure

FieldTypeDescription
data.de_la string Start of the interval the response covers.
data.pana_la string End of the interval the response covers, inclusive.
data.categorie string Category in the source classification.
data.luni integer How many monthly indices actually entered the product.
data.luni_asteptate integer How many there should be for the requested interval. A difference signals missing indices.
data.coeficient string The indexation factor, 6 decimals.
data.coeficient_exact string The unrounded factor, for chained calculations.
data.inflatie_cumulata_procent string The cumulative increase, in percent.
meta.sursa string The official source the data comes from, with its licence where one is required.
meta.formula string
meta.acoperire string How much the data we hold covers, compared to what the source publishes.
meta.nota string A note on how to read the response — a pitfall, a convention or a limit of the source.
data.suma_indexata string The amount after indexation, rounded to the cent.
data.diferenta string How much was added.
meta.fara_date data is null and this says why. No CPI data in the database. The requested month is before 1991 or after the last published month; nedeterminabil — no indices exist for the interval.
meta.fara_date_cod The short, STABLE word for the reason, for clients that branch on it in code: fara_date is prose and may be rephrased, this is not.
meta.caen object How the caen parameter was understood: the requested code, the revision it was read in and the code the route used. For a list of codes, one object per code.
meta.caen.cerut string The CAEN code sent, normalised (upper case, no dots).
meta.caen.versiune_cerut string The revision the code sent was read in: the one in caen_versiune, otherwise the first it exists in.
meta.caen.folosit string The code the series used: the requested one, its first published parent or the source aggregate that contains it (02-03).
meta.caen.nivel string The level of the code used — on company routes, of the requested code: sectiune, subsectiune, diviziune, grupa, clasa or agregat.
meta.caen.denumire string The name of the code, from the CAEN nomenclature.
meta.caen.versiune_serie string The CAEN revision the series is published in.
meta.caen.conversie boolean true when the code was translated from one revision to another through the official INS correspondence.
meta.caen.urcat boolean true when the series does not publish the requested code and a higher level was used.

Response examples

GEThttps://oneapi.ro/api/financiar/v1/calcul/indexare?per_pagina=3&de_la=2024-06-15
{
    "data": {
        "de_la": "2024-06",
        "pana_la": "2026-07",
        "categorie": "total",
        "luni": 25,
        "luni_asteptate": 25,
        "coeficient": "1.173609",
        "coeficient_exact": "1.17360901213229",
        "inflatie_cumulata_procent": "17.36"
    },
    "meta": {
        "sursa": "Institutul Naţional de Statistică — indicele preţurilor de consum, serie lunară.",
        "formula": "Coeficientul e produsul indicilor lunari împărţiţi la 100, pentru lunile de după `de_la` până la `pana_la` inclusiv. Validat pe inflaţia dec/dec publicată de INS.",
        "acoperire": "1991-01 → 2026-07",
        "nota": "Categoria `total` e coşul complet. Celelalte (alimentare, nealimentare, servicii) indexează după o componentă anume, utile când contractul o prevede explicit."
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404caen_nepublicatNeither the code nor its parents are published in the series; detalii.disponibile lists the keys. grupare_nepublicata — the grouping is not in the series; the response lists them.
422caen_inexistentThe code in caen exists in no CAEN revision; it is a bad FILTER value, hence 422, not 404. interval_gol — the starting month is not before the final one; malformed amount or month; non-existent category. caen and grupare sent together, caen_versiune without caen, or a code that is not CAEN-shaped. caen/grupare with ipc or constructii, which have no activities.
429cota_depasitaThe 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": "caen_inexistent",
        "mesaj": "The code in caen exists in no CAEN revision; it is a bad FILTER value, hence 422, not 404. interval_gol — the starting month is not before the final one; malformed amount or month; non-existent category. caen and grupare sent together, caen_versiune without caen, or a code that is not CAEN-shaped. caen/grupare with ipc or constructii, which have no activities.",
        "detalii": {
            "suma": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}