An OpenAPI (Swagger) specification for the Xero API
This repository holds the official Xero OpenAPI descriptions.
OpenAPI spec 3.0
- Accounting API - yaml
- Accounting API - json
- Bank Feeds API - yaml
- Bank Feeds API - json
- Fixed Assets API - yaml
- Fixed Assets API - json
- Files API - yaml
- Files API - json
OpenAPI spec 2.0 (Swagger)
There are lots of tools available for viewing and editing OpenAPI descriptions in a nicely formatted way. A popular tool is SwaggerHub - a version of which is hosted here.
Once you sign up or login, you can create a new API under your account and import a Xero API spec using the 'raw' URL of the spec file e.g.: https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v3/Xero_accounting_2.0.0_swagger.yaml
If you find something missing or incorrect then please open an issue or send us a pull request. There are lots of tools for editing OpenAPI definitions including the SwaggerHub. Just use the import instructions above.
Postman will automatically import OpenAPI definitions but the OpenAPI spec doesn't support OAuth1.0a. To use our OpenAPI definitions to make requests in Postman you will need to also import the Xero OAuth1a Postman collection from our Xero-Postman repo.
Thanks very much to @calcinai for contributing the original swagger 2.0 version of xero-schemas from his xero-php project. It was super useful when creating the official definition.