Skip to content

Update Invoice

Xero

Xero

Update Invoice

Update an existing Xero invoice or bill, including status changes, sent flag updates, line item edits, optional invoice addresses, unit precision, and per-invoice validation errors.

ActionAI Tool

Inputs

Name Type Required Description
xero_tenant_iddropdownRequiredThe Xero organisation (tenant) to target. Loaded dynamically from the connected account's authorised organisations.
invoice_idtextRequiredXero InvoiceID of the invoice or bill to update.
typeselectOptionalInvoice type. Usually unchanged on updates, but accepted here for completeness. (options: Accounts Receivable (Sales Invoice), Accounts Payable (Bill))
contactobjectOptionalInvoice contact. Xero recommends providing only ContactID when updating invoices.
ContactIDtextRequiredXero ContactID for the invoice contact.
datetextOptionalInvoice issue date in YYYY-MM-DD or Xero-compatible date string format.
due_datetextOptionalInvoice due date in YYYY-MM-DD or Xero-compatible date string format.
line_amount_typesselectOptionalWhether line amounts are tax exclusive, tax inclusive, or no tax. (options: Exclusive, Inclusive, No Tax)
invoice_numbertextOptionalInvoice number shown in Xero.
referencetextOptionalAdditional reference number.
branding_theme_idtextOptionalBranding theme identifier to apply to the invoice.
urltextOptionalSource document URL shown as Go to [appName] in Xero.
currency_codetextOptionalISO 4217 currency code to raise the invoice in.
currency_ratenumberOptionalOptional exchange rate for multi-currency invoices.
statusselectOptionalUpdated invoice status. Use DELETED for draft/submitted invoices or VOIDED for authorised invoices. (options: Draft, Submitted, Authorised, Deleted, Voided)
sent_to_contactyes/noOptionalSet true to mark the invoice as sent in Xero.
expected_payment_datetextOptionalExpected payment date for ACCREC invoices.
planned_payment_datetextOptionalPlanned payment date for ACCPAY bills.
line_itemsarray of objectOptionalInvoice line items. Include existing LineItemIDs to update in place; omit existing LineItemIDs to add new lines.
DescriptiontextRequiredLine item description. Xero requires at least one character.
QuantitynumberOptionalLine item quantity.
UnitAmountnumberOptionalUnit amount for the line item.
ItemCodetextOptionalXero item code to use for the line.
AccountCodetextOptionalRevenue or expense account code.
LineItemIDtextOptionalOptional existing line item ID. Usually used on updates.
TaxTypetextOptionalTax type override for the line item.
TaxAmountnumberOptionalExplicit tax amount override for the line item.
LineAmountnumberOptionalExplicit line amount if you want Xero to use a precomputed value.
DiscountRatenumberOptionalPercentage discount applied to the line item. Supported on ACCREC invoices. Mutually exclusive with DiscountAmount.
DiscountAmountnumberOptionalFlat discount amount applied to the line item. Supported on ACCREC invoices. Mutually exclusive with DiscountRate.
Trackingarray of objectOptionalUp to two tracking category selections for the line item.
TrackingCategoryIDtextOptionalTracking category identifier when known.
NametextOptionalTracking category name.
OptiontextOptionalTracking option name.
invoice_addressesarray of objectOptionalInvoice address objects for US sales tax scenarios when applicable.
InvoiceAddressTypetextOptionalWhether the address is FROM or TO.
AddressLine1textOptionalAddress line 1.
AddressLine2textOptionalAddress line 2.
AddressLine3textOptionalAddress line 3.
AddressLine4textOptionalAddress line 4.
CitytextOptionalCity.
RegiontextOptionalRegion or state.
PostalCodetextOptionalPostal or ZIP code.
CountrytextOptionalCountry.
unitdpnumberOptionalOptional unit decimal place precision for unit amounts. Xero supports values such as 4.
summarize_errorsyes/noOptionalWhen false, Xero returns validation errors for each invoice in the response.

Outputs

