swagger: "2.0"
info:
  version: "2.0"
  title: "Polish API"
  description: "Interface specification for services provided by third parties based on access to payment accounts. Prepared by the Polish Bank Association and its affiliates"
host: apiHost
basePath: /
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
tags:
- name: "AS"
  description: "Authorization Service"
- name: "AIS"
  description: "Account Information Service"
- name: "PIS"
  description: "Payment Initiation Services"
- name: "CAF"
  description: "Confirmation of the Availability of Funds"
parameters:
  authorizationParam:
    name: Authorization
    in: header
    required: true
    type: string
    description: "The value of the Authorization header should consist of 'type' + 'credentials', where for the approach using the 'type' token should be 'Bearer'."
  acceptEncodingParam:
    name: Accept-Encoding
    in: header
    required: true
    type: string
    enum:
      - gzip
      - deflate
    description: "Gzip, deflate"
  acceptLanguageParam:
    name: Accept-Language
    in: header
    required: true
    type: string
    description: "Prefered language of response"
  acceptCharsetParam:
    name: Accept-Charset
    in: header
    required: true
    type: string
    enum:
      - utf-8
    description: "UTF-8"
  xjwsSignatureParam:
    name: X-JWS-SIGNATURE
    in: header
    required: true
    type: string
    description: "Detached JWS signature of the body of the payload"
