oneapi
Sign in
Business v1 / Nomenclatoare

Batch CPV classification

You send a list of procurement subject descriptions (JSON body {"texte": ["...", "..."]}, 50 at most) and get back, for each one, the CPV codes that match by MEANING, with a score. ?limita= (per text, 3 by default, 10 at most).

POST
https://oneapi.ro/api/business/v1/cpv/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": [
        "laptopuri pentru birou",
        "servicii de paza"
    ],
    "limita": 2
}
O descriere, trei potriviri Request body
{
    "texte": [
        "lucrari de asfaltare"
    ],
    "limita": 3
}
Cea mai bună potrivire pentru fiecare Request body
{
    "texte": [
        "mobilier de birou",
        "consumabile medicale"
    ],
    "limita": 1
}

Query parameters

This route accepts no query parameters.

How it behaves

  • The batch version of /cpv/potriveste: send a list of procurement-subject descriptions (JSON body {"texte": [...]}, max 50) and get, for each one, the CPV codes matched by meaning, with a score. All are embedded in a single batch.
  • Result order follows the order of the texts; an empty text returns potriviri: []. The method is POST. ?limita= chooses how many suggestions per text (default 3, max 10).

What it is for

  • Batch classification of procurement subjects into CPV codes.
  • Pre-filling CPV codes for a set of contract lines.

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 CPV code.
potriviri[].denumire string | null The name of the procurement subject.
potriviri[].scor number The semantic match score (0–1).

Response examples

body: {"texte": ["laptopuri pentru birou", "servicii de paza"], "limita": 2}

POSThttps://oneapi.ro/api/business/v1/cpv/clasifica-lot
{
    "data": [
        {
            "text": "laptopuri pentru birou",
            "potriviri": [
                {
                    "cod": "30141200-1",
                    "denumire": "Calculatoare de birou",
                    "scor": 0.7954199436056661
                }
            ]
        }
    ]
}

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 CPV 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."
    }
}