Skip to content

List Invoices

GraphQL counterpart of GET /api/admin/invoices. Returns a cursor-paginated list of invoices — every invoice column is populated on each row, so you can query whichever fields you need without a follow-up call. Requires the sales.invoices.view permission. All admin endpoints require an admin Bearer token — see Authentication.

How this menu works

For the invoice state semantics, why a paid order can read "pending", the red payment-due countdown, and the print / send-duplicate / mass-status operations, see the Invoices overview.

Operation

adminInvoices(first, after, id, order_id, state, base_grand_total_from, base_grand_total_to, created_at_from, created_at_to, date_range, sort, order) — a cursor QueryCollection. Every REST query parameter is also exposed as a GraphQL argument; see the REST page for the full argument table.

What's on the listing

Every column of the invoice (state, totals, currency codes, reminders, timestamps), the order/customer context (customerName, customerEmail, orderStatus, orderStatusLabel, orderDate, channelName), and the billingAddress / shippingAddress objects are returned on every listing row. Only items (the line items) is left empty ([]) on the listing — it's the one heavy per-row relation; fetch it with Get Invoice. The field set is otherwise identical to the single-invoice query.

Fields

Same field set as Get Invoice — see that page for the full per-field reference. Summary of what the listing populates:

GroupFieldsOn listing
Identityid, _id, incrementId, orderId, orderIncrementId, state, emailSent, totalQty
Currency codesorderCurrencyCode, baseCurrencyCode, channelCurrencyCode
TotalssubTotal*, grandTotal*, taxAmount*, discountAmount*, shippingAmount* (each in order + base currency, with formatted* and incl-tax variants)
Status & timestampstransactionId, reminders, nextReminderAt, createdAt, updatedAt
Order & customerorderStatus, orderStatusLabel, orderDate, channelName, customerName, customerEmail
AddressesbillingAddress, shippingAddress (JSON objects — query bare)
Line itemsitemsdetail only ([] on listing)

A null here means the DB is genuinely empty

Listing rows return the actual stored value for every column. If a field comes back null (e.g. baseCurrencyCode, transactionId, customerName), that row has no value stored for it — it is not the listing withholding data. Only items is deliberately omitted on the listing.

Amounts — which one to show. Use formattedGrandTotal for a viewer working in the order's currency, and baseGrandTotal / formattedBaseGrandTotal for reporting in the store's base currency. For a single-currency store the two are identical.

Released under the MIT License.