> For the complete documentation index, see [llms.txt](https://docs.tradevest.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tradevest.ai/api-reference/documents/new-schemas.md).

# Schemas v2

## The Document object

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"components":{"schemas":{"Document":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","readOnly":true},"size":{"type":"integer","description":"file size in kB","readOnly":true},"status":{"$ref":"#/components/schemas/DocumentStatusEnum"},"validUntil":{"type":"string","format":"date-time","readOnly":true},"createdOn":{"type":"string","format":"date-time","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":255},"resourceType":{"$ref":"#/components/schemas/DocumentResourceTypeEnum"},"type":{"$ref":"#/components/schemas/DocumentTypeEnum"},"description":{"type":"string","minLength":1,"maxLength":255},"resourceId":{"type":"string","format":"uuid","description":"Identification number in UUID format of resource of type identified by the value of `resourceType` field"},"externalId":{"type":"string","minLength":1,"description":"External Id in partner's system. This value has to be unique"}},"required":["createdOn","documentId","modifiedOn","name","resourceId","resourceType","size","status","type"],"title":"Document"},"DocumentStatusEnum":{"title":"DocumentStatusEnum","type":"string","enum":["RECEIVED","INVALID","CREATED","PENDING","APPROVED","REJECTED","ARCHIVED","DELETED"],"readOnly":true},"DocumentResourceTypeEnum":{"title":"DocumentResourceTypeEnum","type":"string","enum":["NATURAL_PERSON","LEGAL_ENTITY","PARTNER_USER","CUSTOMER","PROXY"]},"DocumentTypeEnum":{"title":"DocumentTypeEnum","type":"string","description":"This list may change in the future.","enum":["KYC","OTHER","PROOF_OF_SINGLE_CUSTODY","PROOF_OF_CUSTODY","PROOF_OF_RESIDENCE","BIRTH_CERTIFICATE","IDENTIFICATION_CERTIFICATE","CURRENT_REGISTRY_EXTRACT","CHRONOLOGICAL_REGISTRY_EXTRACT","SHAREHOLDER_LIST","PARTNERSHIP_AGREEMENT","TRANSPARENCY_REGISTER_EXTRACT","BUSINESS_REGISTRATION","STATUTE","INHERITANCE_LEGITIMATION","INSOLVENCY_ORDER","TIN_NA_CONFIRMATION","SOURCE_OF_INCOME","SOURCE_OF_FUNDS","DEATH_CERTIFICATE","W_8BEN_E","W_8BEN","W_8IMY","CRYPTO_RECEIPT","TRADE_INVOICE","TOK_TRADE_INVOICE","EX_ANTE","TOK_EX_ANTE","CORPORATE_ACTION","TRANSFER_RECEIPT","WALLET_ACCOUNT_STATEMENT","TRADE_INVOICE_SAVINGS_PLAN"]}}}}
```

## The DocumentData object

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"components":{"schemas":{"DocumentData":{"title":"DocumentData","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"resourceType":{"$ref":"#/components/schemas/DocumentResourceTypeEnum"},"type":{"$ref":"#/components/schemas/DocumentUploadTypeEnum"},"description":{"type":"string","minLength":1,"maxLength":255},"resourceId":{"type":"string","format":"uuid","description":"Identification number in UUID format of resource of type identified by the value of `resourceType` field"},"externalId":{"type":"string","minLength":1,"description":"External Id in partner's system. This value has to be unique"}},"required":["name","type","resourceType","resourceId"]},"DocumentResourceTypeEnum":{"title":"DocumentResourceTypeEnum","type":"string","enum":["NATURAL_PERSON","LEGAL_ENTITY","PARTNER_USER","CUSTOMER","PROXY"]},"DocumentUploadTypeEnum":{"title":"DocumentUploadTypeEnum","type":"string","enum":["KYC","OTHER","PROOF_OF_SINGLE_CUSTODY","PROOF_OF_CUSTODY","PROOF_OF_RESIDENCE","BIRTH_CERTIFICATE","IDENTIFICATION_CERTIFICATE","CURRENT_REGISTRY_EXTRACT","CHRONOLOGICAL_REGISTRY_EXTRACT","SHAREHOLDER_LIST","PARTNERSHIP_AGREEMENT","TRANSPARENCY_REGISTER_EXTRACT","BUSINESS_REGISTRATION","STATUTE","INHERITANCE_LEGITIMATION","INSOLVENCY_ORDER","TIN_NA_CONFIRMATION","SOURCE_OF_INCOME","SOURCE_OF_FUNDS","DEATH_CERTIFICATE","W_8BEN_E","W_8BEN","W_8IMY"]}}}}
```

## The DocumentSignatureData object

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"components":{"schemas":{"DocumentSignatureData":{"title":"DocumentSignatureData","type":"object","properties":{"partnerDocumentId":{"type":"string","format":"uuid","description":"Id of the partner document which was signed"},"naturalPersonId":{"type":"string","format":"uuid","description":"Id of the natural person for which the document is signed"},"customerId":{"type":"string","format":"uuid","description":"Id of the customer in whose context the natural person is active. Required only for TERMS_AND_CONDITIONS document type."}},"required":["partnerDocumentId","naturalPersonId"]}}}}
```

## The UploadDocumentResult object

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"components":{"schemas":{"UploadDocumentResult":{"title":"UploadDocumentResult","type":"object","properties":{"documentId":{"type":"string","format":"uuid","readOnly":true}},"required":["documentId"]}}}}
```

## The Documents object

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"components":{"schemas":{"Documents":{"title":"Documents","type":"object","properties":{"data":{"type":"array","description":"Array of documents","items":{"$ref":"#/components/schemas/Document"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"Document":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","readOnly":true},"size":{"type":"integer","description":"file size in kB","readOnly":true},"status":{"$ref":"#/components/schemas/DocumentStatusEnum"},"validUntil":{"type":"string","format":"date-time","readOnly":true},"createdOn":{"type":"string","format":"date-time","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":255},"resourceType":{"$ref":"#/components/schemas/DocumentResourceTypeEnum"},"type":{"$ref":"#/components/schemas/DocumentTypeEnum"},"description":{"type":"string","minLength":1,"maxLength":255},"resourceId":{"type":"string","format":"uuid","description":"Identification number in UUID format of resource of type identified by the value of `resourceType` field"},"externalId":{"type":"string","minLength":1,"description":"External Id in partner's system. This value has to be unique"}},"required":["createdOn","documentId","modifiedOn","name","resourceId","resourceType","size","status","type"],"title":"Document"},"DocumentStatusEnum":{"title":"DocumentStatusEnum","type":"string","enum":["RECEIVED","INVALID","CREATED","PENDING","APPROVED","REJECTED","ARCHIVED","DELETED"],"readOnly":true},"DocumentResourceTypeEnum":{"title":"DocumentResourceTypeEnum","type":"string","enum":["NATURAL_PERSON","LEGAL_ENTITY","PARTNER_USER","CUSTOMER","PROXY"]},"DocumentTypeEnum":{"title":"DocumentTypeEnum","type":"string","description":"This list may change in the future.","enum":["KYC","OTHER","PROOF_OF_SINGLE_CUSTODY","PROOF_OF_CUSTODY","PROOF_OF_RESIDENCE","BIRTH_CERTIFICATE","IDENTIFICATION_CERTIFICATE","CURRENT_REGISTRY_EXTRACT","CHRONOLOGICAL_REGISTRY_EXTRACT","SHAREHOLDER_LIST","PARTNERSHIP_AGREEMENT","TRANSPARENCY_REGISTER_EXTRACT","BUSINESS_REGISTRATION","STATUTE","INHERITANCE_LEGITIMATION","INSOLVENCY_ORDER","TIN_NA_CONFIRMATION","SOURCE_OF_INCOME","SOURCE_OF_FUNDS","DEATH_CERTIFICATE","W_8BEN_E","W_8BEN","W_8IMY","CRYPTO_RECEIPT","TRADE_INVOICE","TOK_TRADE_INVOICE","EX_ANTE","TOK_EX_ANTE","CORPORATE_ACTION","TRANSFER_RECEIPT","WALLET_ACCOUNT_STATEMENT","TRADE_INVOICE_SAVINGS_PLAN"]},"Pagination":{"title":"Pagination","type":"object","properties":{"cursor":{"type":"string","description":"String value used for pagination, which should be set in next page request."},"limit":{"type":"integer","description":"Maximum number of returned items"}},"required":["cursor","limit"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tradevest.ai/api-reference/documents/new-schemas.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
