Get an invoice

distru-get-invoiceRead

Gets one invoice by ID: header detail with totals, paid and remaining amounts, dates, customer, owner, billing location and sales order.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
idstringYesResolve via distru-search-invoices.
includeInvoiceItemsbooleanNo
includeInvoiceChargesbooleanNoCharges, discounts and taxes.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
invoiceobjectNull or absent
invoice.idstringAlways
invoice.customFieldsobject[]Always
invoice.customFields[].customFieldobjectAlways
invoice.customFields[].customField.idstringAlways
invoice.customFields[].customField.namestringAlways
invoice.customFields[].customField.fieldTypeenum
CHECKBOXDATEDROPDOWNTEXT
Always
invoice.customFields[].valuestringCan be null
invoice.invoiceNumberstringAlways
invoice.paymentStatusenum
NOT_PAIDOVER_PAIDPAIDPARTIALLY_PAID
Always
invoice.totalstringAlways
invoice.subtotalstringAlways
invoice.paidstringAlways
invoice.remainingAmountstringAlways
invoice.creditsAppliedstringCan be null
invoice.paymentsCollectedstringAlways
invoice.invoiceDatestringAlways
invoice.dueDatestringAlways
invoice.externalNotesstringCan be null
invoice.paymentTermNamestringCan be null
invoice.qbInvoiceIdstringCan be null
invoice.qbSyncStatusenum
DELETED_IN_QBOERRORNOT_SYNCEDPARTIALLY_SYNCEDPENDINGSYNCED
Can be null
invoice.voidedAtstringCan be null
invoice.createdDatestringAlways
invoice.updatedDatestringAlways
invoice.customerobjectNull or absent
invoice.customer.idstringAlways
invoice.customer.namestringNull or absent
invoice.ownerobjectCan be null
invoice.owner.idstringAlways
invoice.owner.profileobjectAlways
invoice.owner.profile.fullNamestringAlways
invoice.salesOrderobjectCan be null
invoice.salesOrder.idstringAlways
invoice.salesOrder.orderNumberstringAlways
invoice.billingLocationobjectCan be null
invoice.billingLocation.idstringAlways
invoice.billingLocation.namestringAlways
invoice.billingLocation.addressstringAlways
invoice.invoiceItemsobject[]Can be absent
invoice.invoiceItems[].idstringAlways
invoice.invoiceItems[].quantitystringAlways
invoice.invoiceItems[].orderItemobjectAlways
invoice.invoiceItems[].orderItem.idstringAlways
invoice.invoiceItems[].orderItem.pricestringAlways
invoice.invoiceItems[].orderItem.priceBasestringAlways
invoice.invoiceItems[].orderItem.isSamplebooleanAlways
invoice.invoiceItems[].orderItem.notestringCan be null
invoice.invoiceItems[].orderItem.productobjectAlways
invoice.invoiceItems[].orderItem.product.idstringAlways
invoice.invoiceItems[].orderItem.product.namestringAlways
invoice.invoiceItems[].orderItem.batchobjectCan be null
invoice.invoiceItems[].orderItem.batch.idstringAlways
invoice.invoiceItems[].orderItem.batch.namestringAlways
invoice.invoiceItems[].orderItem.locationobjectCan be null
invoice.invoiceItems[].orderItem.location.idstringAlways
invoice.invoiceItems[].orderItem.location.namestringAlways
invoice.invoiceChargesobject[]Can be absent
invoice.invoiceCharges[].idstringAlways
invoice.invoiceCharges[].namestringAlways
invoice.invoiceCharges[].typestringAlways
invoice.invoiceCharges[].unitTypestringAlways
invoice.invoiceCharges[].percentstringCan be null
invoice.invoiceCharges[].pricestringAlways
invoice.invoiceCharges[].isTaxbooleanAlways
What the AI reads

Gets one invoice by ID: header detail with totals, paid and remaining amounts, dates, customer, owner, billing location and sales order. Line items and charges are left out unless you pass includeInvoiceItems or includeInvoiceCharges. Use for a specific invoice after resolving its ID via distru-search-invoices (search takes an invoice number, e.g. one from distru-report-invoice-history); to browse invoices use distru-search-invoices. For its payments, use distru-search-invoice-payments with invoiceIds. salesOrder is null if the caller lacks access to the underlying order or none exists. qbSyncStatus ERROR: distru-search-quickbooks-activities with invoiceIds gives the error. ERROR or NOT_SYNCED: distru-sync-to-quickbooks pushes it, or says why it can't. Null if no invoice matches the ID; a permission error if the caller can't view it.