Process your first document
In this guide you’ll:
- upload a PDF
- receive the processing result via webhook
- optionally retrieve the document later, and
- optionally send corrections to improve the model.
Prerequisites
- Your
x-api-key(add it to all API requests). - A type/model (find it in the Models section in Invofox) - only required when not using Classifier premium feature.
- A public HTTPS endpoint (if you want to receive webhooks).
1. Upload a document
Use the upload endpoint to send your first PDF.
- Required: your API key and the type, which you can find in the “Models” section in the interface (unless using Classifier premium feature).
- You can upload multiple files or provide URLs.
👉 Direct Upload endpoint 👉 URL Upload endpoint
2. Use webhooks for a better UX
Instead of polling, set up a webhook so Invofox notifies you when processing is finished.
document.createdevent is sent when the document is created and immediately entersprocessingstatus (document will be empty at this point)document.processedevent is sent when extraction is complete with all extracted information (document status becomesprocessed)- The document may include a
publicStatefield (pendingCorrection,approved,discarded) for workflow management
3. [OPTIONAL] Retrieve the document with the documentId
At any time, you can fetch the document again using the documentId you received at upload.
- Useful for reporting, integrations, or audits.
4. Send corrections - Best Practice
If the extracted data isn’t 100% accurate, you can send corrected values back to Invofox.
- This not only fixes the document in your system but also helps improve the AI model over time.
- This is a recommended best practice for maintaining high accuracy and continuous model improvement.