v1

latestOpenAPI 3.0.32026-07-26362271803.3 KB
Accounts Receivable

List Invoices

    Retrieve a paginated list of invoices with comprehensive filtering, sorting, and download capabilities.

    This endpoint provides powerful invoice listing with:
    - Advanced filtering by date ranges, status, clients, and entities
    - Full-text search across multiple fields
    - Flexible sorting options including custom calculated fields
    - Async CSV export functionality via email
    - Optimized queries with prefetched relationships

    **Filtering Options:**
    - Date-based filtering (invoice_date, due_date ranges)
    - Status-based filtering (payment status, sent status, aging buckets)
    - Entity and client-based filtering (supports multiple selections)
    - Contract and currency filtering
    - Full-text search across invoice numbers, addresses, messages, and client names

    **Sorting Capabilities:**
    - Standard field sorting (invoice_date, total_amount, due_date, etc.)
    - Custom calculated field sorting (amount_due, client_name, contract_name)
    - Ascending/descending order with null handling

    **Performance Features:**
    - Efficient database queries with proper indexing
    - Prefetched related objects (lines, payments, clients, entities)
    - Pagination support for large datasets
    - Optimized for high-volume invoice management

    **Export Functionality:**
    - Async CSV generation and email delivery
    - Filtered export based on current query parameters
    - Background processing to handle large datasets
    
get/coa/api/v1/invoice/

Query parameters

clientinteger

Filter by client ID. Can be specified multiple times

contractinteger

Filter by contract ID

currencystring

Filter by currency code (e.g., USD, EUR)

downloadboolean

If true, triggers async CSV download workflow and sends result via email

end_datestring

Filter invoices with invoice_date on or before this date (YYYY-MM-DD)

entityinteger

Filter by entity ID. Can be specified multiple times

invoice_numberstring

Filter by exact invoice number

limitinteger

Number of results to return per page.

line_tag_group_idinteger

Filter invoices with at least one line item assigned a tag from this tag group ID

line_tag_idinteger

Filter invoices with at least one line item assigned this tag ID

offsetinteger

The initial index from which to return the results.

paid_date_fromstring

Filter invoices with paid_date on or after this date (YYYY-MM-DD)

paid_date_tostring

Filter invoices with paid_date on or before this date (YYYY-MM-DD)

parent_clientinteger

Filter by parent client (Vendor) ID. Returns invoices for the specified client and all of its descendants via vendor lineage.

qstring

Search query - searches shipping address, invoice number, message, or client name

ref_numberstring

Filter by exact ref number

sentStatus'not_sent' | 'sent'

Filter by sent status

sortstring

Sort order. Use field name for ascending, -field for descending. Special fields: client_name, amount_due. Default: -invoice_date

start_datestring

Filter invoices with invoice_date on or after this date (YYYY-MM-DD)

status'1_30' | '31_60' | '61_90' | '91_120' | 'current' | 'over_120' | 'paid' | 'partially_paid' | 'past_due' | 'sent' | 'uncollectible' | 'unpaid' | 'voided'

Filter by payment status

Response

countinteger required
nextstring uri nullable
previousstring uri nullable

Example response

{
  "count": 123,
  "next": "http://api.example.org/accounts/?offset=400&limit=100",
  "previous": "http://api.example.org/accounts/?offset=200&limit=100"
}