Skip to content

List invoices

Request

🔐 Required role: API_ADMIN

📖 Data dictionary: Invoice

Retrieve invoices with AR transaction data, paginated

This operation accepts only pageSize and page; any other body property is rejected with 400. To filter, use POST /gql/v1/invoices/search.

Uses standard limit/offset pagination via pageSize and page — see Pagination. Use total.aggregate.count to detect the end.

This endpoint delivers complete invoice management functionality with:

  • Pagination for large invoice datasets
  • 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

Ordering: newest first (createdAt desc), then invoiceNumber asc.

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
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Bodyapplication/json
pageSizeinteger, [ 1 .. 1000 ]

Limit — number of records to return (not a page count). Hasura maps this to limit.

Default:50
Example:25
pageinteger, >= 0

Offset — number of records to skip. This is not a page index. To fetch the next N rows after the first N, send pageSize: N and page: N. An offset at or beyond total.aggregate.count returns an empty result array.

Default:0
Example:0
curl -i -X POST \
  https://api.sandbox.aiwyn.app/gql/v1/invoices \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
  -H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "pageSize": 25,
    "page": 0
  }'

Responses

Successfully retrieved invoice records

Bodyapplication/json
invoicesArray of objectsrequired
totalobjectrequired
Response
{ "invoices": [ { … }, { … }, { … } ], "total": { "aggregate": { … } } }