Xero

App · Accounting & Finance · 32 actions

Manage a Xero organization's contacts, invoices, bills, payments, quotes, credit notes and items, email and approve invoices, and read its chart of accounts and tax rates.

Actions

ActionWhat it does
Add a note to an invoiceAdd a note to an invoice's history and notes in Xero, such as a reminder sent or a promise to pay, for your team to see.
Approve an invoiceApprove a draft or awaiting-approval invoice or bill, so it is posted to the accounts and can be paid or emailed.
Archive or restore a contactArchive a contact so it can no longer be used on new transactions, or set it back to active.
Create a contactCreate a customer or supplier contact.
Create a credit noteRaise a credit note against a customer or a supplier.
Create a purchase orderRaise a purchase order to a supplier.
Create a quoteRaise a quote for a contact.
Create an invoiceRaise a sales invoice or a bill against a contact.
Create an itemCreate an untracked item: a saved product or service whose code fills in a line's description, price and account.
Delete a paymentTake a payment off an invoice or bill, such as one recorded by mistake, so it is owed again.
Delete an itemDelete an item.
Delete or void an invoiceTake an invoice out of use.
Email an invoiceHave Xero email a sales invoice to the customer's email address, with a link to view and pay it.
Get a contactRead one contact in full: their name, email address, the person to address, phone numbers, addresses and what they owe.
Get a paymentRead one payment: its amount, date, invoice and bank account.
Get an invoiceRead one invoice in full, with its line items, payments and credit notes applied.
Get the organizationRead the connected Xero organization: its name, country, base currency, financial year end and lock dates.
List accountsList the organization's chart of accounts.
List contactsFind contacts by name, email, contact code or company number, or page through all of them.
List credit notesPage through the organization's credit notes, newest change first.
List customers with unpaid invoicesEvery customer who still owes you money on sales invoices, with their email address, each unpaid invoice (number, dates, amount, how late it is and a link) and their total due, ready for a statement or reminder email.
List invoicesFind invoices and bills by status, contact, invoice number or reference, or the ones paid on a given day.
List itemsList the organization's saved products and services.
List paymentsList payments on invoices, bills and credit notes, newest first.
List purchase ordersFind purchase orders by status or order date.
List quotesFind quotes by status, contact, number or quote date.
List tax ratesList the organization's tax rates and the tax type codes line items use to override the default rate.
Record a paymentRecord money received against an approved invoice, or paid on an approved bill, into one of your bank accounts.
Update a contactChange a contact's details.
Update a purchase orderChange a purchase order, approve it, mark it billed, or delete it.
Update a quoteChange a quote, or mark it sent, accepted, declined or invoiced.
Update an invoiceChange an invoice or move it between draft, awaiting approval and approved.

Add a note to an invoice

Add a note to an invoice's history and notes in Xero, such as a reminder sent or a promise to pay, for your team to see.

Inputs

Invoice IDinvoice_idtextRequired
The invoice's InvoiceID, from 'Create an invoice', 'List invoices' or an invoice trigger.
NotenotetextRequired
The note, up to 2,500 characters.

Outputs

added_attext
invoice_idtext
notetext
usertext
Example output
{
  "added_at": "2026-09-03T09:00:00Z",
  "invoice_id": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "note": "Customer promised payment by Friday.",
  "user": "System Generated"
}

Approve an invoice

Approve a draft or awaiting-approval invoice or bill, so it is posted to the accounts and can be paid or emailed. Every line needs an account.

Inputs

Invoice IDinvoice_idtextRequired
The invoice's InvoiceID, from 'Create an invoice', 'List invoices' or an invoice trigger.

Outputs

AmountCreditednumber
AmountDuenumber
AmountPaidnumber
BrandingThemeIDtext
CISDeductionnumber
Contactobject
CreditNoteslist
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
DueDatetext
DueDateStringtext
EnteredTotalnumber
ExpectedPaymentDatetext
FullyPaidOnDatetext
HasAttachmentstrue/false
InvoiceIDtext
InvoiceNumbertext
LineAmountTypestext
LineItemslist
Overpaymentslist
Paymentslist
PlannedPaymentDatetext
Prepaymentslist
Referencetext
RepeatingInvoiceIDtext
RoundingAmountnumber
SalesTaxCalculationTypeCodetext
SentToContacttrue/false
Statustext
StatusAttributeStringtext
SubTotalnumber
Totalnumber
TotalDiscountnumber
TotalTaxnumber
Typetext
UpdatedDateUTCtext
UpdatedDateUTCStringtext
Urltext
Warningslist
amount_due_displaytext
Beta. What is still owed, written out the same way, such as £300.00.
contact_nametext
Beta. The name of the customer or supplier the invoice is made out to, such as Acme Ltd.
date_displaytext
Beta. The invoice date as a person reads it, such as Nov 12, 2026.
due_date_displaytext
Beta. The due date as a person reads it, such as Dec 12, 2026. Empty when the invoice has none.
invoice_linktext
Beta. The link that opens the invoice or bill in Xero, for someone signed in to this organization.
total_displaytext
Beta. The total written out with the invoice's currency for a message, such as £300.00 or $1,240.50.
Example output
{
  "AmountDue": 300.0,
  "AmountPaid": 0.0,
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-01T00:00:00Z",
  "DueDate": "2026-09-30T00:00:00Z",
  "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "InvoiceNumber": "INV-0042",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "Status": "AUTHORISED",
  "SubTotal": 250.0,
  "Total": 300.0,
  "TotalTax": 50.0,
  "Type": "ACCREC",
  "UpdatedDateUTC": "2026-09-01T10:15:00.000Z",
  "amount_due_display": "\u00a3300.00",
  "contact_name": "Acme Ltd",
  "date_display": "Sep 1, 2026",
  "due_date_display": "Sep 30, 2026",
  "invoice_link": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "total_display": "\u00a3300.00"
}

Archive or restore a contact

Archive a contact so it can no longer be used on new transactions, or set it back to active. An archived contact keeps its name, so the name stays taken.

Inputs

Contact IDcontact_idtextRequired
The Xero ContactID of the contact.
Statusstatustext
Archive the contact, or restore it to active.One of: ACTIVE (Active (usable on transactions)), ARCHIVED (Archived (hidden and unusable on new transactions)). Default: ARCHIVED.

Outputs

AccountNumbertext
Their account number, if any.
AccountsPayableTaxTypetext
AccountsReceivableTaxTypetext
Addresseslist
Their postal (POBOX) and street (STREET) addresses.
Balancesobject
What they owe you (AccountsReceivable) and you owe them (AccountsPayable): Outstanding in all and Overdue, as numbers in your organization's own currency. Missing when nothing is owed.
BankAccountDetailstext
BatchPaymentsobject
BrandingThemeobject
CompanyNumbertext
Their company registration number, if any.
ContactGroupslist
ContactIDtext
The contact's ID, for later Xero steps.
ContactNumbertext
The contact code you gave them, if any (your own reference).
ContactPersonslist
Up to five more people at the contact, each with a first name, last name and email address.
ContactStatustext
ACTIVE or ARCHIVED.
DefaultCurrencytext
The currency their invoices default to, such as USD.
Discountnumber
EmailAddresstext
The contact's email address, ready to send to. 'Get a contact' gives an empty text when Xero has none.
FirstNametext
The first name of the main person at the contact. 'Get a contact' gives an empty text when Xero has none.
HasAttachmentstrue/false
Whether files are attached to the contact.
IsCustomertrue/false
Whether you have invoiced them.
IsSuppliertrue/false
Whether they have billed you.
LastNametext
That person's last name. 'Get a contact' gives an empty text when Xero has none.
MergedToContactIDtext
Nametext
The contact's name: the company, or the person if no company.
PaymentTermsobject
Phoneslist
Their phone numbers, one entry each for DEFAULT, MOBILE, FAX and DDI; an entry with no PhoneNumber is one they don't have.
PurchasesDefaultAccountCodetext
PurchasesDefaultLineAmountTypetext
PurchasesTrackingCategorieslist
SalesDefaultAccountCodetext
SalesDefaultLineAmountTypetext
SalesTrackingCategorieslist
TaxNumbertext
TaxNumberTypetext
TrackingCategoryNametext
TrackingOptionNametext
UpdatedDateUTCtext
When the contact last changed.
Websitetext
Their website, if any.
XeroNetworkKeytext
Example output
{
  "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
  "ContactStatus": "ARCHIVED",
  "DefaultCurrency": "GBP",
  "EmailAddress": "ap@acme.example",
  "FirstName": "Ada",
  "IsCustomer": true,
  "IsSupplier": false,
  "LastName": "Lovelace",
  "Name": "Acme Ltd",
  "Phones": [
    {
      "PhoneNumber": "020 7946 0000",
      "PhoneType": "DEFAULT"
    }
  ],
  "UpdatedDateUTC": "2026-08-14T09:12:30.940Z"
}

Create a contact

Create a customer or supplier contact. Xero refuses a name another contact already holds, archived ones included.

Inputs

NamenametextRequired
The contact or organization name. Must be unique in Xero, and cannot contain angle brackets or repeated spaces.
Emailemailtext
The contact's primary email address.
First namefirst_nametext
The main contact person's first name.
Last namelast_nametext
The main contact person's last name.
Phone numberphonetext
A phone number for the contact.
Phone typephone_typetext
Which of Xero's four phone slots the number goes in.One of: DEFAULT (Main), MOBILE, DDI (Direct dial), FAX. Default: DEFAULT.
Contact codecontact_numbertext
Your own identifier for this contact, shown as Contact Code in Xero. 'Get a contact' accepts it in place of the id.
Account numberaccount_numbertext
A user-defined account number for the contact.
Tax numbertax_numbertext
The contact's tax number: ABN, GST number, VAT number or tax ID depending on your Xero region.
Company numbercompany_numbertext
The contact's company registration number.
Default currencydefault_currencytext
ISO currency code used when invoicing this contact, e.g. GBP.
Address line 1address_line1text
First line of the contact's address.
Address line 2address_line2text
Second line of the contact's address.
Citycitytext
City or town.
Regionregiontext
State, province or region.
Postal codepostal_codetext
Postcode or ZIP code.
Countrycountrytext
Country name (letters only, as Xero requires).
Address typeaddress_typetext
Which address this is. Invoices are addressed to the postal one.One of: POBOX (Postal (the address invoices are addressed to)), STREET. Default: POBOX.

