DEV

Xero

Xero Connection

Put Xero to Work with @Human Automations and @Human Agents

The Xero Connection documents all Triggers, Actions and Query Operations available for creating automations via the Xero API.

What can you do with the Xero Connection?

  • Connect to the Xero API in a few clicks

  • Use the related Xero Operations (see below) in @Human Automations or @Human Agents

Trigger Operations

Contact Created

Triggers on: contacts/contact_created

Triggered when a new contact is created in Xero.

Contact Updated

Triggers on: contacts/contact_updated

Triggered when an existing contact is updated in Xero.

Invoice Created

Triggers on: invoices/invoice_created

Triggered when a new invoice is created in Xero.

Invoice Updated

Triggers on: invoices/invoice_updated

Triggered when an existing invoice is updated in Xero.

Action Operations

Query Operations

Example link

Example link

Obtaining Access Credentials

To obtain a System-to-System Personal Access Token (PAT) for Xero, follow these steps:

Prerequisites

  • A Xero user account with admin privileges (required to generate PATs).

  • 2FA (Two-Factor Authentication) enabled on the account (mandatory for PAT generation).

Steps to Generate a Personal Access Token (PAT) in Xero

  1. Log in to Xero

  2. Navigate to Developer Portal

    • Click on your profile icon (top-right) → Select "Developer".

  3. Go to "Personal Access Tokens"

    • In the left sidebar, click "Personal Access Tokens" under "My Apps".

  4. Generate a New Token

    • Click "Generate a new token".

    • Provide a name/description (e.g., "API Integration - [Your App Name]").

    • Select the expiry period (max 6 months).

    • Choose the required scopes (permissions) for your integration (e.g., accounting.contacts, accounting.transactions).

  5. Confirm & Copy the Token

    • Click "Generate Token".

    • Copy the token immediately (it will not be shown again).

    • Store it securely (treat it like a password).

Configuring Webhooks

  1. Log in to Xero Developer Portal

  2. Select Your App

    • Click on the application you want to configure for webhooks.

  3. Navigate to Webhooks Section

    • In the left-hand menu, click on the "Webhooks" tab.

  4. Add Webhook Details

    • Enter your endpoint URL in the "Delivery URL" field.

  5. Choose Event Subscriptions

    • Select the events you want to listen for (e.g., Invoices, Contacts, Payments).

  6. Save and Generate Key

    • Click "Save". This will generate your unique Webhook Key.

  7. Complete Intent to Receive

    • Click "Send 'Intent to Receive'". Your server must verify the test request to change the status to "Intent to receive".

  8. Copy Webhook Key

    • Copy the Webhook Key for use in your application's signature verification logic.

Code (Apache v2.0): Service Connectivity and Metadata

Code (Apache v2.0): List of External Resources and Internal Mapping

Last updated