# Document Management

## Overview

The document management system has been restructured to align with the entity-role architecture separation, providing more precise document categorization based on the associated entity or role type.

## Document Endpoints

The document management API uses the following key endpoints:

* **Upload Document**: `POST /v2/documents/` - Used to upload documents for entities and roles with appropriate `resourceType` and `resourceId`
* **Sign Document**: `POST /v2/documents/sign` - Used to sign documents by natural persons
* **Get Document**: `GET /v2/documents/{documentId}` - Used to retrieve document metadata
* **Get Document File**: `GET /v2/documents/{documentId}/file` - Used to download document file content

When uploading or managing documents, always specify the correct resource type that matches the entity or role the document belongs to.

## Document Types

### Complete Document Types Overview

| Document Group                | Document Type                                                                                                                                                                                                                                    | Entities/Roles                                                                                                                                                               |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Company documents             | <p><code>CURRENT\_REGISTRY\_EXTRACT</code><br><code>CHRONOLOGICAL\_REGISTRY\_EXTRACT</code><br><code>SHAREHOLDER\_LIST</code><br><code>PARTNERSHIP\_AGREEMENT</code><br><code>TRANSPARENCY\_REGISTER\_EXTRACT</code><br><code>STATUTE</code></p> | `LEGAL_ENTITY`                                                                                                                                                               |
| Company documents             | `BUSINESS_REGISTRATION`                                                                                                                                                                                                                          | <p><code>NATURAL\_PERSON</code><br><code>LEGAL\_ENTITY</code></p>                                                                                                            |
| Kyc documents                 | <p><code>IDENTIFICATION\_CERTIFICATE</code><br><code>PROOF\_OF\_RESIDENCE</code><br><code>KYC</code></p>                                                                                                                                         | <p><code>NATURAL\_PERSON</code><br><code>PARTNER\_USER</code></p>                                                                                                            |
| Kyc documents                 | `BIRTH_CERTIFICATE`                                                                                                                                                                                                                              | `NATURAL_PERSON` (Minor)                                                                                                                                                     |
| Kyc documents                 | `DEATH_CERTIFICATE`                                                                                                                                                                                                                              | `NATURAL_PERSON`                                                                                                                                                             |
| Tax documents                 | `TIN_NA_CONFIRMATION`                                                                                                                                                                                                                            | `NATURAL_PERSON`                                                                                                                                                             |
| Tax documents                 | `W_8BEN_E`                                                                                                                                                                                                                                       | `LEGAL_ENTITY`                                                                                                                                                               |
| Financial situation documents | <p><code>SOURCE\_OF\_INCOME</code><br><code>SOURCE\_OF\_FUNDS</code></p>                                                                                                                                                                         | `CUSTOMER`                                                                                                                                                                   |
| Proxy documents               | <p><code>PROOF\_OF\_SINGLE\_CUSTODY</code><br><code>PROOF\_OF\_CUSTODY</code></p>                                                                                                                                                                | `PROXY` (Guardian)                                                                                                                                                           |
| Proxy documents               | `INSOLVENCY_ORDER`                                                                                                                                                                                                                               | `PROXY` (Liquidator)                                                                                                                                                         |
| Proxy documents               | `INHERITANCE_LEGITIMATION`                                                                                                                                                                                                                       | `PROXY` (Power of Attorney in case of death)                                                                                                                                 |
| General documents             | `OTHER`                                                                                                                                                                                                                                          | <p><code>NATURAL\_PERSON</code><br><code>JOINT\_PERSON</code><br><code>LEGAL\_ENTITY</code><br><code>PARTNER\_USER</code><br><code>CUSTOMER</code><br><code>PROXY</code></p> |

## Document Status and Notifications

During the onboarding process, documents go through various status changes:

* **CREATED** - Document has been uploaded
* **PENDING** - Document is being processed during onboarding
* **APPROVED** - Document has been approved and validated
* **REJECTED** - Document failed validation

Partners receive `Document Notification` webhooks for all status changes throughout the document lifecycle.