Outputs

AccountNumbertext
Their account number, if any.
AccountsPayableTaxTypetext
AccountsReceivableTaxTypetext
Addresseslist
Their postal (POBOX) and street (STREET) addresses.
Balancesobject
What they owe you (AccountsReceivable) and you owe them (AccountsPayable): Outstanding in all and Overdue, as numbers in your organization's own currency. Missing when nothing is owed.
BankAccountDetailstext
BatchPaymentsobject
BrandingThemeobject
CompanyNumbertext
Their company registration number, if any.
ContactGroupslist
ContactIDtext
The contact's ID, for later Xero steps.
ContactNumbertext
The contact code you gave them, if any (your own reference).
ContactPersonslist
Up to five more people at the contact, each with a first name, last name and email address.
ContactStatustext
ACTIVE or ARCHIVED.
DefaultCurrencytext
The currency their invoices default to, such as USD.
Discountnumber
EmailAddresstext
The contact's email address, ready to send to. 'Get a contact' gives an empty text when Xero has none.
FirstNametext
The first name of the main person at the contact. 'Get a contact' gives an empty text when Xero has none.
HasAttachmentstrue/false
Whether files are attached to the contact.
IsCustomertrue/false
Whether you have invoiced them.
IsSuppliertrue/false
Whether they have billed you.
LastNametext
That person's last name. 'Get a contact' gives an empty text when Xero has none.
MergedToContactIDtext
Nametext
The contact's name: the company, or the person if no company.
PaymentTermsobject
Phoneslist
Their phone numbers, one entry each for DEFAULT, MOBILE, FAX and DDI; an entry with no PhoneNumber is one they don't have.
PurchasesDefaultAccountCodetext
PurchasesDefaultLineAmountTypetext
PurchasesTrackingCategorieslist
SalesDefaultAccountCodetext
SalesDefaultLineAmountTypetext
SalesTrackingCategorieslist
TaxNumbertext
TaxNumberTypetext
TrackingCategoryNametext
TrackingOptionNametext
UpdatedDateUTCtext
When the contact last changed.
Websitetext
Their website, if any.
XeroNetworkKeytext
Example output
{
  "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
  "ContactStatus": "ACTIVE",
  "DefaultCurrency": "GBP",
  "EmailAddress": "ap@acme.example",
  "FirstName": "Ada",
  "IsCustomer": true,
  "IsSupplier": false,
  "LastName": "Lovelace",
  "Name": "Acme Ltd",
  "Phones": [
    {
      "PhoneNumber": "020 7946 0000",
      "PhoneType": "DEFAULT"
    }
  ],
  "UpdatedDateUTC": "2026-08-14T09:12:30.940Z"
}

Create a credit note

Raise a credit note against a customer or a supplier. Xero does not allow discounts on credit note lines.

Inputs

Contact IDcontact_idtext
The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
Contact namecontact_nametext
Used only when no Contact ID is given: the contact with exactly this name is looked up first, and only its id is sent. The contact itself is never changed.
Typecredit_note_typetext
Whether this credits a customer or a supplier.One of: ACCRECCREDIT (Customer credit note (against a sales invoice)), ACCPAYCREDIT (Supplier credit note (against a bill)). Default: ACCRECCREDIT.
Statusstatustext
The status to create the credit note in.One of: DRAFT, SUBMITTED (Awaiting approval), AUTHORISED (Approved). Default: DRAFT.
Line descriptiondescriptiontext
What the line is for. Required unless an item code is given.
Quantityquantitynumber
How many units. Defaults to 1.At least 0. Default: 1.
Unit amountunit_amountnumber
The price per unit, before tax.
Accountaccount_codetext
The account this line posts to. Optional on a draft, required before it can be approved.
Item codeitem_codetext
A saved item's code, which fills the line's description, price and account from the item.
Tax ratetax_typetext
Overrides the tax rate the account would otherwise apply.
Line items (advanced)line_itemslist
A list of line objects for a multi-line document, e.g. [{"description": "Design", "quantity": 2, "unit_amount": 150}]. When given it replaces the single-line fields above.
Amounts include tax?line_amount_typestext
Whether the amounts above include tax. Defaults to excluding it.One of: Exclusive (Amounts exclude tax), Inclusive (Amounts include tax), NoTax (No tax).
Credit note datedatedate
The date the credit note is issued. Defaults to today.
Credit note numbercredit_note_numbertext
Your own number. Left blank, Xero generates one.
Referencereferencetext
An additional reference. Customer credit notes only.
Currencycurrency_codetext
ISO currency code. Defaults to the organization's base currency.

Outputs

Allocationslist
BrandingThemeIDtext
CISDeductionnumber
Contactobject
CreditNoteIDtext
CreditNoteNumbertext
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
FullyPaidOnDatetext
HasAttachmentstrue/false
LineAmountTypestext
LineItemslist
Referencetext
RemainingCreditnumber
SentToContacttrue/false
Statustext
StatusAttributeStringtext
SubTotalnumber
Totalnumber
TotalTaxnumber
Typetext
UpdatedDateUTCtext
UpdatedDateUTCStringtext
Example output
{
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CreditNoteID": "cccc3333-dddd-4444-eeee-5555ffff6666",
  "CreditNoteNumber": "CN-0003",
  "CurrencyCode": "GBP",
  "Date": "2026-09-02T00:00:00Z",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 125.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 1,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "RemainingCredit": 150.0,
  "Status": "DRAFT",
  "SubTotal": 125.0,
  "Total": 150.0,
  "TotalTax": 25.0,
  "Type": "ACCRECCREDIT",
  "UpdatedDateUTC": "2026-09-02T11:02:00.000Z"
}

Create a purchase order

Raise a purchase order to a supplier. Created as a draft unless you choose otherwise.

Inputs

Contact IDcontact_idtext
The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
Contact namecontact_nametext
Used only when no Contact ID is given: the contact with exactly this name is looked up first, and only its id is sent. The contact itself is never changed.
Statusstatustext
Save it as a draft, for approval, or approved.One of: DRAFT, SUBMITTED (Awaiting approval), AUTHORISED (Approved). Default: DRAFT.
Line descriptiondescriptiontext
What the line is for. Required unless an item code is given.
Quantityquantitynumber
How many units. Defaults to 1.At least 0. Default: 1.
Unit amountunit_amountnumber
The price per unit, before tax.
Accountaccount_codetext
The account this line posts to. Optional on a draft, required before it can be approved.
Item codeitem_codetext
A saved item's code, which fills the line's description, price and account from the item.
Tax ratetax_typetext
Overrides the tax rate the account would otherwise apply.
Discount %discount_ratenumber
A percentage discount on this line, 0-100.From 0.0 to 100.0.
Line items (advanced)line_itemslist
A list of line objects for a multi-line document, e.g. [{"description": "Design", "quantity": 2, "unit_amount": 150}]. When given it replaces the single-line fields above.
Amounts include tax?line_amount_typestext
Whether the amounts above include tax. Defaults to excluding it.One of: Exclusive (Amounts exclude tax), Inclusive (Amounts include tax), NoTax (No tax).
Order datedatedate
The date of the order. Today's date is used when creating without one.
Delivery datedelivery_datedate
When the goods are to be delivered.
Order numberpurchase_order_numbertext
Your own order number. Left blank, Xero generates one.
Referencereferencetext
An additional reference for the order.
Attentionattention_totext
The person at the supplier the order is for.
Telephonetelephonetext
A phone number for the delivery.
Delivery addressdelivery_addresstext
Where the goods are to be delivered.
Delivery instructionsdelivery_instructionstext
Instructions for the delivery, max 4000 characters.
Currencycurrency_codetext
ISO currency code. Defaults to the organization's base currency.

Outputs

AttentionTotext
BrandingThemeIDtext
Contactobject
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
DeliveryAddresstext
DeliveryDatetext
DeliveryDateStringtext
DeliveryInstructionstext
ExpectedArrivalDatetext
HasAttachmentstrue/false
LineAmountTypestext
LineItemslist
PurchaseOrderIDtext
PurchaseOrderNumbertext
Referencetext
SentToContacttrue/false
Statustext
StatusAttributeStringtext
SubTotalnumber
Telephonetext
Totalnumber
TotalDiscountnumber
TotalTaxnumber
UpdatedDateUTCtext
Example output
{
  "AttentionTo": "Accounts",
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-03T00:00:00Z",
  "DeliveryDate": "2026-09-10T00:00:00Z",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "PurchaseOrderID": "eeee5555-ffff-6666-aaaa-7777bbbb8888",
  "PurchaseOrderNumber": "PO-0004",
  "Status": "DRAFT",
  "SubTotal": 250.0,
  "Total": 300.0,
  "TotalTax": 50.0,
  "UpdatedDateUTC": "2026-09-03T09:30:00.000Z"
}

Create a quote

Raise a quote for a contact. Created as a draft unless it is sent straight away.

Inputs

