# Partner Documents

## Get Partner Documents

> \> Get partner documents not connected to single customer. For example reports. 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":"Partner Documents","version":"1.0"},"tags":[{"name":"Partner Documents","description":"Partner Documents"}],"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":"/oauth2/token","scopes":{}}}}},"schemas":{"PartnerDocuments":{"title":"PartnerDocuments","type":"object","properties":{"data":{"type":"array","description":"Array of documents","items":{"$ref":"#/components/schemas/PartnerDocument"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"PartnerDocument":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","readOnly":true},"size":{"type":"integer","description":"file size in kB","readOnly":true},"version":{"type":"integer","description":"document version","readOnly":true},"validFrom":{"type":"string","format":"date"},"validUntil":{"type":"string","format":"date"},"name":{"type":"string","maxLength":255},"type":{"$ref":"#/components/schemas/PartnerDocumentTypeEnum"},"description":{"type":"string","minLength":1,"maxLength":255},"createdOn":{"type":"string","format":"date-time","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","readOnly":true}},"required":["createdOn","documentId","modifiedOn","name","size","type","version"],"title":"Document"},"PartnerDocumentTypeEnum":{"title":"PartnerDocumentTypeEnum","description":"This list may change in the future.","type":"string","enum":["TERMS_AND_CONDITIONS","DATA_PRIVACY_POLICY","KIID","RISK_INFORMATION","CONSUMER_INFORMATION","PRODUCT_TERMS_AND_CONDITIONS"]},"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"]}}},"paths":{"/partner-documents":{"get":{"summary":"Get Partner Documents","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerDocuments"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"operationId":"get-partner-documents","tags":["Partner Documents"],"parameters":[{"schema":{"$ref":"#/components/schemas/PartnerDocumentTypeEnum"},"in":"query","name":"documentType","description":"Type of document. For example TERMS_AND_CONDITIONS."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"startDate","description":"Beginning of the range. Document create date time is after this parameter."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"endDate","description":"End of the range. Document create date time is before this parameter."},{"schema":{"type":"boolean"},"in":"query","name":"isValid","description":"Used to filter active documents."},{"schema":{"type":"string"},"in":"query","name":"cursor","description":"String value used for pagination"},{"schema":{"type":"integer","default":20,"minimum":1},"in":"query","description":"Maximum number of items to return","name":"limit","required":true}],"description":"> Get partner documents not connected to single customer. For example reports. By default, it returns last 20 documents. It is possible to send query parameters to adjust the result."}}}}
```

## Get Partner Document

> \> Get single partner document for given documentId.

```json
{"openapi":"3.0.1","info":{"title":"Partner Documents","version":"1.0"},"tags":[{"name":"Partner Documents","description":"Partner Documents"}],"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":"/oauth2/token","scopes":{}}}}},"schemas":{"PartnerDocument":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","readOnly":true},"size":{"type":"integer","description":"file size in kB","readOnly":true},"version":{"type":"integer","description":"document version","readOnly":true},"validFrom":{"type":"string","format":"date"},"validUntil":{"type":"string","format":"date"},"name":{"type":"string","maxLength":255},"type":{"$ref":"#/components/schemas/PartnerDocumentTypeEnum"},"description":{"type":"string","minLength":1,"maxLength":255},"createdOn":{"type":"string","format":"date-time","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","readOnly":true}},"required":["createdOn","documentId","modifiedOn","name","size","type","version"],"title":"Document"},"PartnerDocumentTypeEnum":{"title":"PartnerDocumentTypeEnum","description":"This list may change in the future.","type":"string","enum":["TERMS_AND_CONDITIONS","DATA_PRIVACY_POLICY","KIID","RISK_INFORMATION","CONSUMER_INFORMATION","PRODUCT_TERMS_AND_CONDITIONS"]},"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":{"/partner-documents/{documentId}":{"get":{"summary":"Get Partner Document","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerDocument"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"operationId":"get-partner-document","tags":["Partner Documents"],"description":"> Get single partner document for given documentId."}}}}
```

## Download document file

> \> Download document file for given documentId.

```json
{"openapi":"3.0.1","info":{"title":"Partner Documents","version":"1.0"},"tags":[{"name":"Partner Documents","description":"Partner Documents"}],"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":"/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":{"/partner-documents/{documentId}/file":{"get":{"summary":"Download 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":"download-partner-document","tags":["Partner Documents"],"description":"> Download document file for given documentId."}}}}
```
