Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Xero API

55 sites Security covered
View on drupal.org

This module integrates with the Xero accounting software, allowing other Drupal modules to create invoices and payments or retrieve data. It uses Xero's OAuth 2.0 for authentication and provides services for querying and interacting with the Xero API.

Provides methods to integrate with the Xero Account SaaS that allows modules to create invoices and payments or read in data from Xero.

This uses Xero's OAuth 2.0 application. You will need to follow their instructions to setup your application for your organization.

Drupal 8 or greater

Xero API uses the xeroclient library.

Getting Started

Please review the README for the most up-to-date instructions.

API

  • Typed Data integration for Xero types including custom "view" method to print out a render array for a data type.
  • xero.query service to get, post, and put to Xero API.
  • Xero reference field to store references to Xero objects by GUID.
  • Form builder service to dynamically create forms based on Typed Data data types.
  • Templates for Xero types.
  • PHPUnit tests running off of qa.drupal.org.

Drupal 7.x-2.x

Experimental OAuth2 support is available in 7.x-2.x branch of this module.

Drupal 6, Drupal 7 1.x

Xero API uses the PHP-Xero library, and is not compatible with oauth module because of the way in which the OAuth class is included in both the module and the PHP-Xero library.

API

  • Methods: Query data, cache data, and build forms around data.
  • Make API: Create array structures for various Xero data types.
  • Theme API: Theme functions and templates for basic data types.
  • Field API: Xero reference field stores Contact, Payment, BankTransaction, Account, and Invoice Xero types (7.x-1.0-beta2 or greater)
  • Tests: Connection test and validation assertions using SimpleTest.
  • Example: See included Ubercart Xero example.

Modules that use Xero API

Xero API provides methods as described in API.txt to let you develop modules. As an example, I have used the Xero API to create addhours and addhours_xero modules (private), which post hour entries as Invoice line items to Xero. You can make any GET or POST query as defined in the Xero Developer Documentation.

As such this module actually has no visible effect other than providing methods for a module developer to use and to test their own application. I found that there is no one way that Accounting is setup per organization.

Version information

Module Version Drupal Compatibility Library Compatibility 3.1.x 10, 11, 12 xeroclient >= 0.5.1, < 11.2 only supported until 3.1.0-alpha3 3.0.x 10 xeroclient >= 0.4 8.x-2.x 8, 9 xeroclient < 0.4 >= 0.3 7.x-2.x 7 xeroclient (included) 7.x-1.x 7 No longer compatible with Xero API

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Dec 2024
Latest release
1 month ago
Releases (12 mo)
2
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
3.1.0-alpha4 Pre-release 11 Jul 13, 2026
3.1.0-alpha3 Pre-release 10–11 Jul 3, 2026
3.1.0-alpha2 Pre-release 10–11 Aug 15, 2025
3.1.0-alpha1 Pre-release 10–11 Dec 20, 2024