ProcurementExpress invoice management. Covers creating, updating, accepting, approving, rejecting, cancelling, archiving invoices, and adding comments. Handles the full invoice lifecycle from receipt through approval to settlement. Routes to MCP tools: list_invoices, get_invoice, create_invoice, update_invoice, accept_invoice, approve_invoice, reject_invoice, cancel_invoice, archive_invoice, dearchive_invoice, rerun_invoice_approval_flow, add_invoice_comment. Triggers on: invoice, bill, invoice approval, invoice status, awaiting review, outstanding invoice, ready to pay, invoice comment, invoice line items.
Authenticate (pex-auth) and set active company (pex-companies) first.
Invoices must be enabled for the company (company_setting.invoice_enabled).
List invoices with pagination and filters.
page (optional, integer, default: 1)per_page (optional, integer) — allowed: 10, 20, 50, 100search (optional) — matches invoice number, supplier nameinvoice_statuses_filter (optional) — "awaiting_review", "outstanding", "ready_to_pay", "settled", "cancelled"supplier_id, requester_id, approver_id, department_id (all optional, integer)archived (optional, boolean, default: false)invoice_date_filter (optional) — "last 7days", "last 30days", "last 60days", "last 90days", "last 180days", "last 1year", "current_month", "current_year", "last_month", "last_year"sage_exported (optional, boolean) — filter by Sage export statussort (optional), direction (optional, "asc" or "desc"){ invoices: Invoice[], meta: PaginationMeta }Get invoice details including line items, linked POs, comments, and payment history.
id (required, integer)InvoiceCreate a new invoice. If company has "create invoice in awaiting review" enabled, starts in awaiting_review status.
invoice_number (optional, string)issue_date, uploaded_date, received_date, due_date (optional, string — company date_format)gross_amount (optional, number)currency_id (optional, integer)supplier_id (optional, integer)standalone_invoice (optional, boolean) — true if not linked to any POpayment_term_id (optional, integer) — payment terms from company settingsselected_purchase_order_ids (optional, integer array) — PO IDs to linkline_items (optional, array) — see references/line-items.mdcustom_field_values_attributes (optional, array) — invoice-level custom field values:
id (optional, integer — for updates), value (required, string), custom_field_id (required, integer)get_company_details (pex-companies) → custom_fields[]InvoiceUpdate an existing invoice.
id (required) + any create paramsid to update, _destroy: true to removeInvoiceAccept an invoice in awaiting_review status (moves to outstanding).
id (required, integer)Approve an invoice (requires invoice approval permission).
id (required, integer)Reject an invoice (requires invoice approval permission).
id (required, integer)Cancel an invoice (requires cancel permission).
id (required, integer)Archive an invoice (requires archive permission).
id (required, integer)Restore an archived invoice.
id (required, integer)Rerun the approval flow when rules have changed.
id (required, integer)Add a comment to an invoice.
invoice_id (required, integer), comment (required, string)awaiting_review → (accept_invoice) → outstanding → (approve_invoice) → ready_to_pay → (payment) → settled
→ (reject_invoice) → rejected
→ (cancel_invoice) → cancelled
If invoice_approval_flow_enabled, the approval flow determines the approval path automatically.
Key fields in Invoice:
id, invoice_number, status, gross_amount, net_amountissue_date, uploaded_date, received_date, due_date, validation_datesupplier_id, supplier_name, currencystandalone_invoice — whether linked to POsconfidence_score, digital_invoice — AI extraction confidenceinvoice_line_items[] — line items (see references/line-items.md)purchase_order_summaries[] — linked PO summariessupplier_invoice_uploads[] — attached invoice filesinvoice_histories[] — status change historyinvoice_comments[] — comments with creator infopayments[] — payment recordscan_accept, can_approve, can_reject, can_cancel, can_archive, can_dearchivepayment_terms_list[] — available payment terms