Skip to main content

invoice

Requires at least one of the permissions payments:invoice:read or purchase:purchase_invoice:read.

Returns one invoice by ID. A user restricted to their own customers cannot open an invoice outside that book.

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 Invoice($id: ID!) {
invoice(id: $id) {
id
invoiceNumber
supplierCode
supplierDisplayName
supplierName
status
allocations {
id
invoiceNumber
paymentNumber
createdAt
amount
appliedFromAdvance
}
}
}

Variables:

{
"id": "id"
}

Response:

{
"data": {
"invoice": {
"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
}
]
}
}
}
invoice(
id: ID!
): Invoice!

Arguments​

invoice.id ● ID! non-null scalar​

The ID of the invoice.

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.