Relations

Overview

The Relations endpoint retrieves ownership, beneficial ownership, key person roles, and corporate structure relationships for one or more companies. You can search by Valu8 ID, organisation number, national identification number, or country with update-date filters.

Each result is a RelationsCompany containing the company profile plus Parents and Children relationship trees.


Authentication

All requests require authentication. Include your access token in the Authorization header:

Authorization: Bearer <access-token>

If authentication fails, the endpoint returns HTTP 401 Unauthorized.


Request

Request Body

FieldTypeRequiredDefaultDescription
SearchParametersobject✅ YesDictionary of search filters. Each key is a parameter name and each value is an array of filter values. See Section 3.2.
PageSizeintegerNo10Number of companies per page. Valid range: 1–500.
CursorstringNonullCursor-based pagination for large result sets (up to 100,000 companies). See Section 3.3.

Example request — search by organisation number:

{
  "SearchParameters": {
    "OrgNo": ["556000-1234"]
  },
  "PageSize": 10
}

Example request — search by country with date filter:

{
  "SearchParameters": {
    "CountryCode": ["SE"],
    "RelationsUpdatedAt": ["2024-01-01", "2024-12-31"]
  },
  "PageSize": 100
}

Search Parameters

The SearchParameters field is a dictionary where each key is a filter name and each value is an array of one or more filter values.

Key rules:

  • At least one search parameter is required.
  • Parameter names are case-insensitive.
  • CountryCode values must match your authorized countries.
  • NationalIdentificationNumber requires CountryCode to also be specified.
  • Organisation numbers and national IDs are normalized (whitespace and hyphens removed).
  • Date parameters use format yyyy-MM-dd and accept one value (from date) or two values (from and to date).
ParameterTypeDescription
Valu8IdintegerSearch by one or more Valu8 internal IDs. Maximum 500 IDs per request.
OrgNostringOrganisation/registration number. Hyphens and whitespace are stripped.
NationalIdentificationNumberstringNatural persons national ID (for person entities). Requires CountryCode.
CountryCodestringISO country code (e.g., "SE", "NO"). Must be in your authorized set.
ContentUpdatedAtdateFilter by content update date. One or two values (yyyy-MM-dd).
RelationsUpdatedAtdateFilter by relations update date. One or two values (yyyy-MM-dd).

Tip: Call GET /v2/relations/search-parameters to get the up-to-date list of available parameters.

Pagination: Cursor

Relations uses cursor-based pagination only (there is no PageNumber). Use cursor mode when you need to walk through more than a single page of results—for example, a country-wide export or syncing all companies that match your filters.

How cursor pagination works

Each page is a separate POST /v2/relations call. The API returns up to PageSize companies (max 500) and an opaque cursor token in the X-Pagination response header. That token encodes the position in the result set; pass it back on the next request to continue where the previous call left off.

StepWhat to do
1. First requestSet Cursor to "*" (start of result set). Use the same SearchParameters you want for the full run. Prefer PageSize: 500 to minimize the number of round trips.
2. Read responseParse the X-Pagination header (JSON). See Section 4.2. Append each non-empty Relations array to your local store.
3. Next requestCopy the Cursor value from X-Pagination into the request body. Keep SearchParameters and PageSize unchanged—only the cursor advances.
4. RepeatContinue until a page returns an empty Relations array, or until X-Pagination.Cursor is null.

First request example:

{
  "Cursor": "*",
  "PageSize": 500,
  "SearchParameters": {
    "CountryCode": ["SE"]
  }
}

Next request example — use the cursor from the previous response header (value truncated for readability):

{
  "Cursor": "eyJTdGFydERDSUQiOjEwMSwiSXRlbUNvdW50ZXIiOjUwMH0=",
  "PageSize": 500,
  "SearchParameters": {
    "CountryCode": ["SE"]
  }
}

Example X-Pagination header on an intermediate page:

