Get Invoice
GraphQL counterpart of GET /api/admin/invoices/{id}. Returns a single invoice with the full totals breakdown, the order/customer context, the billing & shipping addresses, and the invoiced line items — everything the listing leaves out.
Operation
| Operation | Type |
|---|---|
adminInvoice(id: ID!) | Query |
Pass the invoice IRI (/api/admin/invoices/{id}) as id. Requires the sales.invoices.view permission. All admin endpoints require an admin Bearer token — see Authentication.
Identifier vs IRI
id is the resource IRI (/api/admin/invoices/1); _id is the plain numeric id (1). Use the IRI for the id argument.
Objects & lists are returned whole
billingAddress, shippingAddress, and items are returned as JSON — query them bare, without a sub-selection (items, not items { … }). The whole object/array comes back with all the keys documented below. (items is not a cursor connection — there is no edges { node { … } } wrapper.)
Invoice fields
| Field | Type | Description |
|---|---|---|
id | ID | Resource identifier (IRI form). |
_id | Int | Numeric invoice id. |
incrementId | String | Human-facing invoice number. |
orderId | Int | Id of the parent order. |
orderIncrementId | String | Human-facing number of the parent order. |
state | String | Invoice state — pending, pending_payment, paid, overdue. |
emailSent | Boolean | Whether the invoice email was sent to the customer. |
totalQty | Int | Total quantity invoiced. |
Currency codes
| Field | Type | Description |
|---|---|---|
orderCurrencyCode | String | Currency the order/invoice was placed in (e.g. USD). |
baseCurrencyCode | String | The store's base currency. |
channelCurrencyCode | String | The sales channel's currency. |
Totals
Every money total is provided in the order currency and the store's base currency, each with a formatted* string carrying the currency symbol. Sub-total and shipping additionally expose an incl-tax variant.
| Field | Type | Description |
|---|---|---|
subTotal / formattedSubTotal | Float / String | Line-items subtotal (order currency). |
baseSubTotal / formattedBaseSubTotal | Float / String | Subtotal (base currency). |
subTotalInclTax / formattedSubTotalInclTax | Float / String | Subtotal including tax (order currency). |
baseSubTotalInclTax / formattedBaseSubTotalInclTax | Float / String | Subtotal including tax (base currency). |
grandTotal / formattedGrandTotal | Float / String | Invoice total (order currency). |
baseGrandTotal / formattedBaseGrandTotal | Float / String | Invoice total (base currency). |
taxAmount / formattedTaxAmount | Float / String | Tax total (order currency). |
baseTaxAmount / formattedBaseTaxAmount | Float / String | Tax total (base currency). |
discountAmount / formattedDiscountAmount | Float / String | Discount total (order currency). |
baseDiscountAmount / formattedBaseDiscountAmount | Float / String | Discount total (base currency). |
shippingAmount / formattedShippingAmount | Float / String | Shipping total (order currency). |
baseShippingAmount / formattedBaseShippingAmount | Float / String | Shipping total (base currency). |
shippingAmountInclTax / formattedShippingAmountInclTax | Float / String | Shipping incl. tax (order currency). |
baseShippingAmountInclTax / formattedBaseShippingAmountInclTax | Float / String | Shipping incl. tax (base currency). |
shippingTaxAmount / formattedShippingTaxAmount | Float / String | Tax on shipping (order currency). |
baseShippingTaxAmount / formattedBaseShippingTaxAmount | Float / String | Tax on shipping (base currency). |
Status & timestamps
| Field | Type | Description |
|---|---|---|
transactionId | String | Payment transaction reference (null until captured). |
reminders | Int | Number of payment reminders sent (for pending invoices). |
nextReminderAt | String | When the next payment reminder is scheduled (null if none). |
createdAt | String | When the invoice was created. |
updatedAt | String | When the invoice was last updated. |
Order & customer context
Resolved from the parent order so the invoice can be rendered without a second call.
| Field | Type | Description |
|---|---|---|
orderStatus | String | Parent order status code (e.g. processing). |
orderStatusLabel | String | Human-readable order status. |
orderDate | String | When the parent order was placed. |
channelName | String | Sales channel the order belongs to. |
customerName | String | Customer's full name. |
customerEmail | String | Customer's email. |
Addresses (billingAddress, shippingAddress)
JSON objects (query bare). Each contains:
| Key | Type | Description |
|---|---|---|
id | Int | Address id. |
addressType | String | order_billing or order_shipping. |
firstName / lastName | String | Recipient name. |
companyName | String | Company (nullable). |
address | String | Street address. |
city / state / country / postcode | String | Location. |
email / phone | String | Contact details. |
Line items (items)
JSON array (query bare). Each element contains:
| Key | Type | Description |
|---|---|---|
id | Int | Invoice-item id. |
orderItemId | Int | Id of the order item this line was invoiced from. |
sku | String | Product SKU. |
name | String | Product name as ordered. |
qty | Int | Quantity invoiced for this line. |
price / formattedPrice | Float / String | Unit price (order currency). |
basePrice | Float | Unit price (base currency). |
basePriceInclTax | Float | Unit price incl. tax (base currency). |
total / formattedTotal | Float / String | Line total (order currency). |
baseTotal | Float | Line total (base currency). |
baseTotalInclTax | Float | Line total incl. tax (base currency). |
taxAmount / formattedTaxAmount | Float / String | Tax for this line. |
discountAmount / formattedDiscountAmount | Float / String | Discount for this line. |
productId | Int | Id of the product. |
productType | String | Product type — simple, configurable, bundle, etc. |
baseImageUrl | String | URL of the product's base image (null if none). |
additional | JSON | Extra item data (selected options, configurable attributes, etc.). |

