# 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"],"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","CRYPTO_RECEIPT","TRADE_INVOICE","TOK_TRADE_INVOICE","EX_ANTE","TOK_EX_ANTE","CORPORATE_ACTION","TRANSFER_RECEIPT"]}}}}
```

## 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"]}}}}
```

## 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"],"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","CRYPTO_RECEIPT","TRADE_INVOICE","TOK_TRADE_INVOICE","EX_ANTE","TOK_EX_ANTE","CORPORATE_ACTION","TRANSFER_RECEIPT"]},"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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