Contact IDcontact_idtext
The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
Contact namecontact_nametext
Used only when no Contact ID is given: the contact with exactly this name is looked up first, and only its id is sent. The contact itself is never changed.
Statusstatustext
Save the quote as a draft, or mark it as sent.One of: DRAFT, SENT. Default: DRAFT.
Line descriptiondescriptiontext
What the line is for. Required unless an item code is given.
Quantityquantitynumber
How many units. Defaults to 1.At least 0. Default: 1.
Unit amountunit_amountnumber
The price per unit, before tax.
Accountaccount_codetext
The account this line posts to. Optional on a draft, required before it can be approved.
Item codeitem_codetext
A saved item's code, which fills the line's description, price and account from the item.
Tax ratetax_typetext
Overrides the tax rate the account would otherwise apply.
Discount %discount_ratenumber
A percentage discount on this line, 0-100.From 0.0 to 100.0.
Line items (advanced)line_itemslist
A list of line objects for a multi-line document, e.g. [{"description": "Design", "quantity": 2, "unit_amount": 150}]. When given it replaces the single-line fields above.
Amounts include tax?line_amount_typestext
Whether the amounts above include tax. Defaults to excluding it.One of: Exclusive (Amounts exclude tax), Inclusive (Amounts include tax), NoTax (No tax).
Quote datedatedate
The date the quote is issued. Xero requires one; today's date is used when this is left blank.
Expiry dateexpiry_datedate
The date the quote stops being valid.
Quote numberquote_numbertext
Your own quote number. Left blank, Xero generates one.
Referencereferencetext
An additional reference for the quote.
Titletitletext
A title shown on the quote, max 100 characters.
Summarysummarytext
A summary shown on the quote, max 3000 characters.
Termstermstext
The quote's terms, max 4000 characters.
Currencycurrency_codetext
ISO currency code. Defaults to the organization's base currency.

Outputs

BrandingThemeIDtext
Contactobject
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
ExpiryDatetext
ExpiryDateStringtext
LineAmountTypestext
LineItemslist
QuoteIDtext
QuoteNumbertext
Referencetext
Statustext
StatusAttributeStringtext
SubTotalnumber
Summarytext
Termstext
Titletext
Totalnumber
TotalDiscountnumber
TotalTaxnumber
UpdatedDateUTCtext
Example output
{
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-01T00:00:00Z",
  "ExpiryDate": "2026-09-15T00:00:00Z",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "QuoteID": "bbbb2222-cccc-3333-dddd-4444eeee5555",
  "QuoteNumber": "QU-0007",
  "Status": "DRAFT",
  "SubTotal": 250.0,
  "Title": "Website refresh",
  "Total": 300.0,
  "TotalTax": 50.0,
  "UpdatedDateUTC": "2026-09-01T10:16:00.000Z"
}

Create an invoice

Raise a sales invoice or a bill against a contact. Created as a draft unless a different status is chosen; approving it posts journals and needs an account on every line. It can add the contact if they aren't in Xero yet and set the due date a number of days after the invoice date, and it gives back the invoice number, the total and due date ready to put in a message, and a link to the invoice.

Inputs

Contact IDcontact_idtext
The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
Contact namecontact_nametext
Used only when no Contact ID is given: the contact with exactly this name is looked up first, and only its id is sent. The contact itself is never changed.
Typeinvoice_typetext
A sales invoice you are owed, or a bill you owe.One of: ACCREC (Sales invoice (money owed to you)), ACCPAY (Bill (money you owe)). Default: ACCREC.
Statusstatustext
The status to create the invoice in.One of: DRAFT, SUBMITTED (Awaiting approval), AUTHORISED (Approved and awaiting payment). Default: DRAFT.
Line descriptiondescriptiontext
What the line is for. Required unless an item code is given.
Quantityquantitynumber
How many units. Defaults to 1.At least 0. Default: 1.
Unit amountunit_amountnumber
The price per unit, before tax.
Accountaccount_codetext
The account this line posts to. Optional on a draft, required before it can be approved.
Item codeitem_codetext
A saved item's code, which fills the line's description, price and account from the item.
Tax ratetax_typetext
Overrides the tax rate the account would otherwise apply.
Discount %discount_ratenumber
A percentage discount on this line, 0-100.From 0.0 to 100.0.
Line items (advanced)line_itemslist
A list of line objects for a multi-line document, e.g. [{"description": "Design", "quantity": 2, "unit_amount": 150}]. When given it replaces the single-line fields above.
Amounts include tax?line_amount_typestext
Whether the amounts above include tax. Defaults to excluding it.One of: Exclusive (Amounts exclude tax), Inclusive (Amounts include tax), NoTax (No tax).
Invoice datedatedate
The date the invoice is issued. Defaults to today.
Due datedue_datedate
The date payment is due.
Invoice numberinvoice_numbertext
Your own invoice number. Left blank, Xero generates the next one from your invoice settings.
Referencereferencetext
An additional reference shown on the invoice.
Currencycurrency_codetext
ISO currency code, e.g. GBP. Defaults to the organization's base currency.
Source document URLurltext
A link Xero shows on the invoice, back to whatever raised it.
Due in daysdue_in_daysnumber
Beta. Due this many days after the invoice date, for example 30 for 'due in 30 days'. Use it instead of Due date when payment terms are a number of days, so no earlier step has to work the date out. Counted from today when Invoice date is left blank. Ignored when Due date is given.
Add the contact if it isn't in Xero yetcreate_contact_if_missingtrue/false
Beta. Used with Contact name. When no contact in Xero has exactly that name, add one with that name and invoice it, instead of stopping, so the first invoice to a new customer goes through. A contact that already exists is used as it is and never changed.Default: false.
New contact's emailcontact_emailtext
Beta. The email address to save on the contact when this step adds one, for example billing@acme.com. Only used with 'Add the contact if it isn't in Xero yet'; an existing contact's email is left alone.

Outputs

AmountCreditednumber
AmountDuenumber
AmountPaidnumber
BrandingThemeIDtext
CISDeductionnumber
Contactobject
CreditNoteslist
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
DueDatetext
DueDateStringtext
EnteredTotalnumber
ExpectedPaymentDatetext
FullyPaidOnDatetext
HasAttachmentstrue/false
InvoiceIDtext
InvoiceNumbertext
LineAmountTypestext
LineItemslist
Overpaymentslist
Paymentslist
PlannedPaymentDatetext
Prepaymentslist
Referencetext
RepeatingInvoiceIDtext
RoundingAmountnumber
SalesTaxCalculationTypeCodetext
SentToContacttrue/false
Statustext
StatusAttributeStringtext
SubTotalnumber
Totalnumber
TotalDiscountnumber
TotalTaxnumber
Typetext
UpdatedDateUTCtext
UpdatedDateUTCStringtext
Urltext
Warningslist
amount_due_displaytext
Beta. What is still owed, written out the same way, such as £300.00.
contact_createdtrue/false
Beta. True when this step added the contact to Xero because none had that name, so someone can check its details.
contact_nametext
Beta. The name of the customer or supplier the invoice is made out to, such as Acme Ltd.
date_displaytext
Beta. The invoice date as a person reads it, such as Nov 12, 2026.
due_date_displaytext
Beta. The due date as a person reads it, such as Dec 12, 2026. Empty when the invoice has none.
invoice_linktext
Beta. The link that opens the invoice or bill in Xero, for someone signed in to this organization.
total_displaytext
Beta. The total written out with the invoice's currency for a message, such as £300.00 or $1,240.50.
Example output
{
  "AmountDue": 300.0,
  "AmountPaid": 0.0,
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-01T00:00:00Z",
  "DueDate": "2026-09-30T00:00:00Z",
  "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "InvoiceNumber": "INV-0042",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "Status": "DRAFT",
  "SubTotal": 250.0,
  "Total": 300.0,
  "TotalTax": 50.0,
  "Type": "ACCREC",
  "UpdatedDateUTC": "2026-09-01T10:15:00.000Z",
  "amount_due_display": "\u00a3300.00",
  "contact_created": false,
  "contact_name": "Acme Ltd",
  "date_display": "Sep 1, 2026",
  "due_date_display": "Sep 30, 2026",
  "invoice_link": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "total_display": "\u00a3300.00"
}

Create an item

Create an untracked item: a saved product or service whose code fills in a line's description, price and account. Tracked inventory items are not created here.

Inputs

Item codecodetextRequired
Your code for the item. Must be unique, max 30 characters.
Namenametext
The item's name, max 50 characters.
Sales descriptiondescriptiontext
The description used when the item is sold.
Purchase descriptionpurchase_descriptiontext
The description used when the item is bought.
Sale pricesales_unit_pricenumber
What the item sells for, per unit.At least 0.
Sales accountsales_account_codetext
The account a sale of this item posts to.
Sales tax ratesales_tax_typetext
The tax rate applied when the item is sold.
Purchase pricepurchase_unit_pricenumber
What the item costs to buy, per unit.At least 0.
Purchase accountpurchase_account_codetext
The account a purchase of this item posts to.
Purchase tax ratepurchase_tax_typetext
The tax rate applied when the item is bought.
Available on salesis_soldtrue/false
Whether the item can be used on sales invoices.Default: true.
Available on purchasesis_purchasedtrue/false
Whether the item can be used on bills.Default: true.

Outputs

Codetext
Descriptiontext
InventoryAssetAccountCodetext
IsPurchasedtrue/false
IsSoldtrue/false
IsTrackedAsInventorytrue/false
ItemIDtext
Nametext
PurchaseDescriptiontext
PurchaseDetailsobject
QuantityAvailablenumber
QuantityOnBackOrdernumber
QuantityOnHandnumber
SalesDetailsobject
TotalCostPoolnumber
UpdatedDateUTCtext
Example output
{
  "Code": "CONSULT-DAY",
  "Description": "One day of consulting",
  "IsPurchased": false,
  "IsSold": true,
  "IsTrackedAsInventory": false,
  "ItemID": "dddd4444-eeee-5555-ffff-6666aaaa7777",
  "Name": "Consulting day",
  "SalesDetails": {
    "AccountCode": "200",
    "TaxType": "OUTPUT2",
    "UnitPrice": 750.0
  },
  "UpdatedDateUTC": "2026-08-30T08:00:00.000Z"
}

