# List invoices Retrieve invoices with comprehensive filtering and financial data This endpoint delivers complete invoice management functionality with: - Advanced pagination for large invoice datasets - Multi-dimensional filtering (client, status, date ranges) - Integration with AR transactions for complete financial context - Tax, interest, and payment status tracking - Client relationship data for each invoice - Aggregate counting for reporting and analytics Key Financial Features: - Invoice status tracking (PENDING, PAID, OVERDUE, POSTED, etc.) - Tax and interest calculations included - Due date monitoring for collections management - AR transaction linkage for payment reconciliation - Amount and allocation tracking for financial reporting Filtering Capabilities: - Client-specific invoice retrieval - Status-based filtering for workflow management - Date range queries for period reporting - Sorting by creation date or transaction date Business Applications: - Accounts receivable management and aging reports - Client billing history and statement generation - Collections management and overdue tracking - Financial reporting and revenue recognition - Payment reconciliation and allocation tracking Real Example: bash curl --location 'https://{{host}}/v1/invoices' \ --header 'Authorization: bearer {{token}} \ --header 'Content-Type: application/json' \ --data '{ "pageSize": 25, "page": 0 }' Endpoint: POST /gql/v1/invoices Version: 1.0.0 Security: BearerAuth ## Request fields (application/json): - `pageSize` (integer) Maximum number of invoice records to return Example: 25 - `page` (integer) Page number for pagination (0-based) - `clientId` (integer) Filter invoices by specific client ID Example: 7720 - `status` (string) Filter by invoice status Enum: "PENDING", "POSTED", "PAID", "OVERDUE", "CANCELLED", "DRAFT" - `startDate` (string) Start date for invoice date range filter Example: "1990-01-01T00:00:00" - `endDate` (string) End date for invoice date range filter Example: "2024-12-31T23:59:59" - `sortOrder` (string) Sort order for invoice dates Enum: "asc", "desc" ## Response 200 fields (application/json): - `deid_invoice` (array) - `deid_invoice.arTranId` (integer) Associated AR transaction identifier Example: 125890 - `deid_invoice.invoiceNumber` (string) Unique invoice number for client reference Example: "INV-2024-4850" - `deid_invoice.dueDate` (string) Invoice payment due date Example: "2024-04-24T05:00:00" - `deid_invoice.status` (string) Current invoice status Example: "POSTED" - `deid_invoice.tax` (number) Tax amount charged on invoice - `deid_invoice.interest` (number) Interest charges applied to invoice - `deid_invoice.description` (string,null) Additional invoice description or notes - `deid_invoice.createdAt` (string) Invoice record creation timestamp Example: "2024-05-12T22:50:20.595961+00:00" - `deid_invoice.updatedAt` (string) Invoice record last update timestamp Example: "2024-05-12T22:50:20.595961+00:00" - `deid_invoice.ar_tran` (object) Associated AR transaction details - `deid_invoice.ar_tran.id` (integer) Example: 125890 - `deid_invoice.ar_tran.pmsRef` (string) Practice management system reference Example: "240815" - `deid_invoice.ar_tran.transactionDate` (string) Transaction date Example: "2024-03-22T05:00:00" - `deid_invoice.ar_tran.amount` (number) Transaction amount Example: 4250 - `deid_invoice.ar_tran.allocated` (number) Allocated amount Example: 4250 - `deid_invoice.ar_tran.clientId` (integer) Client identifier Example: 7720 - `deid_invoice.ar_tran.client` (object) - `deid_invoice.ar_tran.client.name` (string) Example: "TechFlow Enterprises" - `deid_invoice_aggregate` (object) - `deid_invoice_aggregate.aggregate` (object) - `deid_invoice_aggregate.aggregate.count` (integer) Total number of invoice records matching criteria Example: 94 ## Response 400 fields (application/json): - `error` (string) - `code` (string) ## Response 401 fields (application/json): - `error` (string) - `code` (string) ## Response 500 fields (application/json): - `error` (string) - `code` (string)