API
Introduction
One endpoint in, structured JSON out. Upload an invoice, poll the document, read the extraction.
Base URL
Text
https://api.invoi.stAll requests are authenticated with an API key sent as a bearer token. See Authentication.
Conventions
| Convention | Detail |
|---|---|
| Responses | Always JSON. Errors use one envelope, documented under Errors and limits. |
| Money | Integer cents, never floats. total_cents: 284900 is $2,849.00. |
| Dates | Invoice dates are YYYY-MM-DD. Timestamps are RFC 3339 UTC. |
| Uploads | Multipart form data, field name file. PDF, PNG, or JPEG, at most 20 MB. |
| Confidence | Each major field gets a 0 to 1 score. Decide your own threshold for review. |
| Versioning | /v1 in the path. What's breaking and what isn't is documented under Versioning. |
The extraction lifecycle
- Upload.
POST /v1/extractstores the file and answers immediately with a document inprocessingand an extraction inpending. - Poll.
GET /v1/documents/{id}until the extraction status isdoneorfailed. Most invoices finish in a few seconds. - Read. The extraction carries header fields, line items, and confidence scores in the same shape every time.
1. Upload
Terminal
curl -X POST https://api.invoi.st/v1/extract \
-H "Authorization: Bearer $INVOIST_API_KEY" \
-F "[email protected]"2. Poll
Terminal
curl https://api.invoi.st/v1/documents/01a01663-6802-7707-a847-13323ffab41e \
-H "Authorization: Bearer $INVOIST_API_KEY"Same schema, every invoice
Fields that are not on the invoice come back
null rather than disappearing, so your parser never has to guess at shape.Full request and response details are in the reference: Extraction, Documents, and Usage.