Invoices
A GST invoice is generated once an order is invoiced on our side. It's nested under the order, same as shipments.
Query
query {
myOrders {
orderNumber
salesInvoice {
invoiceNumber
netAmount
gstAmount
totalAmount
}
}
}Response
{
"data": {
"myOrders": [
{
"orderNumber": "GB-3801",
"salesInvoice": {
"invoiceNumber": "INV3412",
"netAmount": 2680,
"gstAmount": 136,
"totalAmount": 2816
}
}
]
}
}salesInvoice is null until an invoice has actually been raised for the order — check for that before reading its fields.