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:
Value | Description |
---|---|
TO_BE_PROCESSED | Invoice is queued for processing |
IN_PROGRESS | Invoice is currently being processed |
PROCESSED | Invoice has been successfully processed |
ERROR | An error occurred during processing |
MANUAL (default) | Invoice being processed manually |
INCOMPLETE | Invoice 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:
Value | Description |
---|---|
RECEIVED | Invoice has been received but not yet in approval flow |
PENDING_APPROVAL | Invoice is awaiting approval |
FLAGGED | Invoice has been flagged for review |
APPROVED | Invoice has been approved |
REJECTED | Invoice has been rejected |
PAID | Invoice 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:
Value | Description | Parameters |
---|---|---|
APPROVAL_STATUS_CHANGED | Records when an invoice's approval status changes | from : Previous approval status / to : New approval status |
COMMENT_ADDED | Records when a comment is added to an invoice | content : Text of the added comment |
COMMENT_CHANGED | Records when an existing comment is edited | content : New text of the comment |
COMMENT_DELETED | Records when a comment is deleted | None |
DUE_DATE_CHANGED | Records when the payment due date is modified | from : Previous due date / to : New due date |
INVOICE_CREATED | Records when a new invoice is created in the system | origin : Source of creation ("UPLOAD", "EMAIL", or "MIGRATED") / sender_email : Email address of sender (only when origin is "EMAIL") |
INVOICE_DATE_CHANGED | Records when the invoice issue date is modified | from : Previous invoice date / to : New invoice date |
INVOICE_FILE_DELETED | Records when a file is removed from an invoice | type : Type of file deleted |
INVOICE_FILE_UPLOADED | Records when a new file is attached to an invoice | type : Type of file uploaded / url : URL to access the file |
INVOICE_NUMBER_CHANGED | Records when the invoice number is modified | from : Previous invoice number / to : New invoice number |
LINKED_PURCHASE_ORDERS_CHANGED | Records when purchase order links are modified | from : Previous purchase order IDs / to : New purchase order IDs |
PROCESSING_STATUS_CHANGED | Records when the processing status changes | from : Previous processing status / to : New processing status |
SET_FROM_CREDIT_NOTE_TO_INVOICE | Records when a document is reclassified from credit note to invoice | None |
SET_FROM_INVOICE_TO_CREDIT_NOTE | Records when a document is reclassified from invoice to credit note | None |
SUPPLIER_CHANGED | Records when the associated supplier is changed | from : Previous supplier name / to : New supplier name |
TOTAL_AMOUNT_CHANGED | Records when the invoice amount is modified | from : 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:
Value | Description | Parameters |
---|---|---|
DUPLICATED_FILE | File was already uploaded | invoice_number , uploaded_at , url |
DUPLICATED_INVOICE | Invoice with same number exists | invoice_number , supplier |
UNEXPECTED | Unspecified error occurred | None |
Updated about 2 months ago