Xero Component

Manage invoices, items, accounts, payments and more objects from your Xero account.
Component key: xero#
DescriptionXero is a cloud-based accounting software platform for small and medium-sized businesses. The Xero component allows you to manage your invoices, payments, items, and contacts through the Xero Rest API.
#
Xero Connections#
Xero OAuth 2.0Xero uses OAuth 2.0 to authorize requests made to the API. In order for your integration to authenticate with your customers' Xero accounts, you will need to create a Xero OAuth 2.0 app:
- Log on to Xero's developer portal
- Click New app
- Give your app a name
- Select Web app for Integration type
- Enter your company's URL for Company or application URL
- Enter
https://oauth2.prismatic.io/callback
for the Redirect URI
- Next, open the Configuration page
- Click Generate Secret and take note of the Client id and Client secret - you'll enter those in Prismatic in a moment
When you add a Xero step to an integration, a Xero OAuth 2.0 connection config variable will be created automatically for you:
- For Scopes, enter the scopes from this list that are relevant to your integration.
Always include the
offline_access
scope in order for authentication tokens to refresh automatically. - For Client ID and Client Secret, enter the values you noted above.
- A single customer might be logged in to multiple tenants, and Tenant Name is unique for each customer. Leave that input blank, and click the visibility icon next to Tenant Name. Adjust Input Visibility and make the value Visible to Customer Deployer and Visible to Organization Deployer. That way, your customers will be prompted for their tenant name when they enable this integration.
For additional information regarding authentication, please refer to the Xero docs.
Input | Default | Notes | Example |
---|---|---|---|
Input Authorize URL string / Required Hidden Field | Default https://login.xero.com/identity/connect/authorize | Notes The OAuth 2.0 Authorization URL for Xero | Example |
Input Client ID string / Required | Default | Notes Provide the Client Id you received from the Xero Developer Console. | Example |
Input Client Secret password / Required | Default | Notes Provide the Client Secret you generated from the Xero Developer Console. | Example |
Input Scopes string / Required | Default offline_access accounting.settings | Notes A space-delimited set of one or more scopes to get the user's permission to access. You must specify 'offline_access' to enable automatic token refresh. | Example accounting.contacts |
Input Tenant Name string / Required | Default | Notes Provide a string value for the name of the tenant you are requesting access to. | Example Acme Inc. |
Input Token URL string / Required Hidden Field | Default https://identity.xero.com/connect/token | Notes The OAuth 2.0 Token URL for Xero | Example |
#
Triggers#
WebhookTrigger for handling webhook requests from your Xero tenant | key: webhook
Input | Notes | Example |
---|---|---|
Input Webhook Key string | Notes Provide the webhook key that was created upon subscription. | Example up/tz7l0Q9FM6Wyq3Rli0bqJrfqmtl4idswda/LQ== |
#
Output Example Payload{ "response": { "contentType": "application/json; charset=UTF-8", "statusCode": 200 }, "payload": { "headers": { "Content-Type": "application/json; charset=UTF-8", "Host": "hooks.example.prismatic.io", "x-xero-signature": "ubUJMsDNGuunnCBc/n1g0wc2SpjplAb" }, "body": { "data": { "events": None, "firstEventSequence": 0, "lastEventSequence": 0, "entropy": "FMLHZNKCVK" }, "contentType": "application/json; charset=UTF-8" }, "rawBody": { "data": { "type": "Buffer", "data": [69, 120, 97, 109, 112, 108, 101] } }, "queryParameters": {}, "webhookUrls": { "Flow 1": "https://hooks.example.prismatic.io/trigger/EXAMPLEGbG93Q29uZmlnOmRlNmNmNDMyLTliNWMtN0005NDMxLTRmYzA4ZjViODgxOA==" }, "webhookApiKeys": { "Flow 1": ["abc-123"] }, "customer": { "externalId": "customer-example-external-id", "name": "John Doe" } }}
#
Actions#
Add Note To ItemAdd a note to an item's history by Id | key: addNoteToItem
Input | Notes | Example |
---|---|---|
Input Item ID string / Required | Notes Provide a string value for the Item ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Notes string | Notes Provide a string value for notes to add to an object. | Example These are example notes. |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "HistoryRecords": [ { "Changes": "Edited", "DateUTCString": "2021-11-23T18:38:24", "DateUTC": "/Date(1637692704697+0000)/", "User": "System Generated", "Details": "These are some example details" } ] }}
#
Add Notes To InvoiceAdd additional notes to an invoice by Id | key: addNoteToInvoice
Input | Notes | Example |
---|---|---|
Input Invoice ID string / Required | Notes Provide a string value for the Invoice ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Notes string | Notes Provide a string value for notes to add to an object. | Example These are example notes. |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "HistoryRecords": [ { "Changes": "Edited", "DateUTCString": "2021-11-23T18:38:24", "DateUTC": "/Date(1637692704697+0000)/", "User": "System Generated", "Details": "These are some example details" } ] }}
#
Archive AccountArchive the information and metadata of an account by Id | key: archiveAccount
Input | Notes | Example |
---|---|---|
Input Account ID string / Required | Notes Provide a string value for the Account ID | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "accounts": [ { "AccountID": "example-7b92-4e10-84e8-efef27090697", "Code": "200", "Name": "Example Account", "Status": "ARCHIVED", "Type": "REVENUE", "TaxType": "OUTPUT" } ] }}
#
Archive ContactArchive the information and metadata of a contact by Id | key: archiveContact
Input | Notes | Example |
---|---|---|
Input Contact ID string / Required | Notes Provide a string value for the Contact ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "contacts": [ { "ContactID": "example-7b92-4e10-84e8-efef27090697", "ContactStatus": "ARCHIVED", "Name": "Example Contact", "EmailAddress": "someone@example.com", "IsSupplier": "false", "IsCustomer": "false", "updatedDateUTC": "/Date(1637614988203+0000)/" } ] }}
#
Create AccountCreate a new account | key: createAccount
Input | Notes | Example |
---|---|---|
Input Account Code string / Required | Notes Provide a string value for the account code. This value is a customer defined alpha numeric account code. | Example 200 |
Input Account Name string / Required | Notes Provide a string value for the name of the account. | Example Example Account |
Input Account Type string / Required | Notes Provide a string value for the type of the given account. You can choose from the list of provided values here: https://developer.xero.com/documentation/api/accounting/types#accounts | Example BANK |
Input Bank Account Number string | Notes This value is required if you are creating an account of type 'BANK'. | Example 121-121-1234567 |
Input Optional Values string Key Value List | Notes For each item, provide a key and value to be used in the request body. | Example exampleValue |
Input Show In Expense Claims boolean | Notes This value will determine if your account will show in expense claims. This field is required for certain accounts. | Example |
Input Connection connection / Required | Notes The connection to use. | Example |
Xero has support for many different types of accounts. When creating certain accounts they may require you to provide additional fields. You can provide these fields with the 'Optional Values' input. For a list of the required values for each type of account, refer to the documentation provided by Xero.
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "accounts": [ { "AccountID": "example-7b92-4e10-84e8-efef27090697", "Code": "200", "Name": "Example Account", "Status": "ARCHIVED", "Type": "REVENUE", "TaxType": "OUTPUT" } ] }}
#
Create AttachmentCreate a new attachment on an existing object | key: createAttachment
Input | Notes | Example |
---|---|---|
Input File Data data / Required | Notes Provide a value that represents the data of the file you want to upload | Example |
Input File Name string / Required | Notes Provide a string value for the name of the file you want to attach to the object. The File Name will become the unique identifier of the file for update operations. | Example My Example File |
Input Object ID string / Required | Notes Provide a string value for the Id of the object. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Object Type string / Required | Notes Provide a string value for the type of object you would like to access. | Example |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Create ContactCreate a new contact | key: createContact
Input | Notes | Example |
---|---|---|
Input Accounts Payable Tax Type string | Notes Provide a string value for the tax type of accounts payable for the account. For more information on what value to provide, refer to the Xero docs: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example OUTPUT |
Input Accounts Receivable Tax Type string | Notes Provide a string value for the tax type of accounts receivable for the account. For more information on what value to provide, refer to the Xero docs: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example OUTPUT |
Input Address string | Notes Provide a string value that represents a valid address. | Example 4 Privet Drive |
Input Address Type string | Notes Provide a string value for the address type. | Example POBOX |
Input Bank Account Details string | Notes Provide a string value for the details of the contacts bank account. Depending on the type of account, providing a value for this field could cause your request to fail. For more information on the expected shape of the Account object, refer to the Xero docs: https://developer.xero.com/documentation/api/accounting/accounts/#get-accounts | Example 01-0123-example-00 |
Input City string | Notes Provide a string value for the city of the address. | Example San Francisco |
Input Contact Name string / Required | Notes Provide a string value for the name of the contact. | Example Acme Inc. |
Input Contact Status string | Notes Provide a string value for the status of the contact. | Example |
Input Default Currency string | Notes Provide a valid type of currency. | Example USD |
Input Email Address string | Notes Provide a valid email address for the contact. | Example someone@example.com |
Input First Name string | Notes Provide a string value for the first name of the contact. | Example John |
Input Last Name string | Notes Provide a string value for the last name of the contact. | Example Doe |
Input Postal Code string | Notes Provide a valid postal code. | Example 48423 |
Input Tax Number string | Notes Provide a string value for the Tax number. For more information on what value to provide, refer to the Xero docs: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example 12-345-678 |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "contacts": [ { "ContactID": "example-7b92-4e10-84e8-efef27090697", "ContactStatus": "Active", "Name": "Example Contact", "EmailAddress": "someone@example.com", "IsSupplier": "false", "IsCustomer": "false", "updatedDateUTC": "/Date(1637614988203+0000)/" } ] }}
#
Create InvoiceCreate a new invoice | key: createInvoice
Input | Default | Notes | Example |
---|---|---|---|
Input Contact ID string / Required | Default | Notes Provide a string value for the Contact ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Date string | Default | Notes Provide a valid date for when the invoice was created. | Example /Date(1518685950940+0000)/ |
Input Date String string | Default | Notes Provide a string value for the date in which the invoice was created. | Example 2021-05-27T00:00:00 |
Input Due Date string | Default | Notes Provide a valid date for the due date of the invoice. | Example /Date(1518685950940+0000)/ |
Input Due Date String string | Default | Notes Provide a string value for the due date of the invoice. | Example 2021-05-27T00:00:00 |
Input Invoice Status string | Default | Notes This value is required if you want to make payments on an invoice. Will default to 'DRAFT' | Example |
Input Invoice Type string / Required | Default | Notes Provide a string value for the type of the given invoice. | Example |
Input Line Amount Type string / Required | Default | Notes Provide a string value for the line Amount Types. | Example |
Input Line Items code | Default
| Notes Provide a JSON array, For each item, provide an object describing a valid line item. The 'ItemCode', 'Tracking', and 'DiscountRate' properties are optional. If you want to provide no line items, simply enter an empty Array. | Example |
Input Connection connection / Required | Default | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "Invoices": [ { "InvoiceID": "example-7b92-4e10-84e8-efef27090697", "InvoiceNumber": "example01", "AmountDue": 800, "AmountPaid": 0, "SentToContact": false, "TotalDiscount": 200, "contact": {} } ] }}
#
Create ItemCreate a new Item | key: createItem
Input | Notes | Example |
---|---|---|
Input Description string | Notes Provide a string value for the description. | Example This is an example description |
Input Inventory Asset Account Code string | Notes Provide the account code for the inventory asset | Example 200 |
Input Is Purchased boolean | Notes Provide a boolean value to determine if the item has been purchased yet. | Example |
Input Is Sold boolean | Notes Provide a boolean value to determine if the item has been sold yet. | Example |
Input Item Code string / Required | Notes Provide a user-defined valid item code. | Example Untracked Item |
Input Item Name string | Notes Provide a string value for the name of the item. | Example Example Name |
Input Purchase Account Code string | Notes Provide the account code of the purchase. | Example 200 |
Input Purchase Description string | Notes Provide a string value for the description. | Example This is an example description |
Input Purchase Tax Type string | Notes Provide the tax type of the purchaser. Pick a value from the items listed here: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example NONE |
Input Purchase Unit Price string | Notes Provide the unit price of the purchase. | Example 800 |
Input Sales Account Code string | Notes Provide the account code of the sale. | Example 200 |
Input Sales Tax Type string | Notes Provide the tax type of the Seller. Provide a value from the items listed here: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example NONE |
Input Sales Unit Price string | Notes Provide the unit price of the sale, if the item has been sold. | Example 50.69 |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "Items": [ { "ItemID": "19b79d12-0ae1-496e-9649-cbd04b15c7c5", "Code": "ExampleThing", "Description": "I sell this untracked thing", "PurchaseDescription": "I buy this untracked thing", "UpdatedDateUTC": "/Date(1488338552390+0000)/", "PurchaseDetails": { "UnitPrice": 20, "AccountCode": "400", "TaxType": "NONE" }, "SalesDetails": { "UnitPrice": 40, "AccountCode": "200", "TaxType": "OUTPUT2" }, "Name": "An Example Untracked Item", "IsTrackedAsInventory": false, "IsSold": true, "IsPurchased": true } ] }}
#
Delete AccountDelete the information and metadata of an account by Id | key: deleteAccount
Input | Notes | Example |
---|---|---|
Input Account ID string / Required | Notes Provide a string value for the Account ID | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "accounts": [ { "AccountID": "example-7b92-4e10-84e8-efef27090697", "Code": "200", "Name": "Example Account", "Status": "ARCHIVED", "Type": "REVENUE", "TaxType": "OUTPUT" } ] }}
#
Delete InvoiceDelete the information and metadata of an invoice by Id | key: deleteInvoice
Input | Notes | Example |
---|---|---|
Input Invoice ID string / Required | Notes Provide a string value for the Invoice ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "Invoices": [ { "InvoiceID": "example-7b92-4e10-84e8-efef27090697", "InvoiceNumber": "example01", "AmountDue": 800, "AmountPaid": 0, "SentToContact": false, "TotalDiscount": 200, "contact": {}, "status": "Deleted" } ] }}
#
Delete ItemDelete the information and metadata of an item by Id | key: deleteItem
Input | Notes | Example |
---|---|---|
Input Item ID string / Required | Notes Provide a string value for the Item ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Get AccountGet the information and metadata of an account by Id | key: getAccount
Input | Notes | Example |
---|---|---|
Input Account ID string / Required | Notes Provide a string value for the Account ID | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "accounts": [ { "AccountID": "example-7b92-4e10-84e8-efef27090697", "Code": "200", "Name": "Example Account", "Status": "ARCHIVED", "Type": "REVENUE", "TaxType": "OUTPUT" } ] }}
#
Get ContactGet the information and metadata of a contact by Id | key: getContact
Input | Notes | Example |
---|---|---|
Input Contact ID string / Required | Notes Provide a string value for the Contact ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "contacts": [ { "ContactID": "example-7b92-4e10-84e8-efef27090697", "ContactStatus": "Active", "Name": "Example Contact", "EmailAddress": "someone@example.com", "IsSupplier": "false", "IsCustomer": "false", "updatedDateUTC": "/Date(1637614988203+0000)/" } ] }}
#
Get Contact HistoryGet the information and metadata of a contact's history by Id | key: getContactHistory
Input | Notes | Example |
---|---|---|
Input Contact ID string / Required | Notes Provide a string value for the Contact ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "HistoryRecords": [ { "Changes": "Edited", "DateUTCString": "2021-11-23T18:38:24", "DateUTC": "/Date(1637692704697+0000)/", "User": "System Generated", "Details": "These are some example details" } ] }}
#
Get InvoiceGet the information and metadata of an invoice by Id | key: getInvoice
Input | Notes | Example |
---|---|---|
Input Invoice ID string / Required | Notes Provide a string value for the Invoice ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "Invoices": [ { "InvoiceID": "example-7b92-4e10-84e8-efef27090697", "InvoiceNumber": "example01", "AmountDue": 800, "AmountPaid": 0, "SentToContact": false, "TotalDiscount": 200, "contact": {} } ] }}
#
Get ItemGet the information and metadata of an item by Id | key: getItem
Input | Notes | Example |
---|---|---|
Input Item ID string / Required | Notes Provide a string value for the Item ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "Items": [ { "ItemID": "example-7b92-4e10-84e8-efef27090697", "Code": "ExampleThing", "Description": "I sell this untracked thing", "PurchaseDescription": "I buy this untracked thing", "UpdatedDateUTC": "/Date(1488338552390+0000)/", "PurchaseDetails": { "UnitPrice": 20, "AccountCode": "400", "TaxType": "NONE" }, "SalesDetails": { "UnitPrice": 40, "AccountCode": "200", "TaxType": "OUTPUT2" }, "Name": "An Example Untracked Item", "IsTrackedAsInventory": false, "IsSold": true, "IsPurchased": true } ] }}
#
Get Item HistoryGet the information and metadata of an items's history by Id | key: getItemHistory
Input | Notes | Example |
---|---|---|
Input Item ID string / Required | Notes Provide a string value for the Item ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "HistoryRecords": [ { "Changes": "Updated", "DateUTCString": "2018-02-28T21:02:11", "DateUTC": "/Date(1519851731990+0000)/", "User": "Example", "Details": "Example Received through the Xero API from ABC Org" }, { "Changes": "Created", "DateUTCString": "2018-02-28T21:01:29", "DateUTC": "/Date(1519851689297+0000)/", "User": "Example", "Details": "Example INV-0041 to ABC Furniture for 100.00." } ] }}
#
Get PaymentGet the information and metadata of a payment by id | key: getPayment
Input | Notes |
---|---|
Input Payment ID string / Required | Notes Provide a string value for the Id of the payment. |
Input Connection connection / Required | Notes The connection to use. |
#
Output Example Payload{ "data": { "Id": "example-d457-425f-8395-b3bdad78e517", "status": "OK", "ProviderName": "example-provider", "Payments": [ { "PaymentID": "19b79d12-0ae1-496e-9649-cbd04b15c7c5", "Date": "/Date(1638144000000+0000)/", "BankAmount": 80, "CurrencyRate": 1, "PaymentType": "ACCRECPAYMENT", "Status": "AUTHORISED", "HasAccount": false } ] }}
#
Get Payment HistoryGet the information and metadata of a payment's history by Id | key: getPaymentHistory
Input | Notes |
---|---|
Input Payment ID string / Required | Notes Provide a string value for the Id of the payment. |
Input Connection connection / Required | Notes The connection to use. |
#
List AccountsList all accounts | key: listAccounts
Input | Notes | Example |
---|---|---|
Input Modified After string | Notes Only contacts created or modified since this timestamp will be returned. | Example yyyy-mm-ddThhss |
Input Page Number string | Notes Provide the page of the results you would like to return. Pagination will only be enabled if over 100 elements are returned by your request. It is not possible to specify the page size. | Example 3 |
Input Where string | Notes The where parameter allows you to filter on endpoints and elements that don't have explicit parameters. | Example Name.Contains("Peter") |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "accounts": [ { "AccountID": "example-7b92-4e10-84e8-efef27090697", "Code": "200", "Name": "Example Account", "Status": "ARCHIVED", "Type": "REVENUE", "TaxType": "OUTPUT" }, { "AccountID": "example-7b92-4e10-84e8-efef27090697", "Code": "200", "Name": "Example Account", "Status": "ARCHIVED", "Type": "REVENUE", "TaxType": "OUTPUT" } ] }}
#
List ConnectionsList all connections | key: listConnections
Input | Notes |
---|---|
Input Connection connection / Required | Notes The connection to use. |
#
Output Example Payload{ "data": [ { "id": "example-e40f-414a-8f95-ce6a63196e1a", "authEventId": "example-e40f-414a-8f95-ce6a63196e1a", "tenantId": "example-e40f-414a-8f95-ce6a63196e1a", "tenantType": "ORGANIZATION", "tenantName": "Example" } ]}
#
List ContactsList all contacts | key: listContacts
Input | Notes | Example |
---|---|---|
Input Modified After string | Notes Only contacts created or modified since this timestamp will be returned. | Example yyyy-mm-ddThhss |
Input Page Number string | Notes Provide the page of the results you would like to return. Pagination will only be enabled if over 100 elements are returned by your request. It is not possible to specify the page size. | Example 3 |
Input Where string | Notes The where parameter allows you to filter on endpoints and elements that don't have explicit parameters. | Example Name.Contains("Peter") |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "contacts": [ { "ContactID": "example-7b92-4e10-84e8-efef27090697", "ContactStatus": "Active", "Name": "Example Contact", "EmailAddress": "someone@example.com", "IsSupplier": "false", "IsCustomer": "false", "updatedDateUTC": "/Date(1637614988203+0000)/" } ] }}
#
List InvoicesList all invoices | key: listInvoices
Input | Notes | Example |
---|---|---|
Input Modified After string | Notes Only contacts created or modified since this timestamp will be returned. | Example yyyy-mm-ddThhss |
Input Page Number string | Notes Provide the page of the results you would like to return. Pagination will only be enabled if over 100 elements are returned by your request. It is not possible to specify the page size. | Example 3 |
Input Where string | Notes The where parameter allows you to filter on endpoints and elements that don't have explicit parameters. | Example Name.Contains("Peter") |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "Invoices": [ { "InvoiceID": "example-7b92-4e10-84e8-efef27090697", "InvoiceNumber": "example01", "AmountDue": 800, "AmountPaid": 0, "SentToContact": false, "TotalDiscount": 200, "contact": {} } ] }}
#
List ItemsList all items | key: listItems
Input | Notes | Example |
---|---|---|
Input Modified After string | Notes Only contacts created or modified since this timestamp will be returned. | Example yyyy-mm-ddThhss |
Input Page Number string | Notes Provide the page of the results you would like to return. Pagination will only be enabled if over 100 elements are returned by your request. It is not possible to specify the page size. | Example 3 |
Input Where string | Notes The where parameter allows you to filter on endpoints and elements that don't have explicit parameters. | Example Name.Contains("Peter") |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "Items": [ { "ItemID": "19b79d12-0ae1-496e-9649-cbd04b15c7c5", "Code": "ExampleThing", "Description": "I sell this untracked thing", "PurchaseDescription": "I buy this untracked thing", "UpdatedDateUTC": "/Date(1488338552390+0000)/", "PurchaseDetails": { "UnitPrice": 20, "AccountCode": "400", "TaxType": "NONE" }, "SalesDetails": { "UnitPrice": 40, "AccountCode": "200", "TaxType": "OUTPUT2" }, "Name": "An Example Untracked Item", "IsTrackedAsInventory": false, "IsSold": true, "IsPurchased": true } ] }}
#
List PaymentsList all payments | key: listPayments
Input | Notes | Example |
---|---|---|
Input Modified After string | Notes Only contacts created or modified since this timestamp will be returned. | Example yyyy-mm-ddThhss |
Input Page Number string | Notes Provide the page of the results you would like to return. Pagination will only be enabled if over 100 elements are returned by your request. It is not possible to specify the page size. | Example 3 |
Input Where string | Notes The where parameter allows you to filter on endpoints and elements that don't have explicit parameters. | Example Name.Contains("Peter") |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "Id": "example-d457-425f-8395-b3bdad78e517", "status": "OK", "ProviderName": "example-provider", "Payments": [ { "PaymentID": "19b79d12-0ae1-496e-9649-cbd04b15c7c5", "Date": "/Date(1638144000000+0000)/", "BankAmount": 80, "CurrencyRate": 1, "PaymentType": "ACCRECPAYMENT", "Status": "AUTHORISED", "HasAccount": false } ] }}
#
Pay InvoiceCreate a new payment on an existing AP/AR invoice | key: payInvoice
Input | Notes | Example |
---|---|---|
Input Account ID string / Required | Notes Provide a string value for the Account ID | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Date String string | Notes Provide a string value for the date in which the invoice was created. | Example 2021-05-27T00:00:00 |
Input Invoice ID string / Required | Notes Provide a string value for the Invoice ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Payment Amount string / Required | Notes Provide a string value for the amount of the payment. This value must be less than or equal to the outstanding amount owed on the invoice. | Example |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Reverse PaymentReverse a payment by Id | key: reversePayment
Input | Notes |
---|---|
Input Payment ID string / Required | Notes Provide a string value for the Id of the payment. |
Input Connection connection / Required | Notes The connection to use. |
#
Output Example Payload{ "data": { "Id": "example-d457-425f-8395-b3bdad78e517", "status": "OK", "ProviderName": "example-provider", "Payments": [ { "PaymentID": "19b79d12-0ae1-496e-9649-cbd04b15c7c5", "Date": "/Date(1638144000000+0000)/", "BankAmount": 80, "CurrencyRate": 1, "PaymentType": "ACCRECPAYMENT", "Status": "DELETED", "HasAccount": false } ] }}
#
Send InvoiceSend an existing accounts receivable invoice through email | key: sendInvoice
Input | Notes | Example |
---|---|---|
Input Invoice ID string / Required | Notes Provide a string value for the Invoice ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
You can use the Send Invoice action to trigger the email of a sales invoice out of Xero. The invoice must be of Type ACCREC and a valid Status for sending (SUBMITTED, AUTHORISED or PAID). The email will be sent to the primary email address of the contact on the invoice and any additional contact persons that have IncludeInEmails flag set to true. The sender will be the user who authorized the app connection.
#
Update AccountUpdate the information and metadata of an existing account by Id | key: updateAccount
Input | Notes | Example |
---|---|---|
Input Account Code string | Notes Provide a string value for the account code. This value is a customer defined alpha numeric account code. | Example 200 |
Input Account ID string / Required | Notes Provide a string value for the Account ID | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Account Name string | Notes Provide a string value for the name of the account. | Example Example Account |
Input Account Type string | Notes Provide a string value for the type of the given account. You can choose from the list of provided values here: https://developer.xero.com/documentation/api/accounting/types#accounts | Example BANK |
Input Description string | Notes Provide a string value for the description. | Example This is an example description |
Input Enable Payments To Account boolean | Notes This flag will enable payments to be made to the given account. | Example |
Input Optional Values string Key Value List | Notes For each item, provide a key and value to be used in the request body. | Example exampleValue |
Input Purchase Tax Type string | Notes Provide the tax type of the purchaser. Pick a value from the items listed here: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example NONE |
Input Show In Expense Claims boolean | Notes This value will determine if your account will show in expense claims. This field is required for certain accounts. | Example |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "accounts": [ { "AccountID": "example-7b92-4e10-84e8-efef27090697", "Code": "200", "Name": "Example Account", "Status": "ARCHIVED", "Type": "REVENUE", "TaxType": "OUTPUT" } ] }}
#
Update AttachmentUpdate the information and metadata of an existing attachment by Id | key: updateAttachment
Input | Notes | Example |
---|---|---|
Input File Data data / Required | Notes Provide a value that represents the data of the file you want to upload | Example |
Input File Name string / Required | Notes Provide a string value for the name of the file you want to attach to the object. The File Name will become the unique identifier of the file for update operations. | Example My Example File |
Input Object ID string / Required | Notes Provide a string value for the Id of the object. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Object Type string / Required | Notes Provide a string value for the type of object you would like to access. | Example |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Update ContactUpdate the information and metadata of a contact by Id | key: updateContact
Input | Notes | Example |
---|---|---|
Input Accounts Payable Tax Type string | Notes Provide a string value for the tax type of accounts payable for the account. For more information on what value to provide, refer to the Xero docs: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example OUTPUT |
Input Accounts Receivable Tax Type string | Notes Provide a string value for the tax type of accounts receivable for the account. For more information on what value to provide, refer to the Xero docs: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example OUTPUT |
Input Address string | Notes Provide a string value that represents a valid address. | Example 4 Privet Drive |
Input Address Type string | Notes Provide a string value for the address type. | Example POBOX |
Input Bank Account Details string | Notes Provide a string value for the details of the contacts bank account. Depending on the type of account, providing a value for this field could cause your request to fail. For more information on the expected shape of the Account object, refer to the Xero docs: https://developer.xero.com/documentation/api/accounting/accounts/#get-accounts | Example 01-0123-example-00 |
Input City string | Notes Provide a string value for the city of the address. | Example San Francisco |
Input Contact ID string / Required | Notes Provide a string value for the Contact ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Contact Name string | Notes Provide a string value for the name of the contact. | Example Acme Inc. |
Input Contact Number string | Notes Provide a string value for the unique number identifier of the contact. | Example IDexample01 |
Input Contact Status string | Notes Provide a string value for the status of the contact. | Example |
Input Default Currency string | Notes Provide a valid type of currency. | Example USD |
Input Email Address string | Notes Provide a valid email address for the contact. | Example someone@example.com |
Input First Name string | Notes Provide a string value for the first name of the contact. | Example John |
Input Last Name string | Notes Provide a string value for the last name of the contact. | Example Doe |
Input Postal Code string | Notes Provide a valid postal code. | Example 48423 |
Input Tax Number string | Notes Provide a string value for the Tax number. For more information on what value to provide, refer to the Xero docs: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example 12-345-678 |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "contacts": [ { "ContactID": "example-7b92-4e10-84e8-efef27090697", "ContactStatus": "Active", "Name": "Example Contact", "EmailAddress": "someone@example.com", "IsSupplier": "false", "IsCustomer": "false", "updatedDateUTC": "/Date(1637614988203+0000)/" } ] }}
#
Update ItemUpdate the information and metadata of an item by Id | key: updateItem
Input | Notes | Example |
---|---|---|
Input Description string | Notes Provide a string value for the description. | Example This is an example description |
Input Optional Values string Key Value List | Notes For each item, provide a key and value to be used in the request body. | Example exampleValue |
Input Inventory Asset Account Code string | Notes Provide the account code for the inventory asset | Example 200 |
Input Is Purchased boolean | Notes Provide a boolean value to determine if the item has been purchased yet. | Example |
Input Is Sold boolean | Notes Provide a boolean value to determine if the item has been sold yet. | Example |
Input Item Code string / Required | Notes Provide a user-defined valid item code. | Example Untracked Item |
Input Item ID string / Required | Notes Provide a string value for the Item ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Item Name string | Notes Provide a string value for the name of the item. | Example Example Name |
Input Purchase Account Code string | Notes Provide the account code of the purchase. | Example 200 |
Input Purchase Description string | Notes Provide a string value for the description. | Example This is an example description |
Input Purchase Tax Type string | Notes Provide the tax type of the purchaser. Pick a value from the items listed here: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example NONE |
Input Purchase Unit Price string | Notes Provide the unit price of the purchase. | Example 800 |
Input Sales Account Code string | Notes Provide the account code of the sale. | Example 200 |
Input Sales Tax Type string | Notes Provide the tax type of the Seller. Provide a value from the items listed here: https://developer.xero.com/documentation/api/accounting/types#tax-types | Example NONE |
Input Sales Unit Price string | Notes Provide the unit price of the sale, if the item has been sold. | Example 50.69 |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "Items": [ { "ItemID": "example-7b92-4e10-84e8-efef27090697", "Code": "ExampleThing", "Description": "I sell this untracked thing", "PurchaseDescription": "I buy this untracked thing", "UpdatedDateUTC": "/Date(1488338552390+0000)/", "PurchaseDetails": { "UnitPrice": 20, "AccountCode": "400", "TaxType": "NONE" }, "SalesDetails": { "UnitPrice": 40, "AccountCode": "200", "TaxType": "OUTPUT2" }, "Name": "An Example Untracked Item", "IsTrackedAsInventory": false, "IsSold": true, "IsPurchased": true } ] }}
#
Void InvoiceVoid an existing approved invoice that has no payments applied to it. | key: voidInvoice
Input | Notes | Example |
---|---|---|
Input Invoice ID string / Required | Notes Provide a string value for the Invoice ID. | Example example-e40f-414a-8f95-ce6a63196e1a |
Input Connection connection / Required | Notes The connection to use. | Example |
#
Output Example Payload{ "data": { "ID": "example-7b92-4e10-84e8-efef27090697", "status": "OK", "ProviderName": "MyExampleProvider", "DateTimeUTC": "/Date(1637616068092)/", "Invoices": [ { "InvoiceID": "example-7b92-4e10-84e8-efef27090697", "InvoiceNumber": "example01", "AmountDue": 800, "AmountPaid": 0, "SentToContact": false, "TotalDiscount": 200, "contact": {}, "Status": "VOIDED" } ] }}