Delete a payment

Take a payment off an invoice or bill, such as one recorded by mistake, so it is owed again. Xero keeps it, marked deleted.

Inputs

Payment IDpayment_idtextRequired
The payment's Xero ID, from 'Record a payment' or 'List payments'.

Outputs

Accountobject
Amountnumber
How much was paid, in the invoice's currency.
BankAmountnumber
How much was paid, in the bank account's currency.
CurrencyRatenumber
The exchange rate used, for an invoice in another currency.
Datetext
The day the payment was made (YYYY-MM-DD).
Invoiceobject
IsReconciledtrue/false
True once the payment is matched to a bank statement line.
PaymentIDtext
The payment's Xero ID.
PaymentTypetext
What kind of payment: ACCRECPAYMENT for money received on a sales invoice, ACCPAYPAYMENT for money paid on a bill, and so on.
Referencetext
The note saved on the payment, if any.
Statustext
AUTHORISED for a recorded payment, DELETED for one taken off.
UpdatedDateUTCtext
When the payment last changed.
Example output
{
  "Account": {
    "AccountID": "99990000-aaaa-bbbb-cccc-ddddeeeeffff",
    "Code": "090"
  },
  "Amount": 300.0,
  "BankAmount": 300.0,
  "CurrencyRate": 1.0,
  "Date": "2026-09-15T00:00:00Z",
  "Invoice": {
    "Contact": {
      "ContactID": "11112222-3333-4444-5555-666677778888",
      "Name": "Acme Ltd"
    },
    "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
    "InvoiceNumber": "INV-0042",
    "Type": "ACCREC"
  },
  "IsReconciled": false,
  "PaymentID": "eeee5555-ffff-6666-aaaa-7777bbbb8888",
  "PaymentType": "ACCRECPAYMENT",
  "Reference": "Bank transfer",
  "Status": "DELETED",
  "UpdatedDateUTC": "2026-09-15T10:15:00.000Z"
}

Delete an item

Delete an item. Xero cannot restore one afterwards; documents that already used it keep their lines.

Inputs

Item ID or codeitem_idtextRequired
The Xero ItemID, or the item's code.

Outputs

deletedtrue/false
item_idtext
Example output
{
  "deleted": true,
  "item_id": "dddd4444-eeee-5555-ffff-6666aaaa7777"
}

Delete or void an invoice

Take an invoice out of use. A draft or awaiting-approval invoice is deleted; an approved one with no payments against it is voided. Xero refuses the other way round.

Inputs

Invoice ID or numberinvoice_idtextRequired
The Xero InvoiceID, or the invoice number.
Delete or voidstatustext
Which of Xero's two ways out of an invoice to use.One of: DELETED (Delete (only a draft or awaiting-approval invoice)), VOIDED (Void (an approved invoice with no payments applied)). Default: DELETED.

Outputs

AmountCreditednumber
AmountDuenumber
AmountPaidnumber
BrandingThemeIDtext
CISDeductionnumber
Contactobject
CreditNoteslist
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
DueDatetext
DueDateStringtext
EnteredTotalnumber
ExpectedPaymentDatetext
FullyPaidOnDatetext
HasAttachmentstrue/false
InvoiceIDtext
InvoiceNumbertext
LineAmountTypestext
LineItemslist
Overpaymentslist
Paymentslist
PlannedPaymentDatetext
Prepaymentslist
Referencetext
RepeatingInvoiceIDtext
RoundingAmountnumber
SalesTaxCalculationTypeCodetext
SentToContacttrue/false
Statustext
StatusAttributeStringtext
SubTotalnumber
Totalnumber
TotalDiscountnumber
TotalTaxnumber
Typetext
UpdatedDateUTCtext
UpdatedDateUTCStringtext
Urltext
Warningslist
amount_due_displaytext
Beta. What is still owed, written out the same way, such as £300.00.
contact_nametext
Beta. The name of the customer or supplier the invoice is made out to, such as Acme Ltd.
date_displaytext
Beta. The invoice date as a person reads it, such as Nov 12, 2026.
due_date_displaytext
Beta. The due date as a person reads it, such as Dec 12, 2026. Empty when the invoice has none.
invoice_linktext
Beta. The link that opens the invoice or bill in Xero, for someone signed in to this organization.
total_displaytext
Beta. The total written out with the invoice's currency for a message, such as £300.00 or $1,240.50.
Example output
{
  "AmountDue": 300.0,
  "AmountPaid": 0.0,
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-01T00:00:00Z",
  "DueDate": "2026-09-30T00:00:00Z",
  "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "InvoiceNumber": "INV-0042",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "Status": "DELETED",
  "SubTotal": 250.0,
  "Total": 300.0,
  "TotalTax": 50.0,
  "Type": "ACCREC",
  "UpdatedDateUTC": "2026-09-01T10:15:00.000Z",
  "amount_due_display": "\u00a3300.00",
  "contact_name": "Acme Ltd",
  "date_display": "Sep 1, 2026",
  "due_date_display": "Sep 30, 2026",
  "invoice_link": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "total_display": "\u00a3300.00"
}

Email an invoice

Have Xero email a sales invoice to the customer's email address, with a link to view and pay it. The invoice must be approved or awaiting approval. Xero allows a limited number of invoice emails a day, and none from its demo company.

Inputs

Invoice ID or numberinvoice_idtextRequired
The invoice to email, by its InvoiceID or its number such as INV-0042.

Outputs

contact_nametext
Who it was emailed to.
emailedtrue/false
True when Xero took the invoice to email.
invoice_idtext
The invoice's Xero ID.
invoice_numbertext
The invoice number, such as INV-0042.
Example output
{
  "contact_name": "Acme Ltd",
  "emailed": true,
  "invoice_id": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "invoice_number": "INV-0042"
}

Get a contact

Read one contact in full: their name, email address, the person to address, phone numbers, addresses and what they owe. The email address is empty if Xero has none.

Inputs

Contact ID or codecontact_idtextRequired
The Xero ContactID, or the contact code you set on it.

Outputs

AccountNumbertext
Their account number, if any.
AccountsPayableTaxTypetext
AccountsReceivableTaxTypetext
Addresseslist
Their postal (POBOX) and street (STREET) addresses.
Balancesobject
What they owe you (AccountsReceivable) and you owe them (AccountsPayable): Outstanding in all and Overdue, as numbers in your organization's own currency. Missing when nothing is owed.
BankAccountDetailstext
BatchPaymentsobject
BrandingThemeobject
CompanyNumbertext
Their company registration number, if any.
ContactGroupslist
ContactIDtext
The contact's ID, for later Xero steps.
ContactNumbertext
The contact code you gave them, if any (your own reference).
ContactPersonslist
Up to five more people at the contact, each with a first name, last name and email address.
ContactStatustext
ACTIVE or ARCHIVED.
DefaultCurrencytext
The currency their invoices default to, such as USD.
Discountnumber
EmailAddresstext
The contact's email address, ready to send to. 'Get a contact' gives an empty text when Xero has none.
FirstNametext
The first name of the main person at the contact. 'Get a contact' gives an empty text when Xero has none.
HasAttachmentstrue/false
Whether files are attached to the contact.
IsCustomertrue/false
Whether you have invoiced them.
IsSuppliertrue/false
Whether they have billed you.
LastNametext
That person's last name. 'Get a contact' gives an empty text when Xero has none.
MergedToContactIDtext
Nametext
The contact's name: the company, or the person if no company.
PaymentTermsobject
Phoneslist
Their phone numbers, one entry each for DEFAULT, MOBILE, FAX and DDI; an entry with no PhoneNumber is one they don't have.
PurchasesDefaultAccountCodetext
PurchasesDefaultLineAmountTypetext
PurchasesTrackingCategorieslist
SalesDefaultAccountCodetext
SalesDefaultLineAmountTypetext
SalesTrackingCategorieslist
TaxNumbertext
TaxNumberTypetext
TrackingCategoryNametext
TrackingOptionNametext
UpdatedDateUTCtext
When the contact last changed.
Websitetext
Their website, if any.
XeroNetworkKeytext
Example output
{
  "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
  "ContactStatus": "ACTIVE",
  "DefaultCurrency": "GBP",
  "EmailAddress": "ap@acme.example",
  "FirstName": "Ada",
  "IsCustomer": true,
  "IsSupplier": false,
  "LastName": "Lovelace",
  "Name": "Acme Ltd",
  "Phones": [
    {
      "PhoneNumber": "020 7946 0000",
      "PhoneType": "DEFAULT"
    }
  ],
  "UpdatedDateUTC": "2026-08-14T09:12:30.940Z"
}

Get a payment

Read one payment: its amount, date, invoice and bank account.

Inputs

Payment IDpayment_idtextRequired
The payment's Xero ID, from 'Record a payment' or 'List payments'.

Outputs

Accountobject
Amountnumber
How much was paid, in the invoice's currency.
BankAmountnumber
How much was paid, in the bank account's currency.
CurrencyRatenumber
The exchange rate used, for an invoice in another currency.
Datetext
The day the payment was made (YYYY-MM-DD).
Invoiceobject
IsReconciledtrue/false
True once the payment is matched to a bank statement line.
PaymentIDtext
The payment's Xero ID.
PaymentTypetext
What kind of payment: ACCRECPAYMENT for money received on a sales invoice, ACCPAYPAYMENT for money paid on a bill, and so on.
Referencetext
The note saved on the payment, if any.
Statustext
AUTHORISED for a recorded payment, DELETED for one taken off.
UpdatedDateUTCtext
When the payment last changed.
Example output
{
  "Account": {
    "AccountID": "99990000-aaaa-bbbb-cccc-ddddeeeeffff",
    "Code": "090"
  },
  "Amount": 300.0,
  "BankAmount": 300.0,
  "CurrencyRate": 1.0,
  "Date": "2026-09-15T00:00:00Z",
  "Invoice": {
    "Contact": {
      "ContactID": "11112222-3333-4444-5555-666677778888",
      "Name": "Acme Ltd"
    },
    "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
    "InvoiceNumber": "INV-0042",
    "Type": "ACCREC"
  },
  "IsReconciled": false,
  "PaymentID": "eeee5555-ffff-6666-aaaa-7777bbbb8888",
  "PaymentType": "ACCRECPAYMENT",
  "Reference": "Bank transfer",
  "Status": "AUTHORISED",
  "UpdatedDateUTC": "2026-09-15T10:15:00.000Z"
}

