oneapi
Sign in
Business v1 / Graf

Graph path

The shortest chain of links (through shared people) between two companies: ?de={cui}&la={cui}. 404 if no link exists within the maximum depth (5).

GET
https://oneapi.ro/api/business/v1/graf/cale

Query parameters

NameTypeDescriptionAccepted values
deoptional string | null VAT number of the starting company. e.g. 14399840e.g. 19e.g. 739926
laoptional string | null VAT number of the destination company. e.g. 43602301e.g. 17285166e.g. 43258691

How it behaves

  • Searches the path between two companies in the connection graph (shared people), via a breadth-first traversal up to a given depth. It returns the chain of companies and the people that link them.
  • The variant anchored on a specific company is at /firme/{cui}/conexe/{cui2}.

What it is for

  • Demonstrating the link between two companies, with the chain of people joining them.
  • Checking bidder independence in a procurement procedure.
  • Visualising a path in the graph, for an investigation report.

Response structure

All fields below live inside data.

FieldTypeDescription
lungime integer How many steps the chain of links between the two companies has.
cale[].cui integer The tax ID.
cale[].denumire string The name.

Response examples

GEThttps://oneapi.ro/api/business/v1/graf/cale?de=14399840&la=43602301
{
    "data": {
        "lungime": 1,
        "cale": [
            {
                "cui": 14399840,
                "denumire": "DANTE INTERNATIONAL SA"
            }
        ]
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404fara_legaturaThere is no link between the companies (up to depth 5).
422validareAn undeclared parameter or a value that fails validation (de, la). The offending field is in detalii.
422parametriGive de and la (tax IDs).
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": "An undeclared parameter or a value that fails validation (de, la). The offending field is in detalii.",
        "detalii": {
            "de": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}