# Changelog

This page lists every change to the Avallone API that you can notice from outside, newest first.

## Version numbers

Each release has a version number in the form `0.minor.patch`:

- The **minor** number goes up when a release adds or changes something.
- The **patch** number goes up when a release only fixes things.

The API stays at `0.x` until every endpoint follows the [API design guidelines](/api-design-guidelines). That release will be `1.0.0`.

Version numbers before this page was published were assigned afterwards, from the history of the code.

## Labels

Each change has one of these labels:

| Label | Meaning |
|---|---|
| **Breaking** | Something works differently, and a client built for the old behaviour can fail. |
| **Deprecated** | Something still works, but will be removed. The entry names the replacement and the removal date. |
| **Removed** | Something was taken out of the API. |
| **Added** | Something new: an endpoint, a field, an enum value or an error code. Nothing you have built needs to change. |
| **Changed** | Something behaves differently, but clients built for the old behaviour keep working. |
| **Fixed** | An endpoint now behaves as intended. |

See [API design guidelines](/api-design-guidelines#versions-and-changes) for what counts as a breaking change, and for how much notice we give.

## Releases

<Changelog>

## 0.137.0

Released 2026-11-03.

**Deprecated**

- `Fund` as a `legalForm` value. A Fund with no other legal form is still returned with `legalForm` set to `Fund`, so integrations that read the legal form keep working. Read `isFund` instead. No removal date is set yet.

**Added**

- `isFund` marks a company as a Fund. `POST /companies`, `PUT /companies/{companyId}`, `PUT /company` and the companies in `PUT /sync` accept it. A request that leaves it out keeps the value the company already has.
- `GET /companies`, `GET /companies/{companyId}`, `GET /companies/by-ref/{refId}`, `PUT /companies/{companyId}` and `PUT /company` return `isFund`.

**Changed**

- `Fund` is no longer a recommended `legalForm`. A company sent with `legalForm` set to `Fund` is marked as a Fund instead, with `isFund` set to `true` and no legal form.
- Changing a Fund's `legalForm` to another value no longer removes its Fund status. Send `isFund: false` to do that.

## 0.136.0

Released 2026-10-26.

**Deprecated**

- `reasons` on related company relations, in the REST endpoints and in `relatedCompanies` on `PUT /sync`. `details` replaces it, and lists the same reasons as entries without a role, so one field is enough. `reasons` will be removed on 2027-06-30. Until then, a request that sends both must list the same reasons in both, otherwise it returns `400`, and in `PUT /sync` the relation fails.

**Added**

- `details` sets a related company relation's company roles and reasons. Each entry is a role, a reason, or a role with a reason, such as `{ "role": "General Partner", "reason": "Manages the fund" }`. The role must already exist in your tenant, and names are matched without regard to case. `POST` and `PUT` on `/companies/{companyId}/related-companies` accept it. So do `PATCH` and `PUT` on `/companies/{companyId}/related-companies/{relationId}`. The responses of all four include it.
- `PUT /sync` accepts `details` on each entry of `relatedCompanies`. Without cleanup, the entries are added to the roles and reasons the relation already has, and an entry with `delete: true` removes one. With cleanup, `details` replaces them.

**Changed**

- On `POST` and `PUT /companies/{companyId}/related-companies`, `details` can be a list of roles and reasons. The object with `ownership`, `voting` and `notes` is still accepted, and still deprecated.

**Fixed**

- `reasons` in related company responses no longer contains `null` for a relation that has company roles.
- `PATCH` and `PUT /companies/{companyId}/related-companies/{relationId}` return the relation's `reasons` and `companyReferenceId`, as `GET` does.

## 0.135.0

Released 2026-10-26.

**Added**

- Companies, officers from `GET /officers/{id}` and `GET /officers/by-ref/{refId}`, related company relations and company documents include `tenantId`.
- Officer addresses, contacts, citizenships and tax details also include `tenantId`.
- A document attachment can have a `null` `tenantId`.

## 0.134.0

Released 2026-10-19.

**Breaking**

- The activity log and access logs endpoints send errors in the [error format](/api-design-guidelines#errors), as `application/problem+json`.
- The activity log and access logs endpoints return `400` for a query parameter they don't know, `405` for a method they don't support, and `406` when the `Accept` header doesn't allow the type they return.
- The access log download moves from `GET /access-logs?date=…` to `GET /access-logs/{date}/content`. `GET /access-logs` now lists the days that have a file, and answers `?date=` with `400`.
- In the activity log entry for an access log download, `outcome` is `not_found` or `invalid_date`, instead of `not-found` or `invalid-date`.
- `GET /activities` treats `to` as exclusive: `from=2026-03-01&to=2026-04-01` covers all of March.
- `GET /activities` accepts only an RFC 3339 timestamp, such as `2026-03-01T09:00:00Z`, or a `YYYY-MM-DD` date, in `from` and `to`. Other forms return `400`, such as `2026-03`, `2026-W10`, or a timestamp without seconds or without `Z` or an offset.
- `GET /activities` returns `400` for an unknown `resourceType`, instead of an empty list.
- `GET /activities` names the link to the next page `nextPageUrl`, instead of `nextPageURI`.
- `GET /activities/types` and `GET /activities/resource-types` return their values under `results`, instead of as a bare list.
- `actor.ipAddress` is `null` when there is no IP address, instead of a placeholder such as `N/A`.
- `data` is `[]` instead of `null` for entries recorded before 13 June 2025. Every item in `data` has a `type`, and a change item has `before` and `after` even when they are `null`.
- In the specification, the activity log operations are `listActivities`, `listActivityTypes` and `listActivityResourceTypes`. Their schemas are `Activity`, `ActivityList` and related names, without `Api` or `Dto`. The activity type enum is `ActivityType`, instead of `ActivityTypes`.

**Added**

- `GET /access-logs` lists the days that have an access log file, newest first, with the size of each file. Each day's `contentUrl` is the path that downloads its file.
- `GET /access-logs/{date}` returns one day, so you can check that it has a file before you download it.

**Fixed**

- `401` responses from every endpoint carry `WWW-Authenticate: Bearer`.
- The specification shows the activity log's `actor` field by its real name, marks the fields of the activity log and access logs read-only, and describes every error response of both with the `Problem` schema. `page`, `limit` and the page counts in `metadata` are integers, instead of numbers.

## 0.133.0

Released 2026-10-13.

**Changed**

- `GET /officers/{id}` and `GET /officers/by-ref/{refId}` return a body with `404`: `statusCode`, `name` and `message`. The body used to be empty.

## 0.132.0

Released 2026-09-30.

**Added**

- `GET /access-logs` downloads one day of the tenant's access logs.
- Access log downloads are recorded in the activity log as `API-access-logs-requested`.

## 0.131.0

Released 2026-09-24.

**Breaking**

- `DELETE /companies/{id}` returns `404` when no company matches, instead of `204`.

**Changed**

- `GET /companies` matches `search.referenceId` without regard to case.

## 0.130.3

Released 2026-09-22.

**Fixed**

- `GET /companies/{companyId}/related-officers` returns every officer of the company, including officers with no ownership, voting or UBO data.

## 0.130.2

Released 2026-09-10.

**Fixed**

- `PUT /sync` reports a readable per-item failure when a related company's reference ID can't be found.

## 0.130.1

Released 2026-08-25.

**Fixed**

- `PUT /sync` clears an officer's `dateOfBirth` when it is sent as `null`, and keeps the stored value when the date sent isn't valid.

## 0.130.0

Released 2026-08-03.

**Added**

- `GET /activities/types` and `GET /activities/resource-types` list the values the activity filters accept.

## 0.129.0

Released 2026-07-28.

**Added**

- `GET /activities` lists the tenant's activity log, filtered by type, resource, user and time range.

## 0.128.2

Released 2026-07-27.

**Fixed**

- `PUT /sync` always updates the same role when a company has several officer roles with the same name.

## 0.128.1

Released 2026-07-27.

**Fixed**

- `PUT /sync` rejects an officer and a counterparty that share a reference ID, instead of merging them into one person.

## 0.128.0

Released 2026-07-07.

**Breaking**

- `POST /companies/{companyId}/related-companies` only creates relations, and returns `409` when a relation already exists or would create a cycle.
- `PUT /companies/{companyId}/related-companies` replaces the company's relations in both directions, as parent and as subsidiary.

**Added**

- `GET`, `PATCH`, `PUT` and `DELETE /companies/{companyId}/related-companies/{relationId}` work on a single relation.
- Related company relations have an `id`, a `type`, `reasons` and a `url`.

## 0.127.0

Released 2026-07-07.

**Added**

- `PUT /sync` accepts `amlStatus` on `counterparty`, limited to the documented values.

## 0.126.2

Released 2026-07-07.

**Fixed**

- `overallRiskStatus` on `GET /counterparty/companies` shows the tenant's own risk value, including manual overrides, instead of a generic Low, Medium or High.

## 0.126.1

Released 2026-06-23.

**Fixed**

- `PUT /sync` resolves counterparty `roles` by name for the tenant, and clears them when an empty list is sent.

## 0.126.0

Released 2026-06-23.

**Added**

- `GET /officers/{id}` and `GET /officers/by-ref/{refId}` return one officer, and return `404` when the officer doesn't exist.
- `GET /counterparty/individuals` lists individual counterparties.

## 0.125.0

Released 2026-06-19.

**Breaking**

- In the `PUT /sync` result, the message of a failed item is a string, instead of a list with one string.
- A failed item whose error wasn't expected has the message `Unknown error. Please contact support@avallone.io`, instead of the internal error message.

**Fixed**

- When two counterparties would get the same entity name, the item fails in `PUT /sync` with the message `Counterparty with name "<name>" already exists`, instead of a database error.

## 0.124.0

Released 2026-06-09.

**Added**

- `GET`, `POST` and `PUT /companies/{companyId}/related-companies` read and write a company's relations to other companies.
- `GET`, `POST` and `PUT /companies/{companyId}/related-officers` read and write a company's officers, with their roles and ownership.

## 0.123.0

Released 2026-06-04.

**Changed**

- `PUT /sync` doesn't change an officer's email when another individual already has that email or the officer has open outbound requests, and reports a warning instead.

## 0.122.1

Released 2026-06-04.

**Fixed**

- `PUT /sync` with cleanup clears old relation details when a company relation changes type.

## 0.122.0

Released 2026-06-03.

**Added**

- `PUT /sync` accepts `forceUbo` on related officers, which marks the officer as a UBO whatever their ownership or voting.

## 0.121.0

Released 2026-05-29.

**Breaking**

- `PUT /sync` validates the fields inside `counterparty` on companies and officers, and rejects invalid values.

**Added**

- `PUT /sync` accepts `followUpAt` and `riskValue` on `counterparty`.

## 0.120.0

Released 2026-05-26.

**Added**

- `GET /counterparty/companies` returns each counterparty's main `riskScore`, including `overallRiskStatus`, `createdAt` and `createdBy`.

## 0.119.0

Released 2026-05-26.

**Breaking**

- `GET`, `PUT` and `DELETE /companies/{id}` and the document endpoints ignore the `x-id-field` header, so `{id}` is always the internal ID. The header was removed without a deprecation period.
- The document endpoints moved from `/companies/documents/{id}` to `/companies/{companyId}/documents/{docId}`, and the old paths were removed.

**Added**

- `GET /companies/by-ref/{refId}` returns a company by its reference ID, and `204` when no company has it.
- `GET /companies/by-ref/{refId}/documents`, `GET /companies/by-ref/{refId}/documents/{docId}` and `GET /companies/by-ref/{refId}/documents/{docId}/content` read documents by the company's reference ID.
- `GET /company-documents/{docId}/resolve` returns the company a document belongs to, and the document's path.

**Fixed**

- `PUT /companies/{id}` keeps the company's existing `referenceId` when the request leaves it out.

## 0.118.0

Released 2026-05-12.

**Breaking**

- `DELETE /companies/{id}` takes the internal company ID instead of the reference ID, unless the request sends `x-id-field: referenceId`. It returns `204` when no company matches, instead of `404`.
- `GET /companies/{id}` returns `204` when no company matches, instead of `404`.
- `PUT /company` returns `200` with the company, instead of `201`, `200` or `304` with its `referenceId`.

**Deprecated**

- `PUT /company`. Use `PUT /companies/{id}`. No removal date is set yet.
- `POST /company/documents`. Use `POST /companies/{id}/documents`. No removal date is set yet.

**Added**

- `POST /companies` creates a company, and returns `201` with its `id` and `referenceId`. It returns `409` when a company with the same `referenceId`, or the same name and registration number, already exists.
- `PUT /companies/{id}` replaces a company, and returns `204` when no company matches.
- `POST /companies` and `PUT /companies/{id}` take company relations from `parentCompanies`, like `PUT /company`.
- `GET`, `PUT` and `DELETE /companies/{id}` and `GET` and `POST /companies/{id}/documents` accept an `x-id-field` header. `x-id-field: referenceId` makes `{id}` a reference ID. Any value other than `id` or `referenceId` returns `400`.
- `GET /companies/{id}/documents` lists a company's documents, and `POST /companies/{id}/documents` uploads documents to it.
- `GET /companies/documents/{id}` returns one document, and `GET /companies/documents/{id}/content?attachmentId=…` downloads one of its files.
- Document responses list each attachment's `id`, `fileName`, `mimeType`, `fileSize` and `url`.

**Changed**

- `GET /companies/{id}` is no longer deprecated.

**Fixed**

- `POST /company/documents` returns `400` when `documentMetadatas` isn't valid JSON, instead of `500`.

## 0.117.0

Released 2026-05-11.

**Added**

- `PUT /sync` accepts `responder` as a case `type`, next to `collector`.

## 0.116.3

Released 2026-05-07.

**Fixed**

- `PUT /sync` keeps a relation's existing `notes` when the request leaves `notes` out.

## 0.116.2

Released 2026-04-30.

**Fixed**

- `PUT /sync` with cleanup skips company relations whose reference ID can't be found, instead of failing.

## 0.116.1

Released 2026-04-09.

**Fixed**

- `PUT /sync` clears a relation's `voting` when the request sends `voting` without a number.

## 0.116.0

Released 2026-02-23.

**Added**

- `PUT /sync` accepts `reasons` on `parentCompanies` items too.

## 0.115.2

Released 2026-02-23.

**Fixed**

- `PUT /sync` stores an officer address's `countryCode` as `null` when it isn't sent, instead of `-`.

## 0.115.1

Released 2026-01-30.

**Fixed**

- `PUT /sync` applies a related officer role only once when the same role and title are sent more than once, keeping the one with the latest `startAt`.

## 0.115.0

Released 2026-01-23.

**Added**

- `PUT /sync` accepts `endAt` on officer roles, the date the role ended.

## 0.114.3

Released 2025-12-03.

**Fixed**

- `PUT /sync` rejects related officer roles that have no `name`.

## 0.114.2

Released 2025-11-28.

**Fixed**

- `PUT /sync` matches an officer address without a `countryCode` to the stored address, instead of creating a duplicate.

## 0.114.1

Released 2025-11-18.

**Fixed**

- `PUT /sync` no longer fails when a contact person name or email is sent as something other than a string.

## 0.114.0

Released 2025-11-11.

**Changed**

- `PUT /sync` trims contact person names and email addresses, and stores email addresses in lowercase.

## 0.113.0

Released 2025-11-10.

**Breaking**

- The `PUT /sync` result reports company relations under `relatedCompanies` instead of `parentCompanies`.

**Deprecated**

- `parentCompanies` on companies in `PUT /sync` is deprecated, and `relatedCompanies` replaces it.

**Added**

- `PUT /sync` accepts `relatedCompanies` on companies, with an optional `reasons` list for relations that have no ownership or voting. `PUT /company` still takes company relations from `parentCompanies` only.

**Changed**

- `PUT /sync` only changes a relation's `ownership`, `voting` and `notes` when the request includes at least one of them.

## 0.112.1

Released 2025-10-10.

**Fixed**

- `PUT /sync` with cleanup no longer fails when a company referenced by related officers can't be found.

## 0.112.0

Released 2025-10-10.

**Added**

- `PUT /sync` accepts `specialRights` on each related officer, as a list of `specialRightType` and optional `description`.

## 0.111.0

Released 2025-09-17.

**Changed**

- Officer addresses in `PUT /sync` no longer require `countryCode`.
- An officer sent with `tinNumber` and no `taxCountryCode` updates the TIN of the officer's primary tax country.

## 0.110.2

Released 2025-08-19.

**Fixed**

- Leaving out `categories` when `PUT /sync` updates a company no longer clears its categories. With `config.cleanup: true`, and on `PUT /company`, they are still cleared.

## 0.110.1

Released 2025-08-18.

**Fixed**

- Renaming a company through `PUT /sync` also renames its counterparty.

## 0.110.0

Released 2025-08-15.

**Added**

- `GET /counterparty/companies` filters by `referenceId`.

## 0.109.0

Released 2025-08-13.

**Changed**

- An officer sent to `PUT /sync` with `delete: true` doesn't need `firstName` and `lastName`.
- An officer without `firstName` or `lastName` is reported under `failed` with the message `firstName and lastName are required`.

## 0.108.0

Released 2025-07-31.

**Changed**

- Country fields in `PUT /sync` accept country names and nationalities, such as `Danish`, as well as ISO codes.

## 0.107.1

Released 2025-06-12.

**Fixed**

- `PUT /sync` no longer sets ownership and voting to `0` on officer relations that don't send them.

## 0.107.0

Released 2025-06-11.

**Removed**

- `GET /companies/{id}/documents` is removed. It was never implemented and always returned `501`.

## 0.106.1

Released 2025-06-03.

**Fixed**

- Changing an officer address's `countryCode` in `PUT /sync` now updates the officer's primary address.

## 0.106.0

Released 2025-05-26.

**Added**

- `GET /company-document-types` lists the document types you can upload: the built-in types and your tenant's own.
- Experimental `POST /company/documents` uploads documents to the company named by `companyReferenceId`. `documentMetadatas` is a JSON list with one entry per file, in file order. Each entry needs `referenceId`, `companyDocumentTypeId` and `countryCode`, and accepts `expiryDate` or `expiringDate`, `issueDate`, `description` and `note`. An entry whose `referenceId` belongs to an existing document replaces that document.
- `GET /companies/{id}/documents` is reachable, but returns `501`.

## 0.105.0

Released 2025-04-04.

**Breaking**

- A streamed `PUT /sync` response returns `207` instead of `200`. A response is streamed when `companies`, `officers` or `cases` has more than 50 items.

**Fixed**

- `PUT /sync` handles invalid dates without failing the whole request.

## 0.104.0

Released 2025-03-28.

**Added**

- Cases in `PUT /sync` accept `customFields`, an object of field names and text values. A field that doesn't exist yet is created.

## 0.103.0

Released 2025-03-25.

**Added**

- Companies in `PUT /sync` can be matched by their Avallone `id`, by adding `id` to `config.companyIdFields`.

**Changed**

- `PUT /sync` matches companies on `config.companyIdFields` first, then on `referenceId`. It used to try `referenceId` first.

## 0.102.0

Released 2025-03-24.

**Added**

- Officers in `PUT /sync` can be matched by their Avallone `id`, by adding `id` to `config.officerIdFields`.

## 0.101.0

Released 2025-03-19.

**Breaking**

- `PUT /sync` returns `304` instead of `204` when every item is unmodified. Companies, officers and cases are always reported as created or updated, so this only happens when `config.sync` leaves all three out.

## 0.100.0

Released 2025-03-18.

**Breaking**

- `PUT /sync` returns a status code that reflects the result: `201` when every item was created, `200` when every item was updated, `204` when every item was unmodified, `207` for a mix, and `400` when every item failed or has a warning. It used to return `200` every time.
- The results of related items, such as relations and licenses, count as items. So does a warning. Deleted items and items that weren't found don't count, so a request that only deletes returns `200`.

**Changed**

- Only a request with more than 50 items in `companies`, `officers` or `cases` is streamed. A streamed response still returns `200`.
- Only a streamed `PUT /sync` request waits for another sync in the tenant to finish. Other requests run straight away, even while another sync is running.
- A request that isn't streamed gets its result as soon as it finishes, without the spaces written while it works.

## 0.99.0

Released 2025-03-13.

**Changed**

- `PUT /sync` validates company and officer attachments. `ids` must be a list, and `metadata` must be present.

## 0.98.0

Released 2025-03-10.

**Added**

- Cases in `PUT /sync` accept `officers`, each identified by its `referenceId`, to link them to the case. The results are reported under `caseOfficers`. Unlinking isn't supported: an officer sent with `delete: true` is reported as failed.

**Fixed**

- `PUT /sync` rejects a list of lists where it expects a list of items.

## 0.97.0

Released 2025-03-07.

**Added**

- Companies in `PUT /sync` and the company endpoints accept `industryCodes`.

**Fixed**

- An empty `dateOfBirth` no longer breaks the officer sync in `PUT /sync`.

## 0.96.0

Released 2025-03-04.

**Breaking**

- `counterpartyTypes` on companies and officers is renamed to `categories`, with the values `related_party` and `opposing_party`.

## 0.95.0

Released 2025-03-03.

**Added**

- Cases in `PUT /sync` accept `companies`, each identified by its `referenceId`, to link them to the case. The results are reported under `caseCompanies`. Unlinking isn't supported: a company sent with `delete: true` is reported as failed.

**Changed**

- Cases no longer accept `receivedAt`. It is set when the case is first synced.
- `dueAt` is optional.

## 0.94.0

Released 2025-02-26.

**Added**

- `PUT /sync` accepts `cases`, each with `referenceId`, `title`, `status`, `type`, `receivedAt` and `dueAt`, and an optional `description`. `status` takes a request status such as `open` or `closed`. `type` must be `collector`. Syncing cases needs the same permissions as the rest of `PUT /sync`.
- Deleting a case isn't supported: a case sent with `delete: true` is reported as failed.
- The results are reported under `cases`.

## 0.93.0

Released 2025-02-21.

**Changed**

- A company with an invalid `incorporatedAt` date is saved with a warning in `PUT /sync`, instead of the request being rejected.

## 0.92.2

Released 2025-02-21.

**Fixed**

- `config.cleanup` on `PUT /sync` no longer clears relations of companies that weren't in the request.

## 0.92.1

Released 2025-02-18.

**Fixed**

- `PUT /sync` reports the correct result for parent company relations.

## 0.92.0

Released 2025-02-14.

**Breaking**

- The `PUT /sync` result reports related officers by the officer's `referenceId`, instead of the company's.

**Changed**

- `config.cleanup: true` on `PUT /sync` now clears a company's fields and relations before applying the update. With the default `false`, only the fields you send are updated. The option is experimental.
- Only a `PUT /sync` request with more than 20 companies or more than 20 officers waits for another sync in the tenant to finish.

## 0.91.0

Released 2025-02-12.

**Added**

- `PUT /sync` results include `warning`, with the reference IDs and messages of items that were saved with warnings.

**Changed**

- An officer with an invalid `dateOfBirth` fails on its own in `PUT /sync`, instead of the whole request being rejected with `400`.

## 0.90.0

Released 2025-02-03.

**Added**

- The OpenAPI specification documents the experimental company endpoints.

## 0.89.0

Released 2025-02-03.

**Breaking**

- The experimental `PUT /companies` endpoint moved to `PUT /company`.

**Fixed**

- `PUT /company` now updates the company's relations from `parentCompanies` and `relatedOfficers`. The relations sent replace the existing ones.

## 0.88.0

Released 2025-01-30.

**Added**

- Experimental `PUT /companies` creates or updates a single company, and experimental `DELETE /companies/{referenceId}` deletes one.

## 0.87.2

Released 2025-01-27.

**Fixed**

- `PUT /sync` no longer fails when a custom field it refers to was deleted.

## 0.87.1

Released 2025-01-23.

**Fixed**

- `GET /companies` no longer fails when a company has a custom field value whose field was deleted.

## 0.87.0

Released 2025-01-14.

**Changed**

- A `PUT /sync` request with at most one company and at most one officer no longer waits for other syncs in the tenant to finish.

## 0.86.1

Released 2025-01-14.

**Fixed**

- Deleting a company through the API now removes it the same way as deleting it in Avallone.

## 0.86.0

Released 2025-01-13.

**Added**

- Officers in `PUT /sync` accept tax details: `hasRecentTaxChanges`, `isUSCitizen` and `hasBeenUSCitizen`, and one tax country, with `taxCountryCode` and `tinNumber`. The tax country is stored as the officer's primary tax country.

## 0.85.0

Released 2025-01-08.

**Added**

- The OpenAPI specification describes `PUT /sync` in more detail, with request examples.

## 0.84.0

Released 2025-01-08.

**Added**

- The `search` parameter of `GET /companies` accepts `referenceId`.

## 0.83.0

Released 2025-01-07.

**Breaking**

- `isRelatedParty` on companies and officers is replaced by `counterpartyTypes`, a list of counterparty types. Company responses include `counterpartyTypes`.

## 0.82.1

Released 2024-12-11.

**Fixed**

- A company sent to `PUT /sync` with `delete: true` is now deleted. The item still needs its `name`.

## 0.82.0

Released 2024-12-10.

**Deprecated**

- `GET /companies/{companyId}` is deprecated.

## 0.81.0

Released 2024-12-04.

**Changed**

- When another sync is running, `PUT /sync` now tries 5 times, 5 seconds apart, before returning `409`.

## 0.80.0

Released 2024-12-03.

**Changed**

- When another sync is already running for the tenant, `PUT /sync` tries 3 times, 2 seconds apart, before returning `409`. It used to return `400` or `409` straight away.

## 0.79.0

Released 2024-11-22.

**Added**

- `GET /counterparty/companies` filters by when the AML status was last updated, using the `interval` and `unit` query parameters.

## 0.78.0

Released 2024-11-11.

**Added**

- `PUT /sync` and the company endpoints accept `isRelatedParty` on companies and officers.

## 0.77.0

Released 2024-10-01.

**Added**

- Contact persons in `PUT /sync` accept `isPrimary`. Only the first contact marked primary is kept as primary, and it replaces the company's previous primary contact.

## 0.76.0

Released 2024-09-30.

**Removed**

- `PUT /sync` no longer accepts `cases`.

## 0.75.0

Released 2024-09-26.

**Breaking**

- `PUT /sync` no longer copies `ownership` into `voting` when a parent company relation leaves `voting` out. A `null` ownership or voting is stored as `0`, and a field you leave out keeps its value.

## 0.74.0

Released 2024-09-17.

**Added**

- `PUT /sync` syncs a company's `contactPersons` as their own records, and removes a contact person sent with `delete: true`.

## 0.73.0

Released 2024-09-04.

**Added**

- Cases in `PUT /sync` can link a company or officer by its Avallone `id` instead of its `referenceId`.

## 0.72.1

Released 2024-08-02.

**Fixed**

- `PUT /sync` no longer rejects a company when its custom field values fail the field's validation rules.

## 0.72.0

Released 2024-08-01.

**Added**

- Cases in `PUT /sync` accept `companies` and `officers`, each identified by `referenceId`, to link them to the case.

## 0.71.0

Released 2024-07-31.

**Changed**

- In the specification, counterparty company fields such as `registrationNumber` appear under getter names such as `getRegistrationNumber`, and the schemas are renamed to `ApiCounterpartyDto` and `ApiCounterpartiesResponseDto`. The JSON responses are unchanged.

## 0.70.0

Released 2024-07-30.

**Changed**

- A company document created from `attachments` in `PUT /api/v1/sync` is recorded with an approved document request.

## 0.69.0

Released 2024-07-29.

**Breaking**

- Syncing cases through `PUT /api/v1/sync` requires the `CREATE_CLIENT_CASE` and `UPDATE_CLIENT_CASE` permissions.

## 0.68.0

Released 2024-07-24.

**Added**

- Cases in `PUT /api/v1/sync` accept `createdAt`, `status` (`open` or `closed`), `riskScore` (`low`, `medium` or `high`) and `responsible`.

## 0.67.1

Released 2024-07-24.

**Fixed**

- An officer address with type `primary` is saved as the officer's primary address.

## 0.67.0

Released 2024-07-23.

**Added**

- `PUT /api/v1/sync` accepts `cases`, each with a `referenceId` and a `name`, and reports them under `cases` in the response.
- `config.caseIdFields` chooses how cases are matched, and `cases` can be listed in `config.sync`.

## 0.66.0

Released 2024-07-23.

**Changed**

- Company relations in `PUT /api/v1/sync` no longer require `ownership`.

## 0.65.1

Released 2024-07-11.

**Fixed**

- `GET /api/v1/counterparty/companies` no longer fails when the user who last changed an AML status has no name or no longer exists.

## 0.65.0

Released 2024-07-10.

**Deprecated**

- `amlStatus` on counterparty companies is deprecated. Use `aml`.

**Added**

- Counterparty companies include `aml`, with `status`, `updatedAt` and `updatedBy`.

**Changed**

- Counterparties created through `PUT /api/v1/sync` start with the AML status `none`.

## 0.64.1

Released 2024-07-03.

**Fixed**

- `PUT /api/v1/sync` no longer fails when `attachments` has an empty list of IDs.

## 0.64.0

Released 2024-06-25.

**Added**

- Companies and officers in `PUT /api/v1/sync` accept `attachments`, which turn uploaded files into documents with the given metadata.

## 0.63.0

Released 2024-06-22.

**Changed**

- `PUT /api/v1/sync` matches officers on `config.officerIdFields` only. It used to try `referenceId` first. `officerIdFields` defaults to `referenceId`.

**Fixed**

- Several officers with the same name in one `PUT /api/v1/sync` request are kept apart, instead of being merged.

## 0.62.0

Released 2024-06-18.

**Added**

- `config.saveReferenceId` in `PUT /api/v1/sync` stores the sent `referenceId` even when records are matched by other ID fields.

## 0.61.1

Released 2024-05-14.

**Fixed**

- `PUT /api/v1/sync` no longer overwrites the contact person of an existing counterparty company.

## 0.61.0

Released 2024-05-07.

**Changed**

- Individual counterparties updated through `PUT /api/v1/sync` are screened again when the tenant has automatic screening turned on.

## 0.60.0

Released 2024-05-03.

**Changed**

- Counterparty companies updated through `PUT /api/v1/sync` are screened again when the tenant has automatic screening turned on.

## 0.59.0

Released 2024-05-01.

**Changed**

- `contactPersons` on a company in `PUT /api/v1/sync` is saved for every company, not only for counterparty companies.

## 0.58.0

Released 2024-04-25.

**Changed**

- Counterparties created through `PUT /api/v1/sync` are screened automatically when the tenant has automatic screening turned on.

## 0.57.1

Released 2024-04-18.

**Fixed**

- Updating an individual counterparty through `PUT /api/v1/sync` updates the existing counterparty, instead of creating another one.

## 0.57.0

Released 2024-04-16.

**Added**

- Companies in `PUT /api/v1/sync` accept `delete: true`, which deletes a counterparty company.

## 0.56.0

Released 2024-04-02.

**Added**

- Counterparty companies include `customFields`.

**Fixed**

- `PUT /api/v1/sync` no longer creates an empty address for a counterparty company sent without address fields.

## 0.55.1

Released 2024-03-28.

**Fixed**

- Updating a counterparty company through `PUT /api/v1/sync` saves the changes, and keeps the existing contact person when none is sent.

## 0.55.0

Released 2024-03-28.

**Changed**

- `PUT /api/v1/sync` updates existing counterparty companies and individual counterparties, instead of reporting them as failed.

## 0.54.0

Released 2024-03-27.

**Added**

- `PUT /api/v1/sync` creates counterparty companies. Companies accept `contactPersons`, and `counterparty.roles` for counterparty companies.

## 0.53.0

Released 2024-03-22.

**Added**

- Officers in `PUT /api/v1/sync` accept `delete: true`, which deletes the officer.
- The `PUT /api/v1/sync` response includes a `deleted` count and list of reference IDs.

## 0.52.1

Released 2024-03-18.

**Fixed**

- Custom fields are saved when `PUT /api/v1/sync` creates an individual counterparty.

## 0.52.0

Released 2024-03-12.

**Added**

- Officers in `PUT /api/v1/sync` accept `addresses`, each with a `type` of `primary` or `business`.
- The `PUT /api/v1/sync` response reports officer addresses under `residencies`.

**Changed**

- A company address of type `business` in `PUT /api/v1/sync` is no longer reported as failed. It isn't stored.

## 0.51.0

Released 2024-03-05.

**Added**

- Counterparty companies include `amlStatus`, with `approvedAt` and `approvedBy`, or `null` when the counterparty isn't AML-approved.

## 0.50.1

Released 2024-02-21.

**Fixed**

- The specification no longer marks `isPep` on officers, or `companies` in the sync payload, as required.

## 0.50.0

Released 2024-02-16.

**Added**

- Officers in `PUT /api/v1/sync` accept the type `counterparty_officer`.

## 0.49.0

Released 2024-02-16.

**Added**

- Officers in `PUT /api/v1/sync` accept a `type`: `officer`, the default, or `counterparty`. A `counterparty` officer is created as an individual counterparty.
- Officers in `PUT /api/v1/sync` accept `email`, and `counterparty.roles` for individual counterparties.

## 0.48.1

Released 2024-02-13.

**Fixed**

- `company-relations` and `officer-relations` in `config.sync` are applied. Before, relations were skipped when `config.sync` was set.

## 0.48.0

Released 2024-02-13.

**Added**

- `config.sync` in `PUT /api/v1/sync` chooses which parts of the payload to process: `companies`, `officers`, `company-relations` and `officer-relations`.
- `config.companyIdFields` and `config.officerIdFields` are documented. They choose which fields match existing records, and default to `referenceId`.

## 0.47.0

Released 2024-02-12.

**Changed**

- `PUT /api/v1/sync` matches reference IDs and other ID fields without regard to upper or lower case.

## 0.46.0

Released 2024-02-07.

**Changed**

- `PUT /api/v1/sync` matches officers against existing individual counterparties as well.

## 0.45.1

Released 2024-02-07.

**Fixed**

- A counterparty company that can't be created is reported as a failed item, instead of failing the whole `PUT /api/v1/sync` request.

## 0.45.0

Released 2024-02-05.

**Added**

- Officers in `PUT /api/v1/sync` accept `customFields`. Custom fields that don't exist yet are created.

## 0.44.0

Released 2024-02-01.

**Changed**

- `PUT /api/v1/sync` creates a company custom field when a company sends one that doesn't exist yet.

## 0.43.0

Released 2024-02-01.

**Deprecated**

- `GET /api/v1/counterparties` is deprecated. Use `GET /api/v1/counterparty/companies`.

**Added**

- `GET /api/v1/counterparty/companies` lists the tenant's counterparty companies, paginated with `page` and `limit`. Each result has `name`, `registrationNumber`, `referenceId`, `incorporationCountryCode`, `addresses` and `contactPerson`.

## 0.42.1

Released 2024-02-01.

**Fixed**

- The specification describes the company `type` field once, with the company type values, instead of also listing legal form values.

## 0.42.0

Released 2024-01-31.

**Added**

- Companies in `PUT /api/v1/sync` accept the type `related_company`, and sync can create them.

## 0.41.0

Released 2024-01-31.

**Breaking**

- After `referenceId`, `PUT /api/v1/sync` matches companies on `config.companyIdFields` instead of on registration number and name. `companyIdFields` defaults to `referenceId`, so by default companies are matched on `referenceId` only. To match on registration number and name, list them in `companyIdFields`.

**Added**

- Companies in `PUT /api/v1/sync` accept a `type`: `entity`, the default, or `counterparty`.
- `type` can be used as an ID field to match existing companies and officers.

**Changed**

- `PUT /api/v1/sync` only creates companies of type `entity`. A company of type `counterparty` that doesn't exist yet is reported as failed.

## 0.40.0

Released 2024-01-30.

**Removed**

- The deprecated `POST /api/v1/companies` and `PUT /api/v1/companies/{companyId}` endpoints were removed.

## 0.39.0

Released 2024-01-29.

**Changed**

- `PUT /api/v1/sync` matches officers against existing counterparty officers as well as officers.
- `PUT /api/v1/sync` records an officer relation for an officer whose role title is `Related Person`, even when no `ownership` is sent.

## 0.38.1

Released 2024-01-09.

**Fixed**

- `PUT /api/v1/companies/{companyId}` validates the fields in its body, instead of silently dropping them.

## 0.38.0

Released 2023-07-06.

**Changed**

- `PUT /api/v1/sync` works again, and runs one sync per tenant at a time. A second request while a sync is running returns `400` with the message `Sync already in progress`.

## 0.37.0

Released 2023-06-23.

**Changed**

- `PUT /api/v1/sync` was switched off, and returned `400` with the message `Too many requests`.

## 0.36.0

Released 2023-05-22.

**Breaking**

- Company `addresses` on `GET /companies`, `GET /companies/{companyId}`, `POST /companies` and `PUT /companies/{companyId}` changed from an object with a `primary` address to a list. Responses list the primary address only, without a `type`, and `[null]` when the company has none. `address` still holds the same address.
- `POST /companies` and `PUT /companies/{companyId}` read the address with `type` `primary` from the list.

**Deprecated**

- In `PUT /sync`, the `addresses` object with a `primary` address is deprecated. Send a list of addresses, each with a `type`.

**Added**

- Companies in `PUT /sync` accept `addresses` as a list, each address with a `type`. Only `primary` is accepted: an address of another type is reported as failed.

## 0.35.0

Released 2023-05-15.

**Added**

- Companies in `PUT /sync` accept `hasLicenses` and a `licenses` list, each entry with a `name`. `delete: true` removes an entry.
- The `PUT /sync` response reports the result of `licenses`.

## 0.34.0

Released 2023-05-12.

**Added**

- Officers in `PUT /sync` accept a `contactInfo` list, each entry with a `type` and `details`. `delete: true` removes an entry.
- The `PUT /sync` response reports the results of `foreignTaxInfo`, `citizenships` and `contactInfo`.

## 0.33.0

Released 2023-05-09.

**Added**

- Officers in `PUT /sync` accept a `citizenships` list, each entry with a `countryCode`, `givenAtBirth` and `socialSecurityNumber`. `delete: true` removes an entry.

## 0.32.0

Released 2023-05-02.

**Added**

- Companies in `PUT /sync` accept `lei`.

## 0.31.0

Released 2023-05-01.

**Added**

- Officers in `PUT /sync` accept `dateOfBirth`, `cityOfBirth` and `countryOfBirth`.

## 0.30.0

Released 2023-05-01.

**Added**

- Companies in `PUT /sync` accept `taxNumber`, `hasForeignTax` and a `foreignTaxInfo` list, each entry with a `countryCode`, `taxNumber` and `isTin`. `delete: true` removes an entry, and `config.cleanup` replaces the list.

## 0.29.0

Released 2023-04-27.

**Changed**

- Several schemas in the OpenAPI specification were renamed, for example `ApiCompanyDTO` to `CompanyDto`.

## 0.28.0

Released 2023-04-27.

**Added**

- Companies in `PUT /sync` accept `isSelfOwned`.
- Officer relations in `PUT /sync` accept `notes`, and officer roles accept a `startAt` date.

**Fixed**

- `isListed: false` is no longer overridden by the older `isPublic` field.

## 0.27.0

Released 2023-04-26.

**Added**

- Companies in `PUT /sync` accept `giin`, `isListed`, `stockExchangeName`, `stockExchangeCountryCode`, `isUnderSupervision`, `supervisingInstitutionName` and `supervisorLicenseNumber`.

## 0.26.0

Released 2023-04-25.

**Changed**

- `POST /companies` and `PUT /companies/{companyId}` use the same create-or-update logic as `PUT /sync`.

## 0.25.0

Released 2023-04-20.

**Breaking**

- `config.collectionStrategy` in `PUT /sync` was replaced by the boolean `config.cleanup`, which defaults to `false`.

## 0.24.1

Released 2023-04-19.

**Fixed**

- Recreating collections in `PUT /sync` also replaces the company's officer relations.

## 0.24.0

Released 2023-04-17.

**Deprecated**

- `POST /companies` and `PUT /companies/{companyId}` are deprecated. Use `PUT /sync`.

**Removed**

- The experimental `/company-relations` endpoints were removed.
- The deprecated `/company-structure` endpoints were removed.
- `GET /company-document-types` and the document endpoints on `/companies/{id}/documents` were removed.

**Changed**

- `registrationNumber` is optional for companies in `PUT /sync`, `POST /companies` and `PUT /companies/{companyId}`.

## 0.23.0

Released 2023-04-13.

**Changed**

- Officer role names in `PUT /sync` are matched without regard to case.

## 0.22.0

Released 2023-04-12.

**Added**

- The OpenAPI specification includes request examples for `PUT /sync`.

## 0.21.0

Released 2023-04-12.

**Breaking**

- An officer role in `relatedOfficers` names the role in `name` instead of `role`.

**Added**

- `relatedOfficers` in `PUT /sync` creates and updates officer relations, each with `roles` (with `name`, `title` and `notes`), `ownership` and `voting`. `delete: true` removes the roles listed in `roles`, and the officer's ownership and voting.

## 0.20.0

Released 2023-04-03.

**Breaking**

- The default `config.collectionStrategy` in `PUT /sync` changed from `recreate` to `incremental`, so relations that are not sent are kept.

**Changed**

- `PUT /sync` matches companies and officers by `referenceId` first, then by their other identifying fields.
- `companyIdFields` and `officerIdFields` are no longer shown in the OpenAPI specification.

## 0.19.0

Released 2023-03-30.

**Breaking**

- An officer's `referenceId` in `PUT /sync` must be a string.

## 0.18.1

Released 2023-03-29.

**Fixed**

- The `PUT /sync` response includes the results of parent relations.

## 0.18.0

Released 2023-03-29.

**Breaking**

- The parent relations result in the `PUT /sync` response is named `parentCompanies` instead of `companyParents`.

**Added**

- Companies in `PUT /sync` accept a `relatedOfficers` list. Creating these relations is reported as not supported yet.
- The `PUT /sync` response reports the result of officer relations under `relatedOfficers`.

## 0.17.0

Released 2023-03-21.

**Added**

- Company relation responses include `otherRelationDetails`.

## 0.16.0

Released 2023-03-20.

**Added**

- `config.collectionStrategy` in `PUT /sync` chooses between `recreate`, which replaces a company's parent relations with the ones sent, and `incremental`, which only adds and updates them. The default is `recreate`.
- A parent company in `PUT /sync` accepts `delete: true` to remove that relation.
- The `PUT /sync` response reports the result of parent relations under `companyParents`.

## 0.15.0

Released 2023-03-17.

**Removed**

- The experimental `/officers` endpoints, which were never implemented and returned `501`, were removed.

**Added**

- `PUT /sync` accepts a `config` object, with `companyIdFields` and `officerIdFields` choosing which fields match existing records. Officers are matched by `referenceId` by default.
- Companies accept and return a `referenceId` on `POST /companies` and `PUT /companies/{companyId}`.

**Changed**

- Country codes in `PUT /sync` are no longer rejected when they don't match the exact code list. Recognisable country values are converted to the code.

**Fixed**

- When `PUT /sync` fails unexpectedly, the response body holds an `error` message instead of being cut off.

## 0.14.0

Released 2023-02-23.

**Breaking**

- The `PUT /sync` response groups its results per resource, under `companies` and `officers`, instead of reporting `created`, `updated` and `failed` at the top level.

**Added**

- `PUT /sync` accepts an `officers` list, each with a `referenceId`, `firstName`, `lastName` and `isPep`.

## 0.13.1

Released 2023-02-01.

**Fixed**

- `PUT /sync` matches existing companies on registration number and name together, so different companies that share a registration number are no longer merged.

## 0.13.0

Released 2023-01-24.

**Changed**

- `groupConnection` accepts the names of the tenant's own group connection types, not only the built-in values.

## 0.12.0

Released 2022-12-16.

**Added**

- Companies accept a `legalTypes` list in `PUT /sync`, `POST /companies` and `PUT /companies/{companyId}`.

## 0.11.0

Released 2022-12-16.

**Added**

- Companies accept `vatNumber`, `incorporatedAt` and `legalForm` in `PUT /sync`, `POST /companies` and `PUT /companies/{companyId}`, and return them in responses.

**Fixed**

- `POST /companies` and `PUT /companies/{companyId}` store the registration number as the registration number, not as the VAT number.

## 0.10.0

Released 2022-12-06.

**Added**

- Company relation responses include `isUboPropagatedToSubsidiaries`.

## 0.9.0

Released 2022-11-22.

**Changed**

- `incorporationCountryCode` is optional in `PUT /sync`.

## 0.8.0

Released 2022-11-18.

**Changed**

- `PUT /sync` keeps the connection open while it works by writing a space every second, then writes the JSON result. The status code is sent when the request starts, so it is always `200`.

## 0.7.0

Released 2022-10-19.

**Added**

- Companies accept a `groupConnection` field in `PUT /sync`, `POST /companies` and `PUT /companies/{companyId}`, and return it in responses.

## 0.6.0

Released 2022-09-19.

**Changed**

- `PUT /sync` requests can run for up to 15 minutes before timing out.

## 0.5.0

Released 2022-09-01.

**Changed**

- An invalid parent company or address in `PUT /sync` no longer stops the company from being saved. The company is saved without it, and the error is reported under `failed`.

**Fixed**

- Sending `parentCompanies: []` in `PUT /sync` removes all of the company's parent relations.

## 0.4.1

Released 2022-08-29.

**Fixed**

- `PUT /sync` accepts API tokens on every request.
- The OpenAPI specification shows `parentCompanies` as a list.

## 0.4.0

Released 2022-08-15.

**Breaking**

- Company `addresses` on the `/companies` endpoints and `PUT /sync` changed from a list to an object with a `primary` address.

## 0.3.0

Released 2022-08-10.

**Added**

- Companies in `PUT /sync` accept `parentCompanies`, each with a `referenceId`, an `ownership` percentage and an optional `voting` percentage.
- When a company in `PUT /sync` includes `parentCompanies`, parent relations that are not in the list are removed.

## 0.2.1

Released 2022-08-08.

**Fixed**

- `PUT /sync` finds existing companies beyond the first 10,000 in a tenant.

## 0.2.0

Released 2022-08-04.

**Added**

- `PUT /sync` creates or updates companies in bulk, matched to existing companies by registration number. It needs the `ADD_COMPANY` and `UPDATE_COMPANY` permissions.
- The `PUT /sync` response reports how many companies were `created`, `updated` and `failed`, with their reference IDs and the errors for each failed company.

## 0.1.2

Released 2022-07-15.

**Fixed**

- The OpenAPI specification marks optional company fields as optional and names the response schemas of the `/companies` endpoints.

## 0.1.1

Released 2022-06-09.

**Fixed**

- The OpenAPI specification shows the example country codes on document upload correctly.

## 0.1.0

Released 2022-06-01.

**Added**

This is the earliest recorded version. The API existed before it, but its earlier changes aren't recorded.

- The API is served under `/api/v1`.
- `GET`, `POST` and `PUT` on `/companies` read and write companies.
- `/companies/{id}/documents` and `GET /company-document-types` are listed, but return `501`.
- The experimental `/company-relations` and `/officers` endpoints and the deprecated `/company-structure` endpoints are available.

</Changelog>
