
Xero is an online accounting platform that helps businesses manage their finances, including invoicing, expense tracking, payroll, and reporting.
By integrating Xero with Wiresk, users can automate key workflows like monitoring new or updated invoices, retrieving records, and managing contacts or transactions.
This allows businesses to pull data directly from Xero into Wiresk’s interface, facilitating easier management of financial records
Explore the available functionalities through the Xero API documentation.
1 – Connect Xero to Wiresk Copy Link
A connection to your Xero account is needed so we can sync it with our platform.
There are two ways to connect your app to Wiresk:
▪️ In “My apps” section, where you can manage your connections (select or create your group first to get access to this section, refer to the Group system ).
▪️ While building your Flow, you can easily establish a connection to your app directly within the Flow builder. This can be done during the setup of either a Trigger or a Method.
In this documentation, we will explain how to create a connection in “My apps” section, it is essentially the same as when creating it on-the-go.
Add Xero app in Wiresk Copy Link
- On the left panel of Wiresk user interface, go to “My apps” and click on the (+) button.
- Search “Xero” in the search field or scroll down the list of apps and choose the Xero icon.

▪️ the Standard OAuth connection, it is recommended for less technical users but offer the same features as the Advanced connection (multi-tenant, Access Token refreshed automatically, etc…).
For multi-organisation account, you can choose the specific organisation (“Tenant”) for each Method and Trigger. When you use standard OAuth connection and don’t explicitly select an organization, the first one you authorized will be used by default (you can authorize multi-organisation in one connection. Refer to the standard Oauth connection below).
▪️ the Advanced OAuth connection, it requires creating a app in your Xero developer Portal, to get the Client ID and secret for Wiresk’s connection.
Connect Xero via Standard OAuth connection Copy Link
- On the prompted screen, give a name to your connection, e.g., “Xero Connection”.
- Select XERO tab connection.
- Select the checkbox Xero (Select permissions for the authorization).
- Verify the list of scopes needed for Xero:
- Manage Invoices.
- Manage Payments.
- Manage Contacts.
- Manage Manual Journals.
- Manage Notes of Record.
- Manage Attachments.
- Manage Reports.
- Create, Read, Update, Delete on any Modules.

- Select the “Authorize” button. You will be redirected to Xero connection page.

- Log in to your Xero Account.
- On the new screen, select your organization and give access to Wiresk App by selecting “Continue”.

- You are redirected to Wiresk to complete your connection.
- The new “Email” field reflects the email address registered in your Xero account.

- Now select the “Save” button. Voila! Your Xero app OAuth connection is ready. You can now use it to build your Flows.
1 – Create and save your initial OAuth connection.
2 – Select that connection and click “Authorize.”
3 – Choose the additional organization to authorize.
4 – Save, and repeat steps 2-4 for each organization.
Connect Xero via an Advanced Connection Copy Link
▪️ You must create a custom app in your Xero developer Portal.
▪️ Retrieve your Client ID and Client Secret.
Create an App in Xero Developer Portal Copy Link
- Go to Xero Developer Portal > My Apps (log in to your Xero account if asked).
- Select “New app” button.

- Set a name for your App, here we’ll use “Wiresk app“.
- Select your Integration type, in our case we’ll set it to “Web app“.
- Enter the application URL : https://app.wiresk.com/
- Enter the Redirect URI : https://api.wiresk.com/api/auth/callback
- Agree to the Xero Developer Platform Terms & Conditions.
- Select “Create app” button.

Get The Client ID and Client Secret Copy Link
- On your newly created app management page, select Configuration tab
- Then, Select Generate a secret.

- Copy and save the Client ID and Client secret (The secret will only be shown once). Keep the Credentials for the Advance connection in Wiresk.
Create an app connection in Wiresk Copy Link
- Go to My apps tab > select ⊕ button > search Xero.
- On the connection screen, Select Oauth Advanced Connection.
- Enter your Xero Client ID and Secret from the previous step.
- Select Xero app permissions for authorization.
- Select the “Authorize” button and you will be redirected to Xero connection page.

- Log in to your Xero Account.
- On the new screen, select your organization and give access to Wiresk App by selecting “Continue”.

You are redirected to Wiresk. Your Client ID is now visible in the field ” Xero Client ID“.

- Select the “Save” button to complete your connection process.
Voila! Your Xero app OAuth Advanced connection is ready. You can now use it to build your Flows.
2 – Create your automated Flows with Xero Copy Link
Now that Xero is linked to Wiresk, you’re ready to start building Flows.
How to create a Flow ↓
- Select your Group, then on the Flow management screen click on “Create Flow”.

A – Select the Trigger
- Name the Flow that you want to create.
- Add your Trigger by clicking on the red plus (+) Add button.
- On the Trigger selection screen, search your app or select it from the list below the screen.

- Select your preferred Trigger on the next screen and customize its settings. For Xero Triggers, refer to the Trigger settings below.
As mentioned in “How to connect your app to Wiresk” above, during your Trigger settings, you can create a new connection to your apps at this stage.
B – Add an HTTP Trigger to your Flow
An HTTP Trigger allows you to manually activate your Flows.
- Click on the red plus button (+) again to add a Trigger for testing your Flow, then click on the button “HTTP Trigger”.

- Write a description and select your API key or create a new one.

- Click on save. Now you can use your HTTP Trigger to Manually run your Flow.
C – Add a Method to your Flow
The Method will perform a specific task on a particular app or service you’ve connected to Wiresk like get info or send emails.
You can add at least 1 or multiple Methods for complex Flows (a maximum of 255 Methods).
- On the Flow builder screen, click on the plus button (+) next to the Trigger icon.

- Search or scroll down to select your apps Methods, then configure it settings. For Xero Methods, see Methods list and settings in the step below.
D – Add Wiresk Tools to your Flow
If you want to build a complex Flow, Wiresk offers a selection of tools at your disposal. Refer to Wiresk’s Tools
To add Tools in your Flow, Follow the same step as adding the Methods. On the Flow builder screen, click on the plus button (+) then just click on the “Tool” tab and select the Tool that you want to add.
3 – Xero Triggers Copy Link
What will start your automation…
Recurrence rule or scheduler settings Copy Link
See Wiresk Scheduler – The Fundamentals.
Setting up the recurrence rule or scheduler of your Trigger (if the Trigger is not a Webhook):
- Regular intervals will monitor your Trigger by intervals in minute
- Daily recurrence will monitor your Trigger by day and hour
- Monthly recurrence will monitor your Trigger every month on a defined date and hour
- Yearly recurrence will monitor your Trigger on a specific date and hour every year
- Specific dates will start your Trigger on specific dates
Get Sample Copy Link
After setting up the Trigger parameters (refer to how to define your parameters in the steps below), click on “Get sample”.
The “Get sample” allows you to extract a subset of data for validation. The data will be used to MAP your Method parameters according to your Flow. Refer to FIELD MAPPING documentation.

Scheduled Triggers List and Settings Copy Link
These Triggers will start your Flow automatically at a specific time or intervals instead of being triggered real-time event (Webhooks).
Check Updated Invoices Copy Link
Configuration Table:
Name* | Check Updated Invoice |
Connection* | Select your connection or create one. |
Time out | You can additionally set the Trigger duration to limit the information processed per execution to optimize performance and resource usage. |
Recurrence rule/scheduler* | Set up your recurrence rule. |
Parameters | |
Include Previous Invoices | Selecting Yes retrieve all existing invoices. Choosing No shows only invoices created since the last time the flow was executed. |
Preview Data | In this tab, you can preview the retrieved data. In specific Trigger instances, data can only be previewed when it is available for retrieval. If no event occurs from the Trigger, a message “No data available”, or “Cannot read properties of null ” will be displayed. |
(*) required field
Before saving your Trigger, don’t forget to use “Get Sample”.
Check New Invoices Copy Link
Configuration Table:
Name* | Check New Invoice |
Connection* | Select your connection or create one. |
Time out | You can additionally set the Trigger duration to limit the information processed per execution to optimize performance and resource usage. |
Recurrence rule/scheduler* | Set up your recurrence rule. |
Parameters | |
Include Previous Invoices | Selecting Yes retrieve all existing invoices. Choosing No shows only invoices created since the last time the flow was executed. |
Preview Data | In this tab, you can preview the retrieved data. In specific Trigger instances, data can only be previewed when it is available for retrieval. If no event occurs from the Trigger, a message “No data available”, or “Cannot read properties of null ” will be displayed. |
(*) required field
Before saving your Trigger, don’t forget to use “Get Sample”.
Get All Records of an Entity Copy Link
Configuration Table:
Name* | Get All Records of an Entity |
Connection* | Select your connection or create one. |
Time out | You can additionally set the Trigger duration to limit the information processed per execution to optimize performance and resource usage. |
Recurrence rule/scheduler* | Set up your recurrence rule. |
Parameters | |
Entity* (Set of data that contain records) | Select the Entity to retrieve records from: Invoice, Account, Payment, Bank Transaction, Bank Transfer, Contact, Credit Note, Manual Journal, Quote, Item, Purchase Order, Contact Group, Employee, Report, Tax Rate, File, Folder, Asset Type, Asset, Tracking Category, Timesheet, Tenant, Setting. |
Page | Define the page number of retrieve records. |
Limit | Define the maximum of records per page. |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Preview Data | In this tab, you can preview the retrieved data. In specific Trigger instances, data can only be previewed when it is available for retrieval. If no event occurs from the Trigger, a message “No data available”, or “Cannot read properties of null ” will be displayed. |
(*) required field
Before saving your Trigger, don’t forget to use “Get Sample”.
Retrieve records using Wiresk’s Query Builder Copy Link
A Query Builder allows you to create complex SQL queries without having to write any code.
This allows non-technical users to easily access and analyze data with a graphical user interface.
See how to use Wiresk’s Query Builder.
✓ When This Trigger is running, the result of the Query can be use to Map your Methods.
Configuration Table:
Name* | Retrieve Records using Wiresk’s Query Builder |
Connection* | Select your connection or create one Refer to how to create a connection. |
Time out | You can additionally set the Trigger duration to limit the information processed per execution to optimize performance and resource usage. |
Recurrence rule/scheduler* | Set up your recurrence rule |
Parameters | |
Entity* (Set of data that contain records) | Select the Entity where the data records are located. Entities available: Invoice, Payment, Batch Payment, Account, Contact, Bank Transaction, Linked Transaction, Bank Transfer, Credit Note, Quote, Manual Journal, Item, Purchase Order, Contact Groups, Employee, Report, Tax Rate, Asset, Asset Type, Tracking Category, Folder, Tenant, Settings. |
Configure Filter | This tab enables you to define specific criteria to narrow down the records being retrieved. |
Configure Columns | Configure which columns or fields of data will be retrieved and included in the output. Preview Data: To visualize the records. You must select at least 1 Columns to get the Preview Dat. If you get this message:” Cannot convert undefined or null to object”, it means there is no records. Number of records:10 By default, 10 records will be shown. Begin at record:0 The display starts at record 0. Edit Columns Customize which columns are displayed and retrieved. Minimum 1 column, maximum 50 columns. Configure Sorting This option is for sorting the data in the columns by Ascending or descending order. |
(*) required field
Before saving your Trigger, don’t forget to use “Get Sample”.
4 – Xero Methods Copy Link
What your automation will do…

