customerInvoices
Requires a customer (portal or buyer app) session.
Customer portal: lists the signed-in customer's own sales invoices, paged. Draft, cancelled and voided invoices are not shown. Needs a customer (portal or buyer app) session.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query CustomerInvoices {
customerInvoices {
totalOutstanding
items {
id
invoiceNumber
salesOrderNumber
status
createdAt
balanceDue
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerInvoices {\n customerInvoices {\n totalOutstanding\n items {\n id\n invoiceNumber\n salesOrderNumber\n status\n createdAt\n balanceDue\n }\n }\n}"
}
EOF
Response:
{
"data": {
"customerInvoices": {
"totalOutstanding": 0,
"items": [
{
"id": "id",
"invoiceNumber": "string",
"salesOrderNumber": "string",
"status": "string",
"createdAt": "2025-01-15T00:00:00Z",
"balanceDue": 0
}
]
}
}
}
customerInvoices(
filter: CustomerPaginationInput
): CustomerInvoiceConnection!
Arguments
customerInvoices.filter ● CustomerPaginationInput input
Paging and search: page (from 1), limit and an optional search text.
Type
CustomerInvoiceConnection object
A page of the customer's invoices, with the total outstanding and paging details.