Identificatori v1 / Identificatori
Validate an identifier
A single validation, straight in the path: the type and the value. It returns whether it is valid, the normalised form and whatever could be read out of the code.
GET
https://oneapi.ro/api/identificatori/v1/{tip}/{valoare}
Path parameters
NameTypeDescriptionExample
tiprequired
string
Identifier type (
cnp, cui, iban, bic, lei, eori, vat…). The full list is at /identificatori/v1/tipuri.
valoarerequired
string
The value to validate, as printed on the document. Spaces and hyphens are ignored.
Query parameters
This route accepts no query parameters.
How it behaves
- One route for every type, with the type as a path segment. Ten near-identical routes would be ten places to maintain for the same behaviour, and the catalogue at
/tipuridescribes them all anyway. - The personal numeric code cannot be requested here. The route answers 405 and points to
POST /identificatori/v1/cnp: in a URL the code would land in the server access logs, the browser history and the next page'sRefererheader. - The response has the same shape for every type:
valid,motive(sentences, not error codes) andcomponente(whatever could be decoded). Someone validating an IBAN today and an ISIN tomorrow need not learn two shapes. - What we do NOT check, by type: for IBAN, the expected length outside Romania — that table is the SWIFT registry, and every library carrying it is LGPL; the mod-97 check digit is however complete. For BIC, the existence of the institution — the registry is a commercial SWIFT product. For VIN, make and model — the manufacturer code list is held by SAE. Each response says so in
observatie, not just the documentation.
What it is for
- Reject a mistyped IBAN in a form, before initiating a payment.
- Check a scanned EAN code, to catch a bad barcode read.
- Decode a VIN to find the model year and manufacturing region.
- Confirm the check digit of a Romanian VAT number before running a lookup that would find nothing anyway.
Response structure
All fields below live inside data.
FieldTypeDescription
tip
string
The type used for validation.
valoare
string
The value received, exactly as sent.
valid
boolean
Whether the identifier is well formed under its standard.
normalizat
string
The canonical form (no separators, upper case), present only when valid.
componente
object
Whatever could be decoded — differs by type.
componente.tara
string
The country the value refers to.
componente.tara_nume
string
componente.cifre_control
string
componente.lungime
integer
componente.lungime_verificata
boolean
componente.format_afisare
string
componente.cod_banca
string
componente.cont
string
motive
What exactly is wrong, in words. Absent when valid.
observatie
string
The concrete limit of the check for that type.
Response examples
GEThttps://oneapi.ro/api/identificatori/v1/iban/RO49AAAA1B31007593840000
{
"data": {
"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"
}
}
}
GEThttps://oneapi.ro/api/identificatori/v1/bic/BTRLRO22
{
"data": {
"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."
}
}
GEThttps://oneapi.ro/api/identificatori/v1/vin/WVWZZZ1JZXW000010
{
"data": {
"tip": "vin",
"valoare": "WVWZZZ1JZXW000010",
"valid": true,
"normalizat": "WVWZZZ1JZXW000010",
"componente": {
"wmi": "WVW",
"regiune_fabricatie": "Europa",
"vds": "ZZZ1JZ",
"cifra_control": "Z",
"cifra_control_asteptata": "1",
"cifra_control_corecta": false,
"cifra_control_obligatorie": false,
"cod_an_model": "X",
"ani_model_posibili": [
1999
],
"serie": "000010"
},
"observatie": "Decodare PARȚIALĂ: structură, cifră de control, an-model și regiune. NU dăm marca sau modelul — lista completă a codurilor de producător (WMI) e ținută de SAE ca produs comercial, iar un decodor care ghicește dintr-o listă neîntreținută e mai rău decât unul care spune ce știe."
}
}
GEThttps://oneapi.ro/api/identificatori/v1/cui/14399840
{
"data": {
"tip": "cui",
"valoare": "14399840",
"valid": true,
"normalizat": "14399840",
"componente": {
"cui": 14399840,
"prefix_tva_scris": false,
"cod_tva": "RO14399840"
},
"observatie": "Doar cifra de control — nu confirmă că firma există. Pentru asta, /business/v1/firme/{cui}; pentru starea de plătitor de TVA, registrul fiscal din același modul."
}
}
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. |
| 404 | negasit | The requested type does not exist. The list is at /identificatori/v1/tipuri. |
| 405 | eroare | Type cnp was requested, which is accepted only via POST. |
| 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": "negasit",
"mesaj": "The requested type does not exist. The list is at /identificatori/v1/tipuri."
}
}