Managing Invoices

A guide for using our Invoices Management API.

Data Model

The system organizes data around the invoice as the primary entity, with relationships to suppliers, purchase orders, files, comments, and history records. Invoices can represent both standard invoices and credit notes, with appropriate tracking for each type.

Important Fields

Processing Status

Represents the invoice content extraction processing state.
The content extraction occurs when invoices are uploaded via Bulk Upload Endpoint or sent via email.
It is represented by the processing_status field. This field is present in most of the GET endpoints.
The possible values of processing_status are:

ValueDescription
TO_BE_PROCESSEDInvoice is queued for processing
IN_PROGRESSInvoice is currently being processed
PROCESSEDInvoice has been successfully processed
ERRORAn error occurred during processing
MANUAL (default)Invoice being processed manually
INCOMPLETEInvoice has been processed but missing information

Approval Status

Tracks the approval workflow state of an invoice.
It is represented by the approval_status field. This field is present in most of the GET endpoints.
The possible values of approval_status are:

ValueDescription
RECEIVEDInvoice has been received but not yet in approval flow
PENDING_APPROVALInvoice is awaiting approval
FLAGGEDInvoice has been flagged for review
APPROVEDInvoice has been approved
REJECTEDInvoice has been rejected
PAIDInvoice has been paid

Invoice History

Tracks all changes made to invoices.
It is represented by the history field. This field is present in the Get Invoice Endpoint response.
The possible values of history are:

ValueDescriptionParameters
APPROVAL_STATUS_CHANGEDRecords when an invoice's approval status changesfrom: Previous approval status / to: New approval status
COMMENT_ADDEDRecords when a comment is added to an invoicecontent: Text of the added comment
COMMENT_CHANGEDRecords when an existing comment is editedcontent: New text of the comment
COMMENT_DELETEDRecords when a comment is deletedNone
DUE_DATE_CHANGEDRecords when the payment due date is modifiedfrom: Previous due date / to: New due date
INVOICE_CREATEDRecords when a new invoice is created in the systemorigin: Source of creation ("UPLOAD", "EMAIL", or "MIGRATED") / sender_email: Email address of sender (only when origin is "EMAIL")
INVOICE_DATE_CHANGEDRecords when the invoice issue date is modifiedfrom: Previous invoice date / to: New invoice date
INVOICE_FILE_DELETEDRecords when a file is removed from an invoicetype: Type of file deleted
INVOICE_FILE_UPLOADEDRecords when a new file is attached to an invoicetype: Type of file uploaded / url: URL to access the file
INVOICE_NUMBER_CHANGEDRecords when the invoice number is modifiedfrom: Previous invoice number / to: New invoice number
LINKED_PURCHASE_ORDERS_CHANGEDRecords when purchase order links are modifiedfrom: Previous purchase order IDs / to: New purchase order IDs
PROCESSING_STATUS_CHANGEDRecords when the processing status changesfrom: Previous processing status / to: New processing status
SET_FROM_CREDIT_NOTE_TO_INVOICERecords when a document is reclassified from credit note to invoiceNone
SET_FROM_INVOICE_TO_CREDIT_NOTERecords when a document is reclassified from invoice to credit noteNone
SUPPLIER_CHANGEDRecords when the associated supplier is changedfrom: Previous supplier name / to: New supplier name
TOTAL_AMOUNT_CHANGEDRecords when the invoice amount is modifiedfrom: Previous amount / to: New amount

Processing Error

If an error occurs during invoice content extraction processing, the error is recorded in the processing_error field. This field is present in the Get Invoice Endpoint response.
The possible values of processing_error are:

ValueDescriptionParameters
DUPLICATED_FILEFile was already uploadedinvoice_number, uploaded_at, url
DUPLICATED_INVOICEInvoice with same number existsinvoice_number, supplier
UNEXPECTEDUnspecified error occurredNone