{
  "Count": 500,
  "TotalCount": 125000,
  "PageSize": 500,
  "TotalPages": 250,
  "Cursor": "eyJTdGFydERDSUQiOjUwMSwiSXRlbUNvdW50ZXIiOjUwMH0="
}

On the last page with data, Count may be less than PageSize. When there are no more companies, you typically receive an empty Relations array and Cursor is null in the header.

Integration tips

  • Do not invent or modify cursor tokens—they are opaque and validated server-side. A bad token returns Cursor has not a valid value. (HTTP 400).
  • TotalCount in X-Pagination reflects how many companies match the search; you can use it for progress UI, but always use cursor + empty Relations to detect completion.
  • Small lookups (a few OrgNo or Valu8Id values) may omit Cursor on the first call and still receive a Cursor in X-Pagination if more matches exist. For explicit, full iteration over large sets, always start with "*" and loop until done.
  • Rate limits apply per request; use PageSize: 500 and reasonable backoff if you receive HTTP 429.

Maximum iteration limit

Cursor pagination is capped at 100,000 companies per search (across all pages in one cursor run). If you keep requesting pages after that cumulative limit, the API returns HTTP 400:

You are not allowed to iterate more than 100000 via cursor.

The limit applies to the same SearchParameters and cursor chain—not per HTTP call. To continue beyond 100,000, start a new search with narrower filters (for example, split by RelationsUpdatedAt date ranges or by region if your use case allows), or use batch files.

Need more than 100,000 companies? If your integration needs a larger dataset—a full-country relations export, periodic full sync, or anything above the cursor cap—use the Batch Files API instead. Batch files are pre-generated bulk exports (JSON Lines, Brotli-compressed) scoped to your account, with no cursor iteration limit. List available files with GET /v2/batches/batch-files, then download via GET /v2/batches/batch-file/{batchFileId}. Contact Valu8 support for batch types and schemas that include relations data.


Response

Success Response (HTTP 200)

Returns a GetCompaniesRelationsByCountryCodeOrDcidsResponse JSON body and an X-Pagination header. An empty Relations array is a valid success response when no companies match.

Pagination Header (X-Pagination)

Every successful response includes an X-Pagination HTTP response header:

FieldTypeDescription
CountintegerNumber of companies in the current response.
TotalCountintegerTotal number of companies matching the search.
PageSizeintegerThe requested page size.
TotalPagesintegerTotal number of pages available.
CursorstringCursor token for the next request. null when no more results.

Example header:

{
  "Count": 100,
  "TotalCount": 3542,
  "PageSize": 100,
  "TotalPages": 36,
  "Cursor": "eyJTdGFydERDSUQiOjEwMSwiSXRlbUNvdW50ZXIiOjEwMH0="
}

Validation Error Response (HTTP 400)

{
  "type": "https://datatracker.ietf.org/doc/html/rfc9110#name-400-bad-request",
  "status": 400,
  "title": "One or more validation errors occurred.",
  "errors": {
    "parameters": [
      "Searchparameters are missing."
    ]
  }
}

Common validation errors:

Error MessageCause
Searchparameters are missing.SearchParameters is null or empty.
Pagesize is invalid (Maximum pagesize: 500).PageSize exceeds 500.
Cursor has not a valid value.Malformed cursor token.
You are not allowed to iterate more than 100000 via cursor.Cursor iteration limit reached.
{param} is an invalid parameter.Unrecognized search parameter name.
{value} is an unauthorized country code.Country not in your authorized set.
Valu8Ids can max be set to 500.Too many Valu8 IDs in one request.
CountryCode is required when searching with NationalIdentificationNumber.Missing country for national ID search.
Invalid date format in ContentUpdatedAt: {value}.Date not in yyyy-MM-dd format.
ContentUpdatedAt can only maximum contain two dates.More than two date values provided.
Invalid date format in RelationsUpdatedAt: {value}.Date not in yyyy-MM-dd format.
RelationsUpdatedAt can only maximum contain two dates.More than two date values provided.

Unauthorized Response (HTTP 401)

Returned with an empty body when authentication fails.


Response Body: GetCompaniesRelationsByCountryCodeOrDcidsResponse

FieldTypeDescription
RelationsRelationsCompany[]Array of companies with their relationship data. See Section 6.

Note: ValidationResults is only included on the HTTP 400 path. On success it is omitted.


RelationsCompany Object

Each item in the Relations array represents a company and its relationship graph.

FieldTypeConditionDescription
Valu8IdintegerAlwaysUnique Valu8 identifier.
NamestringOmitted when nullCompany name.
OrgNostringOmitted when nullOrganisation/registration number.
CountryCodestringOmitted when nullISO country code.
LegalFormintegerOmitted when 0Legal form code. See _v2_companies.md – LegalForm.
OperationalStatusintegerOmitted when 0Operational status code. See _v2_companies.md – OperationalStatus.
TotalNumberOfSharesdoubleOmitted when nullTotal issued shares.
TotalNumberOfVotesdoubleOmitted when nullTotal voting rights.
ParentsRelation[]Omitted when nullEntities that own or control this company. See Section 7.
ChildrenRelation[]Omitted when nullEntities owned or controlled by this company. See Section 7.
UBODetailsUBODetailsOmitted when nullUltimate Beneficial Owner registration details. See Section 8.

Relation Object

Represents a related entity (company or person) in the ownership or control graph. Relations appear in both Parents and Children arrays.

FieldTypeConditionDescription
Valu8IdintegerAlwaysValu8 identifier for the related entity.
NamestringOmitted when nullFull name (person or company).
FirstNamestringOmitted when nullFirst name (person).
LastNamestringOmitted when nullLast name (person).
OrgNostringOmitted when nullOrganisation number (company).
BirthDatestringOmitted when nullDate of birth (person). Masked as "Protected Identity" for protected persons.
NationalIdentificationNumberstringOmitted when nullPersonal national ID. Masked for protected persons without hidden-person access.
GenderstringOmitted when nullGender (person).
Citizenshipsstring[]Omitted when nullCitizenship country codes.
CountryOfResidencesstring[]Omitted when nullCountry of residence codes.
AddressesAddress[]Omitted when nullRegistered addresses. See Section 7.4.
CountryCodestringOmitted when nullCountry code.
IsCompanybooleanOmitted when nulltrue if the entity is a company, false if a person.
IsSearchableEntitybooleanOmitted when nullWhether the entity can be searched in Valu8.
IsProtectedbooleanOmitted when nullWhether the person has a protected identity.
BeneficialOwnershipsBeneficialOwnership[]Omitted when nullUBO records. Requires subscription authorization. See Section 7.2.
OwnershipsOwnership[]Omitted when nullDirect ownership records. See Section 7.1.
UltimateOwnershipsOwnership[]Omitted when nullUltimate ownership records.
CompanyStructureOwnersOwnership[]Omitted when nullCorporate structure ownership records.
KeyPersonRolesRole[]Omitted when nullBoard, CEO, and other key person roles. See Section 7.3.
HistoryRelation[]Omitted when nullHistorical relationship records. Requires subscription authorization.
RegistrationDatedatetimeOmitted when nullEntity registration date.
UpdatedAtdatetimeOmitted when defaultLast update timestamp.

Ownership

FieldTypeConditionDescription
OwnershipStakedoubleOmitted when nullOwnership percentage.
MinOwnershipStakedoubleOmitted when nullMinimum ownership percentage (range).
MaxOwnershipStakedoubleOmitted when nullMaximum ownership percentage (range).
NumberOfSharesdoubleOmitted when nullNumber of shares held.
NumberOfVotesdoubleOmitted when nullNumber of votes held.
MinVotesdoubleOmitted when nullMinimum votes (range).
MaxVotesdoubleOmitted when nullMaximum votes (range).
ShareClassstringOmitted when nullShare class identifier.
ProtocolDatedatetimeOmitted when defaultDate of the ownership protocol/document.
InDatedatetimeOmitted when defaultDate the ownership became effective.
OutDatedatetimeOmitted when nullDate the ownership ended (historical).
UpdatedAtdatetimeOmitted when defaultLast update timestamp.

BeneficialOwnership

Extends Ownership with UBO-specific registration fields.

FieldTypeConditionDescription
(all Ownership fields)See Section 7.1.
CaseNostringOmitted when nullRegistration case number.
RegistrationIdstringOmitted when nullRegistration identifier.
StatusCodestringOmitted when nullRegistration status code.
SuspicionDatestringOmitted when nullDate suspicion was registered.
SuspicionLevelstringOmitted when nullSuspicion level.
SuspicionCaseNostringOmitted when nullSuspicion case number.
SuspicionIssueIDstringOmitted when nullSuspicion issue identifier.
ProxyCompanyRegistrationNumberstringOmitted when nullProxy company registration number.
ProxyCompanyNamestringOmitted when nullProxy company name.
TextstringOmitted when nullDescriptive text for the UBO record.

Role (Key Person)

FieldTypeConditionDescription
IdintegerAlwaysRole type identifier.
TextstringOmitted when nullRole title (e.g., "CEO", "Board Member").
CategorystringOmitted when nullRole category.
InDatedatetimeOmitted when defaultDate the role became effective.
OutDatedatetimeOmitted when nullDate the role ended (historical).
UpdatedAtdatetimeOmitted when defaultLast update timestamp.

Address

FieldTypeDescription
StreetstringStreet name and number.
ZipCodestringPostal / zip code.
CitystringCity or town.
CountryCodestringCountry code.

UBODetails

Company-level UBO registration summary on RelationsCompany.

FieldTypeConditionDescription
HasReportedMissingUBObooleanAlwaystrue if the company has reported missing UBO data.
CaseNostringOmitted when nullRegistration case number.
RegistrationIdstringOmitted when nullRegistration identifier.
StatusstringOmitted when nullRegistration status.
SuspicionLevelstringOmitted when nullSuspicion level.
SuspicionDatestringOmitted when nullSuspicion registration date.
SuspicionCaseNostringOmitted when nullSuspicion case number.
IsUBOExcludedbooleanOmitted when nullWhether UBO is excluded from registration.

Authorization and Data Filtering

The fields returned for each relation depend on your subscription's authorized areas per country. Fields you are not authorized to access are omitted from the response (not returned as null).

Authorization AreaFields Controlled
Beneficial OwnerBeneficialOwnerships
OwnerOwnerships
Company Structure OwnerCompanyStructureOwners
Key PersonKeyPersonRoles
Relations HistoryHistory
Hidden Person AccessWhether protected identity personal data is masked

Protected identity handling: When IsProtected is true, personal fields (BirthDate, CountryCode, Addresses, Citizenships, CountryOfResidences) are masked as "Protected Identity". Name and national ID are also masked unless you have Hidden Person Access authorization.


JSON Serialization Behavior

Value TypeOmission Rule
null strings/objectsOmitted from response
0 (integer/double)Omitted from response
Default DateTimeOmitted from response
null nullable typesOmitted from response

The absence of a field means "no data available" or "not authorized" — not an error.


Companion Endpoint: Search Parameters

Endpoint: GET /v2/relations/search-parameters

Returns all available search parameter names and their data types. Use this endpoint to discover valid filter names before calling the relations search endpoint.

Example response:

{
  "SearchParameters": [
    { "ParameterName": "Valu8Id", "Datatype": "number" },
    { "ParameterName": "NationalIdentificationNumber", "Datatype": "string" },
    { "ParameterName": "OrgNo", "Datatype": "string" },
    { "ParameterName": "ContentUpdatedAt", "Datatype": "date", "Description": "..." },
    { "ParameterName": "RelationsUpdatedAt", "Datatype": "date", "Description": "..." },
    { "ParameterName": "CountryCode", "Datatype": "string" }
  ]
}