Tabula API

Upload a document

POST
/v1/uploads

Uploads one invoice (PDF, or XML e-invoice such as XRechnung or ZUGFeRD), other document (PDF or XML), bank statement (PDF) or SEPA credit transfer file (pain.001 XML), up to 50 MB. Tabula reads the file after the request returns; poll the upload until its status is completed or failed.

Also needs the payments:write scope when documentType is payment_file.

Authorization

apiKey documents:write
headerAuthorizationBearer <token>

A company API key created in Tabula.

Scope: documents:write

Request Body

multipart/form-data
  1. body
file*string

The document. PDF or XML, up to 50 MB.

documentType?string

Uploaded document type. auto lets Tabula classify the invoice type automatically. For bank statements and SEPA payment files, set the matching document type: bank_statement or payment_file.

Default"auto"
Value in"auto""supplier_invoice""customer_invoice""bank_statement""payment_file""other_document"
externalId?string

Your ID for the file. A repeated request with the same externalId returns the original upload. Without one, a repeated file with the same document type returns the original upload.

Length1 <= length <= 200

Response Body

Accepted

application/json
  1. response
id*string

Upload ID.

Formatuuid
batchId*|

ID of the upload batch the file came in. Null for a single upload.

externalId*|

The externalId sent with the upload.

fileName*string

File name. For a file from a ZIP archive, its path in the archive.

documentType*string
Value in"auto""supplier_invoice""customer_invoice""bank_statement""payment_file""other_document"
status*string

queued: waiting to be read. processing: being read. completed: the result is in Tabula. failed: see error. deleted: the result was deleted in Tabula.

Value in"queued""processing""completed""failed""deleted"
result*|null
error*|null
createdAt*string
Formatdate-time
curl -X POST "https://example.com/v1/uploads" \  -F file="string"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "batchId": "5579c111-9c50-47e2-af92-f16d52e63189",  "externalId": "string",  "fileName": "string",  "documentType": "auto",  "status": "queued",  "result": {    "type": "invoice",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "url": "http://example.com"  },  "error": {    "code": "unsupported_file_type",    "message": "string"  },  "createdAt": "2019-08-24T14:15:22Z"}