Get an invoice

Read one invoice in full, with its line items, payments and credit notes applied.

Inputs

Invoice ID or numberinvoice_idtextRequired
The Xero InvoiceID, or the invoice number e.g. INV-0042.

Outputs

AmountCreditednumber
AmountDuenumber
AmountPaidnumber
BrandingThemeIDtext
CISDeductionnumber
Contactobject
CreditNoteslist
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
DueDatetext
DueDateStringtext
EnteredTotalnumber
ExpectedPaymentDatetext
FullyPaidOnDatetext
HasAttachmentstrue/false
InvoiceIDtext
InvoiceNumbertext
LineAmountTypestext
LineItemslist
Overpaymentslist
Paymentslist
PlannedPaymentDatetext
Prepaymentslist
Referencetext
RepeatingInvoiceIDtext
RoundingAmountnumber
SalesTaxCalculationTypeCodetext
SentToContacttrue/false
Statustext
StatusAttributeStringtext
SubTotalnumber
Totalnumber
TotalDiscountnumber
TotalTaxnumber
Typetext
UpdatedDateUTCtext
UpdatedDateUTCStringtext
Urltext
Warningslist
amount_due_displaytext
Beta. What is still owed, written out the same way, such as £300.00.
contact_nametext
Beta. The name of the customer or supplier the invoice is made out to, such as Acme Ltd.
date_displaytext
Beta. The invoice date as a person reads it, such as Nov 12, 2026.
due_date_displaytext
Beta. The due date as a person reads it, such as Dec 12, 2026. Empty when the invoice has none.
invoice_linktext
Beta. The link that opens the invoice or bill in Xero, for someone signed in to this organization.
total_displaytext
Beta. The total written out with the invoice's currency for a message, such as £300.00 or $1,240.50.
Example output
{
  "AmountDue": 300.0,
  "AmountPaid": 0.0,
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-01T00:00:00Z",
  "DueDate": "2026-09-30T00:00:00Z",
  "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "InvoiceNumber": "INV-0042",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "Status": "DRAFT",
  "SubTotal": 250.0,
  "Total": 300.0,
  "TotalTax": 50.0,
  "Type": "ACCREC",
  "UpdatedDateUTC": "2026-09-01T10:15:00.000Z",
  "amount_due_display": "\u00a3300.00",
  "contact_name": "Acme Ltd",
  "date_display": "Sep 1, 2026",
  "due_date_display": "Sep 30, 2026",
  "invoice_link": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "total_display": "\u00a3300.00"
}

Get the organization

Read the connected Xero organization: its name, country, base currency, financial year end and lock dates.

Inputs

None.

Outputs

APIKeytext
Addresseslist
BaseCurrencytext
Classtext
CountryCodetext
CreatedDateUTCtext
DefaultPurchasesTaxtext
DefaultSalesTaxtext
Editiontext
EmployerIdentificationNumbertext
EndOfYearLockDatetext
FinancialYearEndDaynumber
FinancialYearEndMonthnumber
IsDemoCompanytrue/false
LegalNametext
LineOfBusinesstext
Nametext
OrganisationEntityTypetext
OrganisationIDtext
OrganisationStatustext
OrganisationTypetext
PaysTaxtrue/false
PeriodLockDatetext
Phoneslist
RegistrationNumbertext
SalesTaxBasistext
SalesTaxPeriodtext
ShortCodetext
TaxNumbertext
Timezonetext
Versiontext
Example output
{
  "BaseCurrency": "GBP",
  "Class": "DEMO",
  "CountryCode": "GB",
  "CreatedDateUTC": "2026-01-05T09:00:00.000Z",
  "Edition": "BUSINESS",
  "FinancialYearEndDay": 31,
  "FinancialYearEndMonth": 3,
  "IsDemoCompany": true,
  "LegalName": "Demo Company (UK) Ltd",
  "Name": "Demo Company (UK)",
  "OrganisationID": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
  "OrganisationStatus": "ACTIVE",
  "Timezone": "UTC"
}

List accounts

List the organization's chart of accounts. Use it to find the account code a line item should post to.

Inputs

Account typeaccount_typetext
Only return accounts of this type.One of: BANK (Bank account), CURRENT (Current asset), CURRLIAB (Current liability), DEPRECIATN (Depreciation), DIRECTCOSTS (Direct costs), EQUITY, EXPENSE, FIXED (Fixed asset), INVENTORY (Inventory asset), LIABILITY, and 7 more.
Statusstatustext
Only return accounts in this status.One of: ACTIVE, ARCHIVED.
Limitlimitnumber
How many records to return. Xero sends them all in one response, so this trims the result.From 1 to 1000. Default: 100.
Changed sincemodified_sincedate and time
Only return records created or changed after this moment.

Outputs

accountslist
countnumber
total_countnumber
Example output
{
  "accounts": [
    {
      "AccountID": "4f2a3169-8454-4012-a642-05a88ef32982",
      "Class": "REVENUE",
      "Code": "200",
      "EnablePaymentsToAccount": false,
      "Name": "Sales",
      "Status": "ACTIVE",
      "TaxType": "OUTPUT2",
      "Type": "REVENUE"
    },
    {
      "AccountID": "8a1b9c5d-3f2e-4a7b-9c8d-1e2f3a4b5c6d",
      "Class": "EXPENSE",
      "Code": "400",
      "EnablePaymentsToAccount": false,
      "Name": "Advertising",
      "Status": "ACTIVE",
      "TaxType": "INPUT2",
      "Type": "EXPENSE"
    }
  ],
  "count": 2,
  "total_count": 2
}

List contacts

Find contacts by name, email, contact code or company number, or page through all of them.

Inputs

Searchsearch_termtext
Case-insensitive search across name, first and last name, contact number, company number and email.
Contact IDscontact_idslist
Return only these contacts, by their Xero ids.
Include archivedinclude_archivedtrue/false
Also return contacts that have been archived.Default: false.
Summary onlysummary_onlytrue/false
Return a lighter, faster record without addresses, balances, contact groups or contact people.Default: false.
Sort byordertext
How to order the results.One of: Name ASC (Name (A–Z)), Name DESC (Name (Z–A)), UpdatedDateUTC DESC (Recently updated first), UpdatedDateUTC ASC (Least recently updated first).
Pagepagenumber
Which page of results to return. Starts at 1.At least 1. Default: 1.
Page sizepage_sizenumber
How many results per page (1-1000). Defaults to 100.From 1 to 1000. Default: 100.
Changed sincemodified_sincedate and time
Only return records created or changed after this moment.

Outputs

contactslist
countnumber
has_moretrue/false
item_countnumber
pagenumber
page_countnumber
page_sizenumber
Example output
{
  "contacts": [
    {
      "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
      "ContactStatus": "ACTIVE",
      "DefaultCurrency": "GBP",
      "EmailAddress": "ap@acme.example",
      "FirstName": "Ada",
      "IsCustomer": true,
      "IsSupplier": false,
      "LastName": "Lovelace",
      "Name": "Acme Ltd",
      "Phones": [
        {
          "PhoneNumber": "020 7946 0000",
          "PhoneType": "DEFAULT"
        }
      ],
      "UpdatedDateUTC": "2026-08-14T09:12:30.940Z"
    }
  ],
  "count": 1,
  "has_more": false,
  "item_count": 1,
  "page": 1,
  "page_count": 1,
  "page_size": 100
}

List credit notes

Page through the organization's credit notes, newest change first. Every result carries its line items and allocations.

Inputs

Sort byordertext
How to order the results.One of: UpdatedDateUTC DESC (Recently updated first), UpdatedDateUTC ASC (Least recently updated first).
Pagepagenumber
Which page of results to return. Starts at 1.At least 1. Default: 1.
Page sizepage_sizenumber
How many results per page (1-1000). Defaults to 100.From 1 to 1000. Default: 100.
Changed sincemodified_sincedate and time
Only return records created or changed after this moment.

Outputs

countnumber
credit_noteslist
has_moretrue/false
item_countnumber
pagenumber
page_countnumber
page_sizenumber
Example output
{
  "count": 1,
  "credit_notes": [
    {
      "Contact": {
        "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
        "Name": "Acme Ltd"
      },
      "CreditNoteID": "cccc3333-dddd-4444-eeee-5555ffff6666",
      "CreditNoteNumber": "CN-0003",
      "CurrencyCode": "GBP",
      "Date": "2026-09-02T00:00:00Z",
      "LineAmountTypes": "Exclusive",
      "LineItems": [
        {
          "AccountCode": "200",
          "Description": "Onsite project management",
          "LineAmount": 125.0,
          "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
          "Quantity": 1,
          "TaxAmount": 50.0,
          "TaxType": "OUTPUT2",
          "UnitAmount": 125.0
        }
      ],
      "RemainingCredit": 150.0,
      "Status": "DRAFT",
      "SubTotal": 125.0,
      "Total": 150.0,
      "TotalTax": 25.0,
      "Type": "ACCRECCREDIT",
      "UpdatedDateUTC": "2026-09-02T11:02:00.000Z"
    }
  ],
  "has_more": false,
  "item_count": 1,
  "page": 1,
  "page_count": 1,
  "page_size": 100
}

