Upload documents

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

You can use this endpoint to upload files for processing. Uploading documents triggers an asynchronous extraction job.

📘

Don't forget your uploadId!

You will use the returned uploadId to check the status of your extraction job, as well as get the extracted results. The uploadId is also used to delete the documents and results after if needed.

Generating extra results

The extraResults query parameter will generate extra extraction results for documents uploaded to this asynchronous batch. Generating extra extraction results will make them available for querying.

The extra results you can generate include:

  1. FormFields: all Form Field values that are extracted from the document by Butler's general form field extraction
  2. Tables: all Table values that are extracted from the document by Butler's general table extraction algorithm
  3. LineBlocks: all Line Block values that are extracted from the document by Butler's general Line Block extraction algorithm

Here are example code snippets for how to use these additional parameters in your upload request:

# Include the extraResults param when making the request:
params = {
  'extraResults': [ 'FormFields', 'Tables', 'LineBlocks' ]
}

upload_json = requests.post(
  upload_url,
  headers=auth_headers,
  params=params,
  files=files_to_upload
).json()
// Include the extraResults param when making the request:
const params = {
  'extraResults': [ 'FormFields', 'Tables', 'LineBlocks' ]
};

const uploadResponse = await axios.post(
  uploadUrl,
  formData,
  {
    headers: {
      ...authHeaders,
      ...formData.getHeaders(),
    },
    params,
  })
  .catch((err) => console.log(err));
curl -X 'POST' \
  'https://app.butlerlabs.ai/api/queues/<queue_id>/uploads?extraResults=LineBlocks&extraResults=FormFields&extraResults=Tables' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer <api_key>' \
  -H 'Content-Type: multipart/form-data' \
  -F 'files=@<path_to_file>;type=<mime_type>'
Path Params
string
required

The id of the Queue to upload documents to for processing.

Query Params
string

Generate extra extraction results from Butler's general Form Field, Table and Line Item Extraction for this asynchronous batch of documents. See above for how to use this parameter.

Body Params
files
array of strings

Files to upload for processing. Files can be uploaded using multipart form-data or via URL. See code snippet for more details.

files
Response

Language
LoadingLoading…
Response
Choose an example:
application/json