Upload files to one supporting document row of an order, and optionally start data extraction on them in the same call. A file can only be uploaded if it already exists in our storage system. To make it so, please read more here.
Choosing the row
docType names a row that already exists on the order. List the rows with Get order supporting documents, or add one with Request additional documents. Names are matched case-insensitively. A repeated row such as Passport_1 is addressed by its full name.
Data extraction
Set requestDataExtraction to true to extract data from the uploaded files. Extraction requires that:
- every file is a PDF of at most 500 pages and is not password-protected;
- supporting document extraction is enabled for the fund;
- the fund has an extraction workspace;
- the document type is mapped to an extraction template.
These checks run before anything is uploaded. If any of them fails, the whole call is rejected and no file is attached.
requestDataExtraction alone decides whether extraction runs. The fund's setting to extract supporting documents automatically on upload does not apply to files uploaded through this endpoint.
When extraction starts, the response contains extractionRequestId. Uploading never discards existing extraction results. Track the request in extractionRequests of Get order supporting documents; once it is PENDING_REVIEW or REVIEWED, read its data from the supportingDocData entry with the same requestId in GetExtractionData.
Retrying after an error
An error can occasionally be returned after the files were already attached, for example on a timeout, an internal error, or a change to the fund's configuration during the call. Before retrying, call Get order supporting documents and check the row:
- Upload again only the files that are not listed in the row's
files; a listed file is already attached. Uploaded files get new IDs, so match them by file name. If the row already held a file with the same name, compare the row's file count with its count before the call instead. - If extraction was requested and no entry in
extractionRequestscovers the attached files, call Extract data from supporting documents with theiritems[].files[].idvalues.
Errors
| Code | Status | Meaning |
|---|---|---|
PERMISSION_DENIED or (none) | 403 | The fund or order does not exist, or the API key has no permission for it. |
SUPPORTING_DOC_NOT_FOUND | 404 | The order has no supporting document row named docType. |
VALIDATION_FAILED | 400 | sourceFileIds is empty, has more than 50 files, or repeats a file. |
FILE_NOT_FOUND | 400 | One or more source files do not exist. |
FILE_ALREADY_ATTACHED | 400 | One or more source files are already attached to this order. Upload a new file instead. |
NON_PDF_FILE | 400 | Extraction was requested and a file is not a PDF. |
TOO_MANY_PAGES | 400 | Extraction was requested and a PDF has more than 500 pages. |
PASSWORD_PROTECTED_PDF | 400 | Extraction was requested and a PDF is password-protected. |
CORRUPT_PDF | 400 | Extraction was requested and a PDF cannot be read. |
EXTRACTION_NOT_CONFIGURED | 400 | Extraction was requested and data extraction is not configured for the fund. |
SUPPORTING_DOC_EXTRACTION_NOT_ENABLED | 400 | Extraction was requested and supporting document extraction is not enabled for the fund. |
EXTRACTION_WORKSPACE_NOT_CONFIGURED | 400 | Extraction was requested and the fund has no extraction workspace. |
DOC_TYPE_NOT_MAPPED | 400 | Extraction was requested and docType is not mapped to an extraction template. |
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||