Methods List and Settings Copy Link
MANAGE RECORDS:
CREATE RECORDS Copy Link
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Create Records |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to create records: Invoice, Payment, Batch Payment, Contact, Bank Transaction, Bank Transfer, Credit Note, Quote, Manual Journal, Item, Purchase Order, Contact Groups, Employee, Asset, Asset Type, Tracking Category, Folder |
(*) required field
Configuration tables for each Entity:
Create Invoice Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Invoice API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the invoice creation. Additional fields: Tenant, Invoice Number, Reference, Date String, Date, Due Date String, Due Date, Status, Line Amount Types, Line Items, Url, Currency Code, Expected Payment Date, Planned Payment Date | |
Type* | Select the Invoice Type: Account receivable: A sales invoice – commonly known as an Accounts Receivable or customer invoice (ACCREC). Account Payable : A bill – commonly known as an Accounts Payable or supplier invoice (ACCPAY). |
Contact* | Name*: Full name of contact/organization. [+ Add Field] add more fields in Contact: Contact ID: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. Email Address: Email address of contact person. Bank Account Details: Bank account number. Addresses [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Address can be added as elements. Element 1: Represents the first address. _Address Type: If you do not specify an AddressType , Xero will treat the address as a STREET address by default. Possible values :POBOX : For PO Box addresses.STREET : For street addresses (default if no type is specified).DELIVERY : For delivery addresses._Address Line 1 [+ Add Field] add more Address Line. _City _Region _Postal Code _Country Phone [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Phone. _Phone Type: If you do not specify a PhoneType , Xero will treat the phone number as a DEFAULT phone number. Possible values :DEFAULT : The primary phone number (default if no type is specified).MOBILE : For mobile phone numbers.FAX : For fax numbers.DDI : For direct dial-in numbers._Phone Number _Phone Area Code _Phone Country Code |
Line Items* At least one is required to create a complete Invoice. | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. Description*: Description of the line item (max length = 4000). Unit Amount*: By default, unit amount will be rounded to two decimal places. Quantity*: Line item Quantity. [+ Add Field] add more fields in Line Items: Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. Tax Amount: The tax amount is auto calculated as a percentage of the line amount based on the tax rate. You can change this value if the tax calculation is incorrect. Line Amount: The line amount reflects the discounted price if a DiscountRate has been used i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100) (can’t exceed 9,999,999,999.99 ). Account Code: Customer defined alpha numeric account code e.g 200 or SALES. specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. Item Code: User defined item code. Discount Amount Discount Rate Percentage discount or discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Invoice Number (max length = 255) | If your Invoice Type is ACCREC – Enter a Unique alpha numeric code identifying invoice ( when missing will auto-generate from your Organisation Invoice Settings). If your Invoice Type is ACCPAY – Enter a non-unique alpha numeric code identifying invoice. This value will also display as Reference in the UI. |
Reference | ACCREC only – additional reference number (max length = 255) |
Date String | Use these fields if you are working with date strings that are not in the standard YYYY-MM-DD format.The DateString and DueDateString fields accept dates in a human-readable string format (e.g., "1 January 2023" or "01/01/2023" ).Xero will attempt to parse the string into a valid date. If both Date and DateString (or DueDate and DueDateString ) are provided, Xero will prioritize the Date and DueDate fields. |
Date | Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation. |
Due Date String | Use these fields if you are working with date strings that are not in the standard YYYY-MM-DD format.The Date String and Due Date String fields accept dates in a human-readable string format (e.g., "1 January 2023" or "01/01/2023" ).Xero will attempt to parse the string into a valid date. If both Date and Date String (or Due Date and Due Date String ) are provided, Xero will prioritize the Date and DueDate fields. |
Due Date | Date invoice is due – YYYY-MM-DD |
Status | Possible values : Draft – Submitted – Authorized For more details, refer to Invoice Status. |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Url | URL link to a source document – shown as “Go to [appName] ” in the Xero app. |
Currency code | The currency that invoice has been raised in (see List of Currencies). |
Expected Payment Date | Shown on sales invoices (Accounts Receivable) when this has been set. |
Planned Payment Date | Shown on bills (Accounts Payable) when this has been set. |
(*) required field
Example of a sales (ACCREC)
Invoice with every single element being specified:
{
"Invoices": [
{
"Type": "ACCREC",
"Contact": {
"ContactID": "eaa28f49-6028-4b6e-bb12-d8f6278073fc"
},
"DateString": "20025-09-08T00:00:00",
"DueDateString": "20025-10-20T00:00:00",
"ExpectedPaymentDate": "2009-10-20T00:00:00",
"InvoiceNumber": "OIT:01065",
"Reference": "Ref:SMITHK",
"BrandingThemeID": "3b148ee0-adfa-442c-a98b-9059a73e8ef5",
"Url": "http://www.accounting20.com",
"CurrencyCode": "NZD",
"Status": "SUBMITTED",
"LineAmountTypes": "Inclusive",
"SubTotal": "87.11",
"TotalTax": "10.89",
"Total": "98.00",
"LineItems": [
{
"ItemCode": "Test 01",
"Description": "3 copies of OS X 10.6 Snow Leopard",
"Quantity": "3.0000",
"UnitAmount": "59.00",
"TaxType": "OUTPUT",
"TaxAmount": "19.67",
"LineAmount": "177.00",
"AccountCode": "200",
"Tracking": [
{
"TrackingCategoryID": "e2f2f732-e92a-4f3a-9c4d-ee4da0182a13",
"Name": "Region",
"Option": "North"
}
]
},
{
"ItemCode": "Test 02",
"Description": "Returned Apple Keyboard with Numeric Keypad (faulty)",
"Quantity": "1.0000",
"UnitAmount": "-79.00",
"TaxType": "OUTPUT",
"TaxAmount": "-8.78",
"LineAmount": "-79.00",
"AccountCode": "200"
}
]
}
]
}
Create Payment Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Payment API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Payment creation. Additional fields: Tenant, Payment ID, Reference. | |
Invoice* | Invoice ID*: Unique Identifier of the invoice you are applying payment to. You can Look up the value by select Input > Lookup tab > Select Search button to display a list. |
Account* | Account ID*: Specify the unique identifier of the account from which the payment will be made, or Look up the value by select Input > Lookup tab > Select Search button to display a list. Ensure that this account is either a BANK account or has the ‘enable payments’ setting activated. ⚠️ Provide either Account ID or Code. [+ Add Field] add more fields Code*: Code of account you are using to make the payment e.g. 001 ( note: not all accounts have a code value). |
Date* | Date the payment is being made (YYYY-MM-DD). |
Amount* | The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Reference | An optional description for the payment e.g. Direct Debit |
(*) required field
Example of request from Create Payment
Using Account Code:
{
"Invoice": {
"InvoiceID": "00000000-0000-0000-0000-000000000000"
},
"Account": {
"Code": "001"
},
"Date": "2025-10-01",
"Amount": 100.00,
"Reference": "Payment for invoice 123"
}
Create Batch Payment Copy Link
Batch payments allow you to bundle multiple bills or invoices into one payment transaction. This means a single payment in Xero can be reconciled with a single transaction on the bank statement.
▪️ You can only make batch payments in the organisation base currency
▪️ You can’t create a batch payment with a mixture of sales invoices and bills
▪️ You can’t include credit notes, prepayments or overpayments on batch payments
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Batch Payment API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Batch Payment creation. Additional fields: Tenant, Particulars, Code, Reference, Details, Narrative, Date. | |
Account ID* | Specify the unique identifier of the account from which the payment will be made. You can Look up the value by select Input > Lookup tab > Select Search button to display a list. Ensure that this account is either a BANK account or has the ‘enable payments’ setting activated. |
Payment* | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Payment. Invoice ID*: Unique Identifier of the invoice you are applying payment to. You can Look up the value by select Input > Lookup tab > Select Search button to display a list. Amount*: The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice. [+ Add Field] add more fields in Payment. Bank Account Number: The suppliers bank account number the payment is being made to. Particulars: (NZ Only) The information to appear on the supplier’s bank account and bank statement. Code: (NZ Only) Optional references for the batch payment transaction. Reference: (NZ Only) Optional references for the batch payment transaction. Details: The information to appear on the supplier’s bank account. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Particulars | (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero. Max length =12. |
Code | (NZ Only) Optional references for the batch payment transaction. |
Reference | (NZ Only) Optional references for the batch payment transaction. |
Details | (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18 |
Narrative | (UK Only) Only shows on the statement line in Xero. Max length =18 |
Date | Date the payment is being made (YYYY-MM-DD) e.g. 2018-09-06 |
(*) required field
Example of request from Create Batch Payment
Create an ACCPAY batch payment (NZ)
{
"Date": "2018-08-01",
"Particulars": "paying",
"Code": "333",
"Reference": "ddd",
"Account": {
"AccountID": "ac993f75-035b-433c-82e0-7b7a2d40802c"
},
"Payments": [
{
"BankAccountNumber": "123-456-7890",
"Particulars": "def",
"Code": "543",
"Reference": "ggg",
"Invoice": {
"InvoiceID": "d8ec835f-fef6-4d5c-ae41-28df59c57f11"
},
"Amount": "10"
},
{
"BankAccountNumber": "123-456-7890",
"Particulars": "abc",
"Code": "123",
"Reference": "fff",
"Invoice": {
"InvoiceID": "71d1c9ca-3e99-4ef5-8f44-19d24c500ac8"
},
"Amount": "10"
}
]
}
Create Contact Copy Link
▪️ The business rules around contacts in Xero may be changing in the future and ‘Contact Name’ may no longer be a unique field.
▪️ We recommend all developers use ContactID to uniquely reference contacts in Xero and do not rely on ContactName as a way to reference contact data uniquely in Xero.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Contact API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Contact creation. Additional fields: Tenant, FirstName, LastName, Contact Number, Email Address, Company Number, Addresses, Phones, Contact Persons, Bank Account Details, Tax Number, Accounts Receivable Tax Type, Accounts Payable Tax Type, IsSupplier, IsCustomer, Default Currency. | |
Name* | Full name of contact/organisation (max length = 255) |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
FirstName | First name of contact person (max length = 255) |
LastName | Last name of contact person (max length = 255) |
Contact Number | This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero. |
Email Address | Email address of contact person (umlauts (ä, ö, ü) not supported) (max length = 255) |
Company Number | Company registration number. Max 50 char. |
Addresses | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Address can be added as elements. Element 1: Represents the first address. _Address Type: If you do not specify an AddressType , Xero will treat the address as a STREET address by default. Possible values :POBOX : For PO Box addresses.STREET : For street addresses (default if no type is specified).DELIVERY : For delivery addresses._Address Line 1 [+ Add Field] add more Address Line. _City _Region _Postal Code _Country |
Phones | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Phone. _Phone Type: If you do not specify a PhoneType , Xero will treat the phone number as a DEFAULT phone number. Possible values :DEFAULT : The primary phone number (default if no type is specified).MOBILE : For mobile phone numbers.FAX : For fax numbers.DDI : For direct dial-in numbers._Phone Number _Phone Area Code _Phone Country Code |
Contact Persons A contact can have a maximum of 5 Contact Persons. | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Contact person. First Name Last Name Email Address Include in Emails: True – False To indicate whether contact should be included on emails with invoices etc. |
Bank Account Details | Bank account number of contact. |
Tax Number | Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50). |
Accounts Receivable Tax Type | Default tax type used for contact on AR invoices. This field is optional. If not provided, Xero will use the default tax type set in the organization’s settings. The available tax types depend on your organization’s tax settings. You can view and manage tax types in the Xero UI under Settings > Tax Rates. |
Accounts Payable Tax Type | Default tax type used for contact on AP invoices. This field is optional. If not provided, Xero will use the default tax type set in the organization’s settings. The available tax types depend on your organization’s tax settings. You can view and manage tax types in the Xero UI under Settings > Tax Rates. |
Default Currency | Represents the three-letter currency code (e.g., USD , EUR , GBP . See List of Currencies) that will be used as the default currency for the contact.If not provided, Xero will use the organization’s default currency (as set in the Xero organization settings). |
(*) required field
Example of request from Create Contact
Creating a contact record with additional contact people
{
"Contacts": [
{
"Name": "24 locks",
"FirstName": "Ben",
"LastName": "Bowden",
"EmailAddress": "ben.bowden@24locks.com",
"ContactPersons": [
{
"FirstName": "John",
"LastName": "Smith",
"EmailAddress": "john.smith@24locks.com",
"IncludeInEmails": "true"
}
]
}
]
}
Create a Bank Transaction Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Bank Transaction API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Bank Transaction creation. Additional fields: Tenant, Date, Reference, Currency Code, Currency rate, Url, LineAmountTypes. | |
Type* | Bank Transaction Type, Possible values: RECEIVE RECEIVE-OVERPAYMENT RECEIVE-PREPAYMENT SPEND SPEND-OVERPAYMENT SPEND-PREPAYMENT |
Contact* | Contact ID*: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. [+ Add Field] add more fields in Contact: Name: Full name of contact/organization. |
Bank Account | Only accounts of Type BANK will be accepted. Account ID: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. ⚠️ Provide either Account ID or Code. [+ Add Field] add more fields Code: BankAccount code (this value may not always be present for a bank account). |
Line Items* At least one is required to create a bank transaction. | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. Unit Amount*: By default, unit amount will be rounded to two decimal places. Must not equal 0. Amount may be negative, but the total value for the document must be positive. Quantity*: Line item Quantity, must be > 0 Account Code*: Account Code must be active for the organisation. specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. [+ Add Field] add more fields in Line Items: Description: Description of the line item (max length = 4000 chars). |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Date | Date of transaction – YYYY-MM-DD |
Reference | Reference for the transaction. Only supported for SPEND and RECEIVE transactions. |
Currency Code | The currency that Bank Transaction has been raised in (see List of Currencies). Setting currency is only supported on overpayments. |
Currency Rate | Exchange rate to base currency when money is spent or received. Only used for bank transactions in non base currency. If this isn’t specified for non base currency accounts then either the user-defined rate (preference) or the XE.com day rate will be used. Setting currency is only supported on overpayments. |
URL | URL link to a source document – shown as “Go to App Name” |
LineA mount Types | Line amounts are inclusive of tax by default if you don’t specify this element. Possible values : Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
(*) required field
Example of request from Create Bank Transaction
Minimum elements required to add a new spend money transaction.
{
"Type": "SPEND",
"Contact": {
"ContactID": "eaa28f49-6028-4b6e-bb12-d8f6278073fc"
},
"LineItems": [{
"Description": "Yearly Bank Account Fee",
"UnitAmount": "20.00",
"AccountCode": "404"
}],
"BankAccount": {
"Code": "BANK-ABC"
}
}
Create a Bank Transfer Copy Link
▪️ The two sides of each bank transfer will automatically be recorded as RECEIVE-TRANSFER and SPEND-TRANSFER types.
▪️ You cannot transfer between accounts in different currencies
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Bank Transfer API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Bank Transfer creation. Additional fields: Tenant, Date, Reference. | |
From Bank Account* | Account ID: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. ⚠️ Provide either Account ID or Code. [+ Add Field] add more fields Code: BankAccount code (this value may not always be present for a bank account). |
To Bank Account* | Account ID: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. ⚠️ Provide either Account ID or Code. [+ Add Field] add more fields Code: BankAccount code (this value may not always be present for a bank account). |
Amount* | The amount being transferred. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Date | The date of the Transfer YYYY-MM-DD. Defaults to current date. |
Reference | Reference for the transaction. |
(*) required field
Example of request from Create Bank Transfer
{
"BankTransfers": [{
"FromBankAccount": { "Code": "090" },
"ToBankAccount": { "Code": "091" },
"Amount": 20.00
}]
}
Create Credit Notes Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Credit Notes API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Credit Notes creation. Additional fields: Tenant, Date, Line Amount Types, Currency Code, Credit Note Number, SentToContact, Currency rate, Branding Theme ID. | |
Type* | ACCPAYCREDIT An Accounts Payable(supplier) Credit Note ACCRECCREDIT An Account Receivable(customer) Credit Note |
Contact* | Contact ID*: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. [+ Add Field] add more fields in Contact: Name: Full name of contact/organization. |
Line Items* | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. Description*: Description of the line item (max length = 4000). Unit Amount*: By default, unit amount will be rounded to two decimal places. Quantity*: Line item Quantity. [+ Add Field] add more fields in Line Items: Account Code: specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Date | The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation |
Status | If you do not specify a status when creating a credit note, Xero will default to DRAFT. Possible values: DRAFT – AUTHORISED |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Currency Code | Currency used for the Credit Note (see List of Currencies). |
Credit Note Number | If ACCRECCREDIT – Enter a unique alpha numeric code identifying credit note. If ACCPAYCREDIT – Enter a Non-unique alpha numeric code identifying credit note. This value will also display as Reference in the UI. |
Reference | ACCRECCREDIT only – additional reference number |
Currency Rate | The currency rate for a multi-currency invoice. If no rate is specified, the XE.com day rate is used. |
Branding Theme ID | Unique Identifier of the Branding Theme that apply to this Credit Note. |
(*) required field
Example of Create Credit Notes request
{
"Type": "ACCPAYCREDIT",
"Contact": {
"ContactID": "eaa28f49-6028-4b6e-bb12-d8f6278073fc"
},
"Date": "2025-03-29",
"LineAmountTypes": "Exclusive",
"LineItems": [
{
"Description": "MacBook - White",
"Quantity": 1.0000,
"UnitAmount": 1995.00,
"AccountCode": "720"
}
]
}
Create Quote Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Quotes API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Quotes creation. Additional fields: Tenant, Status, Line Amount Types, Currency Code, Quote Number, Reference, Expiry Date, Branding Theme ID, Title, Summary, Terms. | |
Quotes* | Contact*: _Contact ID*: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. [+ Add Field] add more fields in Quote: _Name: Full name of contact/organization. _Date*: Date quote was issued – YYYY-MM-DD Line Items*: [⊕ Element] [⊕ Map] Add fields or Map it from a Data Source. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. _Description*: Description of the line item (max length = 4000). _Unit Amount*: By default, unit amount will be rounded to two decimal places. _Quantity*: Line item Quantity. _Account Code: specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Status | If you do not specify a status when creating a Quote, Xero will default to DRAFT. Possible values: DRAFT – SENT |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Currency Code | Currency used for the Credit Note (see List of Currencies). |
Quote Number | Enter Unique alpha numeric code identifying a quote (Max Length = 255). |
Reference | Additional reference number. |
Expiry Date | Date quote expires – YYYY-MM-DD. |
Branding Theme ID | Unique Identifier of the Branding Theme that apply to this Quote. |
Title | The title of the quote (Max Length = 100). |
Summary | The summary of the quote (Max Length = 3000). |
Terms | The terms of the quote (Max Length = 4000). |
(*) required field
Example of Create Quote request
Create a single quote with all possible elements
{
"QuoteNumber": "QU-1068",
"Reference": "REF-90092",
"Terms": "Quote is valid for 30 business days",
"Contact": {
"ContactID": "6d42f03b-181f-43e3-93fb-2025c012de92",
"ContactName": "John Hammond"
},
"LineItems": [
{
"Description": "Jurassic Park Colouring Book",
"UnitAmount": 12.50,
"LineAmount": 12.50,
"ItemCode": "BOOK",
"Quantity": 1.0000
}
],
"Date": "2019-11-29",
"ExpiryDate": "2019-12-29",
"Status": "SENT",
"CurrencyCode": "NZD",
"SubTotal": 12.50,
"TotalTax": 0.00,
"Total": 12.50,
"Title": "Quote for product sale",
"Summary": "Sale of book",
"LineAmountTypes": "EXCLUSIVE"
}
Create Manual Journal Copy Link
⚠️ There are a few accounts that you can’t use when entering manual journals in Xero. These include system accounts (accounts receivable, accounts payable & retained earnings) and bank accounts. You will receive a 400 validation error if you try and use these reserved accounts. Consider setting up one or more clearing accounts if you need to journal to a bank account.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Manual Journals API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Manual Journal creation. Additional fields: Tenant, Date, Status, Line Amount Types, Url, Show on Cash Basic Reports. | |
Narration* | Description of journal being posted. |
Journal Lines* The JournalLines element must contain at least two individual JournalLine sub-elements. | Line Amount*: Total for line. Debits are positive, credits are negative value Account Code*: specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. [+ Add Field] add more fields in Journal Lines: Description: Description of the line item (max length = 4000). Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. Tracking: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 TrackingCategory elements. Ensure the tracking categories and options you use are ACTIVE .[⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Tracking Category can be added as elements. Element 1: Represents the first Tracking Category. _Name: The name of the tracking category e.g. Department, Region (max length = 100). _Option: The specific option within the tracking category (e.g., “Sales”, “Marketing”). |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Date | Date journal was posted – YYYY-MM-DD. Defaults to the current date if not provided. |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Url | Url link to a source document – shown as “Go to [appName] ” in the Xero app |
Show on Cash Basic Reports | True – False Default is true if not specified. |
(*) required field
Example of Create Manual Journal request
Create a new draft manual journal with optional elements
{
"Date": "2014-08-13",
"Status": "DRAFT",
"Narration": "Prepaid our phone a year in advance",
"LineAmountTypes": "NoTax",
"JournalLines": [
{
"Description": "Prepaid Annual Phone",
"LineAmount": -1000,
"AccountCode": "489",
"TaxType": "NONE",
"Tracking": [
{
"Name": "Region",
"Option": "South"
}
]
},
{
"Description": "Prepayment",
"LineAmount": 1000,
"AccountCode": "620",
"TaxType": "NONE",
"Tracking": [
{
"Name": "Region",
"Option": "South"
}
]
}
],
"ShowOnCashBasisReports": "false"
}
Create Item Copy Link
⚠️ Tracked items in Xero have their inventory quantity and value monitored, and sales are restricted based on stock levels. Untracked items are simply listed on transactions without inventory tracking. Consult Xero’s help center for more information.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Items API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Item creation. Additional fields: Tenant, Description, Inventory Asset Account Code, IsSold, IsPurchased, Purchase Description, Purchase Details, Sales Details. | |
Code* | Enter a user defined item code. |
Name* | The name of the item. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Description | Description of the item. |
Inventory Asset Account Code | The inventory asset account for the item. The account must be of type INVENTORY . The COGSAccountCode in PurchaseDetails is also required to create a tracked item. |
IsSold | True – False If True the item will be available on sales transactions in the Xero UI. |
IsPurchased | True- False If True the item is available for purchase transactions in the Xero UI. |
Purchase Description | The purchase description of the item (max length = 4000) |
Purchase Details | [+ Add Field] add more fields: Unit Price: By default UnitPrice is rounded to two decimal places. Account Code: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items. Cost of good sold Account Code(COGSAccountCode): Cost of goods sold account. Only applicable to the purchase details of tracked items. Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
Sales Details | [+ Add Field] add more fields: Unit Price: By default UnitPrice is rounded to two decimal places. Account Code: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items. Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
(*) required field
Example of Create Item request
Create an untracked item with sales and purchase details:
{
"Code": "Merino-2011-LG",
"Name": "Full Tracked Item",
"Description": "2011 Merino Sweater - LARGE",
"PurchaseDescription": "2011 Merino Sweater - LARGE",
"PurchaseDetails": {
"UnitPrice": 149.0000,
"AccountCode": "300"
},
"SalesDetails": {
"UnitPrice": 299.0000,
"AccountCode": "200"
}
}
Minimum elements to create a tracked item:
{
"Code": "TrackedItem",
"PurchaseDetails": {
"COGSAccountCode": "300"
},
"InventoryAssetAccountCode": "630"
}
Create Purchase Order Copy Link
⚠️ When creating a purchase order via this Method, you can set the Status field to DRAFT, SUBMITTED, or AUTHORISED. However, once a purchase order is set to SUBMITTED or AUTHORISED, it cannot be reverted to DRAFT through the API. Additionally, the statuses BILLED and DELETED are system-generated and cannot be assigned manually during creation or updates.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Purchase Order API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Purchase Order creation. Additional fields: Tenant, Date, Status, Line Amount Types, Currency Code, Purchase Order Number, Reference, Branding Theme ID, Send To Contact, Delivery Address, Attention To, Telephone, Delivery Instructions, Expected Arrival Date. | |
Contact* provide information of an existing contact. | Contact ID*: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. [+ Add Field] add more fields in Contact: Name: Full name of contact/organization. |
Line Items* At least one Line Item is required to create a complete Purchase Order. | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. Unit Amount*: By default, unit amount will be rounded to two decimal places. Quantity*: Line item Quantity. [+ Add Field] add more fields in Line Items: Description: Description of the line item (max length = 4000). Account Code: specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. Discount Rate: Percentage discount being applied to a line item Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Date | Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation |
Delivery Date | Date the goods are to be delivered – YYYY-MM-DD (From supplier location). |
Status | Possible values: DRAFT SUBMITTED AUTHORISED |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Currency Code | The currency that purchase order has been raised in (see List of Currencies). |
Purchase Order Number | Enter the Unique alpha numeric code identifying purchase order ( when missing will auto-generate from your Organisation Invoice Settings). |
Reference | Additional reference number. |
Branding Theme ID | Unique Identifier of the Branding Theme that apply to this Purchase Order. |
Send To Contact | True – False To set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed. |
Delivery Address | The address the goods are to be delivered to. |
Attention To | The person that the delivery is going to. |
Telephone | The phone number for the person accepting the delivery. |
Delivery Instructions | A free text field for instructions (500 characters max). |
Expected Arrival Date | The date the goods are expected to arrive. |
(*) required field
Example of Create Purchase Order
Create a purchase order with all elements specified:
{
"PurchaseOrderNumber": "PO-0292",
"Date": "2015-11-12",
"DeliveryDate": "2015-12-12",
"Reference": "REF123",
"Contact": { "ContactID": "d7b78c9c-b34a-4dad-b999-c3c2504c7877" },
"BrandingThemeID": "4c82c365-35cb-467f-bb11-dce1f2f2f67c",
"Status": "AUTHORISED",
"LineAmountTypes": "Exclusive",
"LineItems": [
{
"ItemCode": "GB1-White",
"Description": "Golf balls - white single. Wholesale catalog item #020812-1",
"UnitAmount": 4.2595,
"TaxType": "INPUT2",
"AccountCode": "300",
"Tracking": [
{
"Name": "Region",
"Option": "Eastside"
},{
"Name": "Salesperson",
"Option": "Adam"
}
],
"Quantity": 1.0000,
"DiscountRate": 10.00
}
],
"CurrencyRate": 0.615310,
"CurrencyCode": "EUR",
"DeliveryAddress": "23 Main Street, Central City, Marineville,1234",
"AttentionTo": "Bob",
"Telephone": "0800 1234 5678",
"DeliveryInstructions": "Don't forget the secret knock",
"ExpectedArrivalDate": "2015-12-12"
}
Create Contact Groups Copy Link
⚠️ You can’t create more than 100 contact groups. Trying to create a group when the limit of 100 has been reached will result in a validation error being returned.
See Xero Contact Groups API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Contact Group creation. Additional fields: Tenant. | |
Contact Group Name* | The Name of the contact group. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of Create Contact Group
{
"Name": "VIP Customers"
}
Create Employee Copy Link
⚠️ You can Create multiple employees by adding [⊕ Element] or [⊕ Map].
Employees Status:
▪️ Employees are automatically considered active upon creation.
▪️ If you want to “terminate” an employee, you need to update their TerminationDate.
See Xero Employees API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Employee creation. Additional fields: Tenant. | |
Employees* | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Employees can be added as elements. Element 1: Represents the first Employee. First Name: First name of an employee (max length = 255) Last Name: Last name of an employee (max length = 255) External Link: Link to an external resource, for example, an employee record in an external system. You can specify the URL element. The description of the link is auto-generated in the form Go to <App name> . <App name> refers to the Xero application name that is making the API call. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of Create employee
{
"Employees": [
{
"FirstName": "Joey",
"LastName": "Bloggs",
"ExternalLink": {
"Url": "http://twitter.com/#!/search/Joey+Bloggs"
}
}
]
}
Create Asset Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Asset API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Asset creation. Additional fields: Tenant, Asset Type ID, Purchase Date, Purchase Price, Book Depreciation Setting, Book Depreciation Detail, Accounting Book value. | |
Asset Name* | The name of the asset. |
Asset Number* | Must be unique. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Asset Type ID | Provide the specific ID that links this asset to its asset type. |
Purchase Date | The date the asset was purchased YYYY-MM-DD. |
Purchase Price | The purchase price of the asset. |
Book Depreciation Setting | [+ Add Field] add more fields: Effective From Date: The date that this depreciation setting is effective from. Displayed as ‘Depreciation start date’ (YYYY-MM-DD) Depreciation Method: The method of depreciation applied to this asset. Possible values: – No Depreciation – Straight Line – DiminishingValue100 = Diminishing Value at 100% – DiminishingValue150 = Diminishing Value at 150% – DiminishingValue200 = Diminishing Value at 200% – FullDepreciation = Full Depreciation at purchase Averaging Method: The method of averaging applied to this asset. Possible values: – Actual Days – Full Month Depreciation Rate: The rate of depreciation (e.g. 0.05) Depreciation Calculation Method: Possible values: – Rate = Depreciation Rate (e.g. 20%) – Life = Effective life (e.g. 5 years) – None |
(*) required field
Example of Create Asset
Create an Asset with all elements specified:
{
"assetName": "Keyboard",
"assetNumber": "FA-00211",
"purchaseDate": "2016-04-11T00:00:00",
"purchasePrice": 3000,
"assetTypeId": "5da209c5-5e19-4a43-b925-71b776c49ced"
"bookDepreciationSettings": {
"effectiveFromDate": "2015-07-01T00:00:00",
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
}
}
Create Asset Type Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Asset Type API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Asset Type creation. Additional fields: Tenant. | |
Asset Type Name* | The name of the Asset Type. |
Fixed Asset Account ID* | The asset account for fixed assets of this type. Tip: you can Look up the value by select Input > Lookup tab > Select Search button to display a list. |
Depreciation Expense Account ID* | The expense account for the depreciation of fixed assets of this type. Tip: you can Look up the value by select Input > Lookup tab > Select Search button to display a list. |
Accumulated Depreciation Account ID* | The account for accumulated depreciation of fixed assets of this type. Tip: you can Look up the value by select Input > Lookup tab > Select Search button to display a list. |
Book Depreciation Setting* | Depreciation Method*: The method of depreciation applied to this asset. Possible values: – No Depreciation – Straight Line – DiminishingValue100 = Diminishing Value at 100% – DiminishingValue150 = Diminishing Value at 150% – DiminishingValue200 = Diminishing Value at 200% – FullDepreciation = Full Depreciation at purchase Averaging Method*: The method of averaging applied to this asset. Possible values: – Actual Days – Full Month Depreciation Rate*: The rate of depreciation (e.g. 0.05) Depreciation Calculation Method*: Possible values: – Rate = Depreciation Rate (e.g. 20%) – Life = Effective life (e.g. 5 years) – None |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of Create Asset Type
{
"assetTypeName": "Computer Equipment",
"fixedAssetAccountId": "afe53f21-1221-451c-a8c4-08457e129d84",
"depreciationExpenseAccountId": "9a30bb28-6d9d-428b-8a98-b0b591518d5b",
"accumulatedDepreciationAccountId": "b7e1f170-d238-41d7-ab2b-d0a89b16838f",
"bookDepreciationSetting": {
"depreciationMethod": "DiminishingValue100",
"averagingMethod": "ActualDays",
"depreciationRate": 40,
"depreciationCalculationMethod": "None"
}
}
Create Tracking Category Copy Link
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Tracking Category creation. Additional fields: Tenant. | |
ID* | Unique Identifier of the Tracking Category to update. |
Name | The name of the Tracking Category. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of Create Tracking Category
{
"Name": "New Category"
}
Create Folder Copy Link
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Folder creation. Additional fields: Tenant. | |
Name* | The name of the Folder. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of Create Folder
{
"Name": "New folder",
"FileCount": 0,
"IsInbox": false,
"Id": "1dd3419f-af99-44cf-b779-fb26730c38e1"
}
UPDATE RECORDS Copy Link
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Update Record |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to create records: Invoice, Contact, Item, Purchase Order, Contact Groups, Employee, Asset, Asset Type, Tracking Category, Folder. |
(*) required field
Configuration tables for each Entity:
Update Invoice Copy Link
When updating Invoices:
▪️ Providing an existing Line Item with its Line Item ID will update that line item.
▪️ Not providing an existing Line Item with it’s Line Item ID will result in that line item being deleted.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Invoice API Reference.
Invoice status changes:
The following state changes are valid when updating invoices.
Existing status | New status |
---|---|
DRAFT | DRAFT |
DRAFT | SUBMITTED |
DRAFT | AUTHORISED |
DRAFT | DELETED |
SUBMITTED | SUBMITTED |
SUBMITTED | AUTHORISED |
SUBMITTED | DRAFT |
SUBMITTED | DELETED |
AUTHORISED | AUTHORISED |
AUTHORISED | VOIDED |
Updating Invoices:
You can only update an invoice depending on the type of invoice, and its payment status.
Payment Status | ACCREC | ACCPAY |
---|---|---|
Unpaid | Yes | Yes |
Paid (in part, or in full) | Yes – with exceptions below | No |
In a locked period | No | No |
If an invoice is paid in part or in full, you can only update the following fields:
Reference
DueDate
InvoiceNumber
BrandingThemeID
Contact
, unless the payment is made with a Credit NoteURL
LineItems
Description
AccountCode
, except for Construction Industry Scheme (CIS) account codesTracking
Configuration table:
MAP FIELDS [+ Add Field] Select fields from a list, to configure the invoice update. Additional fields: Tenant, Invoice Number, Reference, Date String, Date, Due Date String, Due Date, Status, Line Amount Types, Line Items, Url, Currency Code, Expected Payment Date, Planned Payment Date | |
Invoice ID* | Unique Identifier of the Invoice (that has been generated by Xero). |
Type | Select the Invoice Type: Account receivable: A sales invoice – commonly known as an Accounts Receivable or customer invoice. Account Payable : A bill – commonly known as an Accounts Payable or supplier invoice. |
Contact | Name: Full name of contact/organization. [+ Add Field] add more fields in Contact: Contact ID: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. Email Address: Email address of contact person. Bank Account Details: Bank account number. Addresses [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Address can be added as elements. Element 1: Represents the first address. _Address Type: If you do not specify an AddressType , Xero will treat the address as a STREET address by default. Possible values :POBOX : For PO Box addresses.STREET : For street addresses (default if no type is specified).DELIVERY : For delivery addresses._Address Line 1 [+ Add Field] add more Address Line. _City _Region _Postal Code _Country Phone [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Phone. _Phone Type: If you do not specify a PhoneType , Xero will treat the phone number as a DEFAULT phone number. Possible values :DEFAULT : The primary phone number (default if no type is specified).MOBILE : For mobile phone numbers.FAX : For fax numbers.DDI : For direct dial-in numbers._Phone Number _Phone Area Code _Phone Country Code |
Line Items | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. Line Item ID: Unique Identifier of the Line Item. Description: Description of the line item (max length = 4000). Unit Amount: By default, unit amount will be rounded to two decimal places. Quantity: Line item Quantity. [+ Add Field] add more fields in Line Items: Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. Tax Amount: The tax amount is auto calculated as a percentage of the line amount based on the tax rate. You can change this value if the tax calculation is incorrect. Line Amount: The line amount reflects the discounted price if a DiscountRate has been used i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100) (can’t exceed 9,999,999,999.99 ). Account Code: Customer defined alpha numeric account code e.g 200 or SALES. specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. Item Code: User defined item code. Discount Amount Discount Rate Percentage discount or discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Invoice Number (max length = 255) | If your Invoice Type is ACCREC – Enter a Unique alpha numeric code identifying invoice ( when missing will auto-generate from your Organisation Invoice Settings). If your Invoice Type is ACCPAY – Enter a non-unique alpha numeric code identifying invoice. This value will also display as Reference in the UI. |
Reference | ACCREC only – additional reference number (max length = 255) |
Date String | Use these fields if you are working with date strings that are not in the standard YYYY-MM-DD format.The DateString and DueDateString fields accept dates in a human-readable string format (e.g., "1 January 2023" or "01/01/2023" ).Xero will attempt to parse the string into a valid date. If both Date and DateString (or DueDate and DueDateString ) are provided, Xero will prioritize the Date and DueDate fields. |
Date | Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation. |
Due Date String | Use these fields if you are working with date strings that are not in the standard YYYY-MM-DD format.The Date String and Due Date String fields accept dates in a human-readable string format (e.g., "1 January 2023" or "01/01/2023" ).Xero will attempt to parse the string into a valid date. If both Date and Date String (or Due Date and Due Date String ) are provided, Xero will prioritize the Date and DueDate fields. |
Due Date | Date invoice is due – YYYY-MM-DD |
Status | Possible values : Draft – Submitted – Authorized For more details, refer to Invoice Status. |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Url | URL link to a source document – shown as “Go to [appName] ” in the Xero app. |
Currency code | The currency that invoice has been raised in (see List of Currencies). |
Expected Payment Date | Shown on sales invoices (Accounts Receivable) when this has been set. |
Planned Payment Date | Shown on bills (Accounts Payable) when this has been set. |
(*) required field
Example of Invoice (ACCREC)
Invoice with every single element being specified:
{
"Invoices": [
{
"Type": "ACCREC",
"Contact": {
"ContactID": "eaa28f49-6028-4b6e-bb12-d8f6278073fc"
},
"DateString": "20025-09-08T00:00:00",
"DueDateString": "20025-10-20T00:00:00",
"ExpectedPaymentDate": "2009-10-20T00:00:00",
"InvoiceNumber": "OIT:01065",
"Reference": "Ref:SMITHK",
"BrandingThemeID": "3b148ee0-adfa-442c-a98b-9059a73e8ef5",
"Url": "http://www.accounting20.com",
"CurrencyCode": "NZD",
"Status": "SUBMITTED",
"LineAmountTypes": "Inclusive",
"SubTotal": "87.11",
"TotalTax": "10.89",
"Total": "98.00",
"LineItems": [
{
"ItemCode": "Test 01",
"Description": "3 copies of OS X 10.6 Snow Leopard",
"Quantity": "3.0000",
"UnitAmount": "59.00",
"TaxType": "OUTPUT",
"TaxAmount": "19.67",
"LineAmount": "177.00",
"AccountCode": "200",
"Tracking": [
{
"TrackingCategoryID": "e2f2f732-e92a-4f3a-9c4d-ee4da0182a13",
"Name": "Region",
"Option": "North"
}
]
},
{
"ItemCode": "Test 02",
"Description": "Returned Apple Keyboard with Numeric Keypad (faulty)",
"Quantity": "1.0000",
"UnitAmount": "-79.00",
"TaxType": "OUTPUT",
"TaxAmount": "-8.78",
"LineAmount": "-79.00",
"AccountCode": "200"
}
]
}
]
}
Update Contact Copy Link
⚠️ When you are updating a contact you don’t need to specify every element. If you exclude an element then the existing value will be preserved.
▪️ The business rules around contacts in Xero may be changing in the future and ‘Contact Name’ may no longer be a unique field.
▪️ We recommend all developers use ContactID to uniquely reference contacts in Xero and do not rely on ContactName as a way to reference contact data uniquely in Xero.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Contact API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Contact update. Additional fields: Tenant, FirstName, LastName, Contact Number, Email Address, Company Number, Addresses, Phones, Contact Persons, Bank Account Details, Tax Number, Accounts Receivable Tax Type, Accounts Payable Tax Type, IsSupplier, IsCustomer, Default Currency. | |
Contact ID* | Unique Identifier of the Contact in Xero. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Name | Full name of contact/organisation (max length = 255) |
FirstName | First name of contact person (max length = 255) |
LastName | Last name of contact person (max length = 255) |
Contact Number | This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero. |
Email Address | Email address of contact person (umlauts (ä, ö, ü) not supported) (max length = 255) |
Company Number | Company registration number. Max 50 char. |
Addresses | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Address can be added as elements. Element 1: Represents the first address. _Address Type: If you do not specify an AddressType , Xero will treat the address as a STREET address by default. Possible values :POBOX : For PO Box addresses.STREET : For street addresses (default if no type is specified).DELIVERY : For delivery addresses._Address Line 1 [+ Add Field] add more Address Line. _City _Region _Postal Code _Country |
Phones | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Phone. _Phone Type: If you do not specify a PhoneType , Xero will treat the phone number as a DEFAULT phone number. Possible values :DEFAULT : The primary phone number (default if no type is specified).MOBILE : For mobile phone numbers.FAX : For fax numbers.DDI : For direct dial-in numbers._Phone Number _Phone Area Code _Phone Country Code |
Contact Persons A contact can have a maximum of 5 Contact Persons. | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Contact person. First Name Last Name Email Address Include in Emails: True – False To indicate whether contact should be included on emails with invoices etc. |
Bank Account Details | Bank account number of contact. |
Tax Number | Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50). |
Accounts Receivable Tax Type | Default tax type used for contact on AR invoices. This field is optional. If not provided, Xero will use the default tax type set in the organization’s settings. The available tax types depend on your organization’s tax settings. You can view and manage tax types in the Xero UI under Settings > Tax Rates. |
Accounts Payable Tax Type | Default tax type used for contact on AP invoices. This field is optional. If not provided, Xero will use the default tax type set in the organization’s settings. The available tax types depend on your organization’s tax settings. You can view and manage tax types in the Xero UI under Settings > Tax Rates. |
Default Currency | Represents the three-letter currency code (e.g., USD , EUR , GBP . See List of Currencies) that will be used as the default currency for the contact.If not provided, Xero will use the organization’s default currency (as set in the Xero organization settings). |
(*) required field
Example of updating a Contact
{
"ContactID": "eaa28f49-6028-4b6e-bb12-d8f6278073fc",
"ContactNumber": "ID001",
"Name": "ABC Limited",
"FirstName": "John",
"LastName": "Smith",
"EmailAddress": "john.smith@gmail.com",
"Addresses": [
{
"AddressType": "POBOX",
"AddressLine1": "P O Box 123",
"City": "Wellington",
"PostalCode": "6011"
}
],
"BankAccountDetails": "01-0123-0123456-00",
"TaxNumber": "12-345-678",
"AccountsReceivableTaxType": "OUTPUT",
"AccountsPayableTaxType": "INPUT",
"DefaultCurrency": "NZD"
}
Update Item Copy Link
⚠️ Only the fields you include in your update request will be modified; any fields you omit will retain their existing values in Xero.
⚠️ Tracked items in Xero have their inventory quantity and value monitored, and sales are restricted based on stock levels. Untracked items are simply listed on transactions without inventory tracking. Consult Xero’s help center for more information.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Items API Reference.
Adjusting the quantity and value of tracked items:
The Quantity and TotalCostPool elements are read-only and cannot be directly modified through the Items endpoint. To update the quantity or value of tracked items, you must create accounting transactions.
To raise the value and quantity of a tracked item, generate purchase transactions such as ACCPAY Invoices or SPEND Bank Transactions. Conversely, to reduce the value and quantity of tracked items, create sales transactions like ACCREC Invoices or RECEIVE Bank Transactions. For further details on inventory adjustments, refer to the Tracked Inventory in Xero guide.
Configuration table:
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Item update. Additional fields: Tenant, Description, Inventory Asset Account Code, IsSold, IsPurchased, Purchase Description, Purchase Details, Sales Details. | |
Item ID* | Unique Identifier of the Item in Xero. |
Code | Enter a user defined item code. |
Name | The name of the item. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Description | Description of the item. |
Inventory Asset Account Code | The inventory asset account for the item. The account must be of type INVENTORY . The COGSAccountCode in PurchaseDetails is also required to create a tracked item. |
IsSold | True – False If True the item will be available on sales transactions in the Xero UI. |
IsPurchased | True- False If True the item is available for purchase transactions in the Xero UI. |
Purchase Description | The purchase description of the item (max length = 4000) |
Purchase Details | [+ Add Field] add more fields: Unit Price: By default UnitPrice is rounded to two decimal places. Account Code: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items. Cost of good sold Account Code(COGSAccountCode): Cost of goods sold account. Only applicable to the purchase details of tracked items. Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
Sales Details | [+ Add Field] add more fields: Unit Price: By default UnitPrice is rounded to two decimal places. Account Code: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items. Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
(*) required field
Update Purchase Order Copy Link
⚠️ When creating a purchase order you can set the Status field to DRAFT, SUBMITTED, or AUTHORISED. However, once a purchase order is set to SUBMITTED or AUTHORISED, it cannot be reverted to DRAFT through the Update Method. Additionally, the statuses BILLED and DELETED are system-generated and cannot be assigned manually during creation or updates.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Purchase Order API Reference.
Updating line items when updating purchase orders:
In an update request:
- Providing an existing Line Item with its Line Item ID will update that line item.
- Providing a Line Item with no Line Item ID will create a new line item.
- Not providing an existing Line Item with it’s Line Item ID will result in that line item being deleted.
Configuration table:
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Purchase Order update. Additional fields: Tenant, Date, Status, Line Amount Types, Currency Code, Purchase Order Number, Reference, Branding Theme ID, Send To Contact, Delivery Address, Attention To, Telephone, Delivery Instructions, Expected Arrival Date. | |
Purchase Order ID* | Unique Identifier of the Purchase Order. |
Contact provide information of an existing contact. | Contact ID: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. [+ Add Field] add more fields in Contact: Name: Full name of contact/organization. |
Line Items | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. Line Item ID: Unique Identifier of the Line Item. Unit Amount: By default, unit amount will be rounded to two decimal places. Quantity: Line item Quantity. [+ Add Field] add more fields in Line Items: Description: Description of the line item (max length = 4000). Account Code: specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. Discount Rate: Percentage discount being applied to a line item Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Date | Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation |
Delivery Date | Date the goods are to be delivered – YYYY-MM-DD (From supplier location). |
Status | Once a purchase order is set to SUBMITTED or AUTHORISED , it cannot be reverted to DRAFT through the API. Additionally, the statuses BILLED and DELETED are system-generated and cannot be assigned manually during creation or updates.Possible values: SUBMITTED AUTHORISED |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Currency Code | The currency that purchase order has been raised in (see List of Currencies). |
Purchase Order Number | Enter the Unique alpha numeric code identifying purchase order ( when missing will auto-generate from your Organisation Invoice Settings). |
Reference | Additional reference number. |
Branding Theme ID | Unique Identifier of the Branding Theme that apply to this Purchase Order. |
Send To Contact | True – False To set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed. |
Delivery Address | The address the goods are to be delivered to. |
Attention To | The person that the delivery is going to. |
Telephone | The phone number for the person accepting the delivery. |
Delivery Instructions | A free text field for instructions (500 characters max). |
Expected Arrival Date | The date the goods are expected to arrive. |
(*) required field
Example request to update a purchase order to mark it as sent
{
"PurchaseOrderID": "8694c9c5-7097-4449-a708-b8c1982921a4",
"SentToContact": true
}
Update Contact Groups Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Contact Groups API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Contact Group update. Additional fields: Tenant, Name, Status. | |
Contact Group ID* | Unique Identifier of the contact group. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Name | New Name of the Contact Group. |
Status | New Status of the Contact Group. Possible values: ACTIVE: The contact group is active and fully functional. ARCHIVED: The contact group is archived and no longer active. |
(*) required field
Example request to rename a Contact Group
{
"ContactGroupID": "679382fd-7a71-4281-b013-0ff811ca87ab",
"Name": "New Name Here"
}
{
"ContactGroupID": "679382fd-7a71-4281-b013-0ff811ca87ab",
"Name": "New Name Here"
}
Update Employee Copy Link
⚠️ When you are updating an employee you don’t need to specify every element. If you exclude an element then the existing value of that field will be preserved.
If you want to “terminate” an employee, you need to update their TerminationDate.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Employees API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Employee update. Additional fields: Tenant. | |
Employees* | Employee ID*: Unique Identifier of the Employee. First Name: First name of an employee (max length = 255) Last Name: Last name of an employee (max length = 255) Status: Possible values: ACTIVE – ARCHIVED External Link: Link to an external resource, for example, an employee record in an external system. You can specify the URL element. The description of the link is auto-generated in the form Go to <App name> . <App name> refers to the Xero application name that is making the API call. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of request to update employees
{
"Employees": [
{
"FirstName": "new name",
"LastName": "Bloggs",
"ExternalLink": {
"Url": "http://twitter.com/#!/search/Joey+Bloggs"
}
}
]
}
Update Asset Copy Link
⚠️ When you are updating an Asset you don’t need to specify every element. If you exclude an element then the existing value of that field will be preserved.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Asset API Reference.
Updating Asset Status:
Certain status transitions may require specific fields to be set. For instance, moving an asset from “DRAFT” to “REGISTERED” typically requires assigning properties such as AssetTypeId
, PurchaseDate
, PurchasePrice
, and depreciation settings.
Configuration table:
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Asset update. Additional fields: Tenant, Asset Type ID, Purchase Date, Purchase Price, Book Depreciation Setting. | |
Asset ID* | Unique Identifier of the Asset to update. |
Asset Name* | The name of the asset. |
Asset Number* | Must be unique. |
Asset Status* | Possible Values: DRAFT – The asset is still being created or in the process of being set up and is not yet officially registered in the system. REGISTERED – The asset is officially registered and active in the system. DISPOSED – The asset has been disposed of (retired, sold, or written off) and is no longer in use. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Asset Type ID | Provide the specific ID that links this asset to its asset type. |
Purchase Date | The date the asset was purchased YYYY-MM-DD. |
Purchase Price | The purchase price of the asset. |
Book Depreciation Setting | [+ Add Field] add more fields: Effective From Date: The date that this depreciation setting is effective from. Displayed as ‘Depreciation start date’ (YYYY-MM-DD) Depreciation Method: The method of depreciation applied to this asset. Possible values: – No Depreciation – Straight Line – DiminishingValue100 = Diminishing Value at 100% – DiminishingValue150 = Diminishing Value at 150% – DiminishingValue200 = Diminishing Value at 200% – FullDepreciation = Full Depreciation at purchase Averaging Method: The method of averaging applied to this asset. Possible values: – Actual Days – Full Month Depreciation Rate: The rate of depreciation (e.g. 0.05) Depreciation Calculation Method: Possible values: – Rate = Depreciation Rate (e.g. 20%) – Life = Effective life (e.g. 5 years) – None |
(*) required field
Example of the minimum request to update an asset
{
"assetId": "dacdcf3f-d6b1-425a-921a-777a4d79ad6b",
"assetName": "Other Computer",
"assetNumber": "FA-00210",
"assetStatus": "Draft"
}
Update Asset Type Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Asset Type API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Asset Type update. Additional fields: Tenant. | |
Asset Type ID* | Unique Identifier of the Asset Type to update. |
Asset Type Name | The name of the Asset Type. |
Fixed Asset Account ID | The asset account for fixed assets of this type. Tip: you can Look up the value by select Input > Lookup tab > Select Search button to display a list. |
Depreciation Expense Account ID | The expense account for the depreciation of fixed assets of this type. Tip: you can Look up the value by select Input > Lookup tab > Select Search button to display a list. |
Accumulated Depreciation Account ID | The account for accumulated depreciation of fixed assets of this type. Tip: you can Look up the value by select Input > Lookup tab > Select Search button to display a list. |
Book Depreciation Setting | Depreciation Method: The method of depreciation applied to this asset. Possible values: – No Depreciation – Straight Line – DiminishingValue100 = Diminishing Value at 100% – DiminishingValue150 = Diminishing Value at 150% – DiminishingValue200 = Diminishing Value at 200% – FullDepreciation = Full Depreciation at purchase Averaging Method: The method of averaging applied to this asset. Possible values: – Actual Days – Full Month Depreciation Rate: The rate of depreciation (e.g. 0.05) Depreciation Calculation Method: Possible values: – Rate = Depreciation Rate (e.g. 20%) – Life = Effective life (e.g. 5 years) – None |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of request for updating an Asset Type name
{
"assetTypeId": "5da209c5-5e19-4a43-b925-71b776c49ced",
"assetTypeName": "New ASSET TYPE NAME"
}
Update Tracking Category Copy Link
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Tracking Category update. Additional fields: Tenant, Status. | |
Name* | The name of the Tracking Category. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Status | Possible values: ACTIVE – ARCHIVED |
(*) required field
Example of request for updating a Tracking Category status
POST https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}
{
"Status": "ARCHIVED"
}
Update Folder Copy Link
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Folder update. Additional fields: Tenant. | |
ID* | Unique Identifier of the folder to rename. |
Name* | The name of the Folder. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of request to rename a Folder
{"name":"New Folder Name"}
UPSERT RECORDS Copy Link
⚠️ Reminder: The Method employs matching criteria to search for existing records. If a match is found, the record is updated; otherwise, a new record is created using the supplied information.
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Upsert Record |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to create records: Invoice, Contact, Item, Purchase Order, Contact Groups, Tracking Category. |
(*) required field
Configuration tables for each Entity:
Upsert Invoice Copy Link
When Upsert Invoices:
▪️ Providing an existing Line Item with its Line Item ID will update that line item.
▪️ Not providing an existing Line Item with it’s Line Item ID will result in that line item being deleted.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Invoice API Reference.
Invoice status changes:
The following state changes are valid when updating invoices.
Existing status | New status |
---|---|
DRAFT | DRAFT |
DRAFT | SUBMITTED |
DRAFT | AUTHORISED |
DRAFT | DELETED |
SUBMITTED | SUBMITTED |
SUBMITTED | AUTHORISED |
SUBMITTED | DRAFT |
SUBMITTED | DELETED |
AUTHORISED | AUTHORISED |
AUTHORISED | VOIDED |
Updating Invoices:
You can only update an invoice depending on the type of invoice, and its payment status.
Payment Status | ACCREC | ACCPAY |
---|---|---|
Unpaid | Yes | Yes |
Paid (in part, or in full) | Yes – with exceptions below | No |
In a locked period | No | No |
If an invoice is paid in part or in full, you can only update the following fields:
Reference
DueDate
InvoiceNumber
BrandingThemeID
Contact
, unless the payment is made with a Credit NoteURL
LineItems
Description
AccountCode
, except for Construction Industry Scheme (CIS) account codesTracking
Configuration table:
MAP FIELDS [+ Add Field] Select fields from a list, to configure the invoice upsert. Additional fields: Tenant, Type, Contact, Line Items, Invoice Number, Reference, Date String, Date, Due Date String, Due Date, Status, Line Amount Types, Line Items, Url, Currency Code, Expected Payment Date, Planned Payment Date | |
Invoice ID* | Unique Identifier of the Invoice (that has been generated by Xero). |
ADDITIONAL FIELDS | |
Type | Select the Invoice Type: Account receivable: A sales invoice – commonly known as an Accounts Receivable or customer invoice. Account Payable : A bill – commonly known as an Accounts Payable or supplier invoice. |
Contact | Name: Full name of contact/organization. [+ Add Field] add more fields in Contact: Contact ID: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. Email Address: Email address of contact person. Bank Account Details: Bank account number. Addresses [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Address can be added as elements. Element 1: Represents the first address. _Address Type: If you do not specify an AddressType , Xero will treat the address as a STREET address by default. Possible values :POBOX : For PO Box addresses.STREET : For street addresses (default if no type is specified).DELIVERY : For delivery addresses._Address Line 1 [+ Add Field] add more Address Line. _City _Region _Postal Code _Country Phone [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Phone. _Phone Type: If you do not specify a PhoneType , Xero will treat the phone number as a DEFAULT phone number. Possible values :DEFAULT : The primary phone number (default if no type is specified).MOBILE : For mobile phone numbers.FAX : For fax numbers.DDI : For direct dial-in numbers._Phone Number _Phone Area Code _Phone Country Code |
Line Items | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. Line Item ID: Unique Identifier of the Line Item. Description: Description of the line item (max length = 4000). Unit Amount: By default, unit amount will be rounded to two decimal places. Quantity: Line item Quantity. [+ Add Field] add more fields in Line Items: Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. Tax Amount: The tax amount is auto calculated as a percentage of the line amount based on the tax rate. You can change this value if the tax calculation is incorrect. Line Amount: The line amount reflects the discounted price if a DiscountRate has been used i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100) (can’t exceed 9,999,999,999.99 ). Account Code: Customer defined alpha numeric account code e.g 200 or SALES. specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. Item Code: User defined item code. Discount Amount Discount Rate Percentage discount or discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts. |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Invoice Number (max length = 255) | If your Invoice Type is ACCREC – Enter a Unique alpha numeric code identifying invoice ( when missing will auto-generate from your Organisation Invoice Settings). If your Invoice Type is ACCPAY – Enter a non-unique alpha numeric code identifying invoice. This value will also display as Reference in the UI. |
Reference | ACCREC only – additional reference number (max length = 255) |
Date String | Use these fields if you are working with date strings that are not in the standard YYYY-MM-DD format.The DateString and DueDateString fields accept dates in a human-readable string format (e.g., "1 January 2023" or "01/01/2023" ).Xero will attempt to parse the string into a valid date. If both Date and DateString (or DueDate and DueDateString ) are provided, Xero will prioritize the Date and DueDate fields. |
Date | Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation. |
Due Date String | Use these fields if you are working with date strings that are not in the standard YYYY-MM-DD format.The Date String and Due Date String fields accept dates in a human-readable string format (e.g., "1 January 2023" or "01/01/2023" ).Xero will attempt to parse the string into a valid date. If both Date and Date String (or Due Date and Due Date String ) are provided, Xero will prioritize the Date and DueDate fields. |
Due Date | Date invoice is due – YYYY-MM-DD |
Status | Possible values : Draft – Submitted – Authorized For more details, refer to Invoice Status. |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Url | URL link to a source document – shown as “Go to [appName] ” in the Xero app. |
Currency code | The currency that invoice has been raised in (see List of Currencies). |
Expected Payment Date | Shown on sales invoices (Accounts Receivable) when this has been set. |
Planned Payment Date | Shown on bills (Accounts Payable) when this has been set. |
(*) required field
Example of Invoice (ACCREC)
Invoice with every single element being specified:
{
"Invoices": [
{
"Type": "ACCREC",
"Contact": {
"ContactID": "eaa28f49-6028-4b6e-bb12-d8f6278073fc"
},
"DateString": "20025-09-08T00:00:00",
"DueDateString": "20025-10-20T00:00:00",
"ExpectedPaymentDate": "2009-10-20T00:00:00",
"InvoiceNumber": "OIT:01065",
"Reference": "Ref:SMITHK",
"BrandingThemeID": "3b148ee0-adfa-442c-a98b-9059a73e8ef5",
"Url": "http://www.accounting20.com",
"CurrencyCode": "NZD",
"Status": "SUBMITTED",
"LineAmountTypes": "Inclusive",
"SubTotal": "87.11",
"TotalTax": "10.89",
"Total": "98.00",
"LineItems": [
{
"ItemCode": "Test 01",
"Description": "3 copies of OS X 10.6 Snow Leopard",
"Quantity": "3.0000",
"UnitAmount": "59.00",
"TaxType": "OUTPUT",
"TaxAmount": "19.67",
"LineAmount": "177.00",
"AccountCode": "200",
"Tracking": [
{
"TrackingCategoryID": "e2f2f732-e92a-4f3a-9c4d-ee4da0182a13",
"Name": "Region",
"Option": "North"
}
]
},
{
"ItemCode": "Test 02",
"Description": "Returned Apple Keyboard with Numeric Keypad (faulty)",
"Quantity": "1.0000",
"UnitAmount": "-79.00",
"TaxType": "OUTPUT",
"TaxAmount": "-8.78",
"LineAmount": "-79.00",
"AccountCode": "200"
}
]
}
]
}
Upsert Contact Copy Link
⚠️ When you are updating a contact you don’t need to specify every element. If you exclude an element then the existing value will be preserved.
▪️ The business rules around contacts in Xero may be changing in the future and ‘Contact Name’ may no longer be a unique field.
▪️ We recommend all developers use ContactID to uniquely reference contacts in Xero and do not rely on ContactName as a way to reference contact data uniquely in Xero.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Contact API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Contact upsert. Additional fields: Tenant, FirstName, LastName, Contact Number, Email Address, Company Number, Addresses, Phones, Contact Persons, Bank Account Details, Tax Number, Accounts Receivable Tax Type, Accounts Payable Tax Type, IsSupplier, IsCustomer, Default Currency. | |
Name* | Full name of contact/organisation (max length = 255) |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
FirstName | First name of contact person (max length = 255) |
LastName | Last name of contact person (max length = 255) |
Contact Number | This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero. |
Email Address | Email address of contact person (umlauts (ä, ö, ü) not supported) (max length = 255) |
Company Number | Company registration number. Max 50 char. |
Addresses | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Address can be added as elements. Element 1: Represents the first address. _Address Type: If you do not specify an AddressType , Xero will treat the address as a STREET address by default. Possible values :POBOX : For PO Box addresses.STREET : For street addresses (default if no type is specified).DELIVERY : For delivery addresses._Address Line 1 [+ Add Field] add more Address Line. _City _Region _Postal Code _Country |
Phones | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Phone. _Phone Type: If you do not specify a PhoneType , Xero will treat the phone number as a DEFAULT phone number. Possible values :DEFAULT : The primary phone number (default if no type is specified).MOBILE : For mobile phone numbers.FAX : For fax numbers.DDI : For direct dial-in numbers._Phone Number _Phone Area Code _Phone Country Code |
Contact Persons A contact can have a maximum of 5 Contact Persons. | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Phone can be added as elements. Element 1: Represents the first Contact person. First Name Last Name Email Address Include in Emails: True – False To indicate whether contact should be included on emails with invoices etc. |
Bank Account Details | Bank account number of contact. |
Tax Number | Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50). |
Accounts Receivable Tax Type | Default tax type used for contact on AR invoices. This field is optional. If not provided, Xero will use the default tax type set in the organization’s settings. The available tax types depend on your organization’s tax settings. You can view and manage tax types in the Xero UI under Settings > Tax Rates. |
Accounts Payable Tax Type | Default tax type used for contact on AP invoices. This field is optional. If not provided, Xero will use the default tax type set in the organization’s settings. The available tax types depend on your organization’s tax settings. You can view and manage tax types in the Xero UI under Settings > Tax Rates. |
Default Currency | Represents the three-letter currency code (e.g., USD , EUR , GBP . See List of Currencies) that will be used as the default currency for the contact.If not provided, Xero will use the organization’s default currency (as set in the Xero organization settings). |
(*) required field
Upsert Item Copy Link
⚠️ Only the fields you include in your update request will be modified; any fields you omit will retain their existing values in Xero.
⚠️ Tracked items in Xero have their inventory quantity and value monitored, and sales are restricted based on stock levels. Untracked items are simply listed on transactions without inventory tracking. Consult Xero’s help center for more information.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Items API Reference.
Adjusting the quantity and value of tracked items:
The Quantity and TotalCostPool elements are read-only and cannot be directly modified through the Items endpoint. To update the quantity or value of tracked items, you must create accounting transactions.
To raise the value and quantity of a tracked item, generate purchase transactions such as ACCPAY Invoices or SPEND Bank Transactions. Conversely, to reduce the value and quantity of tracked items, create sales transactions like ACCREC Invoices or RECEIVE Bank Transactions. For further details on inventory adjustments, refer to the Tracked Inventory in Xero guide.
Configuration table:
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Item update. Additional fields: Tenant, Description, Inventory Asset Account Code, IsSold, IsPurchased, Purchase Description, Purchase Details, Sales Details. | |
Code* | Enter a user defined item code. |
Name | The name of the item. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Description | Description of the item. |
Inventory Asset Account Code | The inventory asset account for the item. The account must be of type INVENTORY . The COGSAccountCode in PurchaseDetails is also required to create a tracked item. |
IsSold | True – False If True the item will be available on sales transactions in the Xero UI. |
IsPurchased | True- False If True the item is available for purchase transactions in the Xero UI. |
Purchase Description | The purchase description of the item (max length = 4000) |
Purchase Details | [+ Add Field] add more fields: Unit Price: By default UnitPrice is rounded to two decimal places. Account Code: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items. Cost of good sold Account Code(COGSAccountCode): Cost of goods sold account. Only applicable to the purchase details of tracked items. Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
Sales Details | [+ Add Field] add more fields: Unit Price: By default UnitPrice is rounded to two decimal places. Account Code: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items. Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
(*) required field
Upsert Purchase Order Copy Link
⚠️ When creating a purchase order you can set the Status field to DRAFT, SUBMITTED, or AUTHORISED. However, once a purchase order is set to SUBMITTED or AUTHORISED, it cannot be reverted to DRAFT through the Update Method. Additionally, the statuses BILLED and DELETED are system-generated and cannot be assigned manually during creation or updates.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Purchase Order API Reference.
Updating line items when updating purchase orders:
In an update request:
- Providing an existing Line Item with its Line Item ID will update that line item.
- Providing a Line Item with no Line Item ID will create a new line item.
- Not providing an existing Line Item with it’s Line Item ID will result in that line item being deleted.
Configuration table:
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Purchase Order upsert. Additional fields: Tenant, Date, Status, Line Amount Types, Currency Code, Purchase Order Number, Reference, Branding Theme ID, Send To Contact, Delivery Address, Attention To, Telephone, Delivery Instructions, Expected Arrival Date. | |
Purchase Order ID* | Unique Identifier of the Purchase Order. |
ADDITIONAL FIELDS | |
Contact provide information of an existing contact. | Contact ID: Enter the Unique Identifier or Look up the value by select Input > Lookup tab > Select Search button to display a list. [+ Add Field] add more fields in Contact: Name: Full name of contact/organization. |
Line Items | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Line can be added as elements. Element 1: Represents the first Line. Line Item ID: Unique Identifier of the Line Item. Unit Amount: By default, unit amount will be rounded to two decimal places. Quantity: Line item Quantity. [+ Add Field] add more fields in Line Items: Description: Description of the line item (max length = 4000). Account Code: specifies which revenue or expense account the credit note applies to. Tip: Find the Account Code with the Method “Get Records” or “Find Records”, Entity “Account”. Discount Rate: Percentage discount being applied to a line item Tax Type: Used as an override if the default Tax Code for the selected Account Code is not correct – see TaxTypes. |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Date | Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation |
Delivery Date | Date the goods are to be delivered – YYYY-MM-DD (From supplier location). |
Status | Once a purchase order is set to SUBMITTED or AUTHORISED , it cannot be reverted to DRAFT through the API. Additionally, the statuses BILLED and DELETED are system-generated and cannot be assigned manually during creation or updates.Possible values: SUBMITTED AUTHORISED |
Line Amount Types | Line amounts are exclusive of tax by default if you don’t specify this element. Possible values: Exclusive: Line items are exclusive of tax Inclusive: Line items are inclusive tax NoTax: Line have no tax |
Currency Code | The currency that purchase order has been raised in (see List of Currencies). |
Purchase Order Number | Enter the Unique alpha numeric code identifying purchase order ( when missing will auto-generate from your Organisation Invoice Settings). |
Reference | Additional reference number. |
Branding Theme ID | Unique Identifier of the Branding Theme that apply to this Purchase Order. |
Send To Contact | True – False To set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed. |
Delivery Address | The address the goods are to be delivered to. |
Attention To | The person that the delivery is going to. |
Telephone | The phone number for the person accepting the delivery. |
Delivery Instructions | A free text field for instructions (500 characters max). |
Expected Arrival Date | The date the goods are expected to arrive. |
(*) required field
Example request to update a purchase order to mark it as sent
{
"PurchaseOrderID": "8694c9c5-7097-4449-a708-b8c1982921a4",
"SentToContact": true
}
Upsert Contact Groups Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Contact Groups API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Contact Group upsert. Additional fields: Tenant. | |
Contact Group ID* | Unique Identifier of the contact group. |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Contact Group Name | Name of the Contact Group. |
Status | Status of the Contact Group. Possible values: ACTIVE: The contact group is active and fully functional. ARCHIVED: The contact group is archived and no longer active. |
(*) required field
Example request to rename a Contact Group
{
"ContactGroupID": "679382fd-7a71-4281-b013-0ff811ca87ab",
"Name": "New Name Here"
}
{
"ContactGroupID": "679382fd-7a71-4281-b013-0ff811ca87ab",
"Name": "New Name Here"
}
Upsert Tracking Category Copy Link
See Xero Tracking Categories Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Tracking Category upsert. Additional fields: Tenant. | |
ID* | Unique Identifier of the Tracking Category. |
ADDITIONAL FIELDS | |
Name | The name of the Tracking Category. |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Status | Possible values: ACTIVE – ARCHIVED |
(*) required field
Example of request for updating a Tracking Category status
POST https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}
{
"Status": "ARCHIVED"
}
DELETE RECORDS Copy Link
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Delete Record |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to delete record from: Contact Groups, Tracking Categories, Batch Payments and Folders. |
ID* | Unique Identifier of the records. Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“. |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of Delete Tracking Category
{
"Name": "new tracking category",
"Status": "DELETED",
"TrackingCategoryID": "f9593a2c-9eb2-470c-b6c5-b23d9cf3bbb6",
"Options": []
}
FIND RECORD Copy Link
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Find Record |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to find records: Invoice, Payment, Batch Payment, Account, Contact, Bank Transaction, Credit Note, Quote, Manual Journal, Item, Purchase Order, Contact Groups, Asset, Asset Type, Tracking Category, Folder. |
MATCHING CRITERIA [+ Add Field] Add a specific field in the search. | |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Entity Invoice | Available fields to filter the search: Type, Invoice ID, Invoice Number, Reference, Date, Due Date, Status, Currency Code. ▪️ When you retrieve multiple invoices, only a summary of the contact is returned and no line details are returned – this is to keep the response more compact. ▪️ The line item details will be returned when you retrieve an individual invoice, either by specifying Invoice ID, Invoice Number, querying by Statuses or by using the optional paging parameter (below). ▪️ When you retrieve invoices by Statuses, pagination is enforced by default. |
Entity Payment | Available fields to filter the search: Payment Type, Status. |
Entity Batch Payment | Available fields to filter the search: Type, Account ID, Status. |
Entity Account | Available fields to filter the search: Account ID, Name, Type. |
Entity Contact | Available fields to filter the search: Contact ID, Name, FirstName, LastName, Contact Number, Contact Status, Email Address. |
Entity Bank Transaction | ▪️ This does not return payments applied to invoices, expense claims or transfers between bank accounts. Available fields to filter the search: Bank Transaction ID, Type. |
Entity Credit Note | Available fields to filter the search: Credit Note Number, Type. |
Entity Quote | Available fields to filter the search: Status, Quote Number. |
Entity Manual Journal | Available fields to filter the search: Status, Narration. |
Entity Item | Available fields to filter the search: Code, Name. |
Entity Purchase Order | Available fields to filter the search: Status, Type, Purchase Order Number. |
Entity Contact Groups | Available fields to filter the search: Contact Group Name, Status. |
Entity Asset | Available fields to filter the search: Asset Name, Asset Number, Status. |
Entity Asset Type | Available fields to filter the search: Asset Type Name |
Entity Tracking Category | Available fields to filter the search: Name, Status. |
Entity Folder | Available fields to filter the search: Name |
(*) required field
Example of responses:
Find Invoice by providing Invoice ID
{
"Type": "ACCREC",
"InvoiceID": "fee88eea-f2aa-4a71-a372-33d6d83d3c45",
"InvoiceNumber": "INV-0027",
"Reference": "Ref MK815",
"Prepayments": [],
"Overpayments": [],
"AmountDue": 396,
"AmountPaid": 0,
"SentToContact": false,
"CurrencyRate": 1,
"IsDiscounted": false,
"HasAttachments": false,
"HasErrors": false,
"Attachments": [],
"InvoicePaymentServices": [],
"Contact": {
"ContactID": "5b96e86b-418e-48e8-8949-308c14aec278",
"ContactStatus": "ACTIVE",
"Name": "Marine Systems",
"EmailAddress": "",
"BankAccountDetails": "",
"Addresses": [
{
"AddressType": "POBOX",
"City": "",
"Region": "",
"PostalCode": "",
"Country": ""
},
{
"AddressType": "STREET",
"City": "",
"Region": "",
"PostalCode": "",
"Country": ""
}
],
"Phones": [
{
"PhoneType": "FAX",
"PhoneNumber": "",
"PhoneAreaCode": "",
"PhoneCountryCode": ""
},
{
"PhoneType": "MOBILE",
"PhoneNumber": "",
"PhoneAreaCode": "",
"PhoneCountryCode": ""
},
{
"PhoneType": "DDI",
"PhoneNumber": "",
"PhoneAreaCode": "",
"PhoneCountryCode": ""
},
{
"PhoneType": "DEFAULT",
"PhoneNumber": "",
"PhoneAreaCode": "",
"PhoneCountryCode": ""
}
],
"UpdatedDateUTC": "2025-02-19T18:03:41+00:00",
"ContactGroups": [],
"IsSupplier": false,
"IsCustomer": true,
"DefaultCurrency": "USD",
"SalesTrackingCategories": [],
"PurchasesTrackingCategories": [],
"ContactPersons": [],
"HasValidationErrors": false
},
"DateString": "2025-02-18T00:00:00",
"Date": "2025-02-18T00:00:00+00:00",
"DueDateString": "2025-02-24T00:00:00",
"DueDate": "2025-02-24T00:00:00+00:00",
"BrandingThemeID": "d613f7f9-8fcb-477f-97f0-31eb85b7e5cf",
"Status": "AUTHORISED",
"LineAmountTypes": "Inclusive",
"LineItems": [
{
"Description": "Marketing guides",
"UnitAmount": 99,
"TaxType": "OUTPUT",
"TaxAmount": 30.18,
"LineAmount": 396,
"AccountCode": "200",
"Tracking": [],
"Quantity": 4,
"LineItemID": "8dd05881-be4a-4765-b95e-cce0d7395f9f",
"AccountID": "d1ebb97b-d207-4ccb-9ab6-8a466a8b4d39",
"ValidationErrors": []
}
],
"SubTotal": 365.82,
"TotalTax": 30.18,
"Total": 396,
"UpdatedDateUTC": "2008-12-19T01:37:59+00:00",
"CurrencyCode": "USD"
}
Find all ACCREC PAYMENT payments with an AUTHORISED status
{
"Payments": [
{
"PaymentID": "b26fd49a-cbae-470a-a8f8-bcbc119e0379",
"BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
"BatchPayment": {
"Account": {
"AccountID": "ac993f75-035b-433c-82e0-7b7a2d40802c"
},
"BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
"Date": "\/Date(1455667200000+0000)\/",
"Type": "RECBATCH",
"Status": "AUTHORISED",
"TotalAmount": "600.00",
"UpdatedDateUTC": "\/Date(1289572582537+0000)\/",
"IsReconciled": "true"
},
"Date": "\/Date(1455667200000+0000)\/",
"BankAmount": 500.00,
"Amount": 500.00,
"Reference": "INV-0001",
"CurrencyRate": 1.000000,
"PaymentType": "ACCRECPAYMENT",
"Status": "AUTHORISED",
"UpdatedDateUTC": "\/Date(1289572582537+0000)\/",
"HasAccount": true,
"IsReconciled": true,
"Account": {
"AccountID": "ac993f75-035b-433c-82e0-7b7a2d40802c",
"Code": "090"
},
"Invoice": {
"Type": "ACCREC",
"InvoiceID": "b0875d8b-ff26-4ce8-8aea-6955492ead48",
"InvoiceNumber": "INV-0001",
"Contact": {
"ContactID": "fef6755f-549b-4617-b1e9-60bdffb517d8",
"Name": "Ridgeway University"
}
}
}
]
}
Find an individual batch payment (NZ)
{
"BatchPayments": [
{
"Account": {
"AccountID": "13918178-849a-4823-9a31-57b7eac713d7"
},
"Reference": "ref",
"BatchPaymentID": "44a1013e-4946-4a73-b207-dfe5424a5ea5",
"DateString": "2018-10-03T00:00:00",
"Date": "/Date(1538524800000+0000)/",
"Payments": [
{
"Invoice": {
"InvoiceID": "5aa9451d-95d1-4f95-a966-bbab2573f71c",
"Payments": [],
"CreditNotes": [],
"Prepayments": [],
"Overpayments": [],
"HasErrors": false,
"IsDiscounted": false,
"LineItems": []
},
"PaymentID": "a22a64cb-364e-43fa-9a1f-bb2cd1f4adde",
"Reference": "ref/cheque",
"Amount": 913.55
},
{
"Invoice": {
"InvoiceID": "30a87092-31b5-4a2c-831e-327486533dd2",
"Payments": [],
"CreditNotes": [],
"Prepayments": [],
"Overpayments": [],
"HasErrors": false,
"IsDiscounted": false,
"LineItems": []
},
"PaymentID": "6e20be79-32d8-4ae1-978e-f76d9b245c02",
"Amount": 495
},
{
"Invoice": {
"InvoiceID": "86d6e00f-ef56-49f7-9a54-796ccd5ca057",
"Payments": [],
"CreditNotes": [],
"Prepayments": [],
"Overpayments": [],
"HasErrors": false,
"IsDiscounted": false,
"LineItems": []
},
"PaymentID": "4ba761b8-5940-4a3f-bcdf-7775adb00332",
"Amount": 3080
}
],
"Type": "RECBATCH",
"Status": "AUTHORISED",
"TotalAmount": 4488.55,
"UpdatedDateUTC": "/Date(1538525239370+0000)/",
"IsReconciled": false
}
]
}
Find Accounts
{
"Accounts": [{
"AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85",
"Code": "091",
"Name": "Business Savings Account",
"Type": "BANK",
"TaxType": "NONE",
"EnablePaymentsToAccount": false,
"BankAccountNumber": "0209087654321050",
"BankAccountType": "BANK",
"CurrencyCode": "NZD"
},{
"AccountID": "7d05a53d-613d-4eb2-a2fc-dcb6adb80b80",
"Code": "200",
"Name": "Sales",
"Type": "REVENUE",
"TaxType": "OUTPUT2",
"Description": "Income from any normal business activity",
"EnablePaymentsToAccount": false
}]
}
Find an individual Account
{
"Accounts": [{
"AccountID": "297c2dc5-cc47-4afd-8ec8-74990b8761e9",
"Code": "300",
"Name": "Purchases",
"Type": "DIRECTCOSTS",
"TaxType": "INPUT2",
"Description": "Goods purchased with the intention of selling these to customers",
"EnablePaymentsToAccount": false
}]
}
Find Contacts
{
"Contacts": [
{
"ContactID": "bd2270c3-8706-4c11-9cfb-000b551c3f51",
"ContactStatus": "ACTIVE",
"Name": "ABC Limited",
"FirstName": "Andrea",
"LastName": "Dutchess",
"CompanyNumber": "NumberBusiness1234",
"EmailAddress": "a.dutchess@abclimited.com",
"BankAccountDetails": "45465844",
"TaxNumber": "415465456454",
"AccountsReceivableTaxType": "INPUT2",
"AccountsPayableTaxType": "OUTPUT2",
"Addresses": [
{
"AddressType": "POBOX",
"AddressLine1": "P O Box 123",
"City": "Wellington",
"PostalCode": "6011",
"AttentionTo": "Andrea"
},{
"AddressType": "STREET"
}
],
"Phones": [
{
"PhoneType": "DEFAULT",
"PhoneNumber": "1111111",
"PhoneAreaCode": "04",
"PhoneCountryCode": "64"
},{
"PhoneType": "FAX"
},{
"PhoneType": "MOBILE"
},{
"PhoneType": "DDI"
}
],
"UpdatedDateUTC": "\/Date(1488391422280+0000)\/",
"IsSupplier": false,
"IsCustomer": true,
"DefaultCurrency": "NZD"
},{
"ContactID": "6d42f03b-181f-43e3-93fb-2025c012de92"
...
}
]
}
Find an individual Contact
{
"Contacts": [
{
"ContactID": "bd2270c3-8706-4c11-9cfb-000b551c3f51",
"ContactStatus": "ACTIVE",
"Name": "ABC Limited",
"FirstName": "Andrea",
"LastName": "Dutchess",
"CompanyNumber": "NumberBusiness1234",
"EmailAddress": "a.dutchess@abclimited.com",
"BankAccountDetails": "45465844",
"TaxNumber": "415465456454",
"AccountsReceivableTaxType": "INPUT2",
"AccountsPayableTaxType": "OUTPUT2",
"Addresses": [
{
"AddressType": "POBOX",
"AddressLine1": "P O Box 123",
"City": "Wellington",
"PostalCode": "6011",
"AttentionTo": "Andrea"
},{
"AddressType": "STREET"
}
],
"Phones": [
{
"PhoneType": "DEFAULT",
"PhoneNumber": "1111111",
"PhoneAreaCode": "04",
"PhoneCountryCode": "64"
},{
"PhoneType": "FAX"
},{
"PhoneType": "MOBILE"
},{
"PhoneType": "DDI"
}
],
"UpdatedDateUTC": "\/Date(1488391422280+0000)\/",
"IsSupplier": false,
"IsCustomer": true,
"DefaultCurrency": "NZD"
}
]
}
Find a single Bank Transaction
{
"BankTransactions": [{
"Contact": {
"ContactID": "6d42f03b-181f-43e3-93fb-2025c012de92",
"Name": "Wilson Periodicals"
},
"DateString": "2014-05-26T00:00:00",
"Date": "\/Date(1401062400000+0000)\/",
"Status": "AUTHORISED",
"LineAmountTypes": "Inclusive",
"LineItems": [{
"Description": "Monthly account fee",
"UnitAmount": "49.90",
"TaxType": "NONE",
"TaxAmount": "0.00",
"LineAmount": "49.90",
"AccountCode": "404",
"Quantity": "1.0000",
"LineItemID": "52208ff9-528a-4985-a9ad-b2b1d4210e38"
}],
"SubTotal": "49.90",
"TotalTax": "0.00",
"Total": "49.90",
"UpdatedDateUTC": "\/Date(1439434356790+0000)\/",
"CurrencyCode": "NZD",
"BankTransactionID": "d20b6c54-7f5d-4ce6-ab83-55f609719126",
"BankAccount": {
"AccountID": "ac993f75-035b-433c-82e0-7b7a2d40802c",
"Code": "090",
"Name": "Business Bank Account"
},
"BatchPayment": {
"Account": {
"AccountID": "ac993f75-035b-433c-82e0-7b7a2d40802c"
},
"BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
"Date": "\/Date(1401062400000+0000)\/",
"Type": "RECBATCH",
"Status": "AUTHORISED",
"TotalAmount": "100.00",
"UpdatedDateUTC": "\/Date(1439434356790+0000)\/",
"IsReconciled": "true"
},
"Type": "SPEND",
"Reference": "Sub 098801",
"IsReconciled": "true"
}]
}
Find a collection of Bank Transactions
{
"BankTransactions": [{
"Contact": {
"ContactID": "c09661a2-a954-4e34-98df-f8b6d1dc9b19",
"Name": "BNZ"
},
"DateString": "2014-05-26T00:00:00",
"Date": "\/Date(1401062400000+0000)\/",
"LineAmountTypes": "Inclusive",
"SubTotal": "15.00",
"TotalTax": "0.00",
"Total": "15.00",
"UpdatedDateUTC": "\/Date(1519250319570+0000)\/",
"FullyPaidOnDate": "\/Date(1439434356790+0000)\/",
"BankTransactionID": "d20b6c54-7f5d-4ce6-ab83-55f609719126",
"BankAccount": {
"AccountID": "297c2dc5-cc47-4afd-8ec8-74990b8761e9",
"Code": "BANK"
},
"Type": "SPEND",
"IsReconciled": "true"
},{
...
}]
}
Find Credit Note (Without Paging)
{
"CreditNotes": [
{
"Contact": {
"ContactID": "c6c7b870-bb4d-489a-921e-2f0ee4192ff9",
"Name": "Test Apply Credit Note"
},
"DateString": "2016-12-16T00:00:00",
"Date": "\/Date(1481846400000+0000)\/",
"Status": "PAID",
"LineAmountTypes": "Inclusive",
"SubTotal": 86.96,
"TotalTax": 13.04,
"Total": 100.00,
"UpdatedDateUTC": "\/Date(1290168061547+0000)\/",
"CurrencyCode": "NZD",
"FullyPaidOnDate": "\/Date(1481846400000+0000)\/",
"Type": "ACCRECCREDIT",
"CreditNoteID": "aea95d78-ea48-456b-9b08-6bc012600072",
"CreditNoteNumber": "CN-0002",
"CurrencyRate": 1.000000,
"RemainingCredit": 0.00,
"Allocations": [
{
"AllocationID": "b12335f4-a1e5-4431-aeb4-488e5547558e",
"Amount": 100.00,
"Date": "\/Date(1481846400000+0000)\/",
"Invoice": {
"InvoiceID": "87cfa39f-136c-4df9-a70d-bb80d8ddb975",
"InvoiceNumber": "INV-0001"
}
}
]
}
]
}
Find Single Credit Note
{
"CreditNotes": [
{
"Contact": {
"ContactID": "d0cd2c4f-18a0-4f7c-a32a-2db00f29d298",
"ContactStatus": "ACTIVE",
"Name": "PC Complete"
...
},
"DateString": "2017-02-07T00:00:00",
"Date": "\/Date(1486425600000+0000)\/",
"DueDate": "\/Date(1486425600000+0000)\/",
"Status": "PAID",
"LineAmountTypes": "Exclusive",
"LineItems": [
{
"Description": "Internal DVD drive couldn't be supplied, backorder (Oliver laptop)",
"UnitAmount": 199.00,
"TaxType": "INPUT",
"TaxAmount": 19.90,
"LineAmount": 199.00,
"AccountCode": "453",
"AccountId": "fc8f0c5e-a3dc-4de3-ab8d-37ae0e5d152f",
"Tracking": [
{
"Name": "Region",
"Option": "North",
"TrackingCategoryID": "093af706-c2aa-4d97-a4ce-2d205a017eac",
"TrackingOptionID": "3f05cdf9-246b-46a2-bf6f-441da1b09b89"
}
],
"Quantity": 1.0000
}
],
"SubTotal": 199.00,
"TotalTax": 19.90,
"Total": 218.90,
"UpdatedDateUTC": "\/Date(1290777947340+0000)\/",
"CurrencyCode": "AUD",
"FullyPaidOnDate": "\/Date(1486425600000+0000)\/",
"Type": "ACCPAYCREDIT",
"RemainingCredit": 0.00,
"Allocations": [
{
"AllocationID": "b12335f4-a1e5-4431-aeb4-488e5547558e",
"Amount": 218.90,
"Date": "\/Date(1486425600000+0000)\/",
"Invoice": {
"InvoiceID": "673dd7cc-beb7-4697-83d4-0c47cb400cc2"
}
}
],
"HasAttachments": false,
"CreditNoteID": "7df8949c-b71f-40c0-bbcf-39f2f450f286",
"CreditNoteNumber": "03391"
}
]
}
Find a collection of Quotes
{
"Id": "a5325919-874c-4e7c-bcb0-5b149de392c8",
"Status": "OK",
"ProviderName": "Adam Public",
"DateTimeUTC": "/Date(1574029615275)/",
"Quotes": [
{
"QuoteID": "68e9965d-8d22-4e22-a01c-ee0a78fb3ea1",
"QuoteNumber": "QU-0010",
"Reference": "REF-123",
"Terms": "Quote valid until the end of the month",
"Contact": {
"ContactID": "42771b60-19a7-4692-af81-dd9f9b9362d4",
"Name": "ABC Furniture",
"EmailAddress": "info@abfl.com",
"FirstName": "Trish",
"LastName": "Rawlings"
},
"LineItems": [
{
"LineItemID": "060f0936-5818-4b31-acbd-6c733dafbc1a",
"AccountCode": "200",
"Description": "Development work - developer onsite per day",
"UnitAmount": 650.0000,
"DiscountRate": 10.00,
"LineAmount": 585.00,
"ItemCode": "DevD",
"Quantity": 1.0000,
"TaxAmount": 58.50,
"TaxType": "OUTPUT",
"Tracking": [
{
"TrackingCategoryID": "093af706-c2aa-4d97-a4ce-2d205a017eac",
"TrackingOptionID": "ae777a87-5ef3-4fa0-a4f0-d10e1f13073a",
"Name": "Region",
"Option": "Eastside"
}
]
}
],
"Date": "/Date(1574035200000)/",
"DateString": "2019-11-18T00:00:00",
"ExpiryDate": "/Date(1575072000000)/",
"ExpiryDateString": "2019-11-30T00:00:00",
"Status": "DRAFT",
"CurrencyRate": 0.901366,
"CurrencyCode": "CAD",
"SubTotal": 585.00,
"TotalTax": 58.50,
"Total": 643.50,
"TotalDiscount": 65.00,
"Title": "Quote for dev work",
"Summary": "As discussed",
"BrandingThemeID": "2ced98b8-3be9-42c4-ae79-fe3c8bca3490",
"UpdatedDateUTC": "/Date(1574029509507)/",
"LineAmountTypes": "EXCLUSIVE"
}
...
]
}
Find a collection of Manual Journals (Without Paging)
{
"ManualJournals": [
{
"Date": "\/Date(1486166400000+0000)\/",
"Status": "DRAFT",
"LineAmountTypes": "NoTax",
"UpdatedDateUTC": "\/Date(1291226902527+0000)\/",
"ManualJournalID": "99ff1108-2d9a-4955-ac7e-e705aa1b9547",
"Narration": "Prepaid our insurance a year in advance",
"ShowOnCashBasisReports": true
},{
"Date": "\/Date(1488240000000+0000)\/",
"Status": "POSTED",
"LineAmountTypes": "NoTax",
"UpdatedDateUTC": "\/Date(1291227505357+0000)\/",
"ManualJournalID": "e5f09a63-62db-4739-af7c-1deda351ed5a",
"Narration": "Prepaid our phone a year in advance",
"ShowOnCashBasisReports": true
}
]
}
Find a single Manual Journals
{
"ManualJournals": [
{
"Date": "\/Date(1486166400000+0000)\/",
"Status": "POSTED",
"LineAmountTypes": "NoTax",
"UpdatedDateUTC": "\/Date(1291226902527+0000)\/",
"ManualJournalID": "c53ebb10-c046-471b-9919-29ac6b9fb977",
"Narration": "Coded incorrectly Office Equipment should be Computer Equipment",
"JournalLines": [
{
"Description": "Coded incorrectly Office Equipment should be Computer Equipment",
"TaxType": "NONE",
"TaxAmount": 0.00,
"LineAmount": -2569.00,
"AccountCode": "720",
"Tracking": [],
"IsBlank": false
},
{
"Description": "Coded incorrectly Computer Equipment should be Office Equipment",
"TaxType": "NONE",
"TaxAmount": 0.00,
"LineAmount": 2569.00,
"AccountCode": "710",
"Tracking": [],
"IsBlank": false
}
],
"ShowOnCashBasisReports": true,
"HasAttachments": false
}
]
}
Find an individual Items
{
"Items": [
{
"ItemID": "9a59ea90-942e-484d-9b71-d00ab607e03b",
"Code": "Merino-2011-LG",
"Description": "2011 Merino Sweater - LARGE",
"UpdatedDateUTC": "\/Date(1488338552390+0000)\/",
"PurchaseDetails": {
"UnitPrice": 149.0000,
"AccountCode": "300"
},
"SalesDetails": {
"UnitPrice": 299.0000,
"AccountCode": "200"
}
}
]
}
Find a collection of Items
{
"Items": [
{
"ItemID": "19b79d12-0ae1-496e-9649-cbd04b15c7c5",
"Code": "UnTrackedThing",
"Description": "I sell this untracked thing",
"PurchaseDescription": "I buy this untracked thing",
"UpdatedDateUTC": "\/Date(1488338552390+0000)\/",
"PurchaseDetails": {
"UnitPrice": 20.0000,
"AccountCode": "400",
"TaxType": "NONE"
},
"SalesDetails": {
"UnitPrice": 40.0000,
"AccountCode": "200",
"TaxType": "OUTPUT2"
},
"Name": "An Untracked Item",
"IsTrackedAsInventory": false,
"IsSold": true,
"IsPurchased": true
},
{
"ItemID": "90a72d44-43e4-410d-a68b-1139ef0c0c07",
"Code": "TrackedThing",
"Description": "I sell this tracked thing",
"PurchaseDescription": "I purchase this tracked thing",
"UpdatedDateUTC": "\/Date(1488338552390+0000)\/",
"PurchaseDetails": {
"UnitPrice": 20.0000,
"COGSAccountCode": "430",
"TaxType": "NONE"
},
"SalesDetails": {
"UnitPrice": 40.0000,
"AccountCode": "200",
"TaxType": "OUTPUT2"
},
"Name": "Tracked Thing",
"IsTrackedAsInventory": true,
"InventoryAssetAccountCode": "630",
"TotalCostPool": 200.00,
"QuantityOnHand": 10.0000,
"IsSold": true,
"IsPurchased": true
}
]
}
Find Contact Groups
{
"ContactGroups": [
{
"ContactGroupID": "97bbd0e6-ab4d-4117-9304-d90dd4779199",
"Name": "VIP Customers",
"Status": "ACTIVE"
},{
"ContactGroupID": "d0c68f1a-e5dd-4a45-aa02-27d8fdbfd562",
"Name": "Preferred Suppliers",
"Status": "ACTIVE"
}
]
}
Find Single Contact Group
{
"ContactGroups": [
{
"ContactGroupID": "97bbd0e6-ab4d-4117-9304-d90dd4779199",
"Name": "Adam's Contacts",
"Status": "ACTIVE",
"Contacts": [
{
"ContactID": "9ce626d2-14ea-463c-9fff-6785ab5f9bfb",
"Name": "Boom FM"
},{
"ContactID": "b9d4332a-26a3-4577-8db2-6e830d4b07cd",
"Name": "Berry Brew"
},{
"ContactID": "2dc0ef7c-582f-4542-963b-dbdc069e4819",
"Name": "Bayside Wholesale"
}
]
}
]
}
Find a list of draft Assets
{
"pagination": {
"page": 1,
"pageSize": 10,
"pageCount": 1,
"itemCount": 2,
},
"items": [
{
"assetId": "3b5b3a38-5649-495f-87a1-14a4e5918634",
"assetName": "Awesome Truck 3",
"assetNumber": "FA-0013",
"purchaseDate": "2015-07-01T00:00:00",
"purchasePrice": 1000,
"disposalPrice": 0,
"assetStatus": "Draft",
"canRollback": true,
"accountingBookValue": 0
},
{
"assetId": "1fd647b8-c449-42cb-9cc4-cd41fe8df262",
"assetName": "Awesome Car",
"assetNumber": "FA-0001",
"purchaseDate": "2015-07-01T00:00:00",
"purchasePrice": 100000,
"disposalPrice": 0,
"assetStatus": "Draft",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 0.01,
"depreciationCalculationMethod": "None",
"effectiveFromDate": "2015-07-01T00:00:00",
"costLimit": 100000,
"residualValue": 10000,
},
"bookDepreciationDetail": {
"currentCapitalGain": 0,
"currentGainLoss": 0,
"priorAccumDepreciationAmount": 0,
"currentAccumDepreciationAmount": 0
},
"canRollback": true,
"accountingBookValue": 100000
}
]
}
Find a single Asset
{
"assetId": "92d04e4407404c1facd6edbbceac7faa",
"assetName": "Computer",
"assetNumber": "FA-0021",
"purchaseDate": "2016-04-11T00:00:00",
"purchasePrice": 3000,
"serialNumber": "123456789",
"warrantyExpiryDate": "2018-04-11T00:00:00",
"assetTypeId": "5da209c55e194a43b92571b776c49ced",
"description": "A computer for computing",
"disposalPrice": 0,
"assetStatus": "Registered",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
"currentGainLoss": 0,
},
"bookDepreciationDetail": {
"currentCapitalGain": 0,
"depreciationStartDate": "2016-04-11T00:00:00",
"priorAccumDepreciationAmount": 0,
"currentAccumDepreciationAmount": 0
},
"canRollback": true,
"accountingBookValue": 3000
}
Find a list of Asset Types
[
{
"assetTypeId": "5da209c5-5e19-4a43-b925-71b776c49ced",
"assetTypeName": "Computer Equipment",
"fixedAssetAccountId": "24e260f1-bfc4-4766-ad7f-8a8ce01de879",
"depreciationExpenseAccountId": "b23fc79b-d66b-44b0-a240-e138e086fcbc",
"accumulatedDepreciationAccountId": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
},
"locks": 0
},
{
"assetTypeId": "a865d898-4ee9-4366-bf37-bfc1b35cf788",
"assetTypeName": "Office Equipment",
"fixedAssetAccountId": "24e260f1-bfc4-4766-ad7f-8a8ce01de879",
"depreciationExpenseAccountId": "b23fc79b-d66b-44b0-a240-e138e086fcbc",
"accumulatedDepreciationAccountId": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
},
"locks": 0
},
{
"assetTypeId": "26c17b4a-0093-402c-b9bb-281dedf5c604",
"assetTypeName": "Vehicles",
"fixedAssetAccountId": "24e260f1-bfc4-4766-ad7f-8a8ce01de879",
"depreciationExpenseAccountId": "b23fc79b-d66b-44b0-a240-e138e086fcbc",
"accumulatedDepreciationAccountId": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
},
"locks": 0
}
]
Find Tracking Categories
{
"TrackingCategories": [
{
"Name": "Region",
"Status": "ACTIVE",
"TrackingCategoryID": "351953c4-8127-4009-88c3-f9cd8c9cbe9f",
"Options": [
{
"TrackingOptionID": "ce205173-7387-4651-9726-2cf4c5405ba2",
"Name": "Eastside",
"Status": "ACTIVE"
},
{
"TrackingOptionID": "6eb12fdf-63de-4033-98df-be679d84e3c2",
"Name": "North",
"Status": "ACTIVE"
},
{
"TrackingOptionID": "6159bdd4-b634-4338-a664-e929aa73f70f",
"Name": "South",
"Status": "ACTIVE"
},
{
"TrackingOptionID": "161ad543-97ab-4436-8213-e0d794b1ea90",
"Name": "West Coast",
"Status": "ACTIVE"
}
]
}
]
}
Find Folders
{
"Name":"Inbox",
"FileCount":0,
"Email":"xero.inbox.dxlsh.yth06v9y5u6ak3bz@xerofiles.com",
"IsInbox":true,
"Id":"7215cb90-15e1-4949-9fec-690126f1f88f"
},
{
"Name":"Contracts",
"FileCount":1,
"IsInbox":false,
"Id":"0f8ccf21-7267-4268-9167-a1e2c40c84c8"
}
GET RECORDS Copy Link
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Get Records |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to retrieve records from: Invoice, Payment, Batch Payment, Account, Contact, Linked Transaction, Item, Purchase Order, Contact Groups, Employee, Report, Tax Rate, Asset, Asset Type, Tracking Category, Folder, Tenant, Settings. |
MATCHING CRITERIA [+ Add Field] Add a specific field in the search. | |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
Entity Invoice | ▪️ When you retrieve multiple invoices, only a summary of the contact is returned and no line details are returned – this is to keep the response more compact. ▪️ The line item details will be returned when you retrieve an individual invoice, either by specifying Invoice ID, Invoice Number, querying by Statuses or by using the optional paging parameter (below). ▪️ When you retrieve invoices by Statuses, pagination is enforced by default. See Find Record Method. |
Entity Payment | Requests that have more than 100k payments being returned in the response will be denied and receive a 400 response code. |
Entity Batch Payment | Retrieve batch payments. |
Entity Account | Allows you to retrieve the full chart of accounts. |
Entity Contact | Requests that have more than 100k contacts being returned in the response will be denied. |
Entity Linked Transaction | Available fields to filter the search: Linked Transaction ID: The Xero identifier for an Linked Transaction. Source Transaction ID: Filter by the SourceTransactionID. Get all the linked transactions created from a particular ACCPAY invoice. Contact ID: Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. Status: Filter by the combination of ContactID and Status. Get all the linked transactions that have been assigned to a particular customer and have a particular status Target Transaction ID. Page: Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. |
Entity Item | Retrieve a collection of items. |
Entity Purchase Order | When you retrieve multiple purchase orders, paging is enforced by default. 100 purchase orders are returned per page. |
Entity Contact Groups | Allows you to retrieve the ContactID and Name of all the contacts in a contact group. Only contact groups with a status of ACTIVE are returned. |
Entity Employee | Retrieves Employees within an organisation. |
Entity Report | Returns the 1099 report, for all years from 2012, as configured by the rules in the Xero app. The 1099 report includes both the 1099-NEC and 1099-MISC forms for all reports in years 2020 onward. For reports 2019 and prior, only the 1099-MISC form applies. This report is available to US organizations only. To access this report, the user must have the advisor user role in the organization. |
Entity Tax Rate | Returns tax rates for an organisation. |
Entity Asset | Available fields to filter the search: Status: Required when retrieving a collection of assets. |
Entity Asset Type | Retrieve a list of Asset Types. |
Entity Tracking Category | Retrieve tracking categories and options. |
Entity Folder | Retrieving the list of folders. |
Entity Tenant | Retrieve Tenants information. |
Entity Settings | Allows you to retrieve the organisation settings for fixed assets. |
(*) required field
Example of responses:
Get a collection of Invoices
{
"Invoices": [
{
"Type": "ACCREC",
"Contact": {
"ContactID": "025867f1-d741-4d6b-b1af-9ac774b59ba7",
"Name": "City Agency"
},
"Date": "\/Date(1518685950940+0000)\/",
"DateString": "2009-05-27T00:00:00",
"DueDate": "\/Date(1518685950940+0000)\/",
"DueDateString": "2009-06-06T00:00:00",
"Status": "AUTHORISED",
"LineAmountTypes": "Exclusive",
"SubTotal": 1800.00,
"TotalTax": "225.00",
"Total": "2025.00",
"UpdatedDateUTC": "\/Date(1518685950940+0000)\/",
"CurrencyCode": "NZD",
"InvoiceID": "243216c5-369e-4056-ac67-05388f86dc81",
"InvoiceNumber": "OIT00546",
"AmountDue": "2025.00",
"AmountPaid": "0.00",
"AmountCredited": "0.00"
},
{
"Reference": "RPT-DD",
"Type": "ACCREC",
"Contact": {
"ContactID": "06638157-fdfa-47f4-91d0-875b5f5c18c6",
"Name": "Marine Systems"
},
"Date": "\/Date(1518685950940+0000)\/",
"DateString": "2009-05-27T00:00:00",
"DueDate": "\/Date(1518685950940+0000)\/",
"DueDateString": "2009-06-06T00:00:00",
"Status": "AUTHORISED",
"LineAmountTypes": "Exclusive",
"SubTotal": "28.50",
"TotalTax": "3.56",
"Total": "32.06",
"UpdatedDateUTC": "\/Date(1518685950940+0000)\/",
"CurrencyCode": "NZD",
"InvoiceID": "03778e72-d541-404a-ab9b-2757aeda76a3",
"InvoiceNumber": "OIT00542",
"AmountDue": "32.06",
"AmountPaid": "0.00",
"AmountCredited": "0.00"
}
]
}
Get Payments
{
"Payments": [
{
"PaymentID": "b26fd49a-cbae-470a-a8f8-bcbc119e0379",
"BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
"BatchPayment": {
"Account": {
"AccountID": "ac993f75-035b-433c-82e0-7b7a2d40802c"
},
"BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
"Date": "\/Date(1455667200000+0000)\/",
"Type": "RECBATCH",
"Status": "AUTHORISED",
"TotalAmount": "600.00",
"UpdatedDateUTC": "\/Date(1289572582537+0000)\/",
"IsReconciled": "true"
},
"Date": "\/Date(1455667200000+0000)\/",
"BankAmount": 500.00,
"Amount": 500.00,
"Reference": "INV-0001",
"CurrencyRate": 1.000000,
"PaymentType": "ACCRECPAYMENT",
"Status": "AUTHORISED",
"UpdatedDateUTC": "\/Date(1289572582537+0000)\/",
"HasAccount": true,
"IsReconciled": true,
"Account": {
"AccountID": "ac993f75-035b-433c-82e0-7b7a2d40802c",
"Code": "090"
},
"Invoice": {
"Type": "ACCREC",
"InvoiceID": "b0875d8b-ff26-4ce8-8aea-6955492ead48",
"InvoiceNumber": "INV-0001",
"Contact": {
"ContactID": "fef6755f-549b-4617-b1e9-60bdffb517d8",
"Name": "Ridgeway University"
}
}
}
]
}
Get an individual batch payment (NZ)
{
"BatchPayments": [
{
"Account": {
"AccountID": "13918178-849a-4823-9a31-57b7eac713d7"
},
"Reference": "ref",
"BatchPaymentID": "44a1013e-4946-4a73-b207-dfe5424a5ea5",
"DateString": "2018-10-03T00:00:00",
"Date": "/Date(1538524800000+0000)/",
"Payments": [
{
"Invoice": {
"InvoiceID": "5aa9451d-95d1-4f95-a966-bbab2573f71c",
"Payments": [],
"CreditNotes": [],
"Prepayments": [],
"Overpayments": [],
"HasErrors": false,
"IsDiscounted": false,
"LineItems": []
},
"PaymentID": "a22a64cb-364e-43fa-9a1f-bb2cd1f4adde",
"Reference": "ref/cheque",
"Amount": 913.55
},
{
"Invoice": {
"InvoiceID": "30a87092-31b5-4a2c-831e-327486533dd2",
"Payments": [],
"CreditNotes": [],
"Prepayments": [],
"Overpayments": [],
"HasErrors": false,
"IsDiscounted": false,
"LineItems": []
},
"PaymentID": "6e20be79-32d8-4ae1-978e-f76d9b245c02",
"Amount": 495
},
{
"Invoice": {
"InvoiceID": "86d6e00f-ef56-49f7-9a54-796ccd5ca057",
"Payments": [],
"CreditNotes": [],
"Prepayments": [],
"Overpayments": [],
"HasErrors": false,
"IsDiscounted": false,
"LineItems": []
},
"PaymentID": "4ba761b8-5940-4a3f-bcdf-7775adb00332",
"Amount": 3080
}
],
"Type": "RECBATCH",
"Status": "AUTHORISED",
"TotalAmount": 4488.55,
"UpdatedDateUTC": "/Date(1538525239370+0000)/",
"IsReconciled": false
}
]
}
Get Accounts
{
"Accounts": [{
"AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85",
"Code": "091",
"Name": "Business Savings Account",
"Type": "BANK",
"TaxType": "NONE",
"EnablePaymentsToAccount": false,
"BankAccountNumber": "0209087654321050",
"BankAccountType": "BANK",
"CurrencyCode": "NZD"
},{
"AccountID": "7d05a53d-613d-4eb2-a2fc-dcb6adb80b80",
"Code": "200",
"Name": "Sales",
"Type": "REVENUE",
"TaxType": "OUTPUT2",
"Description": "Income from any normal business activity",
"EnablePaymentsToAccount": false
}]
}
Get Contacts
{
"Contacts": [
{
"ContactID": "bd2270c3-8706-4c11-9cfb-000b551c3f51",
"ContactStatus": "ACTIVE",
"Name": "ABC Limited",
"FirstName": "Andrea",
"LastName": "Dutchess",
"CompanyNumber": "NumberBusiness1234",
"EmailAddress": "a.dutchess@abclimited.com",
"BankAccountDetails": "45465844",
"TaxNumber": "415465456454",
"AccountsReceivableTaxType": "INPUT2",
"AccountsPayableTaxType": "OUTPUT2",
"Addresses": [
{
"AddressType": "POBOX",
"AddressLine1": "P O Box 123",
"City": "Wellington",
"PostalCode": "6011",
"AttentionTo": "Andrea"
},{
"AddressType": "STREET"
}
],
"Phones": [
{
"PhoneType": "DEFAULT",
"PhoneNumber": "1111111",
"PhoneAreaCode": "04",
"PhoneCountryCode": "64"
},{
"PhoneType": "FAX"
},{
"PhoneType": "MOBILE"
},{
"PhoneType": "DDI"
}
],
"UpdatedDateUTC": "\/Date(1488391422280+0000)\/",
"IsSupplier": false,
"IsCustomer": true,
"DefaultCurrency": "NZD"
},{
"ContactID": "6d42f03b-181f-43e3-93fb-2025c012de92"
...
}
]
}
Get Linked Transactions
{
"LinkedTransactions": [
{
"LinkedTransactionID": "2b921ac0-1ed9-4a61-bd67-706180f1bd94",
"SourceTransactionID": "057df639-6632-4995-b0ac-00152e1c5092",
"SourceLineItemID": "aa605236-49cc-4cf7-8c43-161def9bbf68",
"ContactID": "a94c0f29-8924-4b05-b0e6-585ea1982faa",
"TargetTransactionID": "147f3680-1b41-48ee-8c7f-61a656bbf49a",
"TargetLineItemID": "14f06cf1-e2af-4825-8476-bb79f5ba503e",
"Status": "BILLED",
"Type": "BILLABLEEXPENSE",
"UpdatedDateUTC": "2015-09-09T22:13:28",
"SourceTransactionTypeCode": "SPEND"
},
{
"LinkedTransactionID": "dc3c18e6-ab39-4d0e-8283-0609efa36145",
"SourceTransactionID": "0465c7b5-69b8-4e55-8c32-af73eab9afba",
"SourceLineItemID": "c92bf129-5da1-401c-8cf5-1508e92ee829",
"Status": "DRAFT",
"Type": "BILLABLEEXPENSE",
"UpdatedDateUTC": "2015-09-09T23:43:54",
"SourceTransactionTypeCode": "ACCPAY"
}
]
}
Get a collection of Items
{
"Items": [
{
"ItemID": "19b79d12-0ae1-496e-9649-cbd04b15c7c5",
"Code": "UnTrackedThing",
"Description": "I sell this untracked thing",
"PurchaseDescription": "I buy this untracked thing",
"UpdatedDateUTC": "\/Date(1488338552390+0000)\/",
"PurchaseDetails": {
"UnitPrice": 20.0000,
"AccountCode": "400",
"TaxType": "NONE"
},
"SalesDetails": {
"UnitPrice": 40.0000,
"AccountCode": "200",
"TaxType": "OUTPUT2"
},
"Name": "An Untracked Item",
"IsTrackedAsInventory": false,
"IsSold": true,
"IsPurchased": true
},
{
"ItemID": "90a72d44-43e4-410d-a68b-1139ef0c0c07",
"Code": "TrackedThing",
"Description": "I sell this tracked thing",
"PurchaseDescription": "I purchase this tracked thing",
"UpdatedDateUTC": "\/Date(1488338552390+0000)\/",
"PurchaseDetails": {
"UnitPrice": 20.0000,
"COGSAccountCode": "430",
"TaxType": "NONE"
},
"SalesDetails": {
"UnitPrice": 40.0000,
"AccountCode": "200",
"TaxType": "OUTPUT2"
},
"Name": "Tracked Thing",
"IsTrackedAsInventory": true,
"InventoryAssetAccountCode": "630",
"TotalCostPool": 200.00,
"QuantityOnHand": 10.0000,
"IsSold": true,
"IsPurchased": true
}
]
}
Get Purchase Orders
{
"Items": [
{
"ItemID": "19b79d12-0ae1-496e-9649-cbd04b15c7c5",
"Code": "UnTrackedThing",
"Description": "I sell this untracked thing",
"PurchaseDescription": "I buy this untracked thing",
"UpdatedDateUTC": "\/Date(1488338552390+0000)\/",
"PurchaseDetails": {
"UnitPrice": 20.0000,
"AccountCode": "400",
"TaxType": "NONE"
},
"SalesDetails": {
"UnitPrice": 40.0000,
"AccountCode": "200",
"TaxType": "OUTPUT2"
},
"Name": "An Untracked Item",
"IsTrackedAsInventory": false,
"IsSold": true,
"IsPurchased": true
},
{
"ItemID": "90a72d44-43e4-410d-a68b-1139ef0c0c07",
"Code": "TrackedThing",
"Description": "I sell this tracked thing",
"PurchaseDescription": "I purchase this tracked thing",
"UpdatedDateUTC": "\/Date(1488338552390+0000)\/",
"PurchaseDetails": {
"UnitPrice": 20.0000,
"COGSAccountCode": "430",
"TaxType": "NONE"
},
"SalesDetails": {
"UnitPrice": 40.0000,
"AccountCode": "200",
"TaxType": "OUTPUT2"
},
"Name": "Tracked Thing",
"IsTrackedAsInventory": true,
"InventoryAssetAccountCode": "630",
"TotalCostPool": 200.00,
"QuantityOnHand": 10.0000,
"IsSold": true,
"IsPurchased": true
}
]
}
Get Contact Groups
{
"ContactGroups": [
{
"ContactGroupID": "97bbd0e6-ab4d-4117-9304-d90dd4779199",
"Name": "VIP Customers",
"Status": "ACTIVE"
},{
"ContactGroupID": "d0c68f1a-e5dd-4a45-aa02-27d8fdbfd562",
"Name": "Preferred Suppliers",
"Status": "ACTIVE"
}
]
}
Get 1099 Reports 2022
{
"Id": "8b474ddb-9ef4-457c-8640-1c0e3670ea0e",
"Status": "OK",
"ProviderName": "Hornblower Enterprises",
"DateTimeUTC": "/Date(1662597051457)/",
"Reports": [
{
"ReportName": "1099-NEC report",
"ReportDate": "1 Jan 2022 to 31 Dec 2022",
"Fields": [],
"Contacts": [
{
"Box1": 0.0,
"Box2": 0.0,
"Box4": 1000.0,
"Name": "Bank West",
"FederalTaxIDType": "SSN",
"City": "Pinehaven",
"Zip": "12345",
"State": "CA",
"Email": "test_one@example.com",
"StreetAddress": "Procurement Services\r\nGPO 1234\r\n\r\n\r\n",
"TaxID": "234-22-2223",
"ContactId": "81d5706a-8057-4338-8511-747cd85f4c68",
"LegalName": "Test One",
"BusinessName": "Bank West",
"FederalTaxClassification": "SOLE_PROPRIETOR"
},
{
"Box1": 0.0,
"Box2": 0.0,
"Box4": 1000.0,
"Name": "Hoyt Productions",
"FederalTaxIDType": "SSN",
"City": "Oaktown",
"Zip": "45123",
"State": "NY",
"Email": "test_two@example.com",
"StreetAddress": "100 Rusty Ridge Road\r\nSuite 100\r\n\r\n\r\n",
"TaxID": "123-45-6780",
"ContactId": "19732b6a-9a5c-4651-b33c-3f8f682e2a2b",
"LegalName": "Test Two",
"BusinessName": "Hoyt Productions",
"FederalTaxClassification": "SOLE_PROPRIETOR"
},
{
"Box1": 0.0,
"Box2": 0.0,
"Box4": 1000.0,
"Name": "Truxton Property Management",
"FederalTaxIDType": "EIN",
"City": "Coppertown",
"Zip": "21321",
"State": "FL",
"Email": "test_three@example.com",
"StreetAddress": "1000 Copper Avenue\r\nSuite 1000\r\n\r\n\r\n",
"TaxID": "33-3332233",
"ContactId": "018355fc-c67e-4352-b443-ef3873031983",
"LegalName": "Test Three",
"BusinessName": "Truxton Property Management",
"FederalTaxClassification": "SOLE_PROPRIETOR"
}
]
},
{
"ReportName": "1099-MISC report",
"ReportDate": "1 Jan 2022 to 31 Dec 2022",
"Fields": [],
"Contacts": [
{
"Box1": 5543.75,
"Box2": 0.0,
"Box3": 0.0,
"Box4": 0.0,
"Box5": 0.0,
"Box6": 0.0,
"Box7": 0.0,
"Box8": 0.0,
"Box9": 0.0,
"Box10": 0.0,
"Box11": 0.0,
"Box14": 0.0,
"Name": "Bank West",
"FederalTaxIDType": "SSN",
"City": "Pinehaven",
"Zip": "12345",
"State": "CA",
"Email": "test_one@example.com",
"StreetAddress": "Procurement Services\r\nGPO 1234\r\n\r\n\r\n",
"TaxID": "234-22-2223",
"ContactId": "81d5706a-8057-4338-8511-747cd85f4c68",
"LegalName": "Test One",
"BusinessName": "Bank West",
"FederalTaxClassification": "SOLE_PROPRIETOR"
},
{
"Box1": 5543.75,
"Box2": 0.0,
"Box3": 0.0,
"Box4": 0.0,
"Box5": 0.0,
"Box6": 0.0,
"Box7": 0.0,
"Box8": 0.0,
"Box9": 0.0,
"Box10": 0.0,
"Box11": 0.0,
"Box14": 0.0,
"Name": "Hoyt Productions",
"FederalTaxIDType": "SSN",
"City": "Oaktown",
"Zip": "45123",
"State": "NY",
"Email": "test_two@example.com",
"StreetAddress": "100 Rusty Ridge Road\r\nSuite 100\r\n\r\n\r\n",
"TaxID": "123-45-6780",
"ContactId": "19732b6a-9a5c-4651-b33c-3f8f682e2a2b",
"LegalName": "Test Two",
"BusinessName": "Hoyt Productions",
"FederalTaxClassification": "SOLE_PROPRIETOR"
},
{
"Box1": 5543.75,
"Box2": 0.0,
"Box3": 0.0,
"Box4": 0.0,
"Box5": 0.0,
"Box6": 0.0,
"Box7": 0.0,
"Box8": 0.0,
"Box9": 0.0,
"Box10": 0.0,
"Box11": 0.0,
"Box14": 0.0,
"Name": "Truxton Property Management",
"FederalTaxIDType": "EIN",
"City": "Coppertown",
"Zip": "21321",
"State": "FL",
"Email": "test_three@example.com",
"StreetAddress": "1000 Copper Avenue\r\nSuite 1000\r\n\r\n\r\n",
"TaxID": "33-3332233",
"ContactId": "018355fc-c67e-4352-b443-ef3873031983",
"LegalName": "Test Three",
"BusinessName": "Truxton Property Management",
"FederalTaxClassification": "SOLE_PROPRIETOR"
}
]
}
]
}
Get Tax Rates
{
"TaxRates": [
{
"Name": "15% GST on Expenses",
"TaxType": "INPUT2",
"CanApplyToAssets": "true",
"CanApplyToEquity": "true",
"CanApplyToExpenses": "true",
"CanApplyToLiabilities": "true",
"CanApplyToRevenue": "false",
"DisplayTaxRate": "15.0000",
"EffectiveRate": "15.0000",
"Status": "ACTIVE",
"TaxComponents": [
{
"Name": "GST",
"Rate": "15.0000",
"IsCompound": "false",
"IsNonRecoverable": "false"
}
]
},
{
"Name": "15% GST on Income",
"TaxType": "OUTPUT2",
"CanApplyToAssets": "true",
"CanApplyToEquity": "true",
"CanApplyToExpenses": "false",
"CanApplyToLiabilities": "true",
"CanApplyToRevenue": "true",
"DisplayTaxRate": "15.0000",
"EffectiveRate": "15.0000",
"Status": "ACTIVE",
"TaxComponents": [
{
"Name": "GST",
"Rate": "15.0000",
"IsCompound": "false",
"IsNonRecoverable": "false"
}
]
},
{
"Name": "GST on Imports",
"TaxType": "GSTONIMPORTS",
"CanApplyToAssets": "false",
"CanApplyToEquity": "false",
"CanApplyToExpenses": "false",
"CanApplyToLiabilities": "true",
"CanApplyToRevenue": "false",
"DisplayTaxRate": "0.0000",
"EffectiveRate": "0.0000",
"Status": "ACTIVE",
"TaxComponents": [
{
"Name": "GST",
"Rate": "0.0000",
"IsCompound": "false",
"IsNonRecoverable": "false"
}
]
}
]
}
Get a list of draft Assets
{
"pagination": {
"page": 1,
"pageSize": 10,
"pageCount": 1,
"itemCount": 2,
},
"items": [
{
"assetId": "3b5b3a38-5649-495f-87a1-14a4e5918634",
"assetName": "Awesome Truck 3",
"assetNumber": "FA-0013",
"purchaseDate": "2015-07-01T00:00:00",
"purchasePrice": 1000,
"disposalPrice": 0,
"assetStatus": "Draft",
"canRollback": true,
"accountingBookValue": 0
},
{
"assetId": "1fd647b8-c449-42cb-9cc4-cd41fe8df262",
"assetName": "Awesome Car",
"assetNumber": "FA-0001",
"purchaseDate": "2015-07-01T00:00:00",
"purchasePrice": 100000,
"disposalPrice": 0,
"assetStatus": "Draft",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 0.01,
"depreciationCalculationMethod": "None",
"effectiveFromDate": "2015-07-01T00:00:00",
"costLimit": 100000,
"residualValue": 10000,
},
"bookDepreciationDetail": {
"currentCapitalGain": 0,
"currentGainLoss": 0,
"priorAccumDepreciationAmount": 0,
"currentAccumDepreciationAmount": 0
},
"canRollback": true,
"accountingBookValue": 100000
}
]
}
Get a single Asset
{
"assetId": "92d04e4407404c1facd6edbbceac7faa",
"assetName": "Computer",
"assetNumber": "FA-0021",
"purchaseDate": "2016-04-11T00:00:00",
"purchasePrice": 3000,
"serialNumber": "123456789",
"warrantyExpiryDate": "2018-04-11T00:00:00",
"assetTypeId": "5da209c55e194a43b92571b776c49ced",
"description": "A computer for computing",
"disposalPrice": 0,
"assetStatus": "Registered",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
"currentGainLoss": 0,
},
"bookDepreciationDetail": {
"currentCapitalGain": 0,
"depreciationStartDate": "2016-04-11T00:00:00",
"priorAccumDepreciationAmount": 0,
"currentAccumDepreciationAmount": 0
},
"canRollback": true,
"accountingBookValue": 3000
}
Get a list of Asset Types
[
{
"assetTypeId": "5da209c5-5e19-4a43-b925-71b776c49ced",
"assetTypeName": "Computer Equipment",
"fixedAssetAccountId": "24e260f1-bfc4-4766-ad7f-8a8ce01de879",
"depreciationExpenseAccountId": "b23fc79b-d66b-44b0-a240-e138e086fcbc",
"accumulatedDepreciationAccountId": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
},
"locks": 0
},
{
"assetTypeId": "a865d898-4ee9-4366-bf37-bfc1b35cf788",
"assetTypeName": "Office Equipment",
"fixedAssetAccountId": "24e260f1-bfc4-4766-ad7f-8a8ce01de879",
"depreciationExpenseAccountId": "b23fc79b-d66b-44b0-a240-e138e086fcbc",
"accumulatedDepreciationAccountId": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
},
"locks": 0
},
{
"assetTypeId": "26c17b4a-0093-402c-b9bb-281dedf5c604",
"assetTypeName": "Vehicles",
"fixedAssetAccountId": "24e260f1-bfc4-4766-ad7f-8a8ce01de879",
"depreciationExpenseAccountId": "b23fc79b-d66b-44b0-a240-e138e086fcbc",
"accumulatedDepreciationAccountId": "ca4c6b39-4f4f-43e8-98da-5e1f350a6694",
"bookDepreciationSetting": {
"depreciationMethod": "StraightLine",
"averagingMethod": "ActualDays",
"depreciationRate": 33,
"depreciationCalculationMethod": "None"
},
"locks": 0
}
]
Get Tracking Categories
{
"TrackingCategories": [
{
"Name": "Region",
"Status": "ACTIVE",
"TrackingCategoryID": "351953c4-8127-4009-88c3-f9cd8c9cbe9f",
"Options": [
{
"TrackingOptionID": "ce205173-7387-4651-9726-2cf4c5405ba2",
"Name": "Eastside",
"Status": "ACTIVE"
},
{
"TrackingOptionID": "6eb12fdf-63de-4033-98df-be679d84e3c2",
"Name": "North",
"Status": "ACTIVE"
},
{
"TrackingOptionID": "6159bdd4-b634-4338-a664-e929aa73f70f",
"Name": "South",
"Status": "ACTIVE"
},
{
"TrackingOptionID": "161ad543-97ab-4436-8213-e0d794b1ea90",
"Name": "West Coast",
"Status": "ACTIVE"
}
]
}
]
}
Get Folders
{
"Name":"Inbox",
"FileCount":0,
"Email":"xero.inbox.dxlsh.yth06v9y5u6ak3bz@xerofiles.com",
"IsInbox":true,
"Id":"7215cb90-15e1-4949-9fec-690126f1f88f"
},
{
"Name":"Contracts",
"FileCount":1,
"IsInbox":false,
"Id":"0f8ccf21-7267-4268-9167-a1e2c40c84c8"
}
Get Tenant (Specific to Wiresk)
[
{
"id": "87b4fe4d-dfb1-4754-af21-9c815401bd74",
"authEventId": "ce8b0930-09cb-48fd-9b15-aea64fc10856",
"tenantId": "1633f71f-d77e-48b6-a2c4-df3e1962eedd",
"tenantType": "ORGANISATION",
"tenantName": "Demo Company (Global)",
"createdDateUtc": "2025-02-20T04:35:50.2922220",
"updatedDateUtc": "2025-02-20T04:35:50.2942050"
},
{
"id": "fa064823-2d9c-4d97-b783-a513a4f3b3c6",
"authEventId": "d012bdda-2b8a-40af-96e7-631e6dfafa03",
"tenantId": "89f8b832-3b28-4b1a-bd49-aaecec055952",
"tenantType": "ORGANISATION",
"tenantName": "Wiresk Demo",
"createdDateUtc": "2025-02-19T08:25:18.7274290",
"updatedDateUtc": "2025-02-19T08:25:18.7287320"
}
]
Get Settings
{
"assetNumberPrefix": "FA-",
"assetNumberSequence": "0022",
"assetStartDate": "2015-07-01T00:00:00",
"lastDepreciationDate": "2015-07-31T00:00:00",
"defaultGainOnDisposalAccountId": "346ddb97-739a-4274-b43b-66aa3218d17c",
"defaultLossOnDisposalAccountId": "1b798541-24e2-4855-9309-c023a0b576f3",
"defaultCapitalGainOnDisposalAccountId": "6d6a0bdb-e118-45d8-a023-2ad617ec1cb7",
"optInForTax": false
}
HISTORY NOTE:
Notes are the only type of Change that can be manually created. All other types of Change are created automatically when certain actions occur (e.g. an invoice is paid).
The note will be displayed in history & notes showing the date of creation and “System Generated” as the user that created it.
Add Note to Record Copy Link
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Add Note to Record |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to retrieve records from: Invoice, Payment, Batch Payment, Contact, Bank Transaction, Credit Note, Quote, Manual Journal, Item, Purchase Order |
MAP FIELDS [+ Add Field] Add addiotnal fields: Tenant | |
Entities | Invoice: specify the Invoice ID. Payment: specify the Payment ID. Batch Payment: specify the Batch Payment ID. Contact: specify the Contact ID. Bank Transaction: specify the Bank Transaction ID. Credit Note: specify the Credit Note ID. Quote: specify the Quote ID. Manual Journal: specify the Manual Journal ID. Item: specify the Item ID. Purchase Order: specify the Purchase Order ID. |
History Records* | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional History Records can be added as elements. Element 1: Represents the first History Record. Details*: Add the Note. |
ADDITIONAL FIELDS | |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of creating a note against payment
PUT https://api.xero.com/api.xro/2.0/Payments/{Guid}/History
{
"HistoryRecords": [
{
"Details": "Note added by Wiresk"
}
...
]
}
Example of response
{
"DateUTCString": "2025-03-05T09:54:20",
"DateUTC": "/Date(1741168460543)/",
"Details": "test note wiresk",
"ValidationErrors": []
}
Get Record Notes Copy Link
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Get Record Notes |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to retrieve records from: Invoice, Payment, Batch Payment, Contact, Bank Transaction, Bank Transfer, Credit Note, Quote, Manual Journal, Item, Purchase Order |
MAP FIELDS [+ Add Field] Add addiotnal fields: Tenant | |
Entities | Invoice: specify the Invoice ID. Payment: specify the Payment ID. Batch Payment: specify the Batch Payment ID. Contact: specify the Contact ID. Bank Transaction: specify the Bank Transaction ID. Bank Transfer: specify the Bank Transfer ID. Credit Note: specify the Credit Note ID. Quote: specify the Quote ID. Manual Journal: specify the Manual Journal ID. Item: specify the Item ID. Purchase Order: specify the Purchase Order ID. |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of response from Get Invoice Note
[
{
"Changes": "Note",
"DateUTCString": "2025-03-05T09:54:20",
"DateUTC": "/Date(1741168460523+0000)/",
"User": "System Generated",
"Details": "test note wiresk"
},
{
"Changes": "Approved",
"DateUTCString": "2025-02-17T01:37:59",
"DateUTC": "/Date(1739756279057+0000)/",
"User": "Wiresk Business",
"Details": ""
},
{
"Changes": "Created",
"DateUTCString": "2025-02-17T01:37:58",
"DateUTC": "/Date(1739756278057+0000)/",
"User": "Wiresk Business",
"Details": ""
}
]
ATTACHMENT:
Download Attachment Copy Link
See Xero Attachment API Reference.
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Download Attachment |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to retrieve records from: Invoice, Payment, Batch Payment, Contact, Bank Transaction, Bank Transfer, Credit Note, Quote, Manual Journal, Item, Purchase Order |
MAP FIELDS [+ Add Field] Add addiotnal fields: Tenant | |
Entities | Invoice: specify the Invoice ID. Payment: specify the Payment ID. Batch Payment: specify the Batch Payment ID. Contact: specify the Contact ID. Bank Transaction: specify the Bank Transaction ID. Bank Transfer: specify the Bank Transfer ID. Credit Note: specify the Credit Note ID. Quote: specify the Quote ID. Manual Journal: specify the Manual Journal ID. Item: specify the Item ID. Purchase Order: specify the Purchase Order ID. |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Get Attachment Copy Link
See Xero Attachment API Reference.
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Get Attachment |
Connection* | Select your connection or create one. |
Entity* (Set of data that contain records) | Select the available Entities to retrieve records from: Invoice, Account, Contact, Bank Transaction, Bank Transfer, Credit Note, Quote, Manual Journal, Purchase Order. |
MAP FIELDS [+ Add Field] Add addiotnal fields: Tenant | |
Entities | Invoice: specify the Invoice ID. Account: specify the Account ID. Contact: specify the Contact ID. Bank Transaction: specify the Bank Transaction ID. Bank Transfer: specify the Bank Transfer ID. Credit Note: specify the Credit Note ID. Quote: specify the Quote ID. Manual Journal: specify the Manual Journal ID. Purchase Order: specify the Purchase Order ID. |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of response from Get Attachment
{
"Attachments": [
{
"AttachmentID": "e59a2c7f-1306-4078-a0f3-73537afcbba9",
"FileName": "Image00394.png",
"Url": "https://api.xero.com/api.xro/2.0/Receipts/220ddca8-3144-4085-9a88-2d72c5133734/Attachments/Image00394.png",
"MimeType": "image/png",
"ContentLength": "10294"
}
]
}
CONTACT GROUP:
Add Contacts Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Contact Groups API Reference.
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Add Contacts |
Connection* | Select your connection or create one. |
MATCHING CRITERIA | |
Contact Group ID* | Unique Identifier of the Contact Group. |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). |
MAP FIELDS | |
Contacts* | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional Contact can be added as elements. Element 1: Represents the first Contact. Contact ID*: Unique Identifier of the contact to add to the contact group. |
(*) required field
Remove All Contacts Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Contact Groups API Reference.
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Remove All Contacts |
Connection* | Select your connection or create one. |
MATCHING CRITERIA | |
Contact Group ID* | Unique Identifier of the Contact Group from which all the contacts will be removed. |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). |
(*) required field
Remove All Contacts Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Contact Groups API Reference.
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Remove a Contact |
Connection* | Select your connection or create one. |
MATCHING CRITERIA | |
Contact Group ID* | Unique Identifier of the Contact Group from which all the contacts will be removed. |
Contact ID* | Unique Identifier of the Contact to remove from the Contact Group. |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). |
(*) required field
INVOICE:
Email The Invoice Copy Link
▪️ The invoice must be of Type ACCREC and a valid Status for sending (SUBMITTED,AUTHORISED or PAID).
▪️ Invoices go to the main contact and those marked for email.
▪️ The sender is the app connection author.
▪️ The email uses the organization’s default template (see details on email templates).
▪️ Xero limits daily invoice emails: 1000 for paid accounts, 20 for trials, including both app and API usage.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Emailling an Invoice API Reference.
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Email The Invoice |
Connection* | Select your connection or create one. |
MATCHING CRITERIA | |
Invoice ID* | Unique Identifier of the Invoice to send. |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). |
(*) required field
Get Online Invoice Copy Link
▪️ You cannot retrieve an online invoice url for DRAFT invoices.
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Retrieving the Online Invoice URL API Reference.
Configuration Table:
Input Options:
- Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
- Default Value: You can specify a fixed attribute.
Name* | Get Online Invoice |
Connection* | Select your connection or create one. |
MATCHING CRITERIA | |
Invoice ID* | Unique Identifier of the Invoice. |
Tenant Available in All entities. | Optionally select a specific Organization (for Xero Account with multiple Organisations). |
(*) required field
Response example of Get Online Invoice
{
"OnlineInvoiceUrl": "https://in.xero.com/rX78CnzsBQQWHcpDIzjjijuQvpvmb0FjfGdBeNbZ"
}
PAYMENT:
Create Multiple Payments Copy Link
Tip: Get ID and Code value (for example Contact ID) from Method “Get Records“, “Find Record” or from Trigger “Get all Records of an Entity“.
See Xero Multiple Payments API Reference.
MAP FIELDS [+ Add Field] Select fields from a list, to configure the Payment creation. Additional fields: Tenant, Payment ID, Reference. | |
Payments* | [⊕ Element][⊕ Map] Add a repeating group of fields or Map it from an array. See Field Mapping. Additional payments can be added as elements. Element 1: Represents the first payment. Invoice ID*: Unique Identifier of the invoice you are applying payment to. You can Look up the value by select Input > Lookup tab > Select Search button to display a list. Account ID*: Specify the unique identifier of the account from which the payment will be made, or Look up the value by select Input > Lookup tab > Select Search button to display a list. Ensure that this account is either a BANK account or has the ‘enable payments’ setting activated. Amount*: The amount of the payment. [+ Add Field] add more fields Date: Date the payment is being made (YYYY-MM-DD). Reference: An optional description for the payment e.g. Direct Debit |
ADDITIONAL FIELDS | |
Tenant | Optionally select a specific Organization (for Xero Account with multiple Organisations). Select Input > Lookup tab > Select Search button to display a list. |
(*) required field
Example of request from Create Multiple Payments
{
"Payments": [
{
"Invoice": { "InvoiceID": "96df0dff-43ec-4899-a7d9-e9d63ef12b19" },
"Account": { "AccountID": "297c2dc5-cc47-4afd-8ec8-74990b8761e9" },
"Date": "2009-07-13",
"Amount": 3375.00
},
{
"Invoice": { "InvoiceID": "0a1d0d71-b001-4c71-a260-31e77c9d4a92" },
"Account": { "AccountID": "a65b0dac-b444-4b41-959b-c1580cd6268f" },
"Date": "2009-09-01",
"Amount": 393.75
},
{
"Invoice": { "InvoiceID": "93c9be81-1df4-4338-b5dc-e67a89cd2d7c" },
"Account": { "AccountID": "a65b0dac-b444-4b41-959b-c1580cd6268f" },
"Date": "2009-07-21",
"Amount": 398
}
]
}
5 – Test run or automate your Flow Copy Link
After setting up your Flow, you can choose to:
- “Run once”, your Flow will run only a single time. You can use this function to test your Flow. Refer to how to set up an HTTP Trigger, in the “Create a Flow” step.
- “Run Scheduler” will automate your Flows with the recurrence rule you previously defined.
For more details, refer to How to run a Flow tutorial in our Help Center.
If you are using a Webhook Trigger, the Flow will initiate automatically when a webhook is received from your connected apps. This means that the Flow is automated without a scheduler and will run until you deactivate the Flow manually. Refer to Webhook documentation in our Help Center.
If you need an integration that you cannot find in Wiresk, you can make a request to our team, and we will try our best to satisfy your needs.