List customers with unpaid invoices

Every customer who still owes you money on sales invoices, with their email address, each unpaid invoice (number, dates, amount, how late it is and a link) and their total due, ready for a statement or reminder email. A customer billed in two currencies appears once for each.

Inputs

Minimum total owedminimum_totalnumber
Leave out customers who owe less than this in all, such as 50.At least 0.
Only overdue invoicesoverdue_onlytrue/false
Turn on to count only invoices past their due date, leaving out ones not yet due.Default: false.

Outputs

countnumber
customerslist
Example output
{
  "count": 1,
  "customers": [
    {
      "contact_id": "e0e0e0e0-1111-2222-3333-444455556666",
      "currency": "GBP",
      "email": "accounts@acme.example",
      "invoice_count": 1,
      "invoices": [
        {
          "amount_due": 300.0,
          "amount_due_display": "300.00 GBP",
          "date_display": "Sep 1, 2026",
          "days_overdue": 12,
          "due_date_display": "Sep 30, 2026",
          "invoice_number": "INV-0042",
          "is_overdue": true,
          "link": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=aaaa1111-bbbb-2222-cccc-3333dddd4444",
          "reference": "PO 1187"
        }
      ],
      "name": "Acme Ltd",
      "total_due": 300.0,
      "total_due_display": "300.00 GBP"
    }
  ]
}

List invoices

Find invoices and bills by status, contact, invoice number or reference, or the ones paid on a given day. Every result carries its line items and the customer's name and email, ready for a message.

Inputs

Statusesstatuseslist
Only return invoices in these statuses.One or more of: DRAFT, SUBMITTED (Awaiting approval), AUTHORISED (Approved and awaiting payment), PAID, VOIDED, DELETED.
Contact IDscontact_idslist
Only return invoices for these contacts.
Invoice numbersinvoice_numberslist
Only return invoices with these exact numbers.
Searchsearch_termtext
Case-insensitive search across invoice number and reference.
Only ones created herecreated_by_my_apptrue/false
Only return invoices created through the Xero app you connected with.Default: false.
Sort byordertext
How to order the results.One of: Date DESC (Invoice date, newest first), Date ASC (Invoice date, oldest first), UpdatedDateUTC DESC (Recently updated first), UpdatedDateUTC ASC (Least recently updated first).
Only overdue sales invoicesoverdue_onlytrue/false
Beta. Turn on to get just the sales invoices that are awaiting payment and past their due date, oldest first, with what they add up to (total_amount_due), so a reminder needs no filtering or adding up. Reads every page itself, so it replaces Statuses, Sort by and paging.Default: false.
Only billsonly_billstrue/false
Beta. Turn on to get just the bills you owe suppliers, leaving out the invoices you send customers, so a list of bills awaiting approval needs no filtering.Default: false.
Only sales invoicessales_onlytrue/false
Beta. Turn on to get just the invoices you send customers, leaving out the bills you owe suppliers.Default: false.
Paid inpaid_intext
Beta. Only invoices and bills paid in full today, yesterday, in the 7 days before today, so far this month or last month (days as your Xero organization counts them), earliest payment first, with what was paid on them in all (total_paid), so a daily or monthly summary needs no date filtering. Turn on Only sales invoices to leave out bills. It reads every matching invoice, so it replaces Statuses, Sort by and paging.One of: today (Today so far), yesterday, last_7_days (The 7 days before today), this_month (This month so far), last_month (Last month).
Pagepagenumber
Which page of results to return. Starts at 1.At least 1. Default: 1.
Page sizepage_sizenumber
How many results per page (1-1000). Defaults to 100.From 1 to 1000. Default: 100.
Changed sincemodified_sincedate and time
Only return records created or changed after this moment.

Outputs

countnumber
has_moretrue/false
invoiceslist
item_countnumber
pagenumber
page_countnumber
page_sizenumber
total_amount_duenumber
Beta. With Only overdue sales invoices: what the invoices still owe in all.
total_amount_due_displaytext
Beta. total_amount_due as a person writes it ($1,240.50), ready to put in a message.
total_paidnumber
Beta. With Paid in: what was paid on the invoices in all, in your organization's currency (an invoice in another currency is converted at the rate Xero recorded on it).
total_paid_currencytext
Beta. With Paid in: the currency total_paid is in, your Xero organization's own, such as USD.
total_paid_displaytext
Beta. With Paid in: total_paid written out with its currency, such as $1,240.50, ready to put in a message.
Example output
{
  "count": 1,
  "has_more": false,
  "invoices": [
    {
      "AmountDue": 0.0,
      "AmountPaid": 300.0,
      "Contact": {
        "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
        "Name": "Acme Ltd"
      },
      "CurrencyCode": "GBP",
      "Date": "2026-09-01T00:00:00Z",
      "DueDate": "2026-09-30T00:00:00Z",
      "FullyPaidOnDate": "2026-09-12T00:00:00Z",
      "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
      "InvoiceNumber": "INV-0042",
      "LineAmountTypes": "Exclusive",
      "LineItems": [
        {
          "AccountCode": "200",
          "Description": "Onsite project management",
          "LineAmount": 250.0,
          "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
          "Quantity": 2,
          "TaxAmount": 50.0,
          "TaxType": "OUTPUT2",
          "UnitAmount": 125.0
        }
      ],
      "Status": "PAID",
      "SubTotal": 250.0,
      "Total": 300.0,
      "TotalTax": 50.0,
      "Type": "ACCREC",
      "UpdatedDateUTC": "2026-09-01T10:15:00.000Z",
      "amount_due_display": "\u00a30.00",
      "amount_paid_display": "\u00a3300.00",
      "contact_email": "accounts@acme.example",
      "contact_name": "Acme Ltd",
      "date_display": "Sep 1, 2026",
      "due_date_display": "Sep 30, 2026",
      "fully_paid_on": "2026-09-12",
      "fully_paid_on_display": "Sep 12, 2026",
      "invoice_link": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=aaaa1111-bbbb-2222-cccc-3333dddd4444",
      "total_display": "\u00a3300.00"
    }
  ],
  "item_count": 1,
  "page": 1,
  "page_count": 1,
  "page_size": 100,
  "total_amount_due": 120.0,
  "total_amount_due_display": "$120.00",
  "total_paid": 300.0,
  "total_paid_currency": "GBP",
  "total_paid_display": "\u00a3300.00"
}

List items

List the organization's saved products and services.

Inputs

Limitlimitnumber
How many records to return. Xero sends them all in one response, so this trims the result.From 1 to 1000. Default: 100.
Changed sincemodified_sincedate and time
Only return records created or changed after this moment.

Outputs

countnumber
itemslist
total_countnumber
Example output
{
  "count": 1,
  "items": [
    {
      "Code": "CONSULT-DAY",
      "Description": "One day of consulting",
      "IsPurchased": false,
      "IsSold": true,
      "IsTrackedAsInventory": false,
      "ItemID": "dddd4444-eeee-5555-ffff-6666aaaa7777",
      "Name": "Consulting day",
      "SalesDetails": {
        "AccountCode": "200",
        "TaxType": "OUTPUT2",
        "UnitPrice": 750.0
      },
      "UpdatedDateUTC": "2026-08-30T08:00:00.000Z"
    }
  ],
  "total_count": 1
}

List payments

List payments on invoices, bills and credit notes, newest first.

Inputs

Statusstatustext
Only recorded payments, or only deleted ones.One of: AUTHORISED (Recorded), DELETED.
Pagepagenumber
Which page of results to return. Starts at 1.At least 1. Default: 1.
Page sizepage_sizenumber
How many results per page (1-1000). Defaults to 100.From 1 to 1000. Default: 100.
Changed sincemodified_sincedate and time
Only return records created or changed after this moment.

Outputs

countnumber
has_moretrue/false
item_countnumber
pagenumber
page_countnumber
page_sizenumber
paymentslist
Example output
{
  "count": 1,
  "has_more": false,
  "item_count": 1,
  "page": 1,
  "page_count": 1,
  "page_size": 100,
  "payments": [
    {
      "Account": {
        "AccountID": "99990000-aaaa-bbbb-cccc-ddddeeeeffff",
        "Code": "090"
      },
      "Amount": 300.0,
      "BankAmount": 300.0,
      "CurrencyRate": 1.0,
      "Date": "2026-09-15T00:00:00Z",
      "Invoice": {
        "Contact": {
          "ContactID": "11112222-3333-4444-5555-666677778888",
          "Name": "Acme Ltd"
        },
        "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
        "InvoiceNumber": "INV-0042",
        "Type": "ACCREC"
      },
      "IsReconciled": false,
      "PaymentID": "eeee5555-ffff-6666-aaaa-7777bbbb8888",
      "PaymentType": "ACCRECPAYMENT",
      "Reference": "Bank transfer",
      "Status": "AUTHORISED",
      "UpdatedDateUTC": "2026-09-15T10:15:00.000Z"
    }
  ]
}

List purchase orders

Find purchase orders by status or order date.

Inputs

Statusstatustext
Only return purchase orders in this status.One of: DRAFT, SUBMITTED (Awaiting approval), AUTHORISED (Approved), BILLED, DELETED.
Dated fromdate_fromdate
Only return orders dated on or after this date.
Dated todate_todate
Only return orders dated on or before this date.
Sort byordertext
How to order the results.One of: UpdatedDateUTC DESC (Recently updated first), UpdatedDateUTC ASC (Least recently updated first).
Pagepagenumber
Which page of results to return. Starts at 1.At least 1. Default: 1.
Page sizepage_sizenumber
How many results per page (1-1000). Defaults to 100.From 1 to 1000. Default: 100.
Changed sincemodified_sincedate and time
Only return records created or changed after this moment.

Outputs

