oneapi
Sign in
Business v1 / Nomenclatoare

Batch CAEN classification

You send a list of activity descriptions (JSON body {"texte": ["...", "..."]}, 50 at most) and get back, for each one, the NACE codes that match by MEANING, with a score. For classifying a whole set of texts in a single call. ?limita= (suggestions per text, 3 by default, 10 at most).

POST
https://oneapi.ro/api/business/v1/caen/clasifica-lot

Request body

Sent as JSON in the request body (Content-Type: application/json) — not in the query string.

NameTypeDescriptionAccepted values
texteoptional array | null A list of descriptions (required, in the body). Max 50.
limitaoptional string | null How many suggestions per text (default 3, max 10).
Two descriptions Request body
{
    "texte": [
        "reparatii biciclete",
        "cabinet stomatologic"
    ],
    "limita": 2
}
O descriere, trei potriviri Request body
{
    "texte": [
        "transport rutier de marfa"
    ],
    "limita": 3
}
Trei descrieri, cea mai bună potrivire Request body
{
    "texte": [
        "florarie",
        "service auto",
        "agentie de turism"
    ],
    "limita": 1
}

Query parameters

This route accepts no query parameters.

How it behaves

  • The batch version of /caen/potriveste: send a list of activity descriptions (JSON body {"texte": [...]}, max 50) and get, for each one, the CAEN codes matched by meaning, with a score. All texts are embedded in a single batch (fast), then compared against the index.
  • Built for classifying a whole set in one call (e.g. a column of descriptions from a file). Result order follows the order of the texts; an empty text returns potriviri: [].
  • The method is POST (the list can be long). ?limita= chooses how many suggestions per text (default 3, max 10).

What it is for

  • Batch classification of freely described activities into CAEN codes.
  • Enriching a file of companies or products with CAEN codes.

Response structure

All fields below live inside data[].

FieldTypeDescription
text string The submitted text, in the order of the request.
potriviri[].cod string The matched CAEN code.
potriviri[].denumire string | null The activity name.
potriviri[].scor number The semantic match score (0–1).

Response examples

body: {"texte": ["reparatii biciclete", "cabinet stomatologic"], "limita": 2}

POSThttps://oneapi.ro/api/business/v1/caen/clasifica-lot
{
    "data": [
        {
            "text": "reparatii biciclete",
            "potriviri": [
                {
                    "cod": "9529",
                    "denumire": "Repararea și întreținerea articolelor de uz personal și gospodăresc n.c.a.",
                    "scor": 0.6088588833808899
                }
            ]
        }
    ]
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validaretexte is missing, empty, or has more than 50 items.
429cota_depasitaThe plan's monthly quota has been exceeded (see Retry-After).
503mentenantaThe CAEN semantic index is not built, or embeddings are unavailable.

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": "texte is missing, empty, or has more than 50 items."
    }
}