paths:
  /v1.0/auth/v1.0/authorize:
      x-swagger-router-controller: as
      post:
        summary: "Requests OAuth2 authorization code"
        description: "Requests OAuth2 authorization code"
        operationId: authorize
        parameters:
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: authorizeRequest
          in: body
          description: "Data for OAuth2 Authorization Code Request"
          required: true
          schema:
            $ref: "#/definitions/AuthorizeRequest"
        tags:
          - AS
        responses:
          "302":
            description: "Redirection"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
              Location: 
                type: string
                description: "URI reference for redirection"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
  /v1.0/auth/v1.0/authorizeExt:
      x-swagger-router-controller: as
      post:
        summary: "Requests OAuth2 authorization code based on One-time authorization code issued by External Authorization Tool"
        description: "Requests OAuth2 authorization code based One-time authorization code issued by External Authorization Tool. Authorization code will be delivered to TPP as callback request from ASPSP if PSU authentication is confirmed by EAT. Callback function must provide similar notification also in case of unsuccessful authentication or its abandonment."
        operationId: authorizeExt
        parameters:
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: eatCodeRequest
          in: body
          description: "Data for OAuth2 Authorization Code Request extended for EAT based authentication and callback response"
          required: true
          schema:
            $ref: "#/definitions/EatCodeRequest"
        tags:
          - AS
        responses:
          "200":
            description: Successful TPP and EAT Code verification
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "403":
            description:  "Forbidden"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
  /v1.0/auth/v1.0/token:
      x-swagger-router-controller: as
      post:
        summary: "Requests OAuth2 access token value"
        description: "Requests OAuth2 access token value"
        operationId: token
        parameters:
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: tokenRequest
          in: body
          description: "Data for OAuth2 Access Token Request"
          required: true
          schema:
            $ref: "#/definitions/TokenRequest"
        tags:
          - AS
        responses:
          "200":
            description: Success
            schema:
              $ref: "#/definitions/TokenResponse"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
              X-JWS-SIGNATURE:
                type: string
                description: "Detached JWS signature of the body of the response"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
  /v1.0/accounts/v1.0/deleteConsent:
      x-swagger-router-controller: ais
      post:
        summary: "Removes consent"
        description: "Removes consent"
        operationId: deleteConsent
        parameters:
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - name: deleteConsentRequest
          in: body
          description: "Data for delete Consent Request"
          required: true
          schema:
            $ref: "#/definitions/DeleteConsentRequest"
        tags:
          - AIS
        responses:
          "200":
            description: Success
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
  /v1.0/accounts/v1.0/getAccounts:
      x-swagger-router-controller: ais
      post:
        summary: "Get information about all user's payment account"
        description: "User identification based on access token"
        operationId: getAccounts
        parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: getAccountsRequest
          in: body
          description: "Data for Accounts Request"
          required: true
          schema:
            $ref: "#/definitions/AccountsRequest"
        tags:
          - AIS
        responses:
          "200":
            description: Success
            schema:
              $ref: "#/definitions/AccountsResponse"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
                #required: false
              X-JWS-SIGNATURE:
                type: string
                description: "Detached JWS signature of the body of the response"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "401":
            description:  "Authorization header not found"
            schema:
              $ref: "#/definitions/Error"
          "403":
            description:  "Access denied"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "429":
            description:  "Request limit for the requested service exceeded"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
        security:
        - xs2a_auth:
          - "ais:accounts"
  /v1.0/accounts/v1.0/getAccount:
      x-swagger-router-controller: ais
      post:
        summary: "Get detailed information about user payment account"
        description: "User identification based on access token"
        operationId: getAccount
        parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: getAccountRequest
          in: body
          description: "Data for Account Request"
          required: true
          schema:
            $ref: "#/definitions/AccountInfoRequest"
        tags:
          - AIS
        responses:
          "200":
            description: Success
            schema:
              $ref: "#/definitions/AccountResponse"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
              X-JWS-SIGNATURE:
                type: string
                description: "Detached JWS signature of the body of the response"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "401":
            description:  "Authorization header not found"
            schema:
              $ref: "#/definitions/Error"
          "403":
            description:  "Access denied"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "429":
            description:  "Request limit for the requested service exceeded"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
        security:
        - xs2a_auth:
          - "ais:accounts"
  /v1.0/accounts/v1.0/getTransactionsDone:
      x-swagger-router-controller: ais
      post:
        summary: "Get list of user done transactions"
        description: ""
        operationId: getTransactionsDone
        parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: getTransactionsDoneRequest
          in: body
          description: "Data for Transactions Done Request"
          required: true
          schema:
            $ref: "#/definitions/TransactionInfoRequest"
        tags:
          - AIS
        responses:
          "200":
            description: Success
            schema:
              $ref: "#/definitions/TransactionsDoneInfoResponse"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
              X-JWS-SIGNATURE:
                type: string
                description: "Detached JWS signature of the body of the response"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "401":
            description:  "Authorization header not found"
            schema:
              $ref: "#/definitions/Error"
          "403":
            description:  "Access denied"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "429":
            description:  "Request limit for the requested service exceeded"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
        security:
        - xs2a_auth:
          - "ais:transactionsDone"
  /v1.0/accounts/v1.0/getTransactionsPending:
      x-swagger-router-controller: ais
      post:
        summary: "Get list of user's pending transactions"
        description: ""
        operationId: getTransactionsPending
        parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: getTransactionsPendingRequest
          in: body
          description: "Data for Transactions Pending Request"
          required: true
          schema:
            $ref: "#/definitions/TransactionInfoRequest"
        tags:
          - AIS
        responses:
          "200":
            description: Success
            schema:
              $ref: "#/definitions/TransactionPendingInfoResponse"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
              X-JWS-SIGNATURE:
                type: string
                description: "Detached JWS signature of the body of the response"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "401":
            description:  "Authorization header not found"
            schema:
              $ref: "#/definitions/Error"
          "403":
            description:  "Access denied"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "429":
            description:  "Request limit for the requested service exceeded"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
        security:
        - xs2a_auth:
          - "ais:transactionsPending"
  /v1.0/accounts/v1.0/getTransactionsRejected:
      x-swagger-router-controller: ais
      post:
        summary: "Get list of user's rejected transactions"
        description: ""
        operationId: getTransactionsRejected
        parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: getTransactionsRejectedRequest
          in: body
          description: "Data for Transactions Rejected Request"
          required: true
          schema:
            $ref: "#/definitions/TransactionInfoRequest"
        tags:
          - AIS
        responses:
          "200":
            description: Success
            schema:
              $ref: "#/definitions/TransactionRejectedInfoResponse"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
              X-JWS-SIGNATURE:
                type: string
                description: "Detached JWS signature of the body of the response"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "401":
            description:  "Authorization header not found"
            schema:
              $ref: "#/definitions/Error"
          "403":
            description:  "Access denied"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "429":
            description:  "Request limit for the requested service exceeded"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
        security:
        - xs2a_auth:
          - "ais:transactionsRejected"
  /v1.0/accounts/v1.0/getHolds:
      x-swagger-router-controller: ais
      post:
        summary: Get list of user's holded operations
        description: ""
        operationId: getHolds
        parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: getHoldsRequest
          in: body
          description: "Data for hold Request"
          required: true
          schema:
            $ref: "#/definitions/TransactionHoldRequest"
        tags:
          - AIS
        responses:
          "200":
            description: Success
            schema:
              $ref: "#/definitions/TransactionHoldInfoResponse"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
              X-JWS-SIGNATURE:
                type: string
                description: "Detached JWS signature of the body of the response"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "401":
            description:  "Authorization header not found"
            schema:
              $ref: "#/definitions/Error"
          "403":
            description:  "Access denied"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "429":
            description:  "Request limit for the requested service exceeded"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
        security:
        - xs2a_auth:
          - "ais:holds"
  /v1.0/accounts/v1.0/getTransactionDetail:
      x-swagger-router-controller: ais
      post:
        summary: "Get detailed information about user's single transaction"
        description: ""
        operationId: getTransactionDetail
        parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: getTransationDetailRequest
          in: body
          description: "Data for transation detail Request"
          required: true
          schema:
            $ref: "#/definitions/TransactionDetailRequest"
        tags:
          - AIS
        responses:
          "200":
            description: Success
            schema:
              $ref: "#/definitions/TransactionDetailResponse"
            headers:
              Content-Encoding:
                type: string
                description: "Gzip, deflate"
              X-JWS-SIGNATURE:
                type: string
                description: "Detached JWS signature of the body of the response"
          "400":
            description:  "Bad request"
            schema:
              $ref: "#/definitions/Error"
          "401":
            description:  "Authorization header not found"
            schema:
              $ref: "#/definitions/Error"
          "403":
            description:  "Access denied"
            schema:
              $ref: "#/definitions/Error"
          "422":
            description:  "Unprocessable entity"
            schema:
              $ref: "#/definitions/Error"
          "429":
            description:  "Request limit for the requested service exceeded"
            schema:
              $ref: "#/definitions/Error"
          "500":
            description: "An unexpected error occured"
            schema:
              $ref: "#/definitions/Error"
        security:
        - xs2a_auth:
          - "ais:transationDetail"
  /v1.0/payments/v1.0/domestic:
    x-swagger-router-controller: pis
    post:
      summary: "Initiate domestic transfer"
      description: ""
      operationId: domestic
      parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: domesticRequest
          in: body
          description: "Data for domestic transfer"
          required: true
          schema:
            $ref: "#/definitions/PaymentDomesticRequest"
      tags:
        - PIS
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/AddPaymentResponse"
          headers:
            Content-Encoding:
              type: string
              description: "Gzip, deflate"
            X-JWS-SIGNATURE:
              type: string
              description: "Detached JWS signature of the body of the response"
        "400":
          description:  "Bad request"
          schema:
            $ref: "#/definitions/Error"
        "401":
          description:  "Authorization header not found"
          schema:
            $ref: "#/definitions/Error"
        "403":
          description:  "Access denied"
          schema:
            $ref: "#/definitions/Error"
        "422":
          description:  "Unprocessable entity"
          schema:
            $ref: "#/definitions/Error"
        "429":
          description:  "Request limit for the requested service exceeded"
          schema:
            $ref: "#/definitions/Error"
        "500":
          description: "An unexpected error occured"
          schema:
            $ref: "#/definitions/Error"
      security:
      - xs2a_auth:
        - "pis:domestic"
  /v1.0/payments/v1.0/EEA:
    x-swagger-router-controller: pis
    post:
      summary: "Initiate SEPA foreign transfers"
      description: ""
      operationId: EEA
      parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: EEARequest
          in: body
          description: "Data for SEPA foreign transfer"
          required: true
          schema:
            $ref: "#/definitions/PaymentEEARequest"
      tags:
        - PIS
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/AddPaymentResponse"
          headers:
            Content-Encoding:
              type: string
              description: "Gzip, deflate"
            X-JWS-SIGNATURE:
              type: string
              description: "Detached JWS signature of the body of the response"
        "400":
          description:  "Bad request"
          schema:
            $ref: "#/definitions/Error"
        "401":
          description:  "Authorization header not found"
          schema:
            $ref: "#/definitions/Error"
        "403":
          description:  "Access denied"
          schema:
            $ref: "#/definitions/Error"
        "422":
          description:  "Unprocessable entity"
          schema:
            $ref: "#/definitions/Error"
        "429":
          description:  "Request limit for the requested service exceeded"
          schema:
            $ref: "#/definitions/Error"
        "500":
          description: "An unexpected error occured"
          schema:
            $ref: "#/definitions/Error"
      security:
      - xs2a_auth:
        - "pis:EEA"
  /v1.0/payments/v1.0/nonEEA:
    x-swagger-router-controller: pis
    post:
      summary: "Initiate non SEPA foreign transfers"
      operationId: nonEEA
      parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: nonEEARequest
          in: body
          description: "Data for non SEPA foreign transfer"
          required: true
          schema:
            $ref: "#/definitions/PaymentNonEEARequest"
      tags:
        - PIS
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/AddPaymentResponse"
          headers:
            Content-Encoding:
              type: string
              description: "Gzip, deflate"
            X-JWS-SIGNATURE:
              type: string
              description: "Detached JWS signature of the body of the response"
        "400":
          description:  "Bad request"
          schema:
            $ref: "#/definitions/Error"
        "401":
          description:  "Authorization header not found"
          schema:
            $ref: "#/definitions/Error"
        "403":
          description:  "Access denied"
          schema:
            $ref: "#/definitions/Error"
        "422":
          description:  "Unprocessable entity"
          schema:
            $ref: "#/definitions/Error"
        "429":
          description:  "Request limit for the requested service exceeded"
          schema:
            $ref: "#/definitions/Error"
        "500":
          description: "An unexpected error occured"
          schema:
            $ref: "#/definitions/Error"
      security:
      - xs2a_auth:
        - "pis:nonEEA"
  /v1.0/payments/v1.0/tax:
    x-swagger-router-controller: pis
    post:
      summary: "Initiate tax transfer"
      description: ""
      operationId: tax
      parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: taxRequest
          in: body
          description: "Data for tax transfer"
          required: true
          schema:
            $ref: "#/definitions/PaymentTaxRequest"
      tags:
        - PIS
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/AddPaymentResponse"
          headers:
            Content-Encoding:
              type: string
              description: "Gzip, deflate"
            X-JWS-SIGNATURE:
              type: string
              description: "Detached JWS signature of the body of the response"
        "400":
          description:  "Bad request"
          schema:
            $ref: "#/definitions/Error"
        "401":
          description:  "Authorization header not found"
          schema:
            $ref: "#/definitions/Error"
        "403":
          description:  "Access denied"
          schema:
            $ref: "#/definitions/Error"
        "422":
          description:  "Unprocessable entity"
          schema:
            $ref: "#/definitions/Error"
        "429":
          description:  "Request limit for the requested service exceeded"
          schema:
            $ref: "#/definitions/Error"
        "500":
          description: "An unexpected error occured"
          schema:
            $ref: "#/definitions/Error"
      security:
      - xs2a_auth:
        - "pis:tax"
  /v1.0/payments/v1.0/getPayment:
    x-swagger-router-controller: pis
    post:
      summary: "Get the status of payment"
      operationId: getPayment
      parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: payment
          in: body
          description: "Payment ID"
          required: true
          schema:
            $ref: "#/definitions/PaymentRequest"
      tags:
        - PIS
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/GetPaymentResponse"
          headers:
            Content-Encoding:
              type: string
              description: "Gzip, deflate"
            X-JWS-SIGNATURE:
              type: string
              description: "Detached JWS signature of the body of the response"
        "400":
          description:  "Bad request"
          schema:
            $ref: "#/definitions/Error"
        "401":
          description:  "Authorization header not found"
          schema:
            $ref: "#/definitions/Error"
        "403":
          description:  "Access denied"
          schema:
            $ref: "#/definitions/Error"
        "422":
          description:  "Unprocessable entity"
          schema:
            $ref: "#/definitions/Error"
        "429":
          description:  "Request limit for the requested service exceeded"
          schema:
            $ref: "#/definitions/Error"
        "500":
          description: "An unexpected error occured"
          schema:
            $ref: "#/definitions/Error"
      security:
      - xs2a_auth:
        - "pis:payment"
  /v1.0/payments/v1.0/getMultiplePayments:
    x-swagger-router-controller: pis
    post:
      summary: "Get the status of multiple payments"
      description: ""
      operationId: getMultiplePayments
      parameters:
        - $ref: "#/parameters/authorizationParam"
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: payments
          in: body
          description: "Payments ID list"
          required: true
          schema:
            $ref: "#/definitions/PaymentsRequest"
      tags:
        - PIS
      responses:
        "200":
          description: "Success"
          schema:
            $ref: "#/definitions/PaymentsResponse"
          headers:
            Content-Encoding:
              type: string
              description: "Gzip, deflate"
            X-JWS-SIGNATURE:
              type: string
              description: "Detached JWS signature of the body of the response"
        "400":
          description:  "Bad request"
          schema:
            $ref: "#/definitions/Error"
        "401":
          description:  "Authorization header not found"
          schema:
            $ref: "#/definitions/Error"
        "403":
          description:  "Access denied"
          schema:
            $ref: "#/definitions/Error"
        "422":
          description:  "Unprocessable entity"
          schema:
            $ref: "#/definitions/Error"
        "429":
          description:  "Request limit for the requested service exceeded"
          schema:
            $ref: "#/definitions/Error"
        "500":
          description: "An unexpected error occured"
          schema:
            $ref: "#/definitions/Error"
      security:
      - xs2a_auth:
        - "pis:multiplePayments"
  /v1.0/confirmation/v1.0/getConfirmationOfFunds:
    x-swagger-router-controller: caf
    post:
      summary: "Confirmation of the availability of funds"
      description: "Confirming the availability on the payers account of the amount necessary to execute the payment transaction, as defined in Art. 65 PSD2."
      operationId: getConfirmationOfFunds
      parameters:
        - $ref: "#/parameters/acceptEncodingParam"
        - $ref: "#/parameters/acceptLanguageParam"
        - $ref: "#/parameters/acceptCharsetParam"
        - $ref: "#/parameters/xjwsSignatureParam"
        - name: confirmationOfFundsRequest
          in: body
          description: "Object with amount to check"
          required: true
          schema:
            $ref: "#/definitions/ConfirmationOfFundsRequest"
      tags:
        - CAF
      responses:
        "200":
          description: Success
          schema:
            $ref: "#/definitions/ConfirmationOfFundsResponse"
          headers:
            Content-Encoding:
              type: string
              description: "Gzip, deflate"
            X-JWS-SIGNATURE:
              type: string
              description: "Detached JWS signature of the body of the response"
        "400":
          description:  "Bad request"
          schema:
            $ref: "#/definitions/Error"
        "401":
          description:  "Authorization header not found"
          schema:
            $ref: "#/definitions/Error"
        "403":
          description:  "Access denied"
          schema:
            $ref: "#/definitions/Error"
        "422":
          description:  "Unprocessable entity"
          schema:
            $ref: "#/definitions/Error"
        "429":
          description:  "Request limit for the requested service exceeded"
          schema:
            $ref: "#/definitions/Error"
        "500":
          description: "An unexpected error occured"
          schema:
            $ref: "#/definitions/Error"
      security:
      - xs2a_auth:
        - "caf:confirmationOfFunds"
securityDefinitions:
  xs2a_auth:
    type: "oauth2"
    flow: "accessCode"
    authorizationUrl: "https://apiHost/auth/authorize"
    tokenUrl: "https://apiHost/auth/token"
    scopes:
      "ais:accounts": "Permission to execute AIS-Accounts"
      "ais:holds": "Permission to execute AIS-Holds"
      "ais:transactionsDone": "Permission to execute AIS-TransactionsDone"
      "ais:transactionsPending": "Permission to execute AIS-TransactionsPending"
      "ais:transactionsRejected": "Permission to execute AIS-TransactionsRejected"
      "ais:transationDetail": "Permission to execute AIS-TransationDetail"
      "pis:multiplePayments": "Permission to execute PIS-MultiplePayments"
      "pis:payment": "Permission to execute PIS-Payment"
      "pis:domestic": "Permission to execute PIS-Domestic"
      "pis:EEA": "Permission to execute PIS-EEA"
      "pis:nonEEA": "Permission to execute PIS-NonEEA"
      "pis:tax": "Permission to execute PIS-Tax"
      "caf:confirmationOfFunds": "Permission to execute CAF-ConfirmationOfFunds"