countnumber
has_moretrue/false
item_countnumber
pagenumber
page_countnumber
page_sizenumber
purchase_orderslist
Example output
{
  "count": 1,
  "has_more": false,
  "item_count": 1,
  "page": 1,
  "page_count": 1,
  "page_size": 100,
  "purchase_orders": [
    {
      "AttentionTo": "Accounts",
      "Contact": {
        "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
        "Name": "Acme Ltd"
      },
      "CurrencyCode": "GBP",
      "Date": "2026-09-03T00:00:00Z",
      "DeliveryDate": "2026-09-10T00:00:00Z",
      "LineAmountTypes": "Exclusive",
      "LineItems": [
        {
          "AccountCode": "200",
          "Description": "Onsite project management",
          "LineAmount": 250.0,
          "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
          "Quantity": 2,
          "TaxAmount": 50.0,
          "TaxType": "OUTPUT2",
          "UnitAmount": 125.0
        }
      ],
      "PurchaseOrderID": "eeee5555-ffff-6666-aaaa-7777bbbb8888",
      "PurchaseOrderNumber": "PO-0004",
      "Status": "DRAFT",
      "SubTotal": 250.0,
      "Total": 300.0,
      "TotalTax": 50.0,
      "UpdatedDateUTC": "2026-09-03T09:30:00.000Z"
    }
  ]
}

List quotes

Find quotes by status, contact, number or quote date.

Inputs

Statusstatustext
Only return quotes in this status.One of: DRAFT, SENT, ACCEPTED, DECLINED, INVOICED, DELETED.
Contact IDcontact_idtext
Only return quotes for this contact.
Quote numberquote_numbertext
Matches any part of the quote number, so 'QU-01' finds QU-0100 as well as QU-0101.
Dated fromdate_fromdate
Only return quotes issued on or after this date.
Dated todate_todate
Only return quotes issued on or before this date.
Sort byordertext
How to order the results.One of: UpdatedDateUTC DESC (Recently updated first), UpdatedDateUTC ASC (Least recently updated first).
Pagepagenumber
Which page of results to return. Starts at 1.At least 1. Default: 1.
Page sizepage_sizenumber
How many results per page (1-1000). Defaults to 100.From 1 to 1000. Default: 100.
Changed sincemodified_sincedate and time
Only return records created or changed after this moment.

Outputs

countnumber
has_moretrue/false
item_countnumber
pagenumber
page_countnumber
page_sizenumber
quoteslist
Example output
{
  "count": 1,
  "has_more": false,
  "item_count": 1,
  "page": 1,
  "page_count": 1,
  "page_size": 100,
  "quotes": [
    {
      "Contact": {
        "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
        "Name": "Acme Ltd"
      },
      "CurrencyCode": "GBP",
      "Date": "2026-09-01T00:00:00Z",
      "ExpiryDate": "2026-09-15T00:00:00Z",
      "LineAmountTypes": "Exclusive",
      "LineItems": [
        {
          "AccountCode": "200",
          "Description": "Onsite project management",
          "LineAmount": 250.0,
          "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
          "Quantity": 2,
          "TaxAmount": 50.0,
          "TaxType": "OUTPUT2",
          "UnitAmount": 125.0
        }
      ],
      "QuoteID": "bbbb2222-cccc-3333-dddd-4444eeee5555",
      "QuoteNumber": "QU-0007",
      "Status": "DRAFT",
      "SubTotal": 250.0,
      "Title": "Website refresh",
      "Total": 300.0,
      "TotalTax": 50.0,
      "UpdatedDateUTC": "2026-09-01T10:16:00.000Z"
    }
  ]
}

List tax rates

List the organization's tax rates and the tax type codes line items use to override the default rate.

Inputs

Statusstatustext
Only return tax rates in this status.One of: ACTIVE (Active (usable on transactions)), DELETED, ARCHIVED (Archived (used historically, not usable now)).
Limitlimitnumber
How many records to return. Xero sends them all in one response, so this trims the result.From 1 to 1000. Default: 100.

Outputs

countnumber
tax_rateslist
total_countnumber
Example output
{
  "count": 2,
  "tax_rates": [
    {
      "DisplayTaxRate": 20.0,
      "EffectiveRate": 20.0,
      "Name": "20% (VAT on Income)",
      "ReportTaxType": "OUTPUT2",
      "Status": "ACTIVE",
      "TaxComponents": [
        {
          "IsCompound": false,
          "Name": "VAT",
          "Rate": 20.0
        }
      ],
      "TaxType": "OUTPUT2"
    },
    {
      "DisplayTaxRate": 0.0,
      "EffectiveRate": 0.0,
      "Name": "Zero Rated Income",
      "Status": "ACTIVE",
      "TaxComponents": [
        {
          "IsCompound": false,
          "Name": "Zero Rated",
          "Rate": 0.0
        }
      ],
      "TaxType": "ZERORATEDOUTPUT"
    }
  ],
  "total_count": 2
}

Record a payment

Record money received against an approved invoice, or paid on an approved bill, into one of your bank accounts. It records the payment in your books; it doesn't move any money.

Inputs

Invoice ID or numberinvoice_idtextRequired
The approved invoice or bill the payment is for, by its InvoiceID or its number such as INV-0042.
Bank accountbank_account_idtextRequired
The bank account the money went into or came out of.
AmountamountnumberRequired
How much was paid, in the invoice's currency. It can't be more than is still owed.At least 0.01.
Paid ondatedate
The day it was paid. Leave empty for today.
Referencereferencetext
A note on the payment, such as Bank transfer or a check number.

Outputs

Accountobject
Amountnumber
How much was paid, in the invoice's currency.
BankAmountnumber
How much was paid, in the bank account's currency.
CurrencyRatenumber
The exchange rate used, for an invoice in another currency.
Datetext
The day the payment was made (YYYY-MM-DD).
Invoiceobject
IsReconciledtrue/false
True once the payment is matched to a bank statement line.
PaymentIDtext
The payment's Xero ID.
PaymentTypetext
What kind of payment: ACCRECPAYMENT for money received on a sales invoice, ACCPAYPAYMENT for money paid on a bill, and so on.
Referencetext
The note saved on the payment, if any.
Statustext
AUTHORISED for a recorded payment, DELETED for one taken off.
UpdatedDateUTCtext
When the payment last changed.
Example output
{
  "Account": {
    "AccountID": "99990000-aaaa-bbbb-cccc-ddddeeeeffff",
    "Code": "090"
  },
  "Amount": 300.0,
  "BankAmount": 300.0,
  "CurrencyRate": 1.0,
  "Date": "2026-09-15T00:00:00Z",
  "Invoice": {
    "Contact": {
      "ContactID": "11112222-3333-4444-5555-666677778888",
      "Name": "Acme Ltd"
    },
    "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
    "InvoiceNumber": "INV-0042",
    "Type": "ACCREC"
  },
  "IsReconciled": false,
  "PaymentID": "eeee5555-ffff-6666-aaaa-7777bbbb8888",
  "PaymentType": "ACCRECPAYMENT",
  "Reference": "Bank transfer",
  "Status": "AUTHORISED",
  "UpdatedDateUTC": "2026-09-15T10:15:00.000Z"
}

Update a contact

Change a contact's details. Anything left blank keeps the value Xero already holds.

Inputs

Contact IDcontact_idtextRequired
The Xero ContactID of the contact to change.
Namenametext
A new name for the contact.
Emailemailtext
The contact's primary email address.
First namefirst_nametext
The main contact person's first name.
Last namelast_nametext
The main contact person's last name.
Phone numberphonetext
A phone number for the contact.
Phone typephone_typetext
Which of Xero's four phone slots the number goes in.One of: DEFAULT (Main), MOBILE, DDI (Direct dial), FAX. Default: DEFAULT.
Contact codecontact_numbertext
Your own identifier for this contact, shown as Contact Code in Xero. 'Get a contact' accepts it in place of the id.
Account numberaccount_numbertext
A user-defined account number for the contact.
Tax numbertax_numbertext
The contact's tax number: ABN, GST number, VAT number or tax ID depending on your Xero region.
Company numbercompany_numbertext
The contact's company registration number.
Default currencydefault_currencytext
ISO currency code used when invoicing this contact, e.g. GBP.
Address line 1address_line1text
First line of the contact's address.
Address line 2address_line2text
Second line of the contact's address.
Citycitytext
City or town.
Regionregiontext
State, province or region.
Postal codepostal_codetext
Postcode or ZIP code.
Countrycountrytext
Country name (letters only, as Xero requires).
Address typeaddress_typetext
Which address this is. Invoices are addressed to the postal one.One of: POBOX (Postal (the address invoices are addressed to)), STREET. Default: POBOX.

Outputs

