> 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-documents.md).

# Documents v2

## Get Documents

> Get documents. By default, it returns last 20 documents. It is possible to send query parameters to adjust the result

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"tags":[{"name":"New Documents","description":"New Documents domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"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"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"parameters":{"startDate":{"schema":{"type":"string","format":"date-time"},"name":"startDate","in":"query","description":"Beginning of the range"},"endDate":{"schema":{"type":"string","format":"date-time"},"in":"query","name":"endDate","description":"End of the range"},"searchText":{"schema":{"type":"string"},"in":"query","name":"searchText","description":"search string to filter through document names"},"resourceType":{"schema":{"$ref":"#/components/schemas/DocumentResourceTypeEnum"},"in":"query","name":"resourceType","required":true},"resourceId":{"schema":{"type":"string","format":"uuid"},"in":"query","name":"resourceId","required":true},"docType":{"schema":{"$ref":"#/components/schemas/DocumentTypeEnum"},"in":"query","name":"docType","description":"document type filter"},"cursor":{"schema":{"type":"string"},"in":"query","name":"cursor","description":"String value used for pagination"},"limit":{"schema":{"type":"integer","default":20,"minimum":1},"in":"query","name":"limit","description":"Maximum number of items to return","required":true}}},"paths":{"/v2/documents":{"get":{"summary":"Get Documents","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Documents"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"operationId":"get-documents","parameters":[{"$ref":"#/components/parameters/startDate"},{"$ref":"#/components/parameters/endDate"},{"$ref":"#/components/parameters/searchText"},{"$ref":"#/components/parameters/resourceType"},{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/docType"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/limit"}],"description":"Get documents. By default, it returns last 20 documents. It is possible to send query parameters to adjust the result","tags":["New Documents"]}}}}
```

## Upload Document

> \| Document Group                | Document Type                                                                                                                                                        | Entities/Roles                                                                                       |\
> \|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|\
> \| Company documents             | \`CURRENT\_REGISTRY\_EXTRACT\`\<br/>\`CHRONOLOGICAL\_REGISTRY\_EXTRACT\`\<br/>\`SHAREHOLDER\_LIST\`\<br/>\`PARTNERSHIP\_AGREEMENT\`\<br/>\`TRANSPARENCY\_REGISTER\_EXTRACT\`\<br/>\`STATUTE\` | \`LEGAL\_ENTITY\`                                                                                       |\
> \| Company documents             | \`BUSINESS\_REGISTRATION\`                                                                                                                                              | \`NATURAL\_PERSON\`\<br/>\`LEGAL\_ENTITY\`                                                                  |\
> \| Kyc documents                 | \`IDENTIFICATION\_CERTIFICATE\`\<br/>\`PROOF\_OF\_RESIDENCE\`\<br/>\`KYC\`                                                                                                      | \`NATURAL\_PERSON\`\<br/>\`PARTNER\_USER\`                                                                  |\
> \| 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\`\<br/>\`W\_8BEN\`\<br/>\`W\_8IMY\`                                                                                                                                 | \`LEGAL\_ENTITY\`                                                                                       |\
> \| Financial situation documents | \`SOURCE\_OF\_INCOME\`\<br/>\`SOURCE\_OF\_FUNDS\`                                                                                                                             | \`CUSTOMER\`                                                                                           |\
> \| Proxy documents               | \`PROOF\_OF\_SINGLE\_CUSTODY\`\<br/>\`PROOF\_OF\_CUSTODY\`                                                                                                                     | \`PROXY\` (Guardian)                                                                                   |\
> \| Proxy documents               | \`INSOLVENCY\_ORDER\`                                                                                                                                                   | \`PROXY\` (Liquidator)                                                                                 |\
> \| Proxy documents               | \`INHERITANCE\_LIGITIMATION\`                                                                                                                                           | \`PROXY\` (Power of Attorney in case of death)                                                         |\
> \| General documents             | \`OTHER\`                                                                                                                                                              | \`NATURAL\_PERSON\`\<br/>\`JOINT\_PERSON\`\<br/>\`LEGAL\_ENTITY\`\<br/>\`PARTNER\_USER\`\<br/>\`CUSTOMER\`\<br/>\`PROXY\` |

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"tags":[{"name":"New Documents","description":"New Documents domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"parameters":{"requestorId":{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}},"schemas":{"UploadDocumentResult":{"title":"UploadDocumentResult","type":"object","properties":{"documentId":{"type":"string","format":"uuid","readOnly":true}},"required":["documentId"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"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"]}}},"paths":{"/v2/documents":{"post":{"summary":"Upload Document","operationId":"upload-document","parameters":[{"$ref":"#/components/parameters/requestorId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDocumentResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"| Document Group                | Document Type                                                                                                                                                        | Entities/Roles                                                                                       |\n|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|\n| Company documents             | `CURRENT_REGISTRY_EXTRACT`<br/>`CHRONOLOGICAL_REGISTRY_EXTRACT`<br/>`SHAREHOLDER_LIST`<br/>`PARTNERSHIP_AGREEMENT`<br/>`TRANSPARENCY_REGISTER_EXTRACT`<br/>`STATUTE` | `LEGAL_ENTITY`                                                                                       |\n| Company documents             | `BUSINESS_REGISTRATION`                                                                                                                                              | `NATURAL_PERSON`<br/>`LEGAL_ENTITY`                                                                  |\n| Kyc documents                 | `IDENTIFICATION_CERTIFICATE`<br/>`PROOF_OF_RESIDENCE`<br/>`KYC`                                                                                                      | `NATURAL_PERSON`<br/>`PARTNER_USER`                                                                  |\n| Kyc documents                 | `BIRTH_CERTIFICATE`                                                                                                                                                  | `NATURAL_PERSON`  (Minor)                                                                            |\n| Kyc documents                 | `DEATH_CERTIFICATE`                                                                                                                                                  | `NATURAL_PERSON`                                                                                     |\n| Tax documents                 | `TIN_NA_CONFIRMATION`                                                                                                                                                | `NATURAL_PERSON`                                                                                     |\n| Tax documents                 | `W_8BEN_E`<br/>`W_8BEN`<br/>`W_8IMY`                                                                                                                                 | `LEGAL_ENTITY`                                                                                       |\n| Financial situation documents | `SOURCE_OF_INCOME`<br/>`SOURCE_OF_FUNDS`                                                                                                                             | `CUSTOMER`                                                                                           |\n| Proxy documents               | `PROOF_OF_SINGLE_CUSTODY`<br/>`PROOF_OF_CUSTODY`                                                                                                                     | `PROXY` (Guardian)                                                                                   |\n| Proxy documents               | `INSOLVENCY_ORDER`                                                                                                                                                   | `PROXY` (Liquidator)                                                                                 |\n| Proxy documents               | `INHERITANCE_LIGITIMATION`                                                                                                                                           | `PROXY` (Power of Attorney in case of death)                                                         |\n| General documents             | `OTHER`                                                                                                                                                              | `NATURAL_PERSON`<br/>`JOINT_PERSON`<br/>`LEGAL_ENTITY`<br/>`PARTNER_USER`<br/>`CUSTOMER`<br/>`PROXY` |","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/DocumentData"},"file":{"type":"string","format":"binary","description":"File data"}},"required":["document","file"]}}}},"tags":["New Documents"]}}}}
```

## Get Document

> Get document

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"tags":[{"name":"New Documents","description":"New Documents domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"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"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/v2/documents/{documentId}":{"get":{"summary":"Get Document","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"operationId":"get-document","parameters":[],"description":"Get document","tags":["New Documents"]}}}}
```

## Get Document File

> Get document file

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"tags":[{"name":"New Documents","description":"New Documents domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/v2/documents/{documentId}/file":{"get":{"summary":"Get Document File","responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"operationId":"get-document-file","parameters":[],"description":"Get document file","tags":["New Documents"]}}}}
```

## Sign Document

> Create new natural person document signature

```json
{"openapi":"3.0.1","info":{"title":"Documents","version":"1.0"},"tags":[{"name":"New Documents","description":"New Documents domain"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"parameters":{"requestorId":{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"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"]}}},"paths":{"/v2/documents/sign":{"post":{"summary":"Sign Document","operationId":"sign-document","tags":["New Documents"],"parameters":[{"$ref":"#/components/parameters/requestorId"}],"responses":{"202":{"description":"Accepted","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Create new natural person document signature","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSignatureData"}}}}}}}}
```


---

# 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-documents.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.
