Learn how to use the Document AI API to process a document.
documents/invoice
endpoint. Provide the path to the invoice file to process (or use the one we’ve provided) and insert your API key into the Authorization
header.
python3 docai.py
or node docai.ts
. The API will respond with a document id
that we’ll need in the next step.
/documents/invoice/[document-id]
. Fill in the document-id
using the id
from the previous API call. The API’s processing time varies based on a variety of factors including number of document pages, so we’ll keep attempting to retrieve the extracted fields every few seconds until the API’s status returns Processed
.