Skip to main content
Version: 2025-04-10

Invoices

Invoices

Download OpenAPI specification:Download

Extract invoice data

JSON response

Upload an invoice for data extraction and receive JSON response data.

File upload options

We support requests with Content-Type application/json or multipart/form-data. Note that application/json requests are preferred as multipart/form-data requests do not support all flags and fields.

  • [application/json] inputURL link to file
  • [application/json] base64 base64 encoded file data
  • [multipart/form-data] file upload local file from browser
header Parameters
orgId
required
string (orgId) non-empty ^[a-zA-Z0-9\-_]+$

Organization ID

authKey
required
string (authKey) non-empty ^[a-zA-Z0-9\-_]+$

Authentication key

apiVersion
string (apiVersion) non-empty YYYY-MM-DD
Default: 2025-02-27

API Version

Request Body schema:
required
Any of
inputUrl
required
string

URL for the file to extract data from: Must be a PDF, JPEG, PNG, or TIFF.

fileId
string
Default: "UUID"
Examples: "file1.pdf"

Custom ID for document. If not present, will default to a random UUID.

metadata
object

Custom JSON to be included in the returned response.

webhook
string

Webhook URL to send status updates and JSON response to.

webhookSendFull
boolean
Default: false

When set to true, send whole JSON response to webhook URL upon request completion. Set to false to only send request status.

forceBase64
boolean
Default: false

Setting this parameter to true converts files to Base64 format before sending them on to the model.

forceOCR
boolean
Default: false

Set this parameter to true if the input file is a fillable pdf.

webhookHeaders
object

Request headers to include in the POST request to the webhook.

SFTP (object) or InputOutputSFTP (object)

SFTP authentication details. Required for SFTP URLs in inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
Example
{
  • "inputUrl": "string",
  • "fileId": "file1.pdf",
  • "metadata": { },
  • "webhook": "string",
  • "webhookSendFull": false,
  • "forceBase64": false,
  • "forceOCR": false,
  • "webhookHeaders": { },
  • "sftp": {
    },
  • "staticIP": false
}

Response samples

Content type
application/json
{
  • "documentId": "string",
  • "endTime": 0,
  • "id": "string",
  • "invoiceData": {
    },
  • "pages": 0,
  • "startTime": 0,
  • "status": "SUCCESS",
  • "metadata": { }
}

Zip file response

Upload an invoice for data extraction and receive response data in a ZIP file.

File upload options

We only support requests with Content-Type application/json at this endpoint.

  • [application/json] inputURL link to file
  • [application/json] base64 base64 encoded file data

The default name for the file is an epoch timestamp if fileId field is not included in the request.

header Parameters
orgId
required
string (orgId) non-empty ^[a-zA-Z0-9\-_]+$

Organization ID

authKey
required
string (authKey) non-empty ^[a-zA-Z0-9\-_]+$

Authentication key

apiVersion
string (apiVersion) non-empty YYYY-MM-DD
Default: 2025-02-27

API Version

Request Body schema:
required
Any of
inputUrl
required
string

URL for the file to extract data from: Must be a PDF, JPEG, PNG, or TIFF.

outputUrl
string

URL where resulting zip file should be sent. Must be open to PUT requests. Required if submitting an async request.

outputUrlHeaders
object

Request headers to include in the PUT request to the output URL.

fileId
string
Default: "UUID"
Examples: "file1.pdf"

Custom ID for document. If not present, will default to a random UUID.

forceBase64
boolean
Default: false

Setting this parameter to true converts files to Base64 format before sending them on to the model.

forceOCR
boolean
Default: false

Set this parameter to true if the input file is a fillable pdf.

statusId
string

WARNING: Deprecating in favor of 'fileId'. Custom ID for document. If not present, will default to a random UUID.

metadata
object

Custom JSON to be included in the returned response.

webhook
string

Webhook URL to send status updates and JSON response to.

webhookSendFull
boolean
Default: false

When set to true, send whole JSON response to webhook URL upon request completion. Set to false to only send request status.

webhookHeaders
object

Request headers to include in the POST request to the webhook.

SFTP (object) or InputOutputSFTP (object)

SFTP authentication details. Required for SFTP URLs in inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
Example
{
  • "inputUrl": "string",
  • "outputUrl": "string",
  • "outputUrlHeaders": { },
  • "fileId": "file1.pdf",
  • "forceBase64": false,
  • "forceOCR": false,
  • "statusId": "string",
  • "metadata": { },
  • "webhook": "string",
  • "webhookSendFull": false,
  • "webhookHeaders": { },
  • "sftp": {
    },
  • "staticIP": false
}