definitions:
  AuthorizeRequest:
    description: "Klasa zapytania o uzyskanie kodu autoryzacyjnego zgodnego z OAuth2"
    type: object
    required:
      - requestHeader, response_type, client_id, redirect_uri, scope_details, state
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderWithoutToken"
      response_type:
        type: string
        description: "Typ odpowiedzi. Wartość stała: code"
      client_id:
        type: string
        description: "Identyfikator TPP"
      redirect_uri:
        type: string
        description: "Adres usługi TPP, na które zostanie wykonane przekierowanie po uwierzytelnieniu klienta ASPSP"
      scope:
        type: string
        description: "Typy zgód o które prosi TPP. Lista identyfikatorów zgodna ze specyfikacją standardu Polish API."
      scope_details:
        $ref: "#/definitions/ScopeDetailsInput"
      state:
        type: string
        description: "Losowa, unikalna w ramach TPP wartość – zabezpieczenie przed atakiem Cross-Site Request Forgery"
    xml:
      name: AuthorizeRequest
  EatCodeRequest:
    description: "Klasa zapytania o uzyskanie kodu autoryzacyjnego zgodnego z OAuth2 na podstawie przekazanego kodu jednorazowego, wygenerowanego w EAT"
    type: object
    required:
      - requestHeader, requestId, response_type, eatCode, client_id, callbackURL, apiKey, scope_details
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderWithoutTokenCallback"
      response_type:
        type: string
        description: "Typ odpowiedzi. Wartość stała: code"
      eatCode: 
        type: string
        description: "Jednorazowy kod autoryzacyjny wygenerowany przez EAT"
      eatType: 
        $ref: "#/definitions/DictionaryItem"
        #description: "Typ narzędzia EAT, w którym został wygenerowany kod jednorazowy / Type of EAT that One-Time Code origins from"
      client_id: 
        type: string
        description: "Identyfikator TPP"
      scope:
        type: string
        description: "Typy zgód o które prosi TPP. Lista identyfikatorów zgodna ze specyfikacją standardu Polish API."
      scope_details:
        $ref: "#/definitions/ScopeDetailsInput"
      state:
        type: string
        description: "Losowa, unikalna w ramach TPP wartość – zabezpieczenie przed atakiem Cross-Site Request Forgery"
    xml:
      name: EatCodeRequest
  TokenRequest:
    description: "Klasa zapytania o uzyskanie tokena dostępowego zgodnego z OAuth2"
    type: object
    required:
      - grant_type
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderWithoutToken"
      grant_type:
        type: string
        description: "Typ zastosowanej autoryzacji. Jedna z wartości: authorization_code, refresh_token, exchange_token (rozszerzenie standardu OAuth2)"
      Code:
        type: string
        description: "Kod autoryzacji uzyskany podczas żądania do usługi /authorize OAuth2. Wymagany dla grant_type=authorization_code."
      redirect_uri:
        type: string
        description: "Adres usługi TPP, na które zostanie wykonane przekierowanie po wygenerowaniu tokena dostępowego przez ASPSP. Wymagany dla grant_type=authorization_code."  
      client_id:
        type: string
        description: "Identyfikator TPP. Wymagany dla grant_type=authorization_code."
      refresh_token:
        type: string
        description: "Wartość tokena, który służy do uzyskania nowego tokena dostępowego dla tego samego zakresu zgód (scope, scope_details) w przypadku gdy pierwotny token utraci swoją ważność. Wymagany dla grant_type=refresh_token."
      exchange_token:
        type: string
        description: "Wartość tokena, który służy do uzyskania nowego tokena dostępowego dla innego zakresu zgód (scope, scope_details). Wartością tego parametru powinien być token dostępowy ważnej sesji komuikacyjnej z interfejsem XS2A. Wymagany dla grant_type=exchange_token."
      scope:
        type: string
        description: "Typy zgód o które prosi TPP. Lista identyfikatorów zgodna ze specyfikacją standardu Polish API."
      scope_details:
        $ref: "#/definitions/ScopeDetailsInput"
      is_user_session:
        type: boolean
        description: "Określa czy dana sesja jest związana z interakcją z PSU – wartości true/false. Rozszerzenie standardu OAuth2."
      user_ip:
        type: string
        description: "IP przeglądarki użytkownika (informacja na potrzeby fraud detection). Rozszerzenie standardu OAuth2. Wymagany dla grant_type=refresh_token."
      user_agent:
        type: string
        description: "Informacja dotycząca wersji przeglądarki użytkownika (informacja na potrzeby fraud detection). Rozszerzenie standardu OAuth2. Wymagany dla grant_type=refresh_token."
    xml:
      name: TokenRequest
  TokenResponse:
    description: "Klasa odpowiedzi na zapytanie TPP o wygenerowanie tokena dostępowego"
    required:
      - responseHeader, access_token, token_type, expires_in, scope_details
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
      access_token:
        type: string
        description: "Wartość wygenerowanego tokena dostępowego"
      token_type:
        type: string
        description: "Typ tokena dostępowego. Dozwolona wartość to Bearer."  
      expires_in:
        type: string
        description: "Czas ważności tokena dostępowego, po którym zostanie on unieważniony"
      refresh_token:
        type: string
        description: "Wartość wygenerowanego tokena służącego do uzyskania nowego tokena dostępowego bez konieczności ponownej autoryzacji"
      scope:
        type: string
        description: "Typy zgód które uzyskał TPP. Lista identyfikatorów zgodna ze specyfikacją standardu Polish API."
      scope_details:
        $ref: "#/definitions/ScopeDetailsOutput"
  DeleteConsentRequest:
    description: "Klasa zapytania o usunięcie zgody na dostęp do AIS"
    type: object
    required:
      - consentId
    properties:
      consentId:
        type: string
        description: "Identyfikator zgody / Consent ID"
    xml:
      name: DeleteConsentRequest
  AccountsRequest:
    description: "Klasa zapytania o rachunki / Accounts Request Class"
    type: object
    required:
      - requestHeader
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderCallback"
      isDirectPsu:
          type: boolean
          description: "Znacznik informujący czy request jest przesłany bezpośrednio przez PSU / Is request sent by PSU directly"
      pageId:
        type: string
        description: "Używane w celu stronicowania danych: numer rachunku rozpoczynający stronę / Account number beginning the page (paging info)"
      perPage:
        type: number
        format: int32
        description: "Używane w celu stronicowania danych: wielkość strony danych / Page size (paging info)"
    xml:
      name: AccountsRequest
  AccountResponse:
    description: "Klasa odpowiedzi na zapytania o konto PSU / PSU's Account Response Class"
    required:
      - responseHeader
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
      account:
        $ref: "#/definitions/AccountInfo"
  AccountsResponse:
    description: "Klasa odpowiedzi na zapytania o wiele kont PSU / PSU's Multiple Accounts Response Class"
    required:
      - responseHeader
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
      accounts:
        type: array
        items:
          $ref: "#/definitions/AccountBaseInfo"
      pageInfo:
        $ref: "#/definitions/PageInfo"
  AccountBaseInfo:
      description: "Klasa informacji o koncie / Account Information Class"
      type: object
      required:
        - accountNumber
        - accountTypeName
        - accountType
      properties:
        accountNumber:
          type: string
          description: "Numer rachunku (częściowo zamaskowany) / Account number (partly masked)"
        accountTypeName:
          type: string
          description: "Nazwa typu rachunku / Account type name"
        accountType:
          type: string
          description: "Typ rachunku / Account type"
      xml:
        name: AccountBaseInfo
  AccountInfo:
    description: "Klasa informacji o koncie / Account Information Class"
    type: object
    required:
      - accountNumber
      - nameAddress
      - availableBalance
      - bookingBalance
    properties:
      accountNumber:
        type: string
        description: "Numer rachunku / Account number"
      nameAddress:
        $ref: "#/definitions/NameAddress"
        #description: "Obiekt klasy NameAddress - Imię Nazwisko lub Nazwa PSU  / NameAddress class object - Given name nad surname or name of the company"
      accountType:
        $ref: "#/definitions/DictionaryItem"
        #description: "Typ rachunku / Account’s type"
      accountTypeName:
        type: string
        maxLength: 32
        description: "Nazwa typu rachunku (definiowana przez ASPSP) / Account's type name (defined by ASPSP)"
      accountNameClient:
        type: string
        maxLength: 32
        description: "Nazwa konta ustawiona przez klienta / Account name set by the client"
      currency:
        type: string
        maxLength: 3
        description: "Waluta rachunku / Currency"
      availableBalance:
        type: string
        description: "Dostępne środki - po wykonaniu transakcji / Available funds"
      bookingBalance:
        type: string
        description: "Saldo księgowe rachunku - po wykonaniu transakcji / Book balance of the account"
      bank:
        $ref: "#/definitions/BankAccountInfo"
      auxData:
        $ref: "#/definitions/Map"
        #description: "Dodatkowe dane w postaci mapy klucz wartość/ Additional data as key-value map"
    xml:
      name: AccountInfo
  AccountInfoRequest:
    description: "Klasa zapytania o pojedynczy rachunek / Account Information Request Class"
    type: object
    required:
      - requestHeader
      - accountNumber
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderAIS"
      accountNumber:
        type: string
        description: "Numer rachunku / Account number"
    xml:
      name: AccountInfoRequest
  TransactionInfoRequestBase:
    description: "Bazowa klasa dla zapytań o transakcje / Transaction Information Request Base Class"
    type: object
    properties: 
      requestHeader:
        $ref: "#/definitions/RequestHeaderAISCallback"
      accountNumber:
        type: string
        description: "Numer rachunku / Account number"
      transactionIdFrom:
        type: string
        maxLength: 64
        description: "Element filtru: transacje od podanego identyfikatora transakcji / Filter element"
      transactionDateFrom:
        type: string
        format: date
        maxLength: 10
        description: "Element filtru: data transakcji od, YYYY-MM-DD / Filter element"
      transactionDateTo:
        type: string
        format: date
        maxLength: 10
        description: "Element filtru: data transakcji do, YYYY-MM-DD / Filter element"
      bookingDateFrom:
        type: string
        format: date
        maxLength: 10
        description: "Element filtru: data księgowania od, YYYY-MM-DD / Filter element"
      bookingDateTo:
        type: string
        format: date
        maxLength: 10
        description: "Element filtru: data księgowania do, YYYY-MM-DD / Filter element"
      minAmount:
        type: string
        pattern: '^\d*\.\d{2}$'
        description: "Element filtru: kwota od / Filter element"
      maxAmount:
        type: string
        pattern: '^\d*\.\d{2}$'
        description: "Element filtru: kwota do / Filter element"
      pageId:
        type: string
        description: "Używane w celu stronicowania danych: numer transakcji rozpoczynający stronę / Transaction number beginning the page (paging info)"
      perPage:
        type: number
        format: int32
        description: "Używane w celu stronicowania danych: wielkość strony danych / Page size (paging info)"
    xml:
      name: TransactionInfoRequestBase
  TransactionInfoRequest:
    description: "Klasa zapytania o transakcje / Transaction Information Request Class"
    type: object
    allOf:
      - "$ref": "#/definitions/TransactionInfoRequestBase"
    required: 
      - requestHeader
      - accountNumber
    properties: 
      type:
        type: string
        enum:
        - CREDIT
        - DEBIT
        description: "Element filtru: transakcji / Filter element"
    xml:
      name: TransactionInfoRequest
  TransactionHoldRequest:
    description: "Klasa zapytania o transakcje / Transaction Information Request Class"
    type: object
    allOf:
      - "$ref": "#/definitions/TransactionInfoRequestBase"
    required: 
      - requestHeader
      - accountNumber
    properties: 
      type:
        type: string
        enum:
        - DEBIT
        description: "Element filtru: transakcji / Filter element"
    xml:
      name: TransactionHoldRequest
  TransactionInfoBase:
    description: "Klasa bazowa informacji o transakcji / Transaction Information Base Class"
    type: object
    required:
      - transactionId
      - amount
      - description
      - transactionType
    properties: 
      transactionId:
        type: string
        maxLength: 64
        description: "ID transakcji nadany przez ASPSP / Transaction ID (ASPSP)"
      amount:
        type: string
        pattern: '^\d*\.\d{2}$'
        description: "Kwota transakcji / Amount of the transaction"
      currency:
        type: string
        maxLength: 3
        description: "Kod ISO waluty transakcji / Currency (ISO)"
      description:
        type: string
        maxLength: 140
        description: "Tytuł transakcji / Description of the transaction"
      transactionType:
        type: string
        maxLength: 100
        description: "Typ transakcji / Transaction type"
      tradeDate:
        type: string
        format: date
        description: "Data operacji, YYYY-MM-DDThh:mm:ss[.mmm] / Date of the operation"
      mcc: 
        type: string
        description: "Kod dla każdej transakcji/operacji wykonanej przy użyciu karty / A code of each transaction performed by card"
      auxData:
        $ref: "#/definitions/Map"
  TransactionHoldInfo:
    description: "Klasa opisująca oczekującą transakcję płatniczą"
    type: object
    allOf:
      - "$ref": "#/definitions/TransactionInfoBase"
    required:
      - transactionId
      - amount
      - description
      - transactionType
      - sender
      - recipient
    properties:
      type:
        type: string
        enum:
        - DEBIT
        description: "Typ transakcji uznanie/obciążenie / Transaction type (credit/debit)"
      holdExpirationDate:
        type: string
        format: datetime
        description: "Data ważności blokady"
      initiator:
        $ref: "#/definitions/NameAddress"
      sender:
        $ref: "#/definitions/SenderRecipient"
      recipient:
        $ref: "#/definitions/SenderRecipient"
    xml:
      name: TransactionHoldInfo
  TransactionPendingInfo:
    description: "Klasa opisująca oczekującą transakcję płatniczą. Jest to transakcja niezaksięgowana, niemodyfikowalna, wpływającej na dostępne środki (saldo dostępne)."
    type: object
    allOf:
      - "$ref": "#/definitions/TransactionInfoBase"
    required:
      - transactionId
      - amount
      - description
      - transactionType
    properties:
      type:
        type: string
        enum:
        - CREDIT
        - DEBIT
        description: "Typ transakcji uznanie/obciążenie / Transaction type (credit/debit)"
      initiator:
        $ref: "#/definitions/NameAddress"
      sender:
        $ref: "#/definitions/SenderRecipient"
      recipient:
        $ref: "#/definitions/SenderRecipient"
    xml:
      name: TransactionPendingInfo
  TransactionRejectedInfo:
    description: "Klasa opisująca odrzuconą transakcję płatniczą"
    type: object
    allOf:
      - "$ref": "#/definitions/TransactionInfoBase"
    required:
      - transactionId
      - amount
      - description
      - transactionType
      - sender
      - recipient
    properties:
      type:
        type: string
        enum:
        - CREDIT
        - DEBIT
        description: "Typ transakcji uznanie/obciążenie / Transaction type (credit/debit)"
      initiator:
        $ref: "#/definitions/NameAddress"
      sender:
        $ref: "#/definitions/SenderRecipient"
      recipient:
        $ref: "#/definitions/SenderRecipient"
      rejectionReason:
        type: string
        maxLength: 140
        description: Powod odrzucenia
      rejectionDate:
        type: string
        format: date
        description: "Data odrzucenia, YYYY-MM-DDThh:mm:ss[.mmm]"
    xml:
      name: TransactionRejectedInfo
  TransactionInfo:
    description: "Klasa opisująca zaksięgowaną transakcję płatniczą"
    type: object
    allOf:
      - "$ref": "#/definitions/TransactionInfoBase"
    required:
      - transactionId
      - amount
      - description
      - transactionType
      - sender
      - recipient
    properties:
      type:
        type: string
        enum:
        - CREDIT
        - DEBIT
        description: "Typ transakcji uznanie/obciążenie / Transaction type (credit/debit)"
      transactionStatus:
        $ref: "#/definitions/DictionaryItem"
        #description: "Status transakcji / Transaction status"
      initiator:
        $ref: "#/definitions/NameAddress"
      sender:
        $ref: "#/definitions/SenderRecipient"
      recipient:
        $ref: "#/definitions/SenderRecipient"
      bookingDate:
        type: string
        format: date
        description: "Data księgowania, YYYY-MM-DDThh:mm:ss[.mmm]"
      postTransactionBalance:
        type: string
        description: "Saldo rachunku po transakcji"
    xml:
      name: TransactionInfo
  TransactionsDoneInfoResponse:
    description: "Klasa odpowiedzi zawierająca listę transakcji done / Done Transaction Information Response Class"
    required:
      - responseHeader
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
      transactions:
        type: array
        items:
          $ref: "#/definitions/TransactionInfo"
      pageInfo:
        $ref: "#/definitions/PageInfo"
    xml:
      name: TransactionsDoneInfoResponse
  TransactionPendingInfoResponse:
    description: "Klasa odpowiedzi zawierająca listę transakcji pending / Pending Transaction Information Response Class"
    required:
      - responseHeader
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
      transactions:
        type: array
        items:
          $ref: "#/definitions/TransactionPendingInfo"
      pageInfo:
        $ref: "#/definitions/PageInfo"
    xml:
      name: TransactionPendingInfoResponse
  TransactionRejectedInfoResponse:
    description: "Klasa odpowiedzi zawierająca listę transakcji rejected / Rejected Transaction Information Response Class"
    required:
      - responseHeader
    properties:
      responseHeader:
         $ref: "#/definitions/ResponseHeader"
      transactions:
        type: array
        items:
          $ref: "#/definitions/TransactionRejectedInfo"
      pageInfo:
        $ref: "#/definitions/PageInfo"
    xml:
      name: TransactionRejectedInfoResponse
  TransactionHoldInfoResponse:
    description: "Klasa odpowiedzi zawierająca listę transakcji zawieszonych / Hold Transaction Information Response Class"
    required:
      - responseHeader
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
      transactions:
        type: array
        items:
          $ref: "#/definitions/TransactionHoldInfo"
      pageInfo:
        $ref: "#/definitions/PageInfo"
    xml:
      name: TransactionHoldInfoResponse
  TransactionDetailRequest:
    description: "Klasa zapytania o pojedynczą transakcję / Transaction Detail Request Class"
    type: object
    required:
      - requestHeader
      - transactionId
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderAIS"
      transactionId:
        type: string
        maxLength: 64
        description: "ID transakcji / Transaction ID"
      accountNumber:
        type: string
        maxLength: 34
        description: "Numer konta nadawcy / Sender account number"
      bookingDate:
        type: string
        format: date
        description: "Data zaksięgowania operacji, YYYY-MM-DD / Transaction booking date"
    xml:
      name: TransactionDetailRequest
  Payor:
    description: "Klasa informacji o płatniku do US / Tax Payor Information Class"
    type: object
    required: 
      - payorId
      - payorIdType
    properties:
      payorId:
        type: string
        maxLength: 20
        description: "Identyfikator płatnika / Payor ID"
      payorIdType:
        type: string
        maxLength: 20
        description: "Typ identyfikatora płatnika / Payor ID type"
        enum:
          - N
          - P
          - R
          - 1
          - 2
          - 3
        x-ms-enum:
          name: payorIdType
          values:
          - value: N
            description: NIP
          - value: P
            description: Pesel
          - value: R
            description: Regon
          - value: 1
            description: Dowód osobisty
          - value: 2
            description: Paszport
          - value: 3
            description: Inny
    xml:
      name: Payor
  SocialSecurityPayor:
    description: "Klasa informacji o płatniku do ZUS / Polish Social Security Institution (ZUS) Payor Information Class"
    type: object
    properties:
      nip:
        type: string
        maxLength: 10
        description: "Numer Identyfikacji Podatkowej / Payor's Tax Identification Number"
      additionalPayorId:
        type: string
        maxLength: 20
        description: "Dodatkowy numer identyfikacyjny płatnika / Payor's additional identification number"
      additionalPayorIdType:
        type: string
        maxLength: 20
        description: "Typ dodatkowego identyfikatora płatnika / Payor's additional identifier type"
        enum:
          - P
          - R
          - 1
          - 2
        x-ms-enum:
          name: additionalPayorIdType
          values:
          - value: P
            description: Pesel
          - value: R
            description: Regon
          - value: 1
            description: Dowód osobisty
          - value: 2
            description: Paszport
    xml:
      name: SocialSecurityPayor
  TransactionInfoZUS:
    description: "Klasa informacji danych dla przelewu do ZUS / ZUS Transfer Information Class"
    type: object
    properties:
      payerInfo:
        $ref: "#/definitions/SocialSecurityPayor"
      contributionType:
        type: string
        maxLength: 1
        description: "Typ wpłaty / Contribution type"
      contributionId:
        type: string
        maxLength: 2
        description: "Numer deklaracji / Contribution identifier"
      contributionPeriod:
        type: string
        maxLength: 6
        description: "Okres deklaracji / Contribution period, Format: MMYYYY"
      paymentTypeId:
        type: string
        maxLength: 1
        description: "Identyfikator typu płatności / Payment type ID"
      obligationId:
        type: string
        maxLength: 1
        description: "Numer tytułu wykonawczego / Obligation identifier or number"
    xml:
      name: TransactionInfoZUS
  TransactionInfoTax:
    description: "Klasa informacji danych dla przelewu podatkowego do Urzędu Skarbowego lub Izby Celnej / Tax Transfer"
    type: object
    required:
      - payerInfo
      - formCode
      - periodId
      - periodType
      - year
    properties:
      payerInfo:
        $ref: "#/definitions/Payor"
      formCode:
        type: string
        maxLength: 7
        description: "Symbol formularza Urzędu Skarbowego lub Izby Celnej / Tax authority form symbol"
      periodId:
        type: string
        maxLength: 7
        description: "Numer okresu / Period number"
      periodType:
        type: string
        maxLength: 7
        description: "Typ okresu / Period type"
      year:
        type: number
        format: int32
        maxLength: 4
        description: "Rok okresu / Period year"
      obligationId:
        type: string
        maxLength: 40
        description: "Identyfikator zobowiązania, z którego wynika należność podatku np. decyzja, tytuł wykonawczy, postanowienie / Obligation ID"
      taxAuthorityName: 
        type: string
        description: "Nazwa urzędu skarbowego lub izby celnej / The name of the Tax Authority"
    xml: 
      name: TransactionInfoTax
  TransactionInfoCard:
    type: object
    description: "Klasa reprezentująca informacje o karcie w ramach transakcji / Transaction Card Information Class"
    properties:
      cardHolder:
        type: string
        description: "Właściciel karty / Card holder"
      cardNumber:
        type: string
        description: "Numer karty / Card number"
  TransactionDetailResponse:
    description: "Klasa odpowiedzi na zapytanie o transakcję /  Transaction Detail Response Class"
    type: object
    required:
      - responseHeader
      - baseInfo
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
        #description: "Obiekt klasy ResponseHeader / ResponseHeader Class object
      baseInfo:
        $ref: "#/definitions/TransactionInfo"
        #description: "Obiekt klasy TransactionInfo / TransactionInfo Class object
      zusInfo:
        $ref: "#/definitions/TransactionInfoZUS"
        #description: "Obiekt klasy TransactionInfoZUS / TransactionInfoZUS Class object
      usInfo:
        $ref: "#/definitions/TransactionInfoTax"
        #description: "Obiekt klasy TransactionInfoTax / TransactionInfoTax Class object
      cardInfo:
        $ref: "#/definitions/TransactionInfoCard"
        #description: "Obiekt klasy TransactionInfoCard / TransactionInfoCard Class object
      currencyDate:
        type: string
        format: date
        description: "Data kursu waluty, YYYY-MM-DDThh:mm:ss[.mmm] / Date of the currency exchange rate"
      transactionRate:
        type: array
        items:
          $ref: "#/definitions/CurrencyRate"
        #description: "Kursy transakcji / Currency exchange rates"
      baseCurrency:
        type: string
        maxLength: 3
        description: "Waluta oryginalna transakcji, kod ISO / Currency of the transaction, ISO code"
      amountBaseCurrency:
        type: string
        pattern: '^\d*\.\d{2}$'
        description: "Kwota w oryginalnej walucie / Amount of the transaction"
      usedPaymentInstrumentId:
        type: string
        maxLength: 32
        description: "Unikalny identyfikator instrumentu płatniczego, za którego pomocą wykonano transakcję / Payment Instrument ID"
      tppTransactionId:
        type: string
        maxLength: 64
        description: "Unikalny identyfikator transakcji po stronie TPP / Transaction ID (TPP)"
      tppName:
        type: string
        maxLength: 32
        description: "Nazwa TPP / TPP name"
      rejectionReason:
        type: string
        maxLength: 140
        description: "Przyczyna odrzucenia / Reason for rejection"
      holdExpirationDate:
        type: string
        format: datetime
        description: "Data ważności blokady"
    xml:
      name: TransactionDetailResponse
  PaymentDomesticRequest:
    description: "Klasa zlecenia przelewu krajowego / Domestic Transfer Request Class"
    type: object
    required:
      - requestHeader
      - recipient
      - sender
      - transferData
      - tppTransactionId
      - deliveryMode
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderCallback"
        #description: "Obiekt klasy RequestHeaderCallback / RequestHeaderCallback Class object
      recipient:
        $ref: "#/definitions/RecipientPIS"
        #description: "Obiekt klasy RecipientPIS / RecipientPIS Class object"
      sender:
        $ref: "#/definitions/SenderPIS"
        #description: "Obiekt klasy SenderPIS / SenderPIS Class object"
      transferData:
        $ref: "#/definitions/TransferData"
        #description: "Obiekt klasy TransferData / TransferData Class object"
      tppTransactionId:
        type: string
        maxLength: 64
        description: "ID transakcji nadany przez TPP / Transaction ID (TPP)"
      deliveryMode:
        description: "Tryb pilności / Urgency mode"
        type: string
        enum:
          - ExpressD0
          - StandardD1
      system:
        description: "Droga jaką przelew ma być rozliczony / The way the transfer should be settled"
        type: string
        enum:
          - Elixir
          - ExpressElixir
          - Sorbnet
          - BlueCash
          - Internal
      hold:
         description: "Czy założyć blokadę (w przypadku np. zlecenia przelewu w dniu wolnym) / Indicates if payment should be holded"
         type: boolean
  PaymentEEARequest:
    description: "Klasa zlecenia przelewu zagranicznego SEPA / EEA Transfer Request Class"
    type: object
    required:
      - requestHeader
      - recipient
      - sender
      - transferData
      - tppTransactionId
      - deliveryMode
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderCallback"
        #description: "Obiekt klasy RequestHeaderCallback / RequestHeaderCallback Class object"
      recipient:
        $ref: "#/definitions/RecipientPISForeign"
        #description: "Obiekt klasy RecipientPIS / RecipientPIS Class object"
      sender:
        $ref: "#/definitions/SenderPIS"
        #description: "Obiekt klasy SenderPIS / SenderPIS Class object"
      transferData:
        $ref: "#/definitions/TransferDataCurrencyRequired"
        #description: "Obiekt klasy TransferDataCurrencyRequired / TransferDataCurrencyRequired Class object"
      tppTransactionId:
        type: string
        maxLength: 64
        description: "ID transakcji nadany przez TPP / Transaction ID (TPP)"
      deliveryMode:
        description: "Tryb pilności / Urgency mode"
        type: string
        enum:
          - ExpressD0
          - StandardD1
      system:
        description: "Droga jaką przelew ma być rozliczony / The way the transfer should be settled"
        type: string
        enum:
          - SEPA
          - InstantSEPA
          - Target
      hold:
       description: "Czy założyć blokadę (w przypadku np. zlecenia przelewu w dniu wolnym) / Indicates if payment should be holded"
       type: boolean
    xml:
      name: PaymentEEAAddRequest
  PaymentNonEEARequest:
    description: "Klasa zlecenia przelewu zagranicznego innego niż SEPA / NonEEA Transfer Request Class"
    type: object
    required:
      - requestHeader
      - recipient
      - recipientBank
      - sender
      - transferData
      - tppTransactionId
      - deliveryMode
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderCallback"
        #description: "Obiekt klasy RequestHeaderCallback / RequestHeaderCallback Class object"
      recipient:
        $ref: "#/definitions/RecipientPISForeign"
        #description: "Obiekt klasy RecipientPIS / RecipientPIS Class object"
      recipientBank:
        $ref: "#/definitions/Bank"
        #description: "Obiekt klasy Bank / Bank Class object"
      sender:
        $ref: "#/definitions/SenderPIS"
        #description: "Obiekt klasy SenderPIS / SenderPIS Class object"
      transferData:
        $ref: "#/definitions/TransferDataCurrencyRequired"
        #description: "Obiekt klasy TransferData / TransferData Class object"
      transferCharges:
        type: string
        maxLength: 3
        description: "Klauzula kosztowa / The cost clause"
      tppTransactionId:
        type: string
        maxLength: 64
        description: "ID transakcji nadany przez TPP / Transaction ID (TPP)"
      deliveryMode:
        description: "Tryb pilności / Urgency mode"
        type: string
        enum:
          - ExpressD0
          - UrgentD1
          - StandardD2
      system:
        description: "Droga jaką przelew ma być rozliczony / The way the transfer should be settled"
        type: string
        enum:
          - Swift
      hold:
       description: "Czy założyć blokadę (w przypadku np. zlecenia przelewu w dniu wolnym) / Indicates if payment should be holded"
       type: boolean
    xml:
      name: PaymentNonEEARequest
  PaymentTaxRequest:
    description: "Klasa zlecenia przelewu podatkowego / Tax Transfer Request Class"
    type: object
    required:
      - requestHeader
      - recipient
      - sender
      - transferData
      - tppTransactionId
      - deliveryMode
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderCallback"
        #description: "Obiekt klasy RequestHeaderCallback / RequestHeaderCallback Class object"
      recipient:
        $ref: "#/definitions/RecipientPISTax"
        #description: "Obiekt klasy RecipientPISTax / RecipientPISTax Class object"
      sender:
        $ref: "#/definitions/SenderPIS"
        #description: "Obiekt klasy SenderPIS / SenderPIS Class object"
      transferData:
        $ref: "#/definitions/TransferDataCurrencyRequired"
        #description: "Obiekt klasy TransferDataCurrencyRequired / TransferDataCurrencyRequired Class object"
      usInfo:
        $ref: "#/definitions/TransactionInfoTax"
        #description: "Obiekt klasy TransactionInfoTax / TransactionInfoTax Class object"
      tppTransactionId:
        type: string
        maxLength: 64
        description: "ID transakcji nadany przez TPP / Transaction ID (TPP)"
      deliveryMode:
        description: "Tryb pilności / Urgency mode"
        type: string
        enum:
          - ExpressD0
          - StandardD1
      system:
        description: "Droga jaką przelew ma być rozliczony / The way the transfer should be settled"
        type: string
        enum:
          - Elixir
          - ExpressElixir
      hold:
       description: "Czy założyć blokadę (w przypadku np. zlecenia przelewu w dniu wolnym) / Indicates if payment should be holded"
       type: boolean
    xml:
      name: PaymentTaxRequest
  PaymentRequest:
    description: "Klasa zapytania o status płatności / Payment Request Class"
    required:
      - requestHeader
      - transactionId
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeader"
        #description: "Obiekt klasy RequestHeader / RequestHeader Class object"
      transactionId:
        type: string
        maxLength: 14
        description: "Identyfikator płatności / Transaction ID"
    xml:
      name: PaymentRequest
  PaymentsRequest:
    description: "Klasa zapytania o statusy wielu płatności / Payments Request Class"
    required:
      - requestHeader
      - paymentsId
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderWithoutToken"
        #description: "Obiekt klasy RequestHeaderWithoutToken / RequestHeaderWithoutToken Class object"
      paymentsId:
        type: array
        items:
          type: string
        #description: "Lista identyfikatorów płatności / List of payment ids""
    xml:
      name: PaymentsRequest
  AddPaymentResponse:
    description: "Klasa odpowiedzi zlecenia płatności / Payment Add Response Class"
    required:
      - responseHeader
      - transactionId
      - generalStatus
      - detailedStatus
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
        #description: "Obiekt klasy ResponseHeader / ResponseHeader Class object"
      transactionId:
        type: string
        description: "Identyfiaktor płatności / Transaction ID"
      generalStatus:
        $ref: "#/definitions/PaymentStatus"
        #description: "Obiekt klasy PaymentStatus / PaymentStatus class object"
      detailedStatus:
        type: string
        description: "Status płatności / Detailed payment status"
  PaymentInfo:
    description: "Klasa informacji o płatności / Payment Information Class"
    required:
      - transactionId
      - generalStatus
      - detailedStatus
    properties: &PaymentProperties
      transactionId:
        type: string
        description: "Identyfiaktor płatności / Transaction ID"
      generalStatus:
        $ref: "#/definitions/PaymentStatus"
        #description: "Obiekt klasy PaymentStatus / PaymentStatus class object"
      detailedStatus:
        type: string
        description: "Szczegółowy status płatności / Detailed payment status"
  GetPaymentResponse:
    description: "Klasa odpowiedzi na pytanie o płatność / Payment Get Response Class"
    allOf:
      - "$ref": "#/definitions/PaymentInfo"
    required:
      - responseHeader
      - transactionId
      - generalStatus
      - detailedStatus
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
        #description: "Obiekt klasy ResponseHeader / ResponseHeader Class object"
  PaymentsResponse:
    description: "Klasa odpowiedzi na pytanie o wiele płatności"
    required:
      - responseHeader
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
        #description: "Obiekt klasy ResponseHeader / ResponseHeader Class object"
      payments:
        type: array
        items:
          $ref: "#/definitions/PaymentInfo"
        #description: "Lista elementów typu: PaymentInfo / PaymentInfo type elements list"
  ConfirmationOfFundsRequest:
    description: "Klasa zapytania o dostępne środki płatnicze na rachunku / Confirmation of Funds Request Class"
    type: object
    required:
      - requestHeader
      - accountNumber
      - amount
      - currency
    properties:
      requestHeader:
        $ref: "#/definitions/RequestHeaderWithoutToken"
        #description: "Obiekt klasy RequestHeaderWithoutToken / RequestHeaderWithoutToken Class object"
      accountNumber:
        type: string
        maxLength: 34
        description: "Numer konta / Account number"
      amount:
        type: string
        pattern: '^\d*\.\d{2}$'
        description: "Wielkość środków której dotyczy zaptanie / Amount of the transaction"
      currency:
        type: string
        maxLength: 3
        description: "Kod ISO Waluty (waluta transakcji) / Currency of transaction (ISO)"
    xml:
      name: ConfirmationOfFundsRequest
  ConfirmationOfFundsResponse:
    description: "Klasa odpowiedzi na zapytanie o dostępne środki płatnicze na rachunku / Confirmation of Funds Response Class"
    required:
      - responseHeader
      - fundsAvailable
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
        #description: "Obiekt klasy ResponseHeader / ResponseHeader Class object"
      fundsAvailable:
        description: "Status - Czy środki są dostępne / Status - are funds available"
        type: boolean
        enum:
          - true
          - false
  Error:
    description: "Klasa zawierająca informacje o zwracanym błędzie / Error class"
    properties:
      responseHeader:
        $ref: "#/definitions/ResponseHeader"
        #description: "Obiekt klasy ResponseHeader / ResponseHeader Class object"
      code:
        type: string
        description: "Kod błędu / Error code"
      message:
        type: string
        description: "Opis błędu / Error message"
  AccountIban:
    description: "Numer konta w formacie IBAN"
    type: string
    maxLength: 34
  AccountForeign:
    description: "Numer konta, format dla przelewów zagranicznych"
    type: string
    maxLength: 34
  RequestHeaderWithoutToken:
      description: "Klasa zawierająca informacje o PSU / PSU Information Class"
      type: object
      properties: 
        requestId:
          type: string
          description: "Identyfikator żądania / Request ID"
        userAgent:
          type: string
          description: "Browser agent dla PSU / PSU browser agent"
        ipAddress:
          type: string
          description: "IP adres / IP address"
        sendDate:
          type: string
          format: datetime
          description: "Oryginalna data wysłania, format: 2017-11-24T14:13:05.424Z / Send date"
        tppId:
          type: string
          description: "Identyfikator TPP / TPP ID"
        isCorporateContext:
          type: boolean
          description: "(true / false) Znacznik oznaczający czy żądanie jest wysyłane w kontekście PSU korporacyjnego"
        psuIdentifierType:
          description: "Typ identyfikatora PSU / Type of identifier of the PSU"
          type: string
          enum:
          - N
          - P
          - R
          - 1
          - 2
          - 3
          x-ms-enum:
            name: psuIdentifierType
            values:
            - value: N
              description: Numer NIP PSU / PSU's NIP number
            - value: P
              description: Numer PESEL PSU / PSU's PESEL number
            - value: R
              description: Numer REGON PSU / PSU's REGON number
            - value: 1
              description: Numer dowodu osobistego PSU / PSU's ID Document number
            - value: 2
              description: Numer paszportu PSU / PSU's PASSPORT number
            - value: 3
              description: Inny identyfikator PSU wspierany przez ASPSP / Other identifier of the PSU supported by ASPSP
        psuIdentifierValue:
          type: string
          description: "Wartość identyfikatora klienta / The value of the PSU's identifier"  
  RequestHeaderWithoutTokenCallback:
    description: "Klasa zawierająca informacje o PSU and callback URL / PSU and callback URL Information Class"
    allOf:
      - "$ref": "#/definitions/RequestHeaderWithoutToken"
    required:
      - callbackURL, apiKey
    properties:
      callbackURL:
        type: string
        description: "adres funkcji zwrotnej / callback URL"
      apiKey:
        type: string
        description: "API key dla wywołania funkcji zwrotnej / callback API key"
  RequestHeaderCallback:
    description: "Klasa zawierająca informacje o PSU and callback URL / PSU and callback URL Information Class"
    allOf:
      - "$ref": "#/definitions/RequestHeaderWithoutToken"
    required:
      - token
    properties: 
      token:
        type: string
        description: "Token autoryzacyjny / Authorization token"
      callbackURL:
        type: string
        description: "adres funkcji zwrotnej / callback URL"
      apiKey:
        type: string
        description: "API key dla wywołania funkcji zwrotnej / callback API key"
  RequestHeader:
    description: "Klasa zawierająca informacje o PSU and callback URL / PSU and callback URL Information Class"
    allOf:
      - "$ref": "#/definitions/RequestHeaderWithoutToken"
    required: 
      - token
    properties: 
      token:
        type: string
        description: "Token autoryzacyjny / Authorization token"
  RequestHeaderAIS:
    description: "Klasa zawierająca informacje o PSU / PSU Information Class"
    allOf:
      - "$ref": "#/definitions/RequestHeaderWithoutToken"
    required: 
      - token
    properties: 
      token:
        type: string
        description: "Token autoryzacyjny / Authorization token"
      isDirectPsu:
          type: boolean
          description: "Znacznik informujący czy request jest przesłany bezpośrednio przez PSU / Is request sent by PSU directly"
  RequestHeaderAISCallback:
    description: "Klasa zawierająca informacje o PSU and callback URL / PSU and callback URL Information Class"
    allOf:
      - "$ref": "#/definitions/RequestHeaderWithoutToken"
    required: 
      - token
    properties: 
      token:
        type: string
        description: "Token autoryzacyjny / Authorization token"
      isDirectPsu:
         type: boolean
         description: "Znacznik informujący czy request jest przesłany bezpośrednio przez PSU / Is request sent by PSU directly"
      callbackURL:
        type: string
        description: "adres funkcji zwrotnej / callback URL"
      apiKey:
        type: string
        description: "API key dla wywołania funkcji zwrotnej / callback API key"
  ResponseHeader:
      description: "Klasa zawierająca zwrotne metadane / Metadata Class"
      properties:
        requestId:
          type: string
          description: "Identyfikator żądania / Request ID"
        sendDate:
          type: string
          format: datetime
          description: "Data odpowiedzi, format: 2017-11-24T14:13:05.424Z / Send date"
        isCallback:
          type: boolean
          description: "Znacznik określający czy odpowiedz zostanie przekazana w formie wywołania zwrotnego. true - gdy odpowiedz w formie wywołania zwrotnego. Inna dopuszczalna wartość to false."
  SenderPIS:
    description: "Klasa zawierająca dane nadawcy używana w żądaniach PIS / PIS Sender Data Class"
    properties:
      accountNumber:
        $ref: "#/definitions/AccountIban"
        #description: "Obiekt klasy AccountIban / AccountIban class object"
      name:
        type: string
        maxLength: 140
        description: "Nazwa nadawcy / Sender name"
  Bank:
    description: "Klasa zawierająca dane banku używana w żądaniach AIS / AIS Bank Data Class"
    properties:
      bicOrSwift:
        type: string
        maxLength: 11
        description: "Numer BIC/SWIFT Banku / BIC/SWIFT number"
      name:
        type: string
        maxLength: 70
        description: "Nazwa Banku / Bank's name"
      code:
        type: string
        maxLength: 10
        description: "Kod Banku, dla przelewów zagranicznych / Bank's code"
      countryCode:
        type: string
        maxLength: 3
        description: "Kod kraju 3166-1 / Country code"
      address:
        $ref: "#/definitions/Address"
        #description: "Obiekt klasy Address / Address class object"
  BankAccountInfo:
    description: "Klasa zawierająca dane banku / Bank Data Class"
    properties:
      bicOrSwift:
        type: string
        maxLength: 8
        description: "Numer BIC/SWIFT Banku / BIC/SWIFT number"
      name:
        type: string
        maxLength: 70
        description: "Nazwa Banku / Bank's name"
      address:
        $ref: "#/definitions/Address"
        #description: "Obiekt klasy Address / Address class object"
  TransferDataBase:
    description: "Bazowa klasa dla TransferData / TransferData Base Class"
    type: object
    properties: 
      description:
        type: string
        maxLength: 140
        description: "Pole opisujące przelew / Description"
      amount:
        type: string
        pattern: '^\d*\.\d{2}$'
        description: "Kwota przelewu / Amount"
      executionDate: 
        type: string
        format: date
        maxLength: 10
        description: "Data wykonania przelewu / Date when the transfer was executed (YYYY-MM-DD)"
  TransferData:
    description: "Klasa zawierająca dane przelewu / Transfer Data Class"
    allOf:
      - "$ref": "#/definitions/TransferDataBase"
    required: 
      - description
      - amount
    properties: 
      currency:
        type: string
        maxLength: 3
        description: "Waluta / Currency"
  TransferDataCurrencyRequired:
    description: "Klasa zawierająca dane przelewu / Transfer Data Class"
    allOf:
      - "$ref": "#/definitions/TransferDataBase"
    required: 
      - description
      - amount
      - currency
    properties: 
      currency:
        type: string
        maxLength: 3
        description: "Waluta, domyślnie EUR przelewów zagranicznych / Currency"
  SenderRecipient:
    description: "Klasa zawierająca dane nadawcy/odbiorcy używana w żądaniach AIS / AIS Sender Recipient Data Class"
    properties:
      accountNumber:
        type: string
        description: "Numer konta odbiorcy / Account number"
      accountMassPayment:
        type: string
        description: "Numer wirtualny rachunku odbiorcy w formacie IBAN / Virtual account name"
      bank:
        $ref: "#/definitions/Bank"
        #description: "Obiekt klasy Bank / Bank class object"
      nameAddress:
        $ref: "#/definitions/NameAddress"
        #description: "Obiekt klasy NameAddress / NameAddress class object"
  RecipientPIS:
    description: "Klasa zawierająca dane odbiorcy używana w żądaniach PIS / PIS Recipient Data Class"
    required:
      - name
      - accountNumber
    properties:
      accountNumber:
        $ref: "#/definitions/AccountIban"
        #description: "Obiekt klasy AccountIban / AccountIban class object"
      name:
        type: string
        maxLength: 140
        description: "Recipient's name / Name"
      address:
        $ref: "#/definitions/Address"
        #description: "Obiekt klasy Address / Address class object"
  RecipientPISTax:
    description: "Klasa zawierająca dane odbiorcy używana w żądaniach PIS dla operacji podatkowych / PIS Tax Recipient Data Class"
    required:
      - address
      - accountNumber
    properties:
      accountNumber:
        $ref: "#/definitions/AccountIban"
        #description: "Obiekt klasy AccountIban / AccountIban class object"
      address:
        $ref: "#/definitions/Address"
        #description: "Obiekt klasy Address / Address class object"
  RecipientPISForeign:
    description: "Klasa zawierająca dane odbiorcy używana w żądaniach PIS dla operacji zagranicznych / PIS foreign Recipient Data Class"
    required:
      - name
      - accountNumber
    properties:
      accountNumber:
        $ref: "#/definitions/AccountForeign"
        #description: "Obiekt klasy AccountForeign / AccountForeign class object"
      name:
        type: string
        maxLength: 140
        description: "Recipient's name / Name"
      address:
        $ref: "#/definitions/Address"
        #description: "Obiekt klasy Address / Address class object"
  Address:
    description: "Klasa zawierająca dane adresu pocztowego / Postal address Class"
    type: array
    minItems: 1
    maxItems: 4
    items:
      type: string
      maxLength: 35
  NameAddress:
    description: "Klasa zawierająca dane nazwy i adresu w postaci czterech linii danych / Simple name and  postal address Class"
    properties:
      name:
        type: string
        maxLength: 140
        description: "Nazwa / Name"
      address:
        type: array
        minItems: 1
        maxItems: 3
        items:
          type: string
          maxLength: 35
  PageInfo:
    description: "Klasa zawierająca dane pozwalajace na korzystanie z mechanizmu stronicowania / Paging Information Class"
    properties:
      previousPage:
        type: string
        description: "Użyte w celu stronicowania danych: poprzednia strona (np: numer konta lub transakcji rozpoczynający poprzednią stronę) / Previous page"
      nextPage:
        type: string
        description: "Użyte w celu stronicowania danych: następna strona (np: numer konta lub transakcji rozpoczynający następną stronę) / Next page"
  CurrencyRate:
    description: "Klasa zawierająca kursy przewalutowań / Currency rate"
    properties:
      rate:
        type: number
        format: double
        pattern: '^(0|([1-9][0-9]{0,3}))(\.[0-9]{1,7})?$'
        description: "Kursy przewalutowania / Currency exchange rate"
      fromCurrency:
        type: string
        maxLength: 3
        description: "Waluta rachunku, kod ISO / from Currency, ISO code"
      toCurrency:
        type: string
        maxLength: 3
        description: "Waluta rachunku, kod ISO / to Currency, ISO code"
  PaymentStatus:
    description: "Słownik statusów płatności"
    type: string
    enum:
      - submitted
      - cancelled
      - pending
      - done
      - rejected
  Map:
    description: "Klasa mapy <string, string> / Map (Dictionary) class"
    type : object
    additionalProperties:
      type: string
  DictionaryItem:
    description: "Klasa zawierająca dane elementu/pozycji słownika / Dictionary Item Class"
    properties:
      code:
        type: string
        description: "Kod pozycji słownika / Code"
      description:
        type: string
        description: "Opis pozycji słownika / Description"
  ScopeDetailsInput: 
    description: Zakres, limity, parametry i czas ważności zgód, o które prosi TPP. / Scope, limits, parameters and expiration time of consents requested by TPP
    type: object
    required:
    - consentId
    - privilegeList
    - recurringIndicator
    - resource
    - scopeGroupType
    - scopeTimeDuration
    - scopeTimeLimit
    - throttlingPolicy
    properties:
      privilegeList:
        "$ref": "#/definitions/ScopeDetailsInputPrivilegeList"
      scopeGroupType:
        type: string
        description: Type of consent
        enum:
        - accountInformationService
        - paymentInformationService
        - confirmationOfFunds
      consentId:
        type: string
        description: Id of consent
      resource:
        "$ref": "#/definitions/ScopeDetailsInputResource"
      recurringIndicator:
        type: boolean
        description: Whether the consent is multiple or one-time
      scopeTimeDuration:
        type: integer
        description: Validity in minutes
      scopeTimeLimit:
        type: string
        format: datetime
        description: consent valid until
      throttlingPolicy:
        type: string
        description: Throttling policy
        enum:
        - psd2Regulatory
  ScopeDetailsOutput:
    description: Zakres, limity, parametry i czas ważności zgód, które potwierdza ASPSP / Scope, limits, parameters and expiration time of consents that are confimed by ASPSP
    type: object
    required:
    - consentId
    - privilegeList
    - recurringIndicator
    - resource
    - scopeGroupType
    - scopeTimeDuration
    - scopeTimeLimit
    - throttlingPolicy
    properties:
      privilegeList:
        "$ref": "#/definitions/ScopeDetailsOutputPrivilegeList"
      scopeGroupType:
        type: string
        description: Type of consent
        enum:
        - accountInformationService
        - paymentInformationService
        - confirmationOfFunds
      consentId:
        type: string
        description: Id of consent
      resource:
        "$ref": "#/definitions/ScopeDetailsOutputResource"
      recurringIndicator:
        type: boolean
        description: Whether the consent is multiple or one-time
      scopeTimeDuration:
        type: integer
        description: Validity in minutes
      scopeTimeLimit:
        type: string
        format: datetime
        description: consent valid until
      throttlingPolicy:
        type: string
        description: Throttling policy
        enum:
        - psd2Regulatory
    example:
      consentId: consentId
      resource:
        accounts:
        - accounts
        - accounts
      scopeTimeLimit: scopeTimeLimit
      recurringIndicator: true
      scopeTimeDuration: 3
      throttlingPolicy: psd2Regulatory
      scopeGroupType: accountInformationService
      privilegeList:
        ais:transactionsDone:
          notAfter: notAfter
          scopeUsageLimit: 1
          maxAllowedHistoryLong: 880
          notBefore: notBefore
        ais:holds:
          notAfter: notAfter
          scopeUsageLimit: 1
          maxAllowedHistoryLong: 880
          notBefore: notBefore
        ais:transactionsRejected:
          notAfter: notAfter
          scopeUsageLimit: 1
          maxAllowedHistoryLong: 880
          notBefore: notBefore
        ais:accounts:
          notAfter: notAfter
          scopeUsageLimit: 1
          maxAllowedHistoryLong: 880
          notBefore: notBefore
        pis:tax:
          scopeUsageLimit: 1
        pis:payment:
          scopeUsageLimit: 1
        pis:domestic:
          scopeUsageLimit: 1
        ais:transactionDetail:
          notAfter: notAfter
          scopeUsageLimit: 1
          maxAllowedHistoryLong: 880
          notBefore: notBefore
        caf:confirmationOfFunds:
          amount: 9.301444243932576
          scopeUsageLimit: 1
          currency: currency
        ais:transactionsPending:
          notAfter: notAfter
          scopeUsageLimit: 1
          maxAllowedHistoryLong: 880
          notBefore: notBefore
        pis:multiplePayments:
          scopeUsageLimit: 1
        pis:foreign:
          scopeUsageLimit: 1
  PrivilegeAisAspspInSimple: 
    description: Lista atrybutów uprawnienia usługi AIS będących przedmiotem zapytania o zgodę PSU / The list of attributes of the privilege of the AIS service that are the subject of the request for PSU's consent
    type: object
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
  PrivilegeAisAspspIn: 
    description: Lista atrybutów uprawnienia usługi AIS będących przedmiotem zapytania o zgodę PSU / The list of attributes of the privilege of the AIS service that are the subject of the request for PSU's consent
    type: object
    required:
    - maxAllowedHistoryLong
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
      maxAllowedHistoryLong:
        type: integer
        description: How much history is allowed in days
        minimum: 1
        maximum: 1460
  PrivilegeAisAspspOutSimple: 
    description: Lista atrybutów uprawnienia usługi AIS dla których została wyrażona zgoda przez PSU / The list of attributes of the privilege of the AIS service that the PSU's consent has been confirmed
    type: object
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
  PrivilegeAisAspspOut: 
    description: Lista atrybutów uprawnienia usługi AIS dla których została wyrażona zgoda przez PSU / The list of attributes of the privilege of the AIS service that the PSU's consent has been confirmed
    type: object
    required:
    - maxAllowedHistoryLong
    - notAfter
    - notBefore
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
      maxAllowedHistoryLong:
        type: integer
        description: How much history is allowed in days
        minimum: 1
        maximum: 1460
      notBefore:
        type: string
        format: datetime
        description: Minimum date for transaction that will be returned
      notAfter:
        type: string
        format: datetime
        description: Maximum date for transaction that will be returned
    example:
      notAfter: notAfter
      scopeUsageLimit: 1
      maxAllowedHistoryLong: 880
      notBefore: notBefore
  PrivilegePayment: 
    description: Lista atrybutów uprawnienia do żądania statusu płatności / The list of attributes of the payment status request privilege
    type: object
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
      transactionId: 
        type: string
        description: Identyfikator płatności / Transaction ID
  PrivilegeDomesticTransfer: 
    description: Lista atrybutów uprawnienia do inicjacji przelewu zwykłego / The list of attributes of the domestic transfer request initiation privilege
    type: object
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
      recipient:  
        "$ref": "#/definitions/RecipientPIS"
      sender: 
        "$ref": "#/definitions/SenderPIS"
      transferData: 
        "$ref": "#/definitions/TransferData"
  PrivilegeForeignTransferEEA: 
    description: Lista atrybutów uprawnienia do inicjacji przelewu zagranicznego EEA / The list of attributes of the EEA foreign transfer request initiation privilege
    type: object
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
      recipient:  
        "$ref": "#/definitions/RecipientPISForeign"
      sender: 
        "$ref": "#/definitions/SenderPIS"
      transferData: 
        "$ref": "#/definitions/TransferDataCurrencyRequired"
  PrivilegeForeignTransferNonEEA: 
    description: Lista atrybutów uprawnienia do inicjacji przelewu zagranicznego bez EEA / The list of attributes of the non-EEA foreign transfer request initiation privilege
    type: object
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
      recipient:  
        "$ref": "#/definitions/RecipientPISForeign"
      recipientBank:  
        "$ref": "#/definitions/Bank"
      sender: 
        "$ref": "#/definitions/SenderPIS"
      transferData: 
        "$ref": "#/definitions/TransferDataCurrencyRequired"
  PrivilegeTaxTransfer: 
    description: Lista atrybutów uprawnienia do inicjacji przelewu urzędu podatkowego / The list of attributes of the tax transfer request initiation privilege
    type: object
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
      recipient:
        "$ref": "#/definitions/RecipientPISTax"
      sender: 
        "$ref": "#/definitions/SenderPIS"
      transferData: 
        "$ref": "#/definitions/TransferDataCurrencyRequired"
      usInfo: 
        "$ref": "#/definitions/TransactionInfoTax"
  PrivilegeCaF: 
    description: Uprawnienie usługi CAF, będącej przedmiotem zapytania o zgodę PSU / The privilege of the AIS service that is the subject of the request for PSU's consent
    type: object
    required:
    - amount
    - currency
    properties:
      scopeUsageLimit:
        type: integer
        description: Limit of usages
        minimum: 1
      amount:
        type: number
        format: decimal
      currency:
        type: string
        maxLength: 3
    example:
      amount: 9.301444243932576
      scopeUsageLimit: 1
      currency: currency
  ScopeDetailsInputPrivilegeList:
    description: Pełna lista uprawnień będących przedmiotem zapytania o zgodę PSU / The list of all privileges that are the subject of the request for PSU's consent
    properties:
      ais:accounts:
        "$ref": "#/definitions/PrivilegeAisAspspInSimple"
      ais:account: 
        "$ref": "#/definitions/PrivilegeAisAspspInSimple"
      ais:holds:
        "$ref": "#/definitions/PrivilegeAisAspspIn"
      ais:transactionsDone:
        "$ref": "#/definitions/PrivilegeAisAspspIn"
      ais:transactionsPending:
        "$ref": "#/definitions/PrivilegeAisAspspIn"
      ais:transactionsRejected:
        "$ref": "#/definitions/PrivilegeAisAspspIn"
      ais:transactionDetail:
        "$ref": "#/definitions/PrivilegeAisAspspInSimple"
