oneapi
Sign in
Identificatori v1 / Identificatori

Batch validation

Validates many values at once, each with its declared or detected type. The response holds a verdict per value plus a summary: how many valid, how many not.

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

Request body

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

NameTypeDescriptionAccepted values
valorirequired list Minimum 1, maximum 200.
tipoptional text Maximum 24. max 24 car.
Explicit types Request body
{
    "valori": [
        {
            "valoare": "BTRLRO22",
            "tip": "bic"
        },
        {
            "valoare": "17621339",
            "tip": "cui"
        }
    ]
}
With detection Request body
{
    "valori": [
        {
            "valoare": "RO49AAAA1B31007593840000"
        }
    ]
}
Mixed, with one unreadable value Request body
{
    "valori": [
        {
            "valoare": "RO49AAAA1B31007593840000"
        },
        {
            "valoare": "BTRLRO22"
        },
        {
            "valoare": "abc"
        }
    ]
}

Query parameters

This route accepts no query parameters.

How it behaves

  • The body holds valori — a list of at most 200 {valoare, tip?} items — and, optionally, a request-level tip applied to every item without its own.
  • Without tip, each value goes through detection. The result then carries tip_detectat and detectie_sigura, so you know whether the match was unambiguous. Give the type explicitly when you know it: it is faster and safer.
  • The personal numeric code is not accepted here, neither per item nor at request level. A batch of personal numeric codes is exactly the kind of processing the dedicated route avoids through POST with no cache and no retention; allowing it through another door would void the rule.
  • POST rather than GET, both for large batches and because somebody's list of identifiers has no business in a URL that ends up in logs.

What it is for

  • Clean a contact database, flagging identifiers that fail their check digit.
  • Validate an imported file before loading it, in a single request.
  • Check a mix of types without knowing in advance which is which.

Response structure

All fields below live inside data.

FieldTypeDescription
inregistrari integer How many values were processed.
valide integer How many passed validation.
invalide integer How many did not.
rezultate[] array The result for each value, in the order sent.
rezultate[].tip string
rezultate[].valoare string The value published by the source for the combination above.
rezultate[].valid boolean
rezultate[].normalizat string
rezultate[].componente.institutie string
rezultate[].componente.tara string The country the value refers to.
rezultate[].componente.tara_nume string
rezultate[].componente.locatie string
rezultate[].componente.cod_de_test boolean
rezultate[].componente.sediu_central boolean
rezultate[].observatie string A note on how to read the value next to it.
observatie string A note on how to read the response: a computation convention or a limit of the data.
rezultate[].tip_detectat string Present only when the type was not given explicitly.
rezultate[].detectie_sigura boolean Whether detection found exactly one valid type.
rezultate[].eroare Present only when the type requested for that item does not exist.

Response examples

body: {"valori": [{"valoare": "BTRLRO22", "tip": "bic"}, {"valoare": "17621339", "tip": "cui"}]}

POSThttps://oneapi.ro/api/identificatori/v1/valideaza
{
    "data": {
        "inregistrari": 2,
        "valide": 2,
        "invalide": 0,
        "rezultate": [
            {
                "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": "Când nu dai `tip`, se detectează după formă — iar formele se suprapun (13 cifre pot fi și un cod de produs). Dă tipul explicit când îl cunoști."
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validarevalori is missing, there are more than 200 items, a type does not exist, or type cnp was requested.
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": "valori is missing, there are more than 200 items, a type does not exist, or type cnp was requested."
    }
}