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) andinclude_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
sigursays 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
}
}
body: {"valoare": "787200UMW0547WFAJE55"}
POSThttps://oneapi.ro/api/identificatori/v1/detecteaza
{
"data": {
"valoare": "787200UMW0547WFAJE55",
"potriviri": 2,
"tip_probabil": "lei",
"sigur": true,
"candidati": [
{
"tip": "lei",
"eticheta": "LEI — identificator de entitate juridică",
"valid": true,
"rezultat": {
"tip": "lei",
"valoare": "787200UMW0547WFAJE55",
"valid": true,
"normalizat": "787200UMW0547WFAJE55",
"componente": {
"unitate_emitenta": "7872",
"entitate": "UMW0547WFAJE",
"cifre_control": "55"
},
"observatie": "Pentru datele entității — denumire, sediu, structura de grup — vezi /business/v1/firme/dupa-lei/{lei}, care are registrul GLEIF importat pentru România."
}
}
],
"observatie": null
}
}
body: {"valoare": "RO17621339"}
POSThttps://oneapi.ro/api/identificatori/v1/detecteaza
{
"data": {
"valoare": "RO17621339",
"potriviri": 3,
"tip_probabil": "eori",
"sigur": false,
"candidati": [
{
"tip": "eori",
"eticheta": "EORI — operator economic în vamă",
"valid": true,
"rezultat": {
"tip": "eori",
"valoare": "RO17621339",
"valid": true,
"normalizat": "RO17621339",
"componente": {
"tara": "RO",
"tara_nume": "România",
"identificator_national": "17621339",
"cui": 17621339
},
"observatie": "Pentru România, EORI e `RO` + CUI, deci cifra de control a CUI-ului chiar s-a verificat. Existența înregistrării EORI se confirmă doar la Comisia Europeană."
}
}
],
"observatie": "Mai multe tipuri trec validarea — formele lor se suprapun. Alege după context, sau cere explicit tipul."
}
}
body: {"valoare": "BTRLRO22"}
POSThttps://oneapi.ro/api/identificatori/v1/detecteaza
{
"data": {
"valoare": "BTRLRO22",
"potriviri": 3,
"tip_probabil": "bic",
"sigur": false,
"candidati": [
{
"tip": "bic",
"eticheta": "BIC / SWIFT — cod bancar",
"valid": true,
"rezultat": {
"tip": "bic",
"valoare": "BTRLRO22",
"valid": true,
"normalizat": "BTRLRO22",
"componente": {
"institutie": "BTRL",
"tara": "RO",
"tara_nume": "România",
"locatie": "22",
"cod_de_test": false,
"sediu_central": true
},
"observatie": "Verificare de FORMĂ. Registrul BIC e produs comercial SWIFT, deci nu putem confirma că instituția există sau cine e — doar că șirul respectă ISO 9362."
}
}
],
"observatie": "Mai multe tipuri trec validarea — formele lor se suprapun. Alege după context, sau cere explicit tipul."
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 422 | validare | valoare is missing or not between 2 and 64 characters. |
| 429 | cota_depasita | The 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."
}
}