oneapi
Sign in
Business v1 / Nomenclatoare

CAEN tree

The complete hierarchy of one NACE version: sections → divisions → groups → classes. ?versiune=2|3 (3 by default).

GET
https://oneapi.ro/api/business/v1/caen/arbore

Query parameters

NameTypeDescriptionAccepted values
versiuneoptional string | null 0|1|2|3. Defaults to 3. 0123

How it behaves

  • The full hierarchy of a CAEN version: sections → divisions → groups → classes. For the older editions (the initial edition, Rev.1, Rev.2), which have no section rows, the tree roots are the divisions. ?versiune= selects the edition (default 3).

What it is for

  • Building a hierarchical activity picker, section → class.
  • Populating a local nomenclature in a single call.
  • Grouping a customer portfolio by division or section.

Response structure

All fields below live inside data.

FieldTypeDescription
versiune string The nomenclature revision.
arbore[].cod string The code.
arbore[].denumire string The name.
arbore[].copii[].cod string The code.
arbore[].copii[].denumire string The name.
arbore[].copii[].copii[].cod string The code.
arbore[].copii[].copii[].denumire string The name.

Response examples

GEThttps://oneapi.ro/api/business/v1/caen/arbore
{
    "data": {
        "versiune": "CAEN Rev.3",
        "arbore": [
            {
                "cod": "A",
                "denumire": "AGRICULTURĂ, SILVICULTURĂ ŞI PESCUIT",
                "nr_firme": 261167,
                "nr_firme_functiune": 123874,
                "copii": [
                    {
                        "cod": "01",
                        "denumire": "Agricultură, vânătoare şi servicii anexe",
                        "nr_firme": 237244,
                        "nr_firme_functiune": 111489,
                        "copii": [
                            {
                                "cod": "011",
                                "denumire": "Cultivarea plantelor nepermanente",
                                "nr_firme": 88929,
                                "nr_firme_functiune": 50288,
                                "copii": [
                                    {
                                        "cod": "0111",
                                        "denumire": "Cultivarea cerealelor (excluzând orezul), plantelor leguminoase și a plantelor oleaginoase",
                                        "nr_firme": 41993,
                                        "nr_firme_functiune": 25585
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validareAn undeclared parameter or a value that fails validation (versiune). The offending field is in detalii.
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": "validare",
        "mesaj": "An undeclared parameter or a value that fails validation (versiune). The offending field is in detalii.",
        "detalii": {
            "versiune": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}