Upload files to an order's supporting document

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 extractionRequests covers the attached files, call Extract data from supporting documents with their items[].files[].id values.

Errors

CodeStatusMeaning
PERMISSION_DENIED or (none)403The fund or order does not exist, or the API key has no permission for it.
SUPPORTING_DOC_NOT_FOUND404The order has no supporting document row named docType.
VALIDATION_FAILED400sourceFileIds is empty, has more than 50 files, or repeats a file.
FILE_NOT_FOUND400One or more source files do not exist.
FILE_ALREADY_ATTACHED400One or more source files are already attached to this order. Upload a new file instead.
NON_PDF_FILE400Extraction was requested and a file is not a PDF.
TOO_MANY_PAGES400Extraction was requested and a PDF has more than 500 pages.
PASSWORD_PROTECTED_PDF400Extraction was requested and a PDF is password-protected.
CORRUPT_PDF400Extraction was requested and a PDF cannot be read.
EXTRACTION_NOT_CONFIGURED400Extraction was requested and data extraction is not configured for the fund.
SUPPORTING_DOC_EXTRACTION_NOT_ENABLED400Extraction was requested and supporting document extraction is not enabled for the fund.
EXTRACTION_WORKSPACE_NOT_CONFIGURED400Extraction was requested and the fund has no extraction workspace.
DOC_TYPE_NOT_MAPPED400Extraction was requested and docType is not mapped to an extraction template.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The Anduin ID of the Order object, or your custom ID

Body Params
string
required

The name of a supporting document row that already exists on the order, as listed by GetOrderSupportingDoc. Matched case-insensitively.

sourceFileIds
array of objects
required
length ≥ 1

A non-empty list of source file IDs that you can retrieve through the upload API to attach documents to.

sourceFileIds*
boolean
Defaults to false

Start data extraction on the uploaded files. Every file must be a PDF, the fund must have supporting document extraction enabled, and the document type must be mapped to an extraction template; otherwise the whole call is rejected and nothing is attached.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json