Name Type Description
statusCodenumberHTTP status code from the Xero API response.
bodyobjectStructured Xero response envelope. Access the updated invoice via body.Invoices.
IdtextXero correlation/request identifier for this API call.
StatustextXero operation status, typically OK.
ProviderNametextName of the Xero app/provider handling the request.
DateTimeUTCtextUTC timestamp of the response.
Invoicesarray of objectInvoices or bills returned by Xero.
TypetextInvoice type such as ACCREC or ACCPAY.
ContactobjectContact associated with the invoice (summary form, plus nested Addresses and Phones).
ContactIDtextUnique Xero identifier for the contact.
ContactStatustextCurrent contact status.
NametextName of the contact.
EmailAddresstextPrimary email address.
ContactNumbertextExternal contact code.
AccountNumbertextUser-defined account number.
UpdatedDateUTCtextUTC timestamp of the contact's last update.
IsSupplieryes/noWhether the contact is treated as a supplier.
IsCustomeryes/noWhether the contact is treated as a customer.
Addressesarray of objectAddresses attached to the contact.
AddressTypetextAddress type such as STREET or POBOX.
AddressLine1textAddress line 1.
AddressLine2textAddress line 2.
AddressLine3textAddress line 3.
AddressLine4textAddress line 4.
CitytextCity.
RegiontextRegion / state / province.
PostalCodetextPostal or ZIP code.
CountrytextCountry.
AttentionTotextAttention-to field for the address.
Phonesarray of objectPhones attached to the contact.
PhoneTypetextPhone type such as DEFAULT, DDI, FAX, or MOBILE.
PhoneNumbertextPhone number.
PhoneAreaCodetextPhone area code.
PhoneCountryCodetextPhone country code.
DatetextXero formatted invoice issue date.
DateStringtextISO-style invoice issue date string.
DueDatetextXero formatted invoice due date.
DueDateStringtextISO-style invoice due date string.
StatustextInvoice status.
LineAmountTypestextWhether line amounts are Exclusive, Inclusive, or NoTax.
LineItemsarray of objectLine items on the invoice.
DescriptiontextLine item description.
QuantitytextLine item quantity.
UnitAmounttextUnit amount for the line item.
ItemCodetextRelated Xero item code.
AccountCodetextRelated Xero account code.
AccountIdtextRelated Xero account ID.
LineItemIDtextUnique Xero line item identifier.
TaxTypetextTax type used for the line item.
TaxAmounttextTax amount for the line item.
LineAmounttextTotal line amount after discounts.
DiscountRatetextPercentage discount applied to the line item.
DiscountAmounttextFlat discount applied to the line item.
ItemobjectReferenced Xero item details.
ItemIDtextUnique Xero item identifier.
NametextItem name.
CodetextItem code.
Trackingarray of objectTracking category values on the line item.
TrackingCategoryIDtextTracking category ID.
NametextTracking category name.
OptiontextSelected tracking option.
SubTotaltextTotal before tax.
TotalTaxtextTotal tax amount.
TotaltextInvoice total including tax.
TotalDiscounttextTotal discount amount applied to the invoice.
UpdatedDateUTCtextUTC timestamp of the invoice's last update.
CurrencyCodetextInvoice currency code.
CurrencyRatetextExchange rate used by Xero.
InvoiceIDtextUnique Xero invoice identifier.
InvoiceNumbertextInvoice number shown in Xero.
ReferencetextAdditional reference number.
BrandingThemeIDtextBranding theme identifier.
UrltextSource document URL shown in Xero.
SentToContactyes/noWhether the invoice is marked as sent in Xero.
ExpectedPaymentDatetextExpected payment date on sales invoices.
PlannedPaymentDatetextPlanned payment date on bills.
HasAttachmentsyes/noWhether the invoice has attachments.
RepeatingInvoiceIDtextRepeating invoice template identifier when applicable.
Paymentsarray of objectPayments applied to the invoice.
CreditNotesarray of objectCredit notes applied to the invoice.
Prepaymentsarray of objectPrepayments applied to the invoice.
Overpaymentsarray of objectOverpayments applied to the invoice.
AmountDuetextOutstanding amount still due.
AmountPaidtextAmount paid so far.
CISDeductiontextCIS deduction amount when applicable.
FullyPaidOnDatetextDate the invoice became fully paid.
AmountCreditedtextTotal credited amount.
SalesTaxCalculationTypeCodetextUS sales tax calculation type code when applicable.
InvoiceAddressesarray of objectInvoice address details for US organisations when applicable.
ValidationErrorsarray of objectValidation errors returned for the invoice when Xero includes them.
MessagetextValidation error message.