Xero Identity API

The Identity API from Xero — 2 operation(s) for identity.

OpenAPI Specification

xero-identity-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Xero Accounting Identity API
  version: 11.1.0
  termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
  contact:
    name: Xero Platform Team
    email: api@xero.com
    url: https://developer.xero.com
servers:
- description: The Xero Accounting API exposes accounting and related functions of the main Xero application and can be used for a variety of purposes such as creating transactions like invoices and credit notes, right through to extracting accounting data via our reports endpoint.
  url: https://api.xero.com/api.xro/2.0
tags:
- name: Identity
paths:
  /Connections:
    get:
      security:
      - OAuth2: []
      tags:
      - Identity
      description: Override the base server url that include version
      operationId: getConnections
      summary: Xero Retrieves the connections for this user
      parameters:
      - in: query
        required: false
        name: authEventId
        description: Filter by authEventId
        example: 00000000-0000-0000-0000-000000000000
        schema:
          type: string
          format: uuid
      x-basepath: https://api.xero.com
      responses:
        '200':
          description: Success - return response of type Connections array with 0 to n Connection
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Connection'
              example: '[ { "id": "7cb59f93-2964-421d-bb5e-a0f7a4572a44", "tenantId": "fe79f7dd-b6d4-4a92-ba7b-538af6289c58", "tenantName": "Demo Company (NZ)", "tenantType": "ORGANISATION", "createdDateUtc": "2019-12-07T18:46:19.5165400", "updatedDateUtc": "2019-12-07T18:46:19.5187840" } ]'
  /Connections/{id}:
    delete:
      security:
      - OAuth2: []
      tags:
      - Identity
      description: Override the base server url that include version
      operationId: deleteConnection
      summary: Xero Deletes a connection for this user (i.e. disconnect a tenant)
      x-basepath: https://api.xero.com
      parameters:
      - required: true
        in: path
        name: id
        description: Unique identifier for retrieving single object
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Success - connection has been deleted no content returned
        '404':
          description: Resource not found
components:
  schemas:
    Connection:
      externalDocs:
        url: http://developer.xero.com
      properties:
        id:
          description: Xero identifier
          type: string
          format: uuid
        tenantId:
          description: Xero identifier of organisation
          type: string
          format: uuid
        authEventId:
          description: Identifier shared across connections authorised at the same time
          type: string
          format: uuid
        tenantType:
          description: Xero tenant type (i.e. ORGANISATION, PRACTICE)
          type: string
        tenantName:
          description: Xero tenant name
          type: string
        createdDateUtc:
          description: The date when the user connected this tenant to your app
          type: string
          format: date-time
          x-is-datetime: true
          x-php-format: \DateTime
        updatedDateUtc:
          description: The date when the user most recently connected this tenant to your app. May differ to the created date if the user has disconnected and subsequently reconnected this tenant to your app.
          type: string
          format: date-time
          x-is-datetime: true
          x-php-format: \DateTime
  securitySchemes:
    OAuth2:
      type: oauth2
      description: For more information
      flows:
        authorizationCode:
          authorizationUrl: https://login.xero.com/identity/connect/authorize
          tokenUrl: https://identity.xero.com/connect/token
          scopes:
            email: Grant read-only access to your email
            openid: Grant read-only access to your open id
            profile: your profile information
            accounting.attachments: Grant read-write access to attachments
            accounting.attachments.read: Grant read-only access to attachments
            accounting.budgets.read: Grant read-only access to read budgets
            accounting.contacts: Grant read-write access to contacts and contact groups
            accounting.contacts.read: Grant read-only access to contacts and contact groups
            accounting.journals.read: Grant read-only access to journals
            accounting.reports.read: Grant read-only access to accounting reports
            accounting.reports.tenninetynine.read: Grant read-only access to 1099 reports
            accounting.settings: Grant read-write access to organisation and account settings
            accounting.settings.read: Grant read-only access to organisation and account settings
            accounting.transactions: Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
            accounting.transactions.read: Grant read-only access to invoices
            paymentservices: Grant read-write access to payment services