#      pis:multiplePayments:
#        "$ref": "#/definitions/PrivilegePayment"
      pis:payment:
        "$ref": "#/definitions/PrivilegePayment"
      pis:domestic:
        "$ref": "#/definitions/PrivilegeDomesticTransfer"
      pis:EEA: 
        "$ref": "#/definitions/PrivilegeForeignTransferEEA"
      pis:nonEEA: 
        "$ref": "#/definitions/PrivilegeForeignTransferNonEEA"
      pis:tax:
        "$ref": "#/definitions/PrivilegeTaxTransfer"
      caf:confirmationOfFunds:
        "$ref": "#/definitions/PrivilegeCaF"
  ScopeDetailsInputResource:
    description: Pełna lista zasobów - rachunków płatniczych - których dotyczy żądanie zgody PSU / The full list o resources (accounts) that the PSU's consent is connected with
    required:
    - accounts
    properties:
      accounts:
        type: array
        description: Account numbers in IBAN format
        items:
          type: string
          description: Account numbers List
    example:
      accounts:
      - accounts
      - accounts
  ScopeDetailsOutputResource: 
    description: Pełna lista zasobów - rachunków płatniczych - których dotyczy uzyskana zgoda od PSU / The full list o resources (accounts) that the gained PSU's consent is connected with
    required:
    - accounts
    properties:
      accounts:
        type: array
        description: Account numbers in IBAN format
        items:
          type: string
          description: Account numbers List
    example:
      accounts:
      - accounts
      - accounts
  ScopeDetailsOutputPrivilegeList:
    description: Pełna lista uprawnień, dla których została wyrażona zgoda przez PSU / The list of all privileges that the PSU's consent has been confirmed
    properties:
      ais:accounts:
        "$ref": "#/definitions/PrivilegeAisAspspOutSimple"
      ais:account: 
        "$ref": "#/definitions/PrivilegeAisAspspOutSimple"
      ais:holds:
        "$ref": "#/definitions/PrivilegeAisAspspOut"
      ais:transactionsDone:
        "$ref": "#/definitions/PrivilegeAisAspspOut"
      ais:transactionsPending:
        "$ref": "#/definitions/PrivilegeAisAspspOut"
      ais:transactionsRejected:
        "$ref": "#/definitions/PrivilegeAisAspspOut"
      ais:transactionDetail:
        "$ref": "#/definitions/PrivilegeAisAspspOutSimple"