AccountNumbertext
Their account number, if any.
AccountsPayableTaxTypetext
AccountsReceivableTaxTypetext
Addresseslist
Their postal (POBOX) and street (STREET) addresses.
Balancesobject
What they owe you (AccountsReceivable) and you owe them (AccountsPayable): Outstanding in all and Overdue, as numbers in your organization's own currency. Missing when nothing is owed.
BankAccountDetailstext
BatchPaymentsobject
BrandingThemeobject
CompanyNumbertext
Their company registration number, if any.
ContactGroupslist
ContactIDtext
The contact's ID, for later Xero steps.
ContactNumbertext
The contact code you gave them, if any (your own reference).
ContactPersonslist
Up to five more people at the contact, each with a first name, last name and email address.
ContactStatustext
ACTIVE or ARCHIVED.
DefaultCurrencytext
The currency their invoices default to, such as USD.
Discountnumber
EmailAddresstext
The contact's email address, ready to send to. 'Get a contact' gives an empty text when Xero has none.
FirstNametext
The first name of the main person at the contact. 'Get a contact' gives an empty text when Xero has none.
HasAttachmentstrue/false
Whether files are attached to the contact.
IsCustomertrue/false
Whether you have invoiced them.
IsSuppliertrue/false
Whether they have billed you.
LastNametext
That person's last name. 'Get a contact' gives an empty text when Xero has none.
MergedToContactIDtext
Nametext
The contact's name: the company, or the person if no company.
PaymentTermsobject
Phoneslist
Their phone numbers, one entry each for DEFAULT, MOBILE, FAX and DDI; an entry with no PhoneNumber is one they don't have.
PurchasesDefaultAccountCodetext
PurchasesDefaultLineAmountTypetext
PurchasesTrackingCategorieslist
SalesDefaultAccountCodetext
SalesDefaultLineAmountTypetext
SalesTrackingCategorieslist
TaxNumbertext
TaxNumberTypetext
TrackingCategoryNametext
TrackingOptionNametext
UpdatedDateUTCtext
When the contact last changed.
Websitetext
Their website, if any.
XeroNetworkKeytext
Example output
{
  "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
  "ContactStatus": "ACTIVE",
  "DefaultCurrency": "GBP",
  "EmailAddress": "billing@acme.example",
  "FirstName": "Ada",
  "IsCustomer": true,
  "IsSupplier": false,
  "LastName": "Lovelace",
  "Name": "Acme Ltd",
  "Phones": [
    {
      "PhoneNumber": "020 7946 0000",
      "PhoneType": "DEFAULT"
    }
  ],
  "UpdatedDateUTC": "2026-08-14T09:12:30.940Z"
}

Update a purchase order

Change a purchase order, approve it, mark it billed, or delete it. Only the fields you fill in change.

Inputs

Purchase order IDpurchase_order_idtextRequired
The PurchaseOrderID, from 'Create a purchase order', 'List purchase orders' or the New purchase order trigger.
Statusstatustext
Move the purchase order to this status.One of: DRAFT, SUBMITTED (Awaiting approval), AUTHORISED (Approved), BILLED, DELETED.
Order datedatedate
The date of the order. Today's date is used when creating without one.
Delivery datedelivery_datedate
When the goods are to be delivered.
Order numberpurchase_order_numbertext
Your own order number. Left blank, Xero generates one.
Referencereferencetext
An additional reference for the order.
Attentionattention_totext
The person at the supplier the order is for.
Telephonetelephonetext
A phone number for the delivery.
Delivery addressdelivery_addresstext
Where the goods are to be delivered.
Delivery instructionsdelivery_instructionstext
Instructions for the delivery, max 4000 characters.
Replace lines (advanced)line_itemslist
New lines, which replace every line on the purchase order. Same format as 'Create a purchase order'.

Outputs

AttentionTotext
BrandingThemeIDtext
Contactobject
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
DeliveryAddresstext
DeliveryDatetext
DeliveryDateStringtext
DeliveryInstructionstext
ExpectedArrivalDatetext
HasAttachmentstrue/false
LineAmountTypestext
LineItemslist
PurchaseOrderIDtext
PurchaseOrderNumbertext
Referencetext
SentToContacttrue/false
Statustext
StatusAttributeStringtext
SubTotalnumber
Telephonetext
Totalnumber
TotalDiscountnumber
TotalTaxnumber
UpdatedDateUTCtext
Example output
{
  "AttentionTo": "Accounts",
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-03T00:00:00Z",
  "DeliveryDate": "2026-09-10T00:00:00Z",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "PurchaseOrderID": "eeee5555-ffff-6666-aaaa-7777bbbb8888",
  "PurchaseOrderNumber": "PO-0004",
  "Status": "AUTHORISED",
  "SubTotal": 250.0,
  "Total": 300.0,
  "TotalTax": 50.0,
  "UpdatedDateUTC": "2026-09-03T09:30:00.000Z"
}

Update a quote

Change a quote, or mark it sent, accepted, declined or invoiced. Only the fields you fill in change.

Inputs

Quote IDquote_idtextRequired
The quote's QuoteID, from 'Create a quote', 'List quotes' or a quote trigger.
Statusstatustext
Move the quote to this status.One of: DRAFT, SENT, ACCEPTED, DECLINED, INVOICED.
Quote datedatedate
The date the quote is issued.
Expiry dateexpiry_datedate
The date the quote stops being valid.
Quote numberquote_numbertext
A new quote number.
Referencereferencetext
An additional reference for the quote.
Titletitletext
A title shown on the quote, max 100 characters.
Summarysummarytext
A summary shown on the quote, max 3000 characters.
Termstermstext
The quote's terms, max 4000 characters.
Replace lines (advanced)line_itemslist
New lines, which replace every line on the quote. Same format as 'Create a quote'.

Outputs

BrandingThemeIDtext
Contactobject
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
ExpiryDatetext
ExpiryDateStringtext
LineAmountTypestext
LineItemslist
QuoteIDtext
QuoteNumbertext
Referencetext
Statustext
StatusAttributeStringtext
SubTotalnumber
Summarytext
Termstext
Titletext
Totalnumber
TotalDiscountnumber
TotalTaxnumber
UpdatedDateUTCtext
Example output
{
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-01T00:00:00Z",
  "ExpiryDate": "2026-09-15T00:00:00Z",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "QuoteID": "bbbb2222-cccc-3333-dddd-4444eeee5555",
  "QuoteNumber": "QU-0007",
  "Status": "ACCEPTED",
  "SubTotal": 250.0,
  "Title": "Website refresh",
  "Total": 300.0,
  "TotalTax": 50.0,
  "UpdatedDateUTC": "2026-09-01T10:16:00.000Z"
}

Update an invoice

Change an invoice or move it between draft, awaiting approval and approved. Supplying line items replaces every line on the invoice.

Inputs

Invoice IDinvoice_idtextRequired
The Xero InvoiceID of the invoice to change.
Statusstatustext
Move the invoice to this status. Use 'Delete or void an invoice' to take one out of use.One of: DRAFT, SUBMITTED (Awaiting approval), AUTHORISED (Approved and awaiting payment).
Contact IDcontact_idtext
The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
Contact namecontact_nametext
Used only when no Contact ID is given: the contact with exactly this name is looked up first, and only its id is sent. The contact itself is never changed.
Invoice datedatedate
A new issue date for the invoice.
Due datedue_datedate
A new due date for the invoice.
Invoice numberinvoice_numbertext
A new invoice number.
Referencereferencetext
A new reference for the invoice.
Source document URLurltext
A link Xero shows on the invoice.
Mark as sentsent_to_contacttrue/false
Show the invoice as sent in Xero. Only an approved invoice can be marked sent.
Line items (replaces all lines)line_itemslist
A complete new list of lines. Every existing line whose LineItemID is missing from this list is deleted, so include the ones you want to keep.
Amounts include tax?line_amount_typestext
Whether the line amounts include tax.One of: Exclusive (Amounts exclude tax), Inclusive (Amounts include tax), NoTax (No tax).

Outputs

AmountCreditednumber
AmountDuenumber
AmountPaidnumber
BrandingThemeIDtext
CISDeductionnumber
Contactobject
CreditNoteslist
CurrencyCodetext
CurrencyRatenumber
Datetext
DateStringtext
DueDatetext
DueDateStringtext
EnteredTotalnumber
ExpectedPaymentDatetext
FullyPaidOnDatetext
HasAttachmentstrue/false
InvoiceIDtext
InvoiceNumbertext
LineAmountTypestext
LineItemslist
Overpaymentslist
Paymentslist
PlannedPaymentDatetext
Prepaymentslist
Referencetext
RepeatingInvoiceIDtext
RoundingAmountnumber
SalesTaxCalculationTypeCodetext
SentToContacttrue/false
Statustext
StatusAttributeStringtext
SubTotalnumber
Totalnumber
TotalDiscountnumber
TotalTaxnumber
Typetext
UpdatedDateUTCtext
UpdatedDateUTCStringtext
Urltext
Warningslist
amount_due_displaytext
Beta. What is still owed, written out the same way, such as £300.00.
contact_nametext
Beta. The name of the customer or supplier the invoice is made out to, such as Acme Ltd.
date_displaytext
Beta. The invoice date as a person reads it, such as Nov 12, 2026.
due_date_displaytext
Beta. The due date as a person reads it, such as Dec 12, 2026. Empty when the invoice has none.
invoice_linktext
Beta. The link that opens the invoice or bill in Xero, for someone signed in to this organization.
total_displaytext
Beta. The total written out with the invoice's currency for a message, such as £300.00 or $1,240.50.
Example output
{
  "AmountDue": 300.0,
  "AmountPaid": 0.0,
  "Contact": {
    "ContactID": "e0e0e0e0-1111-2222-3333-444455556666",
    "Name": "Acme Ltd"
  },
  "CurrencyCode": "GBP",
  "Date": "2026-09-01T00:00:00Z",
  "DueDate": "2026-09-30T00:00:00Z",
  "InvoiceID": "aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "InvoiceNumber": "INV-0042",
  "LineAmountTypes": "Exclusive",
  "LineItems": [
    {
      "AccountCode": "200",
      "Description": "Onsite project management",
      "LineAmount": 250.0,
      "LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38",
      "Quantity": 2,
      "TaxAmount": 50.0,
      "TaxType": "OUTPUT2",
      "UnitAmount": 125.0
    }
  ],
  "Reference": "PO-91422",
  "Status": "DRAFT",
  "SubTotal": 250.0,
  "Total": 300.0,
  "TotalTax": 50.0,
  "Type": "ACCREC",
  "UpdatedDateUTC": "2026-09-01T10:15:00.000Z",
  "amount_due_display": "\u00a3300.00",
  "contact_name": "Acme Ltd",
  "date_display": "Sep 1, 2026",
  "due_date_display": "Sep 30, 2026",
  "invoice_link": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=aaaa1111-bbbb-2222-cccc-3333dddd4444",
  "total_display": "\u00a3300.00"
}

On this page