oneapi
Sign in
Identificatori v1 / Identificatori

What kind of identifier is it?

You give it a value without saying what it is: the route returns the matching types, ranked by plausibility, and says whether it is certain. Useful for a single search field.

POST
https://oneapi.ro/api/identificatori/v1/detecteaza

Request body

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

NameTypeDescriptionAccepted values
valoarerequired string The string to analyse: at least 2, at most 64 characters. max 64 car.
include_date_personaleoptional boolean | null With true the national ID number is included among the candidates. It is skipped by default so a 13-digit product code is not analysed as personal data; when requested, the response is never cached.
An IBAN Request body
{
    "valoare": "RO49AAAA1B31007593840000"
}
An LEI Request body
{
    "valoare": "787200UMW0547WFAJE55"
}
A VAT number Request body
{
    "valoare": "RO17621339"
}
A BIC Request body
{
    "valoare": "BTRLRO22"
}

Query parameters

This route accepts no query parameters.

How it behaves

  • The request body has two fields: valoare (required, 2–64 characters) and include_date_personale (optional). Body fields do not appear in the parameter table, which documents the query string only — hence the description here.
  • Detection is a HEURISTIC, not a certainty: the shapes overlap. A Romanian personal numeric code has 13 digits, exactly like an EAN-13. That is why the response returns ALL candidates, with validation run for each, and sigur says whether exactly one passes.
  • The personal numeric code is skipped by default. A 13-digit product code would otherwise be analysed as personal data — precisely the wrong way round. Anyone who genuinely needs it passes include_date_personale: true, and then the response is never cached.
  • A type that PASSES validation is far more likely than one that merely matches the shape, so valid candidates come first.

What it is for

  • Clean an import where one column mixes VAT numbers, IBANs and product codes.
  • Accept any identifier the user gives you in a single search field.
  • Check whether a string is any known identifier, before treating it as free text.

Response structure

All fields below live inside data.

FieldTypeDescription
valoare string The value published by the source for the combination above.
potriviri integer How many candidates match by shape.
tip_probabil string The most likely type, or null if none matches.
sigur boolean true only when exactly one type passes validation.
candidati[] array Every candidate, each with the full validation result.
candidati[].tip string
candidati[].eticheta string Display label for the value — the readable version of the code next to it.
candidati[].valid boolean Whether that type passes validation, not just the shape match.
candidati[].rezultat.tip string
candidati[].rezultat.valoare string The value published by the source for the combination above.
candidati[].rezultat.valid boolean
candidati[].rezultat.normalizat string
candidati[].rezultat.componente.tara string The country the value refers to.
candidati[].rezultat.componente.tara_nume string
candidati[].rezultat.componente.cifre_control string
candidati[].rezultat.componente.lungime integer
candidati[].rezultat.componente.lungime_verificata boolean
candidati[].rezultat.componente.format_afisare string
candidati[].rezultat.componente.cod_banca string
candidati[].rezultat.componente.cont string
observatie null What the result means: several matches, none, or a shape that fails validation.

Response examples

body: {"valoare": "RO49AAAA1B31007593840000"}

POSThttps://oneapi.ro/api/identificatori/v1/detecteaza
{
    "data": {
        "valoare": "RO49AAAA1B31007593840000",
        "potriviri": 1,
        "tip_probabil": "iban",
        "sigur": true,
        "candidati": [
            {
                "tip": "iban",
                "eticheta": "IBAN — cont bancar",
                "valid": true,
                "rezultat": {
                    "tip": "iban",
                    "valoare": "RO49AAAA1B31007593840000",
                    "valid": true,
                    "normalizat": "RO49AAAA1B31007593840000",
                    "componente": {
                        "tara": "RO",
                        "tara_nume": "România",
                        "cifre_control": "49",
                        "lungime": 24,
                        "lungime_verificata": true,
                        "format_afisare": "RO49 AAAA 1B31 0075 9384 0000",
                        "cod_banca": "AAAA",
                        "cont": "1B31007593840000"
                    }
                }
            }
        ],
        "observatie": null
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validarevaloare is missing or not between 2 and 64 characters.
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": "valoare is missing or not between 2 and 64 characters."
    }
}