SAP Cloud Platform Open Connectors

Xero

Xero

Available in the finance hub

Connector Information Details
Provider API Documentation
Authentication OAuth 2.0
Events Polling
Bulk Not supported
Common Resources and Transformations Supported

Xero Connector

On this page:

Authentication Prerequisites

The Xero connector uses the OAuth 2.0 authentication workflow. Before you can authenticate an instance of the Xero connector, you need the following:

Provider sandbox

A trial or paid Xero account and sandbox are required.

Generate OAuth credentials

To generate or retrieve OAuth credentials for your Xero account, follow these steps:

  1. In a web browser, navigate to https://developer.xero.com/myapps/ and sign in.
  2. In the top-right corner of the My Apps page, click New App. The Add a New App window appears.
  3. On the Add a New App window, do the following:
    • In the App name field, add a name for your app.
    • In the Company or application URL, add a URL for your organization's or offering's web page.
    • In the Privacy policy URL (optional) field, you can add a link to your organization's privacy policy.
    • In the OAuth 2.0 redirect URI field, add https://auth.cloudelements.io/oauth
    • Review and agree to the terms and conditions, then click Create app. After your app is created, you will be redirected to the Details page.
  4. From the OAuth 2.0 credentials section of your app's Detail page, click Generate a secret.
  5. When you have both a Client ID and Client secret, copy and paste the values, which you will use when you authenticate a connector instance. 

Record Tenant ID

To retrieve your Tenant ID, do the following:

  1. After creating a new app and generating OAuth credentials, navigate to the Referral Id section of your app's Details page.
  2. Copy and paste the value in XTID, which you will use as your Tenant ID when you authenticate a connector instance.

Required Authentication Parameters

You can authenticate a connector instance using the UI or via API calls. For detailed information on how to authenticate an instance, see our related documentation:

To authenticate an instance of the Xero connector, you will need the following parameters:

Parameter Name/UI ValueAPI ValueDescriptionSource
OAuth API Keyoauth.api.keyGenerated before authenticationGenerate OAuth Creds
OAuth API Secretoauth.api.secretGenerated before authenticationGenerate OAuth Creds
Xero tenant idxero.tenant.idGenerated before authenticationRecord Tenant ID
OAuth Callback URLoauth.callback.urlDefault value is https://auth.cloudelements.io/oauthAuthenticate a Connector Instance (API)

Sample Configuration JSON

"configuration": {
    "oauth.api.key": "[myApiKey]",
    "oauth.api.secret": "[myApiSecret]",
    "xero.tenant.id": "[myTenantId]",
    "oauth.callback.url": "https://auth.cloudelements.io/oauth"
  }

Connector Fact Sheet and Reference

Authentication and Configuration Parameters

To see all authentication parameters for the Xero connector, follow these steps:

  1. Sign in to SAP Cloud Platform Open Connectors and navigate to Connectors.
  2. Hover over the card for a connector, and then click My Resources. 
  3. In the top navigation toolbar, click Setup.
  4. From the Setup page, you can view a complete list of the connector's authentication and configuration parameters.


Events and Supported Resources

The Xero connector supports events via polling. For detailed information about our Events framework and how to configure a connector instance with events, see our documentation:

You can set up polling events for the following resources of the Xero connector:

  • accounts
  • contacts
  • employees
  • items
  • invoices
  • payments
  • purchaseOrders
  • journals

Queryable Endpoints

You can use OCNQL to query the following endpoints of the Xero connector:

  • GET /contacts
  • GET /credit-notes
  • GET /employees
  • GET /invoices
  • GET /items
  • GET /journals
  • GET /payments
  • GET /purchase-orders
  • GET /tax-rates

Xero Connector API Documentation

Base URL

The base URL for all API requests is https://api.openconnectors.us2.ext.hana.ondemand.com/elements/api-v2.