Skip to content

Get Invoice

Returns a single invoice with the full totals breakdown, the order/customer context, the billing & shipping addresses, and the invoiced line items — no follow-up calls required. Requires the sales.invoices.view permission.

Endpoint

EndpointMethod
/api/admin/invoices/{id}GET

Response fields

FieldTypeDescription
idIntegerNumeric invoice id.
incrementIdStringHuman-facing invoice number.
orderIdIntegerId of the parent order.
orderIncrementIdStringHuman-facing number of the parent order.
stateStringInvoice state — pending, pending_payment, paid, overdue.
emailSentBooleanWhether the invoice email was sent to the customer.
totalQtyIntegerTotal quantity invoiced.

Currency codes

FieldTypeDescription
orderCurrencyCodeStringCurrency the order/invoice was placed in.
baseCurrencyCodeStringThe store's base currency.
channelCurrencyCodeStringThe sales channel's currency.

Totals

Each money total is provided in the order currency and the store's base currency, with a formatted* string carrying the currency symbol. Sub-total and shipping additionally expose an incl-tax variant.

FieldTypeDescription
subTotal / formattedSubTotalNumber / StringLine-items subtotal (order currency).
baseSubTotal / formattedBaseSubTotalNumber / StringSubtotal (base currency).
subTotalInclTax / formattedSubTotalInclTaxNumber / StringSubtotal incl. tax (order currency).
baseSubTotalInclTax / formattedBaseSubTotalInclTaxNumber / StringSubtotal incl. tax (base currency).
grandTotal / formattedGrandTotalNumber / StringInvoice total (order currency).
baseGrandTotal / formattedBaseGrandTotalNumber / StringInvoice total (base currency).
taxAmount / formattedTaxAmountNumber / StringTax total (order currency).
baseTaxAmount / formattedBaseTaxAmountNumber / StringTax total (base currency).
discountAmount / formattedDiscountAmountNumber / StringDiscount total (order currency).
baseDiscountAmount / formattedBaseDiscountAmountNumber / StringDiscount total (base currency).
shippingAmount / formattedShippingAmountNumber / StringShipping total (order currency).
baseShippingAmount / formattedBaseShippingAmountNumber / StringShipping total (base currency).
shippingAmountInclTax / formattedShippingAmountInclTaxNumber / StringShipping incl. tax (order currency).
baseShippingAmountInclTax / formattedBaseShippingAmountInclTaxNumber / StringShipping incl. tax (base currency).
shippingTaxAmount / formattedShippingTaxAmountNumber / StringTax on shipping (order currency).
baseShippingTaxAmount / formattedBaseShippingTaxAmountNumber / StringTax on shipping (base currency).

Status & timestamps

FieldTypeDescription
transactionIdStringPayment transaction reference (null until captured).
remindersIntegerNumber of payment reminders sent (for pending invoices).
nextReminderAtStringWhen the next payment reminder is scheduled (null if none).
createdAtStringWhen the invoice was created.
updatedAtStringWhen the invoice was last updated.

Order & customer context

Resolved from the parent order so the invoice can be rendered without a second call.

FieldTypeDescription
orderStatusStringParent order status code.
orderStatusLabelStringHuman-readable order status.
orderDateStringWhen the parent order was placed.
channelNameStringSales channel the order belongs to.
customerNameStringCustomer's full name.
customerEmailStringCustomer's email.

Addresses (billingAddress, shippingAddress)

Objects with: id, addressType (order_billing / order_shipping), firstName, lastName, companyName (nullable), address, city, state, country, postcode, email, phone.

Line items (items)

Array of objects, each with:

FieldTypeDescription
idIntegerInvoice-item id.
orderItemIdIntegerId of the order item this line was invoiced from.
skuStringProduct SKU.
nameStringProduct name as ordered.
qtyIntegerQuantity invoiced for this line.
price / formattedPriceNumber / StringUnit price (order currency).
basePriceNumberUnit price (base currency).
basePriceInclTaxNumberUnit price incl. tax (base currency).
total / formattedTotalNumber / StringLine total (order currency).
baseTotalNumberLine total (base currency).
baseTotalInclTaxNumberLine total incl. tax (base currency).
taxAmount / formattedTaxAmountNumber / StringTax for this line.
discountAmount / formattedDiscountAmountNumber / StringDiscount for this line.
productIdIntegerId of the product.
productTypeStringProduct type — simple, configurable, bundle, etc.
baseImageUrlStringURL of the product's base image (null if none).
additionalObjectExtra item data (selected options, configurable attributes, etc.).

Released under the MIT License.