capabilities.work

Upload and Parse a Document

A 3-step recipe with Affinda. We can help you get access.

Recipe · 3 steps

Upload and Parse a Document

with Affinda

Upload a file, wait for parsing to finish, and return the parsed data.

  1. Upload the file for asynchronous parsing. Setting wait to false returns an identifier immediately so the document can be polled for completion.
  2. Poll the document until its meta.ready flag becomes true, indicating that parsing has finished and the parsed data is available.
  3. Fetch the completed document to return the full set of parsed data and metadata to the caller.
What you'll need to have ready
  • workspace: The workspace identifier to upload the document into.
  • file: The document file contents (binary) to upload for parsing.
  • fileName: Optional file name to store the document under.
  • documentType: Optional document type identifier if already known.
For your developer

Arazzo workflow affinda:upload-and-parse-document, 3 operations: createDocument → getDocument → getDocument. Specs on APIs.io.