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

# Documents

## Find documents across all the applications. Filter by any output key. I.e. filter by their state to retrieve all that are still missing or all that failed a check.

> Find documents across all the applications. Filter by any output key. I.e. filter by their state to retrieve all that are still missing or all that failed a check.\
> \<br />\<br />\
> \<b>Authentication:\</b> required

```json
{"openapi":"3.0.0","info":{"title":"v3","version":"0.0.1"},"servers":[{"url":"https://api.visadoc.co/api:v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/documents/search":{"post":{"operationId":"v3/documents/search|POST","summary":"Find documents across all the applications. Filter by any output key. I.e. filter by their state to retrieve all that are still missing or all that failed a check.","description":"Find documents across all the applications. Filter by any output key. I.e. filter by their state to retrieve all that are still missing or all that failed a check.\n<br /><br />\n<b>Authentication:</b> required","tags":["documents"],"parameters":[],"responses":{"200":{"description":"Success!","content":{"application/json":{"schema":{"type":"object","properties":{"itemsReceived":{"type":"integer","format":"int64","description":""},"curPage":{"type":"integer","format":"int64","description":""},"nextPage":{"type":"integer","format":"int64","description":"","nullable":true},"prevPage":{"type":"integer","format":"int64","description":"","nullable":true},"offset":{"type":"integer","format":"int64","description":""},"perPage":{"type":"integer","format":"int64","description":""},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":""},"created_at":{"type":"integer","format":"int64","description":""},"application_id":{"type":"string","format":"uuid","description":"","nullable":true},"document_type_id":{"type":"string","format":"uuid","description":"","nullable":true},"status":{"type":"string","description":"","enum":["Required","Uploaded","Sent to Verification","Accepted for Verification","Verified by AI","Verified by human","Error","Data Extracted"]},"error_notes":{"type":"string","description":""},"title":{"type":"string","description":""},"description":{"type":"string","description":""},"attachment":{"type":"string","description":""},"upload_time":{"type":"string","description":"","nullable":true},"uploaded_at":{"type":"number","format":"timestamptz","description":"","nullable":true},"manager_note":{"type":"string","description":""},"user_id":{"type":"string","format":"uuid","description":"","nullable":true},"createdBy":{"type":"string","format":"uuid","description":"","nullable":true},"uploadedBy":{"type":"string","description":""},"data":{"type":"object","description":"","nullable":true},"issues":{"type":"object","description":"","nullable":true},"cross_check_passed":{"type":"boolean","description":"","default":"false"},"issues_count":{"type":"integer","format":"int64","description":""},"required":{"type":"boolean","description":"","default":"false"},"category":{"type":"string","description":""}}}}}}}}},"400":{"description":"Input Error. Check the request payload for issues."},"401":{"description":"Unauthorized"},"403":{"description":"Access denied. Additional privileges are needed access the requested resource."},"404":{"description":"Not Found. The requested resource does not exist."},"429":{"description":"Rate Limited. Too many requests."},"500":{"description":"Unexpected error"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"type":"object","description":"","nullable":true},"page":{"type":"integer","format":"int64","description":""},"per_page":{"type":"integer","format":"int64","description":""}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"filters":{"type":"object","description":"","nullable":true},"page":{"type":"integer","format":"int64","description":""},"per_page":{"type":"integer","format":"int64","description":""}}}}}}}}}}
```

## Upload the actual file for a document slot — the step that moves the application forward.

> Upload the actual file for a document slot — the step that moves the application forward.\
> \<br />\<br />\
> \<b>Authentication:\</b> required

```json
{"openapi":"3.0.0","info":{"title":"v3","version":"0.0.1"},"servers":[{"url":"https://api.visadoc.co/api:v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/documents/{document_id}/upload":{"post":{"operationId":"v3/documents/{document_id}/upload|POST","summary":"Upload the actual file for a document slot — the step that moves the application forward.","description":"Upload the actual file for a document slot — the step that moves the application forward.\n<br /><br />\n<b>Authentication:</b> required","tags":["documents"],"parameters":[{"name":"document_id","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success!","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":""},"created_at":{"type":"integer","format":"int64","description":""},"application_id":{"type":"string","format":"uuid","description":"","nullable":true},"document_type_id":{"type":"string","format":"uuid","description":"","nullable":true},"status":{"type":"string","description":"","enum":["Required","Uploaded","Sent to Verification","Accepted for Verification","Verified by AI","Verified by human","Error","Data Extracted"]},"title":{"type":"string","description":""},"description":{"type":"string","description":""},"attachment":{"type":"string","description":""},"uploaded_at":{"type":"number","format":"timestamptz","description":"","nullable":true},"user_id":{"type":"string","format":"uuid","description":"","nullable":true},"createdBy":{"type":"string","format":"uuid","description":"","nullable":true},"uploadedBy":{"type":"string","description":""}}}}}},"400":{"description":"Input Error. Check the request payload for issues."},"401":{"description":"Unauthorized"},"403":{"description":"Access denied. Additional privileges are needed access the requested resource."},"404":{"description":"Not Found. The requested resource does not exist."},"429":{"description":"Rate Limited. Too many requests."},"500":{"description":"Unexpected error"}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"","nullable":true}}}}}}}}}}
```

## Check one document's state — whether the AI and human checks passed, the recommendations, whether it matches the case's other documents (cross-check), and where the file is.

> Check one document's state — whether the AI and human checks passed, the recommendations, whether it matches the case's other documents (cross-check), and where the file is.\
> \<br />\<br />\
> \<b>Authentication:\</b> required

```json
{"openapi":"3.0.0","info":{"title":"v3","version":"0.0.1"},"servers":[{"url":"https://api.visadoc.co/api:v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/documents/{document_id}":{"get":{"operationId":"v3/documents/{document_id}|GET","summary":"Check one document's state — whether the AI and human checks passed, the recommendations, whether it matches the case's other documents (cross-check), and where the file is.","description":"Check one document's state — whether the AI and human checks passed, the recommendations, whether it matches the case's other documents (cross-check), and where the file is.\n<br /><br />\n<b>Authentication:</b> required","tags":["documents"],"parameters":[{"name":"document_id","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success!","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":""},"created_at":{"type":"integer","format":"int64","description":""},"application_id":{"type":"string","format":"uuid","description":"","nullable":true},"document_type_id":{"type":"string","format":"uuid","description":"","nullable":true},"status":{"type":"string","description":"","enum":["Required","Uploaded","Sent to Verification","Accepted for Verification","Verified by AI","Verified by human","Error","Data Extracted"]},"title":{"type":"string","description":""},"description":{"type":"string","description":""},"attachment":{"type":"string","description":""},"uploaded_at":{"type":"number","format":"timestamptz","description":"","nullable":true},"createdBy":{"type":"string","format":"uuid","description":"","nullable":true},"uploadedBy":{"type":"string","description":""},"data":{"type":"object","description":"","nullable":true},"issues":{"type":"object","description":"","nullable":true},"cross_check_passed":{"type":"boolean","description":"","default":"false"},"issues_count":{"type":"integer","format":"int64","description":""},"required":{"type":"boolean","description":"","default":"false"},"application_status":{"type":"array","items":{"type":"string","description":""}},"category":{"type":"string","description":""}}}}}},"400":{"description":"Input Error. Check the request payload for issues."},"401":{"description":"Unauthorized"},"403":{"description":"Access denied. Additional privileges are needed access the requested resource."},"404":{"description":"Not Found. The requested resource does not exist."},"429":{"description":"Rate Limited. Too many requests."},"500":{"description":"Unexpected error"}}}}}}
```