#      pis:multiplePayments:
#        "$ref": "#/definitions/PrivilegePayment"
      pis:payment:
        "$ref": "#/definitions/PrivilegePayment"
      pis:domestic:
        "$ref": "#/definitions/PrivilegeDomesticTransfer"
      pis:EEA: 
        "$ref": "#/definitions/PrivilegeForeignTransferEEA"
      pis:nonEEA: 
        "$ref": "#/definitions/PrivilegeForeignTransferNonEEA"
      pis:tax:
        "$ref": "#/definitions/PrivilegeTaxTransfer"
      caf:confirmationOfFunds:
        "$ref": "#/definitions/PrivilegeCaF"
    example:
      ais:transactionsDone:
        notAfter: notAfter
        scopeUsageLimit: 1
        maxAllowedHistoryLong: 880
        notBefore: notBefore
      ais:holds:
        notAfter: notAfter
        scopeUsageLimit: 1
        maxAllowedHistoryLong: 880
        notBefore: notBefore
      ais:transactionsRejected:
        notAfter: notAfter
        scopeUsageLimit: 1
        maxAllowedHistoryLong: 880
        notBefore: notBefore
      ais:accounts:
        notAfter: notAfter
        scopeUsageLimit: 1
        maxAllowedHistoryLong: 880
        notBefore: notBefore
      pis:tax:
        scopeUsageLimit: 1
      pis:payment:
        scopeUsageLimit: 1
      pis:domestic:
        scopeUsageLimit: 1
      ais:transactionDetail:
        notAfter: notAfter
        scopeUsageLimit: 1
        maxAllowedHistoryLong: 880
        notBefore: notBefore
      caf:confirmationOfFunds:
        amount: 9.301444243932576
        scopeUsageLimit: 1
        currency: currency
      ais:transactionsPending:
        notAfter: notAfter
        scopeUsageLimit: 1
        maxAllowedHistoryLong: 880
        notBefore: notBefore
      pis:multiplePayments:
        scopeUsageLimit: 1
      pis:foreign:
        scopeUsageLimit: 1
  