Xero Accounting API

Core accounting API for the Xero platform. Supports creating and managing accounts, invoices, credit notes, bank transactions, contacts, payments, purchase orders, and financial reports. Provides comprehensive access to all accounting functions in Xero including chart of accounts, journal entries, tax rates, currencies, and tracking categories.

OpenAPI Specification

xero-accounting-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Xero Accounting API
  version: 11.1.0
  termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
  contact:
    name: Xero Platform Team
    email: [email protected]
    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
paths:
  /Accounts:
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
        type: string
    get:
      security:
        - OAuth2:
            - accounting.settings
            - accounting.settings.read
      tags:
        - Accounting
      operationId: getAccounts
      summary: Xero Retrieves the full chart of accounts
      parameters:
        - $ref: "#/components/parameters/ifModifiedSince"
        - in: query
          name: where
          description: Filter by an any element
          example: Status=="ACTIVE" AND Type=="BANK"
          x-example-csharp: Status==\"ACTIVE\"
          x-example-java: Status=="' + Account.StatusEnum.ACTIVE+ '"
          x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Account::STATUS_ACTIVE . '"
          x-example-ruby: Status==#{XeroRuby::Accounting::Account::ACTIVE}
          schema:
            type: string
        - in: query
          name: order
          description: Order by an any element
          example: Name ASC
          schema:
            type: string
      responses:
        "200":
          description: Success - return response of type Accounts array with 0 to n Account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Accounts"
              example:
                Accounts:
                  - AccountID: ebd06280-af70-4bed-97c6-7451a454ad85
                    Code: "091"
                    Name: Business Savings Account
                    Type: BANK
                    TaxType: NONE
                    EnablePaymentsToAccount: false
                    BankAccountNumber: "0209087654321050"
                    BankAccountType: BANK
                    CurrencyCode: NZD
                  - AccountID: 7d05a53d-613d-4eb2-a2fc-dcb6adb80b80
                    Code: "200"
                    Name: Sales
                    Type: REVENUE
                    TaxType: OUTPUT2
                    Description: Income from any normal business activity
                    EnablePaymentsToAccount: false
    put:
      security:
        - OAuth2:
            - accounting.settings
      tags:
        - Accounting
      operationId: createAccount
      summary: Xero Creates a new chart of accounts
      parameters:
        - $ref: "#/components/parameters/idempotencyKey"
      x-hasAccountingValidationError: true
      x-example:
        - object:
          is_object: true
          key: account
          keyPascal: Account
        - code:
          key: code
          keyPascal: Code
          default: 123456
          object: account
        - name:
          key: name
          keyPascal: Name
          default: FooBar
          object: account
        - type:
          key: type
          keyPascal: Type
          default: EXPENSE
          nonString: true
          php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE
          node: AccountType.EXPENSE
          ruby: XeroRuby::Accounting::AccountType::EXPENSE
          python: AccountType.EXPENSE
          java: com.xero.models.accounting.AccountType.EXPENSE
          csharp: AccountType.EXPENSE
          object: account
        - description:
          is_last: true
          key: description
          keyPascal: Description
          default: Hello World
          object: account
      responses:
        "200":
          description: Success - created new Account and return response of type Accounts array with new Account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Accounts"
              example:
                Id: 11814c9d-3b5e-492e-93b0-fad16bf3244f
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550793549392)/
                Accounts:
                  - AccountID: 66b262e2-561e-423e-8937-47d558f13442
                    Code: "123456"
                    Name: Foobar
                    Status: ACTIVE
                    Type: EXPENSE
                    TaxType: INPUT
                    Description: Hello World
                    Class: EXPENSE
                    EnablePaymentsToAccount: false
                    ShowInExpenseClaims: false
                    ReportingCode: EXP
                    ReportingCodeName: Expense
                    UpdatedDateUTC: /Date(1550793549320+0000)/
        "400":
          description: Validation Error - some data was incorrect returns response of type Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
              example:
                ErrorNumber: 10
                Type: ValidationException
                Message: A validation exception occurred
                Elements:
                  - AccountID: 00000000-0000-0000-0000-000000000000
                    Code: "123456"
                    Name: Foobar
                    Type: EXPENSE
                    Description: Hello World
                    ValidationErrors:
                      - Message: Please enter a unique Name.
      requestBody:
        required: true
        description: Account object in body of request
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Account"
            example:
              Code: "123456"
              Name: Foobar
              Type: EXPENSE
              Description: Hello World
  /Accounts/{AccountID}:
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
    get:
      security:
        - OAuth2:
            - accounting.settings
            - accounting.settings.read
      tags:
        - Accounting
      operationId: getAccount
      summary: Xero Retrieves a single chart of accounts by using a unique account Id
      parameters:
        - $ref: "#/components/parameters/AccountID"
      responses:
        "200":
          description: Success - return response of type Accounts array with one Account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Accounts"
              example:
                Id: 323455cc-9511-4451-a873-248d2983f38e
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550797359081)/
                Accounts:
                  - AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a
                    Code: "123456"
                    Name: FooBar
                    Status: ACTIVE
                    Type: EXPENSE
                    TaxType: INPUT
                    Description: Hello World
                    Class: EXPENSE
                    EnablePaymentsToAccount: false
                    ShowInExpenseClaims: false
                    ReportingCode: EXP
                    ReportingCodeName: Expense
                    UpdatedDateUTC: /Date(1550797359120+0000)/
    post:
      security:
        - OAuth2:
            - accounting.settings
      tags:
        - Accounting
      operationId: updateAccount
      summary: Xero Updates a chart of accounts
      x-hasAccountingValidationError: true
      x-example:
        - account:
          is_object: true
          key: account
          keyPascal: Account
        - code:
          key: code
          keyPascal: Code
          default: 123456
          object: account
        - name:
          key: name
          keyPascal: Name
          default: BarFoo
          object: account
        - type:
          key: type
          keyPascal: Type
          default: EXPENSE
          nonString: true
          php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE
          node: AccountType.EXPENSE
          ruby: XeroRuby::Accounting::AccountType::EXPENSE
          python: AccountType.EXPENSE
          java: com.xero.models.accounting.AccountType.EXPENSE
          csharp: AccountType.EXPENSE
          object: account
        - description:
          key: description
          keyPascal: Description
          default: Hello World
          object: account
        - taxType:
          is_last: true
          key: taxType
          keyPascal: TaxType
          keySnake: tax_type
          default: NONE
          object: account
        - accounts:
          is_object: true
          key: accounts
          keyPascal: Accounts
        - accounts:
          is_last: true
          is_array_add: true
          key: accounts
          keyPascal: Accounts
          java: Accounts
          csharp: Account
          object: account
      parameters:
        - $ref: "#/components/parameters/AccountID"
        - $ref: "#/components/parameters/idempotencyKey"
      responses:
        "200":
          description: Success - update existing Account and return response of type Accounts array with updated Account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Accounts"
              example:
                Id: 9012e75c-ec08-40a9-ae15-153fc1f35c4d
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550795389340)/
                Accounts:
                  - AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a
                    Code: "654321"
                    Name: BarFoo
                    Status: ACTIVE
                    Type: EXPENSE
                    TaxType: INPUT
                    Description: Good Bye World
                    Class: EXPENSE
                    EnablePaymentsToAccount: false
                    ShowInExpenseClaims: false
                    ReportingCode: EXP
                    ReportingCodeName: Expense
                    UpdatedDateUTC: /Date(1550795389333+0000)/
        "400":
          description: Validation Error - some data was incorrect returns response of type Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
              example:
                ErrorNumber: 10
                Type: ValidationException
                Message: A validation exception occurred
                Elements:
                  - AccountID: 00000000-0000-0000-0000-000000000000
                    Code: "123456"
                    Name: Foobar
                    Type: EXPENSE
                    Description: Hello World
                    ValidationErrors:
                      - Message: Please enter a unique Name.
      requestBody:
        required: true
        description: Request of type Accounts array with one Account
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Accounts"
            example:
              Accounts:
                - Code: "123456"
                  Name: BarFoo
                  AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a
                  Type: EXPENSE
                  Description: GoodBye World
                  TaxType: INPUT
                  EnablePaymentsToAccount: false
                  ShowInExpenseClaims: false
                  Class: EXPENSE
                  ReportingCode: EXP
                  ReportingCodeName: Expense
                  UpdatedDateUTC: "2019-02-21T16:29:47.96-08:00"
    delete:
      security:
        - OAuth2:
            - accounting.settings
      tags:
        - Accounting
      operationId: deleteAccount
      x-hasAccountingValidationError: true
      summary: Xero Deletes a chart of accounts
      parameters:
        - $ref: "#/components/parameters/AccountID"
      responses:
        "200":
          description: Success - delete existing Account and return response of type Accounts array with deleted Account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Accounts"
              example:
                Id: 76bb0543-8efe-4acc-b7f6-67dfcdec37b4
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550798217216)/
                Accounts:
                  - AccountID: 7f3c0bec-f3e7-4073-b4d6-cc56dd027ef1
                    Code: "123456"
                    Name: FooBar
                    Status: DELETED
                    Type: EXPENSE
                    TaxType: INPUT
                    Description: Hello World
                    Class: EXPENSE
                    EnablePaymentsToAccount: false
                    ShowInExpenseClaims: false
                    ReportingCode: EXP
                    ReportingCodeName: Expense
                    UpdatedDateUTC: /Date(1550798217210+0000)/
        "400":
          description: Validation Error - some data was incorrect returns response of type Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
              example:
                ErrorNumber: 10
                Type: ValidationException
                Message: A validation exception occurred
                Elements:
                  - AccountID: 00000000-0000-0000-0000-000000000000
                    Code: "123456"
                    Name: Foobar
                    Type: EXPENSE
                    Description: Hello World
                    ValidationErrors:
                      - Message: Please enter a unique Name.
  /Accounts/{AccountID}/Attachments:
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
    get:
      security:
        - OAuth2:
            - accounting.attachments
            - accounting.attachments.read
      tags:
        - Accounting
      operationId: getAccountAttachments
      summary: Xero Retrieves attachments for a specific accounts by using a unique account Id
      parameters:
        - $ref: "#/components/parameters/AccountID"
      responses:
        "200":
          description: Success - return response of type Attachments array of Attachment
          x-isAttachment: true
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Attachments"
              example:
                Id: 439c1573-3cd8-4697-a9f6-81fa651ee8f3
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550852630329)/
                Attachments:
                  - AttachmentID: 52a643be-cd5c-489f-9778-53a9fd337756
                    FileName: sample5.jpg
                    Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
                    MimeType: image/jpg
                    ContentLength: 2878711
  /Accounts/{AccountID}/Attachments/{AttachmentID}:
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
    get:
      security:
        - OAuth2:
            - accounting.attachments
            - accounting.attachments.read
      tags:
        - Accounting
      operationId: getAccountAttachmentById
      summary: Xero Retrieves a specific attachment from a specific account using a unique attachment Id
      parameters:
        - $ref: "#/components/parameters/AccountID"
        - $ref: "#/components/parameters/AttachmentID"
        - $ref: "#/components/parameters/ContentType"
      responses:
        "200":
          description: Success - return response of attachment for Account as binary data
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
  /Accounts/{AccountID}/Attachments/{FileName}:
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
    get:
      security:
        - OAuth2:
            - accounting.attachments
            - accounting.attachments.read
      tags:
        - Accounting
      operationId: getAccountAttachmentByFileName
      summary: Xero Retrieves an attachment for a specific account by filename
      parameters:
        - $ref: "#/components/parameters/AccountID"
        - $ref: "#/components/parameters/FileName"
        - $ref: "#/components/parameters/ContentType"
      responses:
        "200":
          description: Success - return response of attachment for Account as binary data
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
    post:
      security:
        - OAuth2:
            - accounting.attachments
      tags:
        - Accounting
      operationId: updateAccountAttachmentByFileName
      x-hasAccountingValidationError: true
      summary: Xero Updates attachment on a specific account by filename
      parameters:
        - $ref: "#/components/parameters/AccountID"
        - $ref: "#/components/parameters/FileName"
        - $ref: "#/components/parameters/idempotencyKey"
      responses:
        "200":
          description: Success - return response of type Attachments array of Attachment
          x-isAttachment: true
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Attachments"
              example:
                Id: c8d6413a-1da2-4faa-9848-21f60443e906
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550859714477)/
                Attachments:
                  - AttachmentID: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    FileName: sample5.jpg
                    Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
                    MimeType: image/jpg
                    ContentLength: 2878711
        "400":
          description: Validation Error - some data was incorrect returns response of type Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        description: Byte array of file in body of request
        content:
          application/octet-stream:
            schema:
              type: string
              format: byte
    put:
      security:
        - OAuth2:
            - accounting.attachments
      tags:
        - Accounting
      operationId: createAccountAttachmentByFileName
      x-hasAccountingValidationError: true
      summary: Xero Creates an attachment on a specific account
      parameters:
        - $ref: "#/components/parameters/AccountID"
        - $ref: "#/components/parameters/FileName"
        - $ref: "#/components/parameters/idempotencyKey"
      responses:
        "200":
          description: Success - return response of type Attachments array of Attachment
          x-isAttachment: true
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Attachments"
              example:
                Id: 724cdff5-bcd1-4c5c-977e-e864c24258e0
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550856817769)/
                Attachments:
                  - AttachmentID: ab95b276-9dce-4925-9077-439818ba270f
                    FileName: sample5.jpg
                    Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
                    MimeType: image/jpg
                    ContentLength: 2878711
        "400":
          $ref: "#/components/responses/400Error"
      requestBody:
        required: true
        description: Byte array of file in body of request
        content:
          application/octet-stream:
            schema:
              type: string
              format: byte
  /BatchPayments:
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
    description: Batch payments allow you to bundle multiple bills or invoices into one payment transaction. This means a single payment in Xero can be reconciled with a single transaction on the bank statement making for a much simpler bank reconciliation experience.
    get:
      security:
        - OAuth2:
            - accounting.transactions
            - accounting.transactions.read
      tags:
        - Accounting
      operationId: getBatchPayments
      summary: Xero Retrieves either one or many batch payments for invoices
      parameters:
        - $ref: "#/components/parameters/ifModifiedSince"
        - in: query
          name: where
          description: Filter by an any element
          example: Status=="AUTHORISED"
          x-example-csharp: Status==\"AUTHORISED\"
          x-example-java: Status=="' + BatchPayment.StatusEnum.AUTHORISED + '"
          x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BatchPayment::STATUS_AUTHORISED . '"
          x-example-ruby: Status==#{XeroRuby::Accounting::BatchPayment::AUTHORISED}
          schema:
            type: string
        - in: query
          name: order
          description: Order by an any element
          example: Date ASC
          schema:
            type: string
      responses:
        "200":
          description: Success - return response of type BatchPayments array of BatchPayment objects
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchPayments"
              example:
                Id: 6ab84949-4fe5-4788-a135-4d8f690d24d7
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550866184006)/
                BatchPayments:
                  - Account:
                      AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
                      CurrencyCode: NZD
                    Reference: Hello World
                    BatchPaymentID: d0e9bbbf-5b8a-48b6-906a-035591fcb061
                    DateString: 2017-11-28T00:00:00
                    Date: /Date(1511827200000+0000)/
                    Payments:
                      - Invoice:
                          InvoiceID: 0975dec2-0cf6-498d-9c9f-c6775b45c61d
                          CurrencyCode: NZD
                          Payments: []
                          CreditNotes: []
                          Prepayments: []
                          Overpayments: []
                          HasErrors: false
                          IsDiscounted: false
                          LineItems: []
                        PaymentID: 97ec2ef8-f4d6-4de5-9f2a-385d41cdc2fc
                        Amount: 200.00
                        BankAmount: 200.00
                      - Invoice:
                          InvoiceID: 600982d9-6605-4e11-afa1-d8dec2be7b52
                          CurrencyCode: NZD
                          Payments: []
                          CreditNotes: []
                          Prepayments: []
                          Overpayments: []
                          HasErrors: false
                          IsDiscounted: false
                          LineItems: []
                        PaymentID: e232795f-b919-4865-a754-12f6ae8402c0
                        Amount: 200.00
                        BankAmount: 200.00
                      - Invoice:
                          InvoiceID: 99a2bd54-4ab1-413c-90bb-57f6464fe5d6
                          CurrencyCode: NZD
                          Payments: []
                          CreditNotes: []
                          Prepayments: []
                          Overpayments: []
                          HasErrors: false
                          IsDiscounted: false
                          LineItems: []
                        PaymentID: c2d571a5-38ff-4d37-9d43-dfadb4ad53ff
                        Amount: 200.00
                        BankAmount: 200.00
                      - Invoice:
                          InvoiceID: c81942c8-bfc5-4c88-a21a-b892a4a8c1c5
                          CurrencyCode: NZD
                          Payments: []
                          CreditNotes: []
                          Prepayments: []
                          Overpayments: []
                          HasErrors: false
                          IsDiscounted: false
                          LineItems: []
                        PaymentID: 0f3c18dc-49bd-47a4-a875-03c84a29978f
                        Amount: 200.00
                        BankAmount: 200.00
                      - Invoice:
                          InvoiceID: 6c9a1d89-8319-42f6-87d6-7690e748af85
                          CurrencyCode: NZD
                          Payments: []
                          CreditNotes: []
                          Prepayments: []
                          Overpayments: []
                          HasErrors: false
                          IsDiscounted: false
                          LineItems: []
                        PaymentID: 43541eed-f3ac-44ac-88cb-9fe1cb7ed8b8
                        Amount: 200.00
                        BankAmount: 200.00
                    Type: RECBATCH
                    Status: AUTHORISED
                    TotalAmount: 1000.00
                    UpdatedDateUTC: /Date(1511893792820+0000)/
                    IsReconciled: false
    put:
      security:
        - OAuth2:
            - accounting.transactions
      tags:
        - Accounting
      operationId: createBatchPayment
      summary: Xero Creates one or many batch payments for invoices
      x-hasAccountingValidationError: true
      x-example:
        - currDate:
          is_date: true
          key: currDate
          keyPascal: CurrDate
          keySnake: curr_date
          java_datatype: LocalDate
          default: LocalDate.now()
          java: LocalDate.now()
          csharp: DateTime.Now
          node: "'2020-12-10'"
          php: new DateTime('2020-12-10')
          python: dateutil.parser.parse('2020-12-03T00:00:00Z')
          ruby: "'YYYY-MM-DD'"
        - paymentAccount:
          is_object: true
          key: paymentAccount
          keyPascal: Account
          keySnake: payment_account
        - accountID:
          is_last: true
          is_uuid: true
          key: accountID
          keyPascal: AccountID
          keySnake: account_id
          default: 00000000-0000-0000-0000-000000000000
          object: paymentAccount
        - bankAccount:
          is_object: true
          key: bankAccount
          keyPascal: Account
          keySnake: bank_account
        - accountID:
          is_last: true
          is_uuid: true
          key: accountID
          keyPascal: AccountID
          keySnake: account_id
          default: 00000000-0000-0000-0000-000000000000
          object: bankAccount
        - invoice:
          is_object: true
          key: invoice
          keyPascal: Invoice
        - invoiceID:
          is_last: true
          is_uuid: true
          key: invoiceID
          keyPascal: InvoiceID
          keySnake: invoice_id
          default: 00000000-0000-0000-0000-000000000000
          object: invoice
        - payment:
          is_object: true
          key: payment
          keyPascal: Payment
        - set_bankaccount:
          is_variable: true
          nonString: true
          key: account
          keyPascal: Account
          default: bankAccount
          python: bank_account
          ruby: bank_account
          object: payment
        - date:
          is_variable: true
          nonString: true
          key: date
          keyPascal: Date
          default: currDate
          python: curr_date
          ruby: curr_date
          object: payment
        - amount:
          nonString: true
          key: amount
          keyPascal: Amount
          default: 1.00
          is_money: true
          object: payment
        - set_invoice:
          is_last: true
          is_variable: true
          nonString: true
          key: invoice
          keyPascal: Invoice
          default: invoice
          object: payment
        - payments:
          is_list: true
          key: payments
          keyPascal: Payment
        - add_payments:
          is_last: true
          is_list_add: true
          key: payments
          keyPascal: Payments
          object: payment
        - batchPayment:
          is_object: true
          key: batchPayment
          keyPascal: BatchPayment
          keySnake: batch_payment
        - set_paymentaccount:
          is_variable: true
          nonString: true
          key: account
          keyPascal: Account
          default: paymentAccount
          python: payment_account
          ruby: payment_account
          object: batchPayment
        - reference:
          key: reference
          keyPascal: Reference
          default: hello foobar
          object: batchPayment
        - date:
          is_variable: true
          nonString: true
          key: date
          keyPascal: Date
          default: currDate
          python: curr_date
          ruby: curr_date
          object: batchPayment
        - set_payments:
          is_last: true
          is_variable: true
          nonString: true
          key: payments
          keyPascal: Payments
          default: payments
          object: batchPayment
        - batchPayments:
          is_object: true
          key: batchPayments
          keyPascal: BatchPayments
        - add_batchPayments:
          is_last: true
          is_array_add: true
          key: batchPayments
          keyPascal: BatchPayments
          keySnake: batch_payments
          java: BatchPayments
          python: batch_payment
          ruby: batch_payment
          csharp: BatchPayment
          object: batchPayment
      parameters:
        - $ref: "#/components/parameters/summarizeErrors"
        - $ref: "#/components/parameters/idempotencyKey"
      responses:
        "200":
          description: Success - return response of type BatchPayments array of BatchPayment objects
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchPayments"
              example:
                Id: 424745ed-6356-46ad-87d4-3585f9062fb4
                Status: OK
                ProviderName: Xero API Partner
                DateTimeUTC: /Date(1550865988111)/
                BatchPayments:
                  - Account:
                      AccountID: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa
                      CurrencyCode: NZD
                    Reference: Foobar123
                    BatchPaymentID: d318c343-208e-49fe-b04a-45642349bcf1
                    DateString: 2019-02-22T00:00:00
                    Date: /Date(1550793600000+0000)/
                    Payments:
                      - Invoice:
                          InvoiceID: 3323652c-155e-433b-8a73-4dde7cfbf410
                          CurrencyCode: NZD
                          Payments: []
                          CreditNotes: []
                          Prepayments: []
                          Overpayments: []
                          HasErrors: false
                          IsDiscounted: false
                          LineItems: []
                        PaymentID: c05098fa-ae3c-4f00-80ec-0a9df07dedff
                        Amount: 1.00
                        BankAmount: 1.00
                      - Invoice:
                          InvoiceID: e4abafb4-1f5b-4d9f-80b3-9a7b815bc302
                          CurrencyCode: NZD
                          Payments: []
                          CreditNotes: []
                          Prepayments: []
                          Overpayments: []
                          HasErrors: false
                          IsDiscounted: false
                          LineItems: []
                        PaymentID: 96409489-2f7d-4804-9a6d-6b939b0e038a
                        Amount: 1.00
                        BankAmount: 1.00
                      - Invoice:
                          InvoiceID: e6039672-b161-40cd-b07b-a0178e7186ad
     

# --- truncated at 32 KB (901 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/xero/refs/heads/main/openapi/xero-accounting-openapi.yml