openapi: 3.0.0
servers:
  - description: Xero Bank Feeds API base url
    url: https://api.xero.com/bankfeeds.xro/1.0
info:
  contact:
    email: api@xero.com
    name: Xero Platform Team
    url: https://developer.xero.com
    x-twitter: XeroAPI
  description: The Bank Feeds API is a closed API that is only available to
    financial institutions that have an established financial services
    partnership with Xero. If you're an existing financial services partner that
    wants access, contact your local Partner Manager. If you're a financial
    institution who wants to provide bank feeds to your business customers,
    contact us to become a financial services partner.
  license:
    name: MIT
    url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
  termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
  title: Xero Bank Feeds API
  version: 2.9.4
  x-apisguru-categories:
    - financial
  x-origin:
    - format: openapi
      url: https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/master/xero_bankfeeds.yaml
      version: "3.0"
  x-providerName: xero.com
  x-serviceName: xero_bankfeeds
paths:
  /FeedConnections:
    get:
      description: By passing in the appropriate options, you can search for available
        feed connections in the system.
      operationId: getFeedConnections
      parameters:
        - description: Page number which specifies the set of records to retrieve. By
            default the number of the records per set is 10. Example -
            https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?page=1 to get
            the second set of the records. When page value is not a number or a
            negative number, by default, the first set of records is returned.
          in: query
          name: page
          schema:
            example: 1
            type: integer
        - description: Page size which specifies how many records per page will be
            returned (default 10). Example -
            https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?pageSize=100
            to specify page size of 100.
          in: query
          name: pageSize
          schema:
            example: 100
            type: integer
      responses:
        "201":
          content:
            application/json:
              example:
                items:
                  - accountId: aefbf6be-4285-4ca5-bf39-0f486c8515c7
                    accountName: SDK Bank 95921
                    accountNumber: "123496842"
                    accountToken: foobar31306
                    accountType: BANK
                    country: GB
                    currency: GBP
                    id: c0eb97b5-4f97-465a-8268-276513c14396
                  - accountId: fc2f3cc2-126e-40d7-9fc1-12e52d0a71f1
                    accountName: SDK Bank 11272
                    accountNumber: "123481122"
                    accountToken: foobar74770
                    accountType: BANK
                    country: GB
                    currency: GBP
                    id: 3b44b539-4e39-4d53-9334-d8ba01674752
                pagination:
                  itemCount: 39
                  page: 1
                  pageCount: 1
                  pageSize: 87654321
              schema:
                $ref: "#/components/schemas/FeedConnections"
          description: search results matching criteria returned with pagination and items
            array
        "400":
          description: validation error response
      security:
        - OAuth2:
            - bankfeeds
      summary: Searches for feed connections
      tags:
        - BankFeeds
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
    post:
      description: By passing in the FeedConnections array object in the body, you can
        create one or more new feed connections
      operationId: createFeedConnections
      requestBody:
        content:
          application/json:
            example:
              items:
                - accountName: SDK Bank 90861
                  accountNumber: "123458637"
                  accountToken: foobar71760
                  accountType: BANK
                  currency: GBP
            schema:
              $ref: "#/components/schemas/FeedConnections"
        description: Feed Connection(s) array object in the body
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                items:
                  - accountToken: foobar71760
                    id: 2a19d46c-2a92-4e50-9401-dcf2cb895be7
                    status: PENDING
              schema:
                $ref: "#/components/schemas/FeedConnections"
          description: success new feed connection(s)response
        "400":
          description: invalid input, object invalid
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
          description: failed to create new feed connection(s)response
      security:
        - OAuth2:
            - bankfeeds
      summary: Create one or more new feed connection
      tags:
        - BankFeeds
      x-hasBankFeedsValidationError: true
  /FeedConnections/DeleteRequests:
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
    post:
      description: By passing in FeedConnections array object in the body, you can
        delete a feed connection.
      operationId: deleteFeedConnections
      requestBody:
        content:
          application/json:
            example:
              items:
                - id: b4cc693b-24d9-42ec-a6d4-2943d253ff63
            schema:
              $ref: "#/components/schemas/FeedConnections"
        description: Feed Connections array object in the body
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                items:
                  - id: b4cc693b-24d9-42ec-a6d4-2943d253ff63
                    status: PENDING
                  - accountToken: "10000125"
                    error:
                      detail: The AccountToken is connected to another Xero Bank Account associated
                        with this bank. This Xero Bank Account belongs to a
                        different Xero Organisation.
                      title: Feed connected in different organisation
                      type: feed-connected-in-different-organisation
                    status: REJECTED
              schema:
                $ref: "#/components/schemas/FeedConnections"
          description: Success response for deleted feed connection
        "400":
          description: bad input parameter
      security:
        - OAuth2:
            - bankfeeds
      summary: Delete an existing feed connection
      tags:
        - BankFeeds
  "/FeedConnections/{id}":
    get:
      description: By passing in a FeedConnection Id options, you can search for
        matching feed connections
      operationId: getFeedConnection
      parameters:
        - description: Unique identifier for retrieving single object
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                accountId: f4c4d595-da94-493b-999a-19d1ae1f508a
                accountName: SDK Bank 5517
                accountNumber: "123434859"
                accountToken: foobar84778
                accountType: BANK
                country: GB
                currency: GBP
                id: b58b685a-1bee-4904-91f1-fee30bb6ea52
              schema:
                $ref: "#/components/schemas/FeedConnection"
          description: success returns a FeedConnection object matching the id in response
        "400":
          description: bad input parameter
      security:
        - OAuth2:
            - bankfeeds
      summary: Retrieve single feed connection based on a unique id provided
      tags:
        - BankFeeds
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
  /Statements:
    get:
      description: By passing in parameters, you can search for matching statements
      operationId: getStatements
      parameters:
        - description: unique id for single object
          in: query
          name: page
          required: false
          schema:
            format: int32
            type: integer
        - description: Page size which specifies how many records per page will be
            returned (default 10). Example -
            https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to
            specify page size of 100.
          in: query
          name: pageSize
          required: false
          schema:
            format: int32
            type: integer
        - in: header
          name: Xero-Application-Id
          required: false
          schema:
            default: 00000000-0000-0000-0000-0000000010000
            type: string
        - in: header
          name: Xero-User-Id
          required: false
          schema:
            default: 00000000-0000-0000-0000-0000030000000
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                items:
                  - endBalance:
                      amount: "150.0000"
                      creditDebitIndicator: CREDIT
                    endDate: 2019-08-15
                    errors:
                      - detail: The received statement was marked as a duplicate.
                        status: 409
                        title: Duplicate Statement Received
                        type: duplicate-statement
                    feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
                    id: 9817e4b8-82b3-4526-91f7-040bd278053f
                    startBalance:
                      amount: "100.0000"
                      creditDebitIndicator: CREDIT
                    startDate: 2019-08-01
                    statementLineCount: "1"
                    status: REJECTED
                  - endBalance:
                      amount: "150.0000"
                      creditDebitIndicator: CREDIT
                    endDate: 2019-08-15
                    feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
                    id: 2fc57bac-7aa7-4981-a5cd-8aee83fe698c
                    startBalance:
                      amount: "100.0000"
                      creditDebitIndicator: CREDIT
                    startDate: 2019-08-01
                    statementLineCount: "1"
                    status: DELIVERED
                pagination:
                  itemCount: 3
                  page: 1
                  pageCount: 210
                  pageSize: 3
              schema:
                $ref: "#/components/schemas/Statements"
          description: success returns Statements array of objects response
        "400":
          content:
            application/problem+json:
              example:
                detail: For the request field missing parameter.
                status: 400
                title: Invalid Request
                type: invalid-request
              schema:
                $ref: "#/components/schemas/Statements"
          description: bad input parameter
      security:
        - OAuth2:
            - bankfeeds
      summary: Retrieve all statements
      tags:
        - BankFeeds
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
    post:
      operationId: createStatements
      requestBody:
        content:
          application/json:
            example:
              items:
                - endBalance:
                    amount: "150"
                    creditDebitIndicator: CREDIT
                  endDate: 2019-08-11
                  feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
                  startBalance:
                    amount: "100"
                    creditDebitIndicator: CREDIT
                  startDate: 2019-08-11
                  statementLines:
                    - amount: "50"
                      chequeNumber: "12379009"
                      creditDebitIndicator: CREDIT
                      description: My new line
                      payeeName: StarLord90315
                      postedDate: 2019-08-11
                      reference: Foobar95578
                      transactionId: "123446422"
                - endBalance:
                    amount: "150"
                    creditDebitIndicator: CREDIT
                  endDate: 2019-08-11
                  feedConnectionId: 2ebe6393-f3bb-48ab-9a0e-b04fa8585a70
                  startBalance:
                    amount: "100"
                    creditDebitIndicator: CREDIT
                  startDate: 2019-08-11
                  statementLines:
                    - amount: "50"
                      chequeNumber: "12379350"
                      creditDebitIndicator: CREDIT
                      description: My new line
                      payeeName: StarLord56705
                      postedDate: 2019-08-11
                      reference: Foobar67355
                      transactionId: "123449402"
            schema:
              $ref: "#/components/schemas/Statements"
        description: Statements array of objects in the body
      responses:
        "202":
          content:
            application/json:
              example:
                items:
                  - feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
                    id: d69b02b7-a30c-464a-99cf-ba9770373c61
                    status: PENDING
                  - feedConnectionId: 2ebe6393-f3bb-48ab-9a0e-b04fa8585a70
                    id: 598f255c-015b-4138-93df-2e06c64565b3
                    status: PENDING
              schema:
                $ref: "#/components/schemas/Statements"
          description: Success returns Statements array of objects in response
        "400":
          content:
            application/problem+json:
              example:
                detail: For the request field 'StatementLine.ChequeNumber' exceeded the maximum
                  length of 20.
                status: 400
                title: Invalid Request
                type: invalid-request
              schema:
                $ref: "#/components/schemas/Statements"
          description: Statement failed validation
        "403":
          content:
            application/problem+json:
              example:
                detail: The application has not been configured to use these API endpoints.
                status: 403
                title: Invalid Application
                type: invalid-application
              schema:
                $ref: "#/components/schemas/Error"
          description: Invalid application or feed connection
        "409":
          content:
            application/problem+json:
              example:
                items:
                  - errors:
                      - detail: The received statement was marked as a duplicate.
                        status: 409
                        title: Duplicate Statement Received
                        type: duplicate-statement
                    feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
                    id: 29fefeb6-f449-470d-9179-f1d8900930d6
                    status: REJECTED
              schema:
                $ref: "#/components/schemas/Statements"
          description: Duplicate statement received
        "413":
          content:
            application/problem+json:
              example:
                detail: Request size of 3500000 bytes exceeds the limit of 3000000 bytes.
                status: 413
                title: Request too large
                type: invalid-request
              schema:
                $ref: "#/components/schemas/Statements"
          description: Statement exceeds size limit
        "422":
          content:
            application/problem+json:
              example:
                detail: End balance does not match start balance +/- statement line amounts.
                status: 422
                title: Invalid End Balance
                type: invalid-end-balance
              schema:
                $ref: "#/components/schemas/Statements"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              example:
                detail: The request should be retried. If the error persists, a Xero support
                  issue should be raised.
                status: 500
                title: Intermittent Internal Xero Error
                type: internal-error
              schema:
                $ref: "#/components/schemas/Statements"
          description: Intermittent Xero Error
      security:
        - OAuth2:
            - bankfeeds
      summary: Creates one or more new statements
      tags:
        - BankFeeds
      x-hasBankFeedsValidationError: true
  "/Statements/{statementID}":
    get:
      description: By passing in a statement id, you can search for matching statements
      operationId: getStatement
      parameters:
        - description: statement id for single object
          in: query
          name: statementId
          required: true
          schema:
            format: uuid
            type: string
        - in: path
          name: statementID
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                endBalance:
                  amount: "150.0000"
                  creditDebitIndicator: CREDIT
                endDate: 2019-10-11
                feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
                id: 97aca24a-dd10-4cda-98c7-1084a048257b
                startBalance:
                  amount: "100.0000"
                  creditDebitIndicator: CREDIT
                startDate: 2019-08-11
                statementLineCount: "1"
                status: DELIVERED
              schema:
                $ref: "#/components/schemas/Statement"
          description: search results matching id for single statement
        "404":
          description: Statement not found
      security:
        - OAuth2:
            - bankfeeds
      summary: Retrieve single statement based on unique id provided
      tags:
        - BankFeeds
    parameters:
      - $ref: "#/components/parameters/requiredHeader"
components:
  parameters:
    requiredHeader:
      description: Xero identifier for Tenant
      in: header
      name: Xero-Tenant-Id
      required: true
      schema:
        type: string
  schemas:
    CountryCode:
      description: ISO-3166 alpha-2 country code, e.g. US, AU This element is required
        only when the Application supports multi-region. Talk to your Partner
        Manager to confirm if this is the case.
      enum:
        - AD
        - AE
        - AF
        - AG
        - AI
        - AL
        - AM
        - AN
        - AO
        - AQ
        - AR
        - AS
        - AT
        - AU
        - AW
        - AZ
        - BA
        - BB
        - BD
        - BE
        - BF
        - BG
        - BH
        - BI
        - BJ
        - BL
        - BM
        - BN
        - BO
        - BR
        - BS
        - BT
        - BW
        - BY
        - BZ
        - CA
        - CC
        - CD
        - CF
        - CG
        - CH
        - CI
        - CK
        - CL
        - CM
        - CN
        - CO
        - CR
        - CU
        - CV
        - CW
        - CX
        - CY
        - CZ
        - DE
        - DJ
        - DK
        - DM
        - DO
        - DZ
        - EC
        - EE
        - EG
        - EH
        - ER
        - ES
        - ET
        - FI
        - FJ
        - FK
        - FM
        - FO
        - FR
        - GA
        - GB
        - GD
        - GE
        - GG
        - GH
        - GI
        - GL
        - GM
        - GN
        - GQ
        - GR
        - GT
        - GU
        - GW
        - GY
        - HK
        - HN
        - HR
        - HT
        - HU
        - ID
        - IE
        - IL
        - IM
        - IN
        - IO
        - IQ
        - IR
        - IS
        - IT
        - JE
        - JM
        - JO
        - JP
        - KE
        - KG
        - KH
        - KI
        - KM
        - KN
        - KP
        - KR
        - KW
        - KY
        - KZ
        - LA
        - LB
        - LC
        - LI
        - LK
        - LR
        - LS
        - LT
        - LU
        - LV
        - LY
        - MA
        - MC
        - MD
        - ME
        - MF
        - MG
        - MH
        - MK
        - ML
        - MM
        - MN
        - MO
        - MP
        - MR
        - MS
        - MT
        - MU
        - MV
        - MW
        - MX
        - MY
        - MZ
        - NA
        - NC
        - NE
        - NG
        - NI
        - NL
        - NO
        - NP
        - NR
        - NU
        - NZ
        - OM
        - PA
        - PE
        - PF
        - PG
        - PH
        - PK
        - PL
        - PM
        - PN
        - PR
        - PS
        - PT
        - PW
        - PY
        - QA
        - RE
        - RO
        - RS
        - RU
        - RW
        - SA
        - SB
        - SC
        - SD
        - SE
        - SG
        - SH
        - SI
        - SJ
        - SK
        - SL
        - SM
        - SN
        - SO
        - SR
        - SS
        - ST
        - SV
        - SX
        - SY
        - SZ
        - TC
        - TD
        - TG
        - TH
        - TJ
        - TK
        - TL
        - TM
        - TN
        - TO
        - TR
        - TT
        - TV
        - TW
        - TZ
        - UA
        - UG
        - US
        - UY
        - UZ
        - VA
        - VC
        - VE
        - VG
        - VI
        - VN
        - VU
        - WF
        - WS
        - XK
        - YE
        - YT
        - ZA
        - ZM
        - ZW
      example: GB
      type: string
    CreditDebitIndicator:
      description: If the statement balances are credit or debit, the
        CreditDebitIndicator should be specified from the perspective of the
        Customer.
      enum:
        - CREDIT
        - DEBIT
      type: string
    CurrencyCode:
      description: 3 letter alpha code for the ISO-4217 currency code, e.g. USD, AUD.
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - IMP
        - INR
        - IQD
        - IRR
        - ISK
        - JEP
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SPL
        - SRD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TVD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XDR
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
        - ZMK
        - ZWD
        - ""
      example: AUD
      type: string
    EndBalance:
      description: The StartBalance plus all the Statement Line Amounts should be
        equal to the EndBalance Amount.
      properties:
        amount:
          example: "10.1340"
          format: double
          type: number
          x-is-money: true
        creditDebitIndicator:
          $ref: "#/components/schemas/CreditDebitIndicator"
      type: object
    Error:
      description: On error, the API consumer will receive an HTTP response with a
        HTTP Status Code of 4xx or 5xx and a Content-Type of
        application/problem+json.
      properties:
        detail:
          description: Human readable detailed error description.
          example: The application has not been configured to use these API endpoints.
          maximum: 255
          type: string
        status:
          description: The numeric HTTP Status Code, e.g. 404
          example: 403
          type: integer
        title:
          description: Human readable high level error description.
          example: Invalid Application
          maximum: 255
          type: string
        type:
          description: Identifies the type of error.
          enum:
            - invalid-request
            - invalid-application
            - invalid-feed-connection
            - duplicate-statement
            - invalid-end-balance
            - invalid-start-and-end-date
            - invalid-start-date
            - internal-error
            - feed-already-connected-in-current-organisation
            - invalid-end-date
            - statement-not-found
            - feed-connected-in-different-organisation
            - feed-already-connected-in-different-organisation
            - bank-feed-not-found
            - invalid-country-specified
            - invalid-organisation-bank-feeds
            - invalid-organisation-multi-currency
            - invalid-feed-connection-for-organisation
            - invalid-user-role
            - account-not-valid
          example: invalid-application
          type: string
      type: object
    FeedConnection:
      externalDocs:
        url: https://developer.xero.com/documentation/bank-feeds-api/feed-connections
      properties:
        accountId:
          description: Xero identifier for a bank account in Xero. Must be included if
            AccountNumber is not specified.
          example: 079a88ea-276d-41fb-a1f1-366ef3e22921
          format: uuid
          type: string
        accountName:
          description: The Account Name will be used for the creation of a new Xero Bank
            Account if a matching Xero Bank Account is not found.
          example: Joe's Savings Account
          maximum: 30
          type: string
        accountNumber:
          description: String(40) when AccountType is BANK String(4) when AccountType is
            CREDITCARD The Account Number is used to match the feed to a Xero
            Bank Account. The API will create a new Xero Bank Account if a match
            to an existing Xero Bank Account is not found. Only the last 4
            digits must be supplied for Credit Card numbers. Must be included if
            AccountId is not specified.
          example: "3809087654321500"
          maximum: 40
          type: string
        accountToken:
          description: This account identifier is generated by the financial institute
            (FI). This must be unique for your financial institute.
          example: "10000123"
          maximum: 50
          type: string
        accountType:
          description: High level bank account type - BANK CREDITCARD BANK encompasses all
            bank account types other than credit cards.
          enum:
            - BANK
            - CREDITCARD
          example: BANK
        country:
          $ref: "#/components/schemas/CountryCode"
        currency:
          $ref: "#/components/schemas/CurrencyCode"
        error:
          $ref: "#/components/schemas/Error"
        id:
          description: GUID used to identify the Account.
          example: 0d3cf8d-95dc-4466-8dc0-47e6d1197e28
          format: uuid
          type: string
        status:
          description: the current status of the feed connection
          enum:
            - PENDING
            - REJECTED
          example: REJECTED
          type: string
      type: object
    FeedConnections:
      externalDocs:
        url: https://developer.xero.com/documentation/bank-feeds-api/feed-connections
      properties:
        items:
          items:
            $ref: "#/components/schemas/FeedConnection"
          type: array
        pagination:
          $ref: "#/components/schemas/Pagination"
      type: object
    Pagination:
      properties:
        itemCount:
          description: Number of items returned
          example: 2
          type: integer
        page:
          description: Page number which specifies the set of records to retrieve. Example
            - https://api.xero.com/bankfeeds.xro/1.0/Statements?page=2 to get
            the second set of the records. When page value is not a number or a
            negative number, by default, the first set of records is returned.
          example: 1
          type: integer
        pageCount:
          description: Number of pages available
          example: 1
          type: integer
        pageSize:
          description: Page size which specifies how many records per page will be
            returned (default 50). Example -
            https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to
            specify page size of 100.
          example: 10
          type: integer
      type: object
    StartBalance:
      description: The starting balance of the statement
      properties:
        amount:
          description: decimal(19,4) unsigned Opening/closing balance amount.
          example: "9.0000"
          format: double
          type: number
          x-is-money: true
        creditDebitIndicator:
          $ref: "#/components/schemas/CreditDebitIndicator"
      type: object
    Statement:
      properties:
        endBalance:
          $ref: "#/components/schemas/EndBalance"
        endDate:
          description: Closing balance date ISO-8601 YYYY-MM-DD
          example: 2018-07-27
          format: date
          type: string
        errors:
          items:
            $ref: "#/components/schemas/Error"
          type: array
        feedConnectionId:
          description: The Xero generated feed connection Id that identifies the Xero Bank
            Account Container into which the statement should be delivered. This
            is obtained by calling GET FeedConnections.
          example: 87cb0dc8-fa32-409c-b622-19f8de8dcc83
          format: uuid
          type: string
        id:
          description: GUID used to identify the Statement.
          example: ba4f3127-5e46-427d-80ea-dea2fcd26afe
          format: uuid
          type: string
        startBalance:
          $ref: "#/components/schemas/StartBalance"
        startDate:
          description: Opening balance date (can be no older than one year from the
            current date) ISO-8601 YYYY-MM-DD
          example: 2018-07-27
          format: date
          type: string
        statementLineCount:
          example: 1
          type: integer
        statementLines:
          $ref: "#/components/schemas/StatementLines"
        status:
          description: Current status of statements
          enum:
            - PENDING
            - REJECTED
            - DELIVERED
          example: PENDING
      type: object
    StatementLine:
      description: the lines details for a statement
      properties:
        amount:
          description: Transaction amount
          example: "5.00"
          format: double
          type: number
          x-is-money: true
        chequeNumber:
          description: The cheque/check number
          example: "021"
          maximum: 20
          type: string
        creditDebitIndicator:
          $ref: "#/components/schemas/CreditDebitIndicator"
        description:
          description: Transaction description
          example: Description for statement line 2
          maximum: 2000
          type: string
        payeeName:
          description: Typically the merchant or payee name
          example: Payee name for statement line 2
          maximum: 255
          type: string
        postedDate:
          description: The date that the transaction was processed or cleared as seen in
            internet banking ISO-8601 YYYY-MM-DD
          example: 2018-06-10
          format: date
          type: string
        reference:
          description: Optional field to enhance the Description
          example: Reference for statement line 2
          maximum: 255
          type: string
        transactionId:
          description: Financial institute's internal transaction identifier. If provided
            this field is factored into duplicate detection.
          example: transaction-id-2
          type: string
      type: object
    StatementLines:
      items:
        $ref: "#/components/schemas/StatementLine"
      type: array
    Statements:
      externalDocs:
        url: https://developer.xero.com/documentation/bank-feeds-api/statements
      properties:
        items:
          items:
            $ref: "#/components/schemas/Statement"
          type: array
        pagination:
          $ref: "#/components/schemas/Pagination"
      type: object
  securitySchemes:
    OAuth2:
      description: For more information visit
        https://developer.xero.com/documentation/oauth2/overview
      flows:
        authorizationCode:
          authorizationUrl: https://login.xero.com/identity/connect/authorize
          scopes:
            accounting.attachments: Grant read-write access to attachments
            accounting.attachments.read: Grant read-only access to attachments
            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.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
            assets assets.read: Grant read-only access to fixed assets
            bankfeeds: Grant read-write access to bankfeeds
            email: Grant read-only access to your email
            files: Grant read-write access to files and folders
            files.read: Grant read-only access to files and folders
            openid: Grant read-only access to your open id
            paymentservices: Grant read-write access to payment services
            payroll: Grant read-write access to payroll
            payroll.employees: Grant read-write access to payroll employees
            payroll.employees.read: Grant read-only access to payroll employees
            payroll.leaveapplications: Grant read-write access to payroll leaveapplications
            payroll.leaveapplications.read: Grant read-only access to payroll leaveapplications
            payroll.payitems: Grant read-write access to payroll payitems
            payroll.payitems.read: Grant read-only access to payroll payitems
            payroll.payrollcalendars: Grant read-write access to payroll calendars
            payroll.payrollcalendars.read: Grant read-only access to payroll calendars
            payroll.payruns: Grant read-write access to payroll payruns
            payroll.payruns.read: Grant read-only access to payroll payruns
            payroll.payslip: Grant read-write access to payroll payslips
            payroll.payslip.read: Grant read-only access to payroll payslips
            payroll.read: Grant read-only access to payroll
            payroll.settings.read: Grant read-only access to payroll settings
            payroll.superfundproducts.read: Grant read-only access to payroll superfundproducts
            payroll.superfunds: Grant read-write access to payroll superfunds
            payroll.superfunds.read: Grant read-only access to payroll superfunds
            payroll.timesheets: Grant read-write access to payroll timesheets
            payroll.timesheets.read: Grant read-only access to payroll timesheets
            profile: your profile information
            projects: Grant read-write access to projects
            projects.read: Grant read-only access to projects
          tokenUrl: https://identity.xero.com/connect/token
      type: oauth2
