Skip to main content

outstandingSalesInvoices

Requires permission payments:invoice:list.

Lists the unpaid sales invoices of one customer: the invoices a customer payment can be allocated to.

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:

query OutstandingSalesInvoices($customerId: ID!) {
outstandingSalesInvoices(customerId: $customerId) {
id
invoiceNumber
supplierCode
supplierDisplayName
supplierName
status
allocations {
id
invoiceNumber
paymentNumber
createdAt
amount
appliedFromAdvance
}
}
}

Variables:

{
"customerId": "id"
}

Response:

{
"data": {
"outstandingSalesInvoices": [
{
"id": "id",
"invoiceNumber": "string",
"supplierCode": "string",
"supplierDisplayName": "string",
"supplierName": "string",
"status": "APPROVED",
"allocations": [
{
"id": "id",
"invoiceNumber": "string",
"paymentNumber": "string",
"createdAt": "2025-01-15T00:00:00Z",
"amount": 0,
"appliedFromAdvance": true
}
]
}
]
}
}
outstandingSalesInvoices(
customerId: ID!
): [Invoice!]!

Arguments​

outstandingSalesInvoices.customerId ● ID! non-null scalar​

The ID of the customer.

Type​

Invoice object​

A sales invoice issued to a customer or a purchase invoice received from a supplier, with its lines, totals, status and settlement.