# Xero

> Manage a Xero organisation's contacts, invoices, bills, quotes, credit notes and items, and read its chart of accounts and tax rates.

App · Accounting & Finance · 20 actions. Web page: https://docs.lodol.com/docs/integrations/xero

## Actions

### 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 ID (`contact_id`, text, required): The Xero ContactID of the contact.
- Status (`status`, text): 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**

- `AccountNumber` (text)
- `AccountsPayableTaxType` (text)
- `AccountsReceivableTaxType` (text)
- `Addresses` (list)
- `Balances` (object)
- `BankAccountDetails` (text)
- `BatchPayments` (object)
- `BrandingTheme` (object)
- `CompanyNumber` (text)
- `ContactGroups` (list)
- `ContactID` (text)
- `ContactNumber` (text)
- `ContactPersons` (list)
- `ContactStatus` (text)
- `DefaultCurrency` (text)
- `Discount` (number)
- `EmailAddress` (text)
- `FirstName` (text)
- `HasAttachments` (true/false)
- `IsCustomer` (true/false)
- `IsSupplier` (true/false)
- `LastName` (text)
- `MergedToContactID` (text)
- `Name` (text)
- `PaymentTerms` (object)
- `Phones` (list)
- `PurchasesDefaultAccountCode` (text)
- `PurchasesDefaultLineAmountType` (text)
- `PurchasesTrackingCategories` (list)
- `SalesDefaultAccountCode` (text)
- `SalesDefaultLineAmountType` (text)
- `SalesTrackingCategories` (list)
- `TaxNumber` (text)
- `TaxNumberType` (text)
- `TrackingCategoryName` (text)
- `TrackingOptionName` (text)
- `UpdatedDateUTC` (text)
- `Website` (text)
- `XeroNetworkKey` (text)

**Example output**

```json
{
  "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**

- Name (`name`, text, required): The contact or organisation name. Must be unique in Xero, and cannot contain angle brackets or repeated spaces.
- Email (`email`, text): The contact's primary email address.
- First name (`first_name`, text): The main contact person's first name.
- Last name (`last_name`, text): The main contact person's last name.
- Phone number (`phone`, text): A phone number for the contact.
- Phone type (`phone_type`, text): Which of Xero's four phone slots the number goes in. One of: `DEFAULT` (Main), `MOBILE`, `DDI` (Direct dial), `FAX`. Default: `DEFAULT`.
- Contact code (`contact_number`, text): Your own identifier for this contact, shown as Contact Code in Xero. 'Get a contact' accepts it in place of the id.
- Account number (`account_number`, text): A user-defined account number for the contact.
- Tax number (`tax_number`, text): The contact's tax number: ABN, GST number, VAT number or tax ID depending on your Xero region.
- Company number (`company_number`, text): The contact's company registration number.
- Default currency (`default_currency`, text): ISO currency code used when invoicing this contact, e.g. GBP.
- Address line 1 (`address_line1`, text): First line of the contact's address.
- Address line 2 (`address_line2`, text): Second line of the contact's address.
- City (`city`, text): City or town.
- Region (`region`, text): State, province or region.
- Postal code (`postal_code`, text): Postcode or ZIP code.
- Country (`country`, text): Country name (letters only, as Xero requires).
- Address type (`address_type`, text): 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**

- `AccountNumber` (text)
- `AccountsPayableTaxType` (text)
- `AccountsReceivableTaxType` (text)
- `Addresses` (list)
- `Balances` (object)
- `BankAccountDetails` (text)
- `BatchPayments` (object)
- `BrandingTheme` (object)
- `CompanyNumber` (text)
- `ContactGroups` (list)
- `ContactID` (text)
- `ContactNumber` (text)
- `ContactPersons` (list)
- `ContactStatus` (text)
- `DefaultCurrency` (text)
- `Discount` (number)
- `EmailAddress` (text)
- `FirstName` (text)
- `HasAttachments` (true/false)
- `IsCustomer` (true/false)
- `IsSupplier` (true/false)
- `LastName` (text)
- `MergedToContactID` (text)
- `Name` (text)
- `PaymentTerms` (object)
- `Phones` (list)
- `PurchasesDefaultAccountCode` (text)
- `PurchasesDefaultLineAmountType` (text)
- `PurchasesTrackingCategories` (list)
- `SalesDefaultAccountCode` (text)
- `SalesDefaultLineAmountType` (text)
- `SalesTrackingCategories` (list)
- `TaxNumber` (text)
- `TaxNumberType` (text)
- `TrackingCategoryName` (text)
- `TrackingOptionName` (text)
- `UpdatedDateUTC` (text)
- `Website` (text)
- `XeroNetworkKey` (text)

**Example output**

```json
{
  "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 ID (`contact_id`, text): The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
- Contact name (`contact_name`, text): 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.
- Type (`credit_note_type`, text): 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`.
- Status (`status`, text): The status to create the credit note in. One of: `DRAFT`, `SUBMITTED` (Awaiting approval), `AUTHORISED` (Approved). Default: `DRAFT`.
- Line description (`description`, text): What the line is for. Required unless an item code is given.
- Quantity (`quantity`, number): How many units. Defaults to 1. At least 0. Default: `1`.
- Unit amount (`unit_amount`, number): The price per unit, before tax.
- Account (`account_code`, text): The account this line posts to. Optional on a draft, required before it can be approved.
- Item code (`item_code`, text): A saved item's code, which fills the line's description, price and account from the item.
- Tax rate (`tax_type`, text): Overrides the tax rate the account would otherwise apply.
- Line items (advanced) (`line_items`, list): 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_types`, text): 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 date (`date`, date): The date the credit note is issued. Defaults to today.
- Credit note number (`credit_note_number`, text): Your own number. Left blank, Xero generates one.
- Reference (`reference`, text): An additional reference. Customer credit notes only.
- Currency (`currency_code`, text): ISO currency code. Defaults to the organisation's base currency.

**Outputs**

- `Allocations` (list)
- `BrandingThemeID` (text)
- `CISDeduction` (number)
- `Contact` (object)
- `CreditNoteID` (text)
- `CreditNoteNumber` (text)
- `CurrencyCode` (text)
- `CurrencyRate` (number)
- `Date` (text)
- `DateString` (text)
- `FullyPaidOnDate` (text)
- `HasAttachments` (true/false)
- `LineAmountTypes` (text)
- `LineItems` (list)
- `Reference` (text)
- `RemainingCredit` (number)
- `SentToContact` (true/false)
- `Status` (text)
- `StatusAttributeString` (text)
- `SubTotal` (number)
- `Total` (number)
- `TotalTax` (number)
- `Type` (text)
- `UpdatedDateUTC` (text)
- `UpdatedDateUTCString` (text)

**Example output**

```json
{
  "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 quote

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

**Inputs**

- Contact ID (`contact_id`, text): The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
- Contact name (`contact_name`, text): 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.
- Status (`status`, text): Save the quote as a draft, or mark it as sent. One of: `DRAFT`, `SENT`. Default: `DRAFT`.
- Line description (`description`, text): What the line is for. Required unless an item code is given.
- Quantity (`quantity`, number): How many units. Defaults to 1. At least 0. Default: `1`.
- Unit amount (`unit_amount`, number): The price per unit, before tax.
- Account (`account_code`, text): The account this line posts to. Optional on a draft, required before it can be approved.
- Item code (`item_code`, text): A saved item's code, which fills the line's description, price and account from the item.
- Tax rate (`tax_type`, text): Overrides the tax rate the account would otherwise apply.
- Discount % (`discount_rate`, number): A percentage discount on this line, 0-100. From 0.0 to 100.0.
- Line items (advanced) (`line_items`, list): 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_types`, text): Whether the amounts above include tax. Defaults to excluding it. One of: `Exclusive` (Amounts exclude tax), `Inclusive` (Amounts include tax), `NoTax` (No tax).
- Quote date (`date`, date): The date the quote is issued. Xero requires one; today's date is used when this is left blank.
- Expiry date (`expiry_date`, date): The date the quote stops being valid.
- Quote number (`quote_number`, text): Your own quote number. Left blank, Xero generates one.
- Reference (`reference`, text): An additional reference for the quote.
- Title (`title`, text): A title shown on the quote, max 100 characters.
- Summary (`summary`, text): A summary shown on the quote, max 3000 characters.
- Terms (`terms`, text): The quote's terms, max 4000 characters.
- Currency (`currency_code`, text): ISO currency code. Defaults to the organisation's base currency.

**Outputs**

- `BrandingThemeID` (text)
- `Contact` (object)
- `CurrencyCode` (text)
- `CurrencyRate` (number)
- `Date` (text)
- `DateString` (text)
- `ExpiryDate` (text)
- `ExpiryDateString` (text)
- `LineAmountTypes` (text)
- `LineItems` (list)
- `QuoteID` (text)
- `QuoteNumber` (text)
- `Reference` (text)
- `Status` (text)
- `StatusAttributeString` (text)
- `SubTotal` (number)
- `Summary` (text)
- `Terms` (text)
- `Title` (text)
- `Total` (number)
- `TotalDiscount` (number)
- `TotalTax` (number)
- `UpdatedDateUTC` (text)

**Example output**

```json
{
  "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.

**Inputs**

- Contact ID (`contact_id`, text): The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
- Contact name (`contact_name`, text): 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.
- Type (`invoice_type`, text): 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`.
- Status (`status`, text): The status to create the invoice in. One of: `DRAFT`, `SUBMITTED` (Awaiting approval), `AUTHORISED` (Approved and awaiting payment). Default: `DRAFT`.
- Line description (`description`, text): What the line is for. Required unless an item code is given.
- Quantity (`quantity`, number): How many units. Defaults to 1. At least 0. Default: `1`.
- Unit amount (`unit_amount`, number): The price per unit, before tax.
- Account (`account_code`, text): The account this line posts to. Optional on a draft, required before it can be approved.
- Item code (`item_code`, text): A saved item's code, which fills the line's description, price and account from the item.
- Tax rate (`tax_type`, text): Overrides the tax rate the account would otherwise apply.
- Discount % (`discount_rate`, number): A percentage discount on this line, 0-100. From 0.0 to 100.0.
- Line items (advanced) (`line_items`, list): 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_types`, text): Whether the amounts above include tax. Defaults to excluding it. One of: `Exclusive` (Amounts exclude tax), `Inclusive` (Amounts include tax), `NoTax` (No tax).
- Invoice date (`date`, date): The date the invoice is issued. Defaults to today.
- Due date (`due_date`, date): The date payment is due.
- Invoice number (`invoice_number`, text): Your own invoice number. Left blank, Xero generates the next one from your invoice settings.
- Reference (`reference`, text): An additional reference shown on the invoice.
- Currency (`currency_code`, text): ISO currency code, e.g. GBP. Defaults to the organisation's base currency.
- Source document URL (`url`, text): A link Xero shows on the invoice, back to whatever raised it.

**Outputs**

- `AmountCredited` (number)
- `AmountDue` (number)
- `AmountPaid` (number)
- `BrandingThemeID` (text)
- `CISDeduction` (number)
- `Contact` (object)
- `CreditNotes` (list)
- `CurrencyCode` (text)
- `CurrencyRate` (number)
- `Date` (text)
- `DateString` (text)
- `DueDate` (text)
- `DueDateString` (text)
- `EnteredTotal` (number)
- `ExpectedPaymentDate` (text)
- `FullyPaidOnDate` (text)
- `HasAttachments` (true/false)
- `InvoiceID` (text)
- `InvoiceNumber` (text)
- `LineAmountTypes` (text)
- `LineItems` (list)
- `Overpayments` (list)
- `Payments` (list)
- `PlannedPaymentDate` (text)
- `Prepayments` (list)
- `Reference` (text)
- `RepeatingInvoiceID` (text)
- `RoundingAmount` (number)
- `SalesTaxCalculationTypeCode` (text)
- `SentToContact` (true/false)
- `Status` (text)
- `StatusAttributeString` (text)
- `SubTotal` (number)
- `Total` (number)
- `TotalDiscount` (number)
- `TotalTax` (number)
- `Type` (text)
- `UpdatedDateUTC` (text)
- `UpdatedDateUTCString` (text)
- `Url` (text)
- `Warnings` (list)

**Example output**

```json
{
  "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"
}
```

### 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 code (`code`, text, required): Your code for the item. Must be unique, max 30 characters.
- Name (`name`, text): The item's name, max 50 characters.
- Sales description (`description`, text): The description used when the item is sold.
- Purchase description (`purchase_description`, text): The description used when the item is bought.
- Sale price (`sales_unit_price`, number): What the item sells for, per unit. At least 0.
- Sales account (`sales_account_code`, text): The account a sale of this item posts to.
- Sales tax rate (`sales_tax_type`, text): The tax rate applied when the item is sold.
- Purchase price (`purchase_unit_price`, number): What the item costs to buy, per unit. At least 0.
- Purchase account (`purchase_account_code`, text): The account a purchase of this item posts to.
- Purchase tax rate (`purchase_tax_type`, text): The tax rate applied when the item is bought.
- Available on sales (`is_sold`, true/false): Whether the item can be used on sales invoices. Default: `true`.
- Available on purchases (`is_purchased`, true/false): Whether the item can be used on bills. Default: `true`.

**Outputs**

- `Code` (text)
- `Description` (text)
- `InventoryAssetAccountCode` (text)
- `IsPurchased` (true/false)
- `IsSold` (true/false)
- `IsTrackedAsInventory` (true/false)
- `ItemID` (text)
- `Name` (text)
- `PurchaseDescription` (text)
- `PurchaseDetails` (object)
- `QuantityAvailable` (number)
- `QuantityOnBackOrder` (number)
- `QuantityOnHand` (number)
- `SalesDetails` (object)
- `TotalCostPool` (number)
- `UpdatedDateUTC` (text)

**Example output**

```json
{
  "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 an item

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

**Inputs**

- Item ID or code (`item_id`, text, required): The Xero ItemID, or the item's code.

**Outputs**

- `deleted` (true/false)
- `item_id` (text)

**Example output**

```json
{
  "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 number (`invoice_id`, text, required): The Xero InvoiceID, or the invoice number.
- Delete or void (`status`, text): 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**

- `AmountCredited` (number)
- `AmountDue` (number)
- `AmountPaid` (number)
- `BrandingThemeID` (text)
- `CISDeduction` (number)
- `Contact` (object)
- `CreditNotes` (list)
- `CurrencyCode` (text)
- `CurrencyRate` (number)
- `Date` (text)
- `DateString` (text)
- `DueDate` (text)
- `DueDateString` (text)
- `EnteredTotal` (number)
- `ExpectedPaymentDate` (text)
- `FullyPaidOnDate` (text)
- `HasAttachments` (true/false)
- `InvoiceID` (text)
- `InvoiceNumber` (text)
- `LineAmountTypes` (text)
- `LineItems` (list)
- `Overpayments` (list)
- `Payments` (list)
- `PlannedPaymentDate` (text)
- `Prepayments` (list)
- `Reference` (text)
- `RepeatingInvoiceID` (text)
- `RoundingAmount` (number)
- `SalesTaxCalculationTypeCode` (text)
- `SentToContact` (true/false)
- `Status` (text)
- `StatusAttributeString` (text)
- `SubTotal` (number)
- `Total` (number)
- `TotalDiscount` (number)
- `TotalTax` (number)
- `Type` (text)
- `UpdatedDateUTC` (text)
- `UpdatedDateUTCString` (text)
- `Url` (text)
- `Warnings` (list)

**Example output**

```json
{
  "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"
}
```

### Get a contact

Read one contact in full, including its addresses, contact people and outstanding balances.

**Inputs**

- Contact ID or code (`contact_id`, text, required): The Xero ContactID, or the contact code you set on it.

**Outputs**

- `AccountNumber` (text)
- `AccountsPayableTaxType` (text)
- `AccountsReceivableTaxType` (text)
- `Addresses` (list)
- `Balances` (object)
- `BankAccountDetails` (text)
- `BatchPayments` (object)
- `BrandingTheme` (object)
- `CompanyNumber` (text)
- `ContactGroups` (list)
- `ContactID` (text)
- `ContactNumber` (text)
- `ContactPersons` (list)
- `ContactStatus` (text)
- `DefaultCurrency` (text)
- `Discount` (number)
- `EmailAddress` (text)
- `FirstName` (text)
- `HasAttachments` (true/false)
- `IsCustomer` (true/false)
- `IsSupplier` (true/false)
- `LastName` (text)
- `MergedToContactID` (text)
- `Name` (text)
- `PaymentTerms` (object)
- `Phones` (list)
- `PurchasesDefaultAccountCode` (text)
- `PurchasesDefaultLineAmountType` (text)
- `PurchasesTrackingCategories` (list)
- `SalesDefaultAccountCode` (text)
- `SalesDefaultLineAmountType` (text)
- `SalesTrackingCategories` (list)
- `TaxNumber` (text)
- `TaxNumberType` (text)
- `TrackingCategoryName` (text)
- `TrackingOptionName` (text)
- `UpdatedDateUTC` (text)
- `Website` (text)
- `XeroNetworkKey` (text)

**Example output**

```json
{
  "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 an invoice

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

**Inputs**

- Invoice ID or number (`invoice_id`, text, required): The Xero InvoiceID, or the invoice number e.g. INV-0042.

**Outputs**

- `AmountCredited` (number)
- `AmountDue` (number)
- `AmountPaid` (number)
- `BrandingThemeID` (text)
- `CISDeduction` (number)
- `Contact` (object)
- `CreditNotes` (list)
- `CurrencyCode` (text)
- `CurrencyRate` (number)
- `Date` (text)
- `DateString` (text)
- `DueDate` (text)
- `DueDateString` (text)
- `EnteredTotal` (number)
- `ExpectedPaymentDate` (text)
- `FullyPaidOnDate` (text)
- `HasAttachments` (true/false)
- `InvoiceID` (text)
- `InvoiceNumber` (text)
- `LineAmountTypes` (text)
- `LineItems` (list)
- `Overpayments` (list)
- `Payments` (list)
- `PlannedPaymentDate` (text)
- `Prepayments` (list)
- `Reference` (text)
- `RepeatingInvoiceID` (text)
- `RoundingAmount` (number)
- `SalesTaxCalculationTypeCode` (text)
- `SentToContact` (true/false)
- `Status` (text)
- `StatusAttributeString` (text)
- `SubTotal` (number)
- `Total` (number)
- `TotalDiscount` (number)
- `TotalTax` (number)
- `Type` (text)
- `UpdatedDateUTC` (text)
- `UpdatedDateUTCString` (text)
- `Url` (text)
- `Warnings` (list)

**Example output**

```json
{
  "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"
}
```

### Get the organisation

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

**Inputs**: None.

**Outputs**

- `APIKey` (text)
- `Addresses` (list)
- `BaseCurrency` (text)
- `Class` (text)
- `CountryCode` (text)
- `CreatedDateUTC` (text)
- `DefaultPurchasesTax` (text)
- `DefaultSalesTax` (text)
- `Edition` (text)
- `EmployerIdentificationNumber` (text)
- `EndOfYearLockDate` (text)
- `FinancialYearEndDay` (number)
- `FinancialYearEndMonth` (number)
- `IsDemoCompany` (true/false)
- `LegalName` (text)
- `LineOfBusiness` (text)
- `Name` (text)
- `OrganisationEntityType` (text)
- `OrganisationID` (text)
- `OrganisationStatus` (text)
- `OrganisationType` (text)
- `PaysTax` (true/false)
- `PeriodLockDate` (text)
- `Phones` (list)
- `RegistrationNumber` (text)
- `SalesTaxBasis` (text)
- `SalesTaxPeriod` (text)
- `ShortCode` (text)
- `TaxNumber` (text)
- `Timezone` (text)
- `Version` (text)

**Example output**

```json
{
  "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 organisation's chart of accounts. Use it to find the account code a line item should post to.

**Inputs**

- Account type (`account_type`, text): 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.
- Status (`status`, text): Only return accounts in this status. One of: `ACTIVE`, `ARCHIVED`.
- Limit (`limit`, number): How many records to return. Xero sends them all in one response, so this trims the result. From 1 to 1000. Default: `100`.
- Changed since (`modified_since`, date and time): Only return records created or changed after this moment.

**Outputs**

- `accounts` (list)
- `count` (number)
- `total_count` (number)

**Example output**

```json
{
  "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**

- Search (`search_term`, text): Case-insensitive search across name, first and last name, contact number, company number and email.
- Contact IDs (`contact_ids`, list): Return only these contacts, by their Xero ids.
- Include archived (`include_archived`, true/false): Also return contacts that have been archived. Default: `false`.
- Summary only (`summary_only`, true/false): Return a lighter, faster record without addresses, balances, contact groups or contact people. Default: `false`.
- Sort by (`order`, text): 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).
- Page (`page`, number): Which page of results to return. Starts at 1. At least 1. Default: `1`.
- Page size (`page_size`, number): How many results per page (1-1000). Defaults to 100. From 1 to 1000. Default: `100`.
- Changed since (`modified_since`, date and time): Only return records created or changed after this moment.

**Outputs**

- `contacts` (list)
- `count` (number)
- `has_more` (true/false)
- `item_count` (number)
- `page` (number)
- `page_count` (number)
- `page_size` (number)

**Example output**

```json
{
  "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 organisation's credit notes, newest change first. Every result carries its line items and allocations.

**Inputs**

- Sort by (`order`, text): How to order the results. One of: `UpdatedDateUTC DESC` (Recently updated first), `UpdatedDateUTC ASC` (Least recently updated first).
- Page (`page`, number): Which page of results to return. Starts at 1. At least 1. Default: `1`.
- Page size (`page_size`, number): How many results per page (1-1000). Defaults to 100. From 1 to 1000. Default: `100`.
- Changed since (`modified_since`, date and time): Only return records created or changed after this moment.

**Outputs**

- `count` (number)
- `credit_notes` (list)
- `has_more` (true/false)
- `item_count` (number)
- `page` (number)
- `page_count` (number)
- `page_size` (number)

**Example output**

```json
{
  "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 invoices

Find invoices and bills by status, contact, invoice number or reference. Every result carries its line items.

**Inputs**

- Statuses (`statuses`, list): Only return invoices in these statuses. One or more of: `DRAFT`, `SUBMITTED` (Awaiting approval), `AUTHORISED` (Approved and awaiting payment), `PAID`, `VOIDED`, `DELETED`.
- Contact IDs (`contact_ids`, list): Only return invoices for these contacts.
- Invoice numbers (`invoice_numbers`, list): Only return invoices with these exact numbers.
- Search (`search_term`, text): Case-insensitive search across invoice number and reference.
- Only ones created here (`created_by_my_app`, true/false): Only return invoices this Xero connection created. Default: `false`.
- Sort by (`order`, text): 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).
- Page (`page`, number): Which page of results to return. Starts at 1. At least 1. Default: `1`.
- Page size (`page_size`, number): How many results per page (1-1000). Defaults to 100. From 1 to 1000. Default: `100`.
- Changed since (`modified_since`, date and time): Only return records created or changed after this moment.

**Outputs**

- `count` (number)
- `has_more` (true/false)
- `invoices` (list)
- `item_count` (number)
- `page` (number)
- `page_count` (number)
- `page_size` (number)

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "invoices": [
    {
      "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"
    }
  ],
  "item_count": 1,
  "page": 1,
  "page_count": 1,
  "page_size": 100
}
```

### List items

List the organisation's saved products and services.

**Inputs**

- Limit (`limit`, number): How many records to return. Xero sends them all in one response, so this trims the result. From 1 to 1000. Default: `100`.
- Changed since (`modified_since`, date and time): Only return records created or changed after this moment.

**Outputs**

- `count` (number)
- `items` (list)
- `total_count` (number)

**Example output**

```json
{
  "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 quotes

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

**Inputs**

- Status (`status`, text): Only return quotes in this status. One of: `DRAFT`, `SENT`, `ACCEPTED`, `DECLINED`, `INVOICED`, `DELETED`.
- Contact ID (`contact_id`, text): Only return quotes for this contact.
- Quote number (`quote_number`, text): Matches any part of the quote number, so 'QU-01' finds QU-0100 as well as QU-0101.
- Dated from (`date_from`, date): Only return quotes issued on or after this date.
- Dated to (`date_to`, date): Only return quotes issued on or before this date.
- Sort by (`order`, text): How to order the results. One of: `UpdatedDateUTC DESC` (Recently updated first), `UpdatedDateUTC ASC` (Least recently updated first).
- Page (`page`, number): Which page of results to return. Starts at 1. At least 1. Default: `1`.
- Page size (`page_size`, number): How many results per page (1-1000). Defaults to 100. From 1 to 1000. Default: `100`.
- Changed since (`modified_since`, date and time): Only return records created or changed after this moment.

**Outputs**

- `count` (number)
- `has_more` (true/false)
- `item_count` (number)
- `page` (number)
- `page_count` (number)
- `page_size` (number)
- `quotes` (list)

**Example output**

```json
{
  "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 organisation's tax rates and the tax type codes line items use to override the default rate.

**Inputs**

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

**Outputs**

- `count` (number)
- `tax_rates` (list)
- `total_count` (number)

**Example output**

```json
{
  "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
}
```

### Update a contact

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

**Inputs**

- Contact ID (`contact_id`, text, required): The Xero ContactID of the contact to change.
- Name (`name`, text): A new name for the contact.
- Email (`email`, text): The contact's primary email address.
- First name (`first_name`, text): The main contact person's first name.
- Last name (`last_name`, text): The main contact person's last name.
- Phone number (`phone`, text): A phone number for the contact.
- Phone type (`phone_type`, text): Which of Xero's four phone slots the number goes in. One of: `DEFAULT` (Main), `MOBILE`, `DDI` (Direct dial), `FAX`. Default: `DEFAULT`.
- Contact code (`contact_number`, text): Your own identifier for this contact, shown as Contact Code in Xero. 'Get a contact' accepts it in place of the id.
- Account number (`account_number`, text): A user-defined account number for the contact.
- Tax number (`tax_number`, text): The contact's tax number: ABN, GST number, VAT number or tax ID depending on your Xero region.
- Company number (`company_number`, text): The contact's company registration number.
- Default currency (`default_currency`, text): ISO currency code used when invoicing this contact, e.g. GBP.
- Address line 1 (`address_line1`, text): First line of the contact's address.
- Address line 2 (`address_line2`, text): Second line of the contact's address.
- City (`city`, text): City or town.
- Region (`region`, text): State, province or region.
- Postal code (`postal_code`, text): Postcode or ZIP code.
- Country (`country`, text): Country name (letters only, as Xero requires).
- Address type (`address_type`, text): 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**

- `AccountNumber` (text)
- `AccountsPayableTaxType` (text)
- `AccountsReceivableTaxType` (text)
- `Addresses` (list)
- `Balances` (object)
- `BankAccountDetails` (text)
- `BatchPayments` (object)
- `BrandingTheme` (object)
- `CompanyNumber` (text)
- `ContactGroups` (list)
- `ContactID` (text)
- `ContactNumber` (text)
- `ContactPersons` (list)
- `ContactStatus` (text)
- `DefaultCurrency` (text)
- `Discount` (number)
- `EmailAddress` (text)
- `FirstName` (text)
- `HasAttachments` (true/false)
- `IsCustomer` (true/false)
- `IsSupplier` (true/false)
- `LastName` (text)
- `MergedToContactID` (text)
- `Name` (text)
- `PaymentTerms` (object)
- `Phones` (list)
- `PurchasesDefaultAccountCode` (text)
- `PurchasesDefaultLineAmountType` (text)
- `PurchasesTrackingCategories` (list)
- `SalesDefaultAccountCode` (text)
- `SalesDefaultLineAmountType` (text)
- `SalesTrackingCategories` (list)
- `TaxNumber` (text)
- `TaxNumberType` (text)
- `TrackingCategoryName` (text)
- `TrackingOptionName` (text)
- `UpdatedDateUTC` (text)
- `Website` (text)
- `XeroNetworkKey` (text)

**Example output**

```json
{
  "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 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 ID (`invoice_id`, text, required): The Xero InvoiceID of the invoice to change.
- Status (`status`, text): 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 ID (`contact_id`, text): The Xero ContactID to raise this against. Get one from 'Create a contact' or 'List contacts'.
- Contact name (`contact_name`, text): 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 date (`date`, date): A new issue date for the invoice.
- Due date (`due_date`, date): A new due date for the invoice.
- Invoice number (`invoice_number`, text): A new invoice number.
- Reference (`reference`, text): A new reference for the invoice.
- Source document URL (`url`, text): A link Xero shows on the invoice.
- Mark as sent (`sent_to_contact`, true/false): Show the invoice as sent in Xero. Only an approved invoice can be marked sent.
- Line items (replaces all lines) (`line_items`, list): 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_types`, text): Whether the line amounts include tax. One of: `Exclusive` (Amounts exclude tax), `Inclusive` (Amounts include tax), `NoTax` (No tax).

**Outputs**

- `AmountCredited` (number)
- `AmountDue` (number)
- `AmountPaid` (number)
- `BrandingThemeID` (text)
- `CISDeduction` (number)
- `Contact` (object)
- `CreditNotes` (list)
- `CurrencyCode` (text)
- `CurrencyRate` (number)
- `Date` (text)
- `DateString` (text)
- `DueDate` (text)
- `DueDateString` (text)
- `EnteredTotal` (number)
- `ExpectedPaymentDate` (text)
- `FullyPaidOnDate` (text)
- `HasAttachments` (true/false)
- `InvoiceID` (text)
- `InvoiceNumber` (text)
- `LineAmountTypes` (text)
- `LineItems` (list)
- `Overpayments` (list)
- `Payments` (list)
- `PlannedPaymentDate` (text)
- `Prepayments` (list)
- `Reference` (text)
- `RepeatingInvoiceID` (text)
- `RoundingAmount` (number)
- `SalesTaxCalculationTypeCode` (text)
- `SentToContact` (true/false)
- `Status` (text)
- `StatusAttributeString` (text)
- `SubTotal` (number)
- `Total` (number)
- `TotalDiscount` (number)
- `TotalTax` (number)
- `Type` (text)
- `UpdatedDateUTC` (text)
- `UpdatedDateUTCString` (text)
- `Url` (text)
- `Warnings` (list)

**Example output**

```json
{
  "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"
}
```
