# Businesses

> Verify a business (KYB) against its registry, record who owns and runs it, and check its documents.

## Introduction

Business verification (KYB) confirms that a company is registered, and helps you establish who owns and controls it. A business can be verified two ways, each a switch that your account's owners turn in the dashboard's organization settings: by its registration (registry lookups) and by a notarised document (document uploads). Both are on by default. A route of a way that is turned off returns `403 capability.disabled`, and with both off every business route does.

A registry match confirms only that the registry holds a matching record. It does not prove who owns the company, that it is trading, or that its licences are valid. Evaluate those separately.

## Creating a business

```bash
curl https://api.aqoon.si/v1/businesses \
  -H "Authorization: Bearer $AQOONSI_KEY" \
  -H "Accept: application/vnd.api+json" \
  -H "Content-Type: application/vnd.api+json" \
  -d '{"data":{"type":"businesses",
    "attributes":{"legalName":"Horn Logistics Ltd","registrationNumber":"12345678902"},
    "relationships":{"jurisdiction":{"data":{"type":"countries","id":"SO"}}}}}'
```

`legalName` and the `jurisdiction` relationship are required. Send `registrationNumber` as a string, never a number. Other declared attributes include `tradingName`, `legalForm`, `incorporationDate`, `registeredAddress` and your own `reference`. As with people, a registry answer never overwrites what the business declared.

## Searching the registry

`POST /v1/lookups` searches a country's business registry by name or registration number. It returns every candidate the registry gave, and never picks one for you.

- A search by registration number is complete.
- A search by name returns only the registry's top results and is `complete: false`: a business that is not listed may still exist.
- A registry that is down returns `503` and records nothing. It is never evidence that a business does not exist.

## Verifying registration

Create a `businessRegistration` verification with the business as its `subject` and an `Idempotency-Key`. It runs in one request and returns the finished verification.

| Registry answer                                                          | Result                                                       |
| ------------------------------------------------------------------------ | ------------------------------------------------------------ |
| One record with exactly that number, and the declared legal name matches | `verified`, `registryVerified`; claims and licences recorded |
| No record                                                                | `failed`, `registrationNotFound`                             |
| Records, none with that exact number                                     | `failed`, `registrationNumberMismatch`                       |
| The number matches, the legal name does not                              | `failed`, `attributeMismatch`                                |
| Outage, rate limit or a registry fault                                   | `503` or `429`; nothing recorded                             |

Case, punctuation and a trailing legal form are ignored when names are compared.

## Licences

`GET /v1/businesses/{id}/licences` lists the licences the registry recorded. A licence the registry reports as unknown is never treated as "no licence": nothing is recorded for it.

## Associations

An association links a person or another company to a business with a role: `director`, `officer`, `shareholder`, `beneficialOwner`, `authorizedRepresentative`, `signatory` or `controller`. Create them with `POST /v1/associations`; `ownership` and `voting` are percentages. End an association by setting `until`; nothing is deleted.

Associations you create are `declared`. Many registries do not publish directors or shareholders, so they come from the business, its documents or your review.

## Ownership

`GET /v1/businesses/{id}/ownership` calculates who owns and controls the business, looking through company shareholders at any depth:

- `beneficialOwners`: people at or above the threshold (25% by default, `filter[threshold]` to change), or with a `controller` association;
- `holders`: every person and company with a stake, direct and effective;
- `unattributed`: the share not traced to any person, with warnings such as `cyclicOwnership`.

The analysis is exactly as complete as the associations recorded.

## Business documents

Upload company papers, such as a certificate of incorporation or a licence. Aqoonsi reads them and compares what they say with the registry. A document is one PDF or image up to 10 MiB, or a set of page images in order.

1. `POST /v1/documents` with `kind`, `mime`, `size`, the business as `subject` and an `Idempotency-Key`.
2. `PUT` the file to the signed URL in `meta.upload`, without the Aqoonsi token.
3. Confirm it with `POST /v1/documents/{id}/readings` and an `Idempotency-Key`.
4. Poll `GET /v1/documents/{id}` or wait for the `document.assessed` webhook.

The assessment is `consistent`, `inconsistent`, `inconclusive` or `unreadable`. An inconsistent document opens a [case](cases.md).

To let a business's staff upload their own files from a phone, issue a document token with `POST /v1/businesses/{id}/sessions`. It is valid for 30 minutes and reaches only that business's documents.
