openapi: 3.0.0
info:
  description: >
    This is the specification of the bLink 'payments-submission-service' module
    API. (as implemented by SIX and used by clients (e.g. third party
    providers)) 
  version: 4.0.0.1-six_caas
  title: bLink API - payments-submission-service module
  contact:
    name: SIX BBS AG
    url: https://www.six-group.com/en/products-services/banking-services/blink.html
servers:
  - url: >-
      https://api-cert.six-group.com/api/bankingservices/b-link/payments-submission-service/v4
paths:
  /payments:
    post:
      tags:
        - payments
      summary: Submit payment instructions
      description: Create new payments submission.
      operationId: submitPaymentInstructions
      parameters:
        - $ref: '#/components/parameters/permissionid_in_header'
        - $ref: '#/components/parameters/correlation_in_header'
        - $ref: '#/components/parameters/agent_in_header'
        - $ref: '#/components/parameters/targetid_in_header'
        - $ref: '#/components/parameters/psu_ip_in_header'
        - $ref: '#/components/parameters/psu_user_agent_in_header'
        - $ref: '#/components/parameters/optional_authorization_in_header'
        - $ref: '#/components/parameters/optional_instance_id_in_header'
      requestBody:
        required: true
        description: Payment instruction details as defined by data model.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/paymentSubmissionRequest'
      responses:
        '201':
          description: Created.
          headers:
            Location:
              $ref: '#/components/headers/Location'
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /payments/{submissionId}/status:
    get:
      tags:
        - payments
      summary: Retrieve payment submission status information
      description: Retrieve a specific payment submission's status.
      operationId: retrievePaymentSubmissionStatus
      parameters:
        - $ref: '#/components/parameters/path_submissionId'
        - $ref: '#/components/parameters/permissionid_in_header'
        - $ref: '#/components/parameters/correlation_in_header'
        - $ref: '#/components/parameters/agent_in_header'
        - $ref: '#/components/parameters/targetid_in_header'
        - $ref: '#/components/parameters/psu_ip_in_header'
        - $ref: '#/components/parameters/psu_user_agent_in_header'
        - $ref: '#/components/parameters/optional_authorization_in_header'
        - $ref: '#/components/parameters/optional_instance_id_in_header'
      responses:
        '200':
          description: Status information for the payment submission
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paymentSubmissionStatus'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /iso20022/payments:
    post:
      tags:
        - iso20022
      summary: Submit an ISO20022 XML payment instruction (PAIN.001)
      description: >
        Submit an XML pain.001 payment instruction according to the ISO20022
        specification.
          * bLink supports payment instructions only in XML-Schema «pain.001.001.09».
      operationId: submitIso20022PaymentInstruction
      parameters:
        - $ref: '#/components/parameters/permissionid_in_header'
        - $ref: '#/components/parameters/correlation_in_header'
        - $ref: '#/components/parameters/agent_in_header'
        - $ref: '#/components/parameters/targetid_in_header'
        - $ref: '#/components/parameters/psu_ip_in_header'
        - $ref: '#/components/parameters/psu_user_agent_in_header'
        - $ref: '#/components/parameters/optional_authorization_in_header'
        - $ref: '#/components/parameters/optional_instance_id_in_header'
      requestBody:
        required: true
        description: Payment instruction details as defined by data model.
        content:
          application/xml:
            schema:
              type: string
      responses:
        '201':
          description: Created.
          headers:
            Location:
              $ref: '#/components/headers/Location'
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
        '202':
          description: Accepted but the resource is not yet created.
          headers:
            Location:
              $ref: '#/components/headers/Location'
            ExpectedDurationInSeconds:
              $ref: '#/components/headers/ExpectedDurationInSeconds'
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/paymentSubmissionRequest'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /iso20022/payments/{submissionId}/status:
    get:
      tags:
        - iso20022
      summary: Retrieve ISO20022 XML status report of a payment instruction (PAIN.002)
      description: >
        Retrieve the status report for the requested XML ISO20022 payment
        instruction (PAIN.002).
          * bLink supports status reports only in XML-Schema «pain.002.001.10».
      operationId: retrieveIso20022PaymentInstructionStatusReport
      parameters:
        - $ref: '#/components/parameters/path_submissionId'
        - $ref: '#/components/parameters/permissionid_in_header'
        - $ref: '#/components/parameters/correlation_in_header'
        - $ref: '#/components/parameters/agent_in_header'
        - $ref: '#/components/parameters/targetid_in_header'
        - $ref: '#/components/parameters/psu_ip_in_header'
        - $ref: '#/components/parameters/psu_user_agent_in_header'
        - $ref: '#/components/parameters/optional_authorization_in_header'
        - $ref: '#/components/parameters/optional_instance_id_in_header'
      responses:
        '200':
          description: Returns the requested ISO20022 XML pain.002 message.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/xml:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /consents:
    get:
      tags:
        - consents
      summary: Retrieve a list of consents
      description: >
        The consents endpoint allows the client (e.g., a third party provider)
        to query the consents for a given user. The provider (e.g., a financial
        institution) must return the consents linked with the access token
        supplied with the request.
      operationId: retrieveConsents
      parameters:
        - $ref: '#/components/parameters/permissionid_in_header'
        - $ref: '#/components/parameters/correlation_in_header'
        - $ref: '#/components/parameters/agent_in_header'
        - $ref: '#/components/parameters/targetid_in_header'
        - $ref: '#/components/parameters/psu_ip_in_header'
        - $ref: '#/components/parameters/psu_user_agent_in_header'
        - $ref: '#/components/parameters/optional_authorization_in_header'
        - $ref: '#/components/parameters/optional_instance_id_in_header'
      responses:
        '200':
          description: List of consents
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/consentAccountItem'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /healthcheck:
    get:
      tags:
        - diagnostics
      summary: >-
        Returns all specified request headers and additional diagnostic
        information
      operationId: healthCheckGet
      parameters:
        - $ref: '#/components/parameters/optional_correlation_in_header'
        - $ref: '#/components/parameters/optional_authorization_in_header'
        - $ref: '#/components/parameters/optional_agent_in_header'
        - $ref: '#/components/parameters/targetid_in_header'
        - $ref: '#/components/parameters/optional_psu_ip_in_header'
        - $ref: '#/components/parameters/optional_psu_user_agent_in_header'
        - $ref: '#/components/parameters/optional_instance_id_in_header'
      responses:
        '200':
          description: Health Check Response
          headers:
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/healthCheckResponse'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
    post:
      tags:
        - diagnostics
      summary: >-
        Returns all specified request headers, the request body and additional
        diagnostic information
      operationId: healthCheckPost
      parameters:
        - $ref: '#/components/parameters/optional_correlation_in_header'
        - $ref: '#/components/parameters/optional_authorization_in_header'
        - $ref: '#/components/parameters/optional_agent_in_header'
        - $ref: '#/components/parameters/targetid_in_header'
        - $ref: '#/components/parameters/optional_psu_ip_in_header'
        - $ref: '#/components/parameters/optional_psu_user_agent_in_header'
        - $ref: '#/components/parameters/optional_instance_id_in_header'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: string
      responses:
        '200':
          description: Health Check Response
          headers:
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/healthCheckResponse'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
components:
  schemas:
    paymentSubmissionRequest:
      title: Payment Submission Request
      type: object
      required:
        - messageId
        - initiatingPartyId
        - debtorAccount
        - bookingInstruction
        - transactions
        - requestedExecutionDate
      properties:
        messageId:
          type: string
          maxLength: 35
          example: eb6305c91f7f49deaed016487c27b42d
        initiatingPartyId:
          type: string
          maxLength: 32
          example: TPP01746
        requestedExecutionDate:
          type: string
          format: date
          example: '2018-04-07'
        debtorAccount:
          $ref: '#/components/schemas/paymentIbanAccount'
        bookingInstruction:
          $ref: '#/components/schemas/paymentBookingInstruction'
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/paymentInstructionItem'
    paymentInstructionItem:
      title: Payment Instruction Item
      type: object
      required:
        - instructionId
        - endToEndId
        - instructedAmount
      properties:
        instructionId:
          type: string
          maxLength: 35
          example: INSTR-001
        endToEndId:
          type: string
          maxLength: 35
          example: ENDTOENDID-001
        instructedAmount:
          $ref: '#/components/schemas/paymentCurrencyAmount'
        ibanDetails:
          $ref: '#/components/schemas/paymentIBANDetail'
        otherDetails:
          $ref: '#/components/schemas/paymentOtherDetail'
        qrDetails:
          $ref: '#/components/schemas/paymentQRDetail'
    paymentIBANDetail:
      title: Payment IBAN Detail
      type: object
      required:
        - creditorAccount
        - creditor
      properties:
        sepaIndicator:
          type: boolean
          example: true
        creditorAccount:
          $ref: '#/components/schemas/paymentIbanAccount'
        creditorAgent:
          $ref: '#/components/schemas/paymentCreditorAgent'
        creditor:
          $ref: '#/components/schemas/paymentCreditor'
        chargeBearer:
          $ref: '#/components/schemas/paymentChargeBearerMethod'
        remittanceReference:
          $ref: '#/components/schemas/paymentIbanRemittanceReference'
        remittanceInformation:
          $ref: '#/components/schemas/paymentRemittanceInformation'
    paymentOtherDetail:
      title: Payment Other Detail
      type: object
      required:
        - creditorAccount
        - creditor
      properties:
        creditorAccount:
          $ref: '#/components/schemas/paymentOtherAccount'
        creditorAgent:
          $ref: '#/components/schemas/paymentCreditorAgent'
        creditor:
          $ref: '#/components/schemas/paymentCreditor'
        chargeBearer:
          $ref: '#/components/schemas/paymentChargeBearerMethod'
        remittanceReference:
          $ref: '#/components/schemas/paymentOtherRemittanceReference'
        remittanceInformation:
          $ref: '#/components/schemas/paymentRemittanceInformation'
    paymentQRDetail:
      title: Payment QR Detail
      type: object
      required:
        - creditor
        - creditorAccount
      properties:
        creditorAccount:
          $ref: '#/components/schemas/paymentQrIbanAccount'
        creditor:
          $ref: '#/components/schemas/paymentCreditor'
        ultimateCreditor:
          $ref: '#/components/schemas/paymentCreditor'
        ultimateDebtor:
          $ref: '#/components/schemas/paymentDebtor'
        remittanceReference:
          $ref: '#/components/schemas/paymentIbanRemittanceReference'
        remittanceInformation:
          $ref: '#/components/schemas/paymentRemittanceInformation'
    paymentCreditor:
      title: Payment Creditor
      type: object
      required:
        - name
        - postalAddress
      properties:
        name:
          type: string
          maxLength: 70
          example: Hans Muster
        postalAddress:
          $ref: '#/components/schemas/paymentStructuredOrUnstructuredAddress'
    paymentDebtor:
      title: Payment Debtor
      type: object
      required:
        - name
        - postalAddress
      properties:
        name:
          type: string
          maxLength: 70
          example: Hans Muster
        postalAddress:
          $ref: '#/components/schemas/paymentStructuredOrUnstructuredAddress'
    paymentChargeBearerMethod:
      title: Payment Charge Bearer Method
      type: string
      enum:
        - DEBT
        - CRED
        - SHAR
        - SLEV
      example: SHAR
    paymentBookingInstruction:
      title: Payment Booking Instruction
      type: string
      enum:
        - SINGLEBOOKING_SIA
        - SINGLEBOOKING_NOA
        - BATCHBOOKING_SALA_NOA
        - BATCHBOOKING_SALA_CND
        - BATCHBOOKING_NOA
        - BATCHBOOKING_CND
        - BATCHBOOKING_CWD
      example: BATCHBOOKING_SALA_CND
    paymentSubmissionStatus:
      title: Payment Submission Status
      type: object
      required:
        - statusCode
      properties:
        messageId:
          type: string
          example: eb6305c91f7f49deaed016487c27b42d
        statusCode:
          type: string
          enum:
            - ACCP
            - RJCT
            - PART
            - RCVD
          example: PART
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/paymentInstructionItemStatus'
    paymentInstructionItemStatus:
      title: Payment Instruction Item Status
      type: object
      required:
        - instructionId
        - statusCode
      properties:
        instructionId:
          type: string
          maxLength: 35
          example: DNCS-20180322-IXN0-TXN0
        statusCode:
          type: string
          enum:
            - ACCP
            - RJCT
          example: RJCT
        reasonCode:
          type: string
          example: CURR
        reasonInformation:
          type: string
          maxLength: 105
          example: currency USD not allowed for payment type IBAN
    paymentCreditorAgent:
      type: object
      properties:
        bic:
          type: string
          maxLength: 11
          example: BDEMMXMM
        clearingSystemMemberIdentification:
          $ref: '#/components/schemas/commonClearingSystemMemberIdentification'
    paymentIbanAccount:
      title: Payment IBAN Account
      type: object
      required:
        - type
        - identification
      properties:
        type:
          type: string
          description: >-
            The allowed account identification type for the creditor account
            depends on the payment type. The debtor account must always be an
            IBAN.
          enum:
            - IBAN
        identification:
          type: string
          maxLength: 34
          pattern: '[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}'
          example: CH9300762011623852957
    paymentQrIbanAccount:
      title: Payment QR-IBAN Account
      type: object
      required:
        - type
        - identification
      properties:
        type:
          type: string
          description: >-
            IBAN or QR-IBAN of the creditor, only IBANs with CH or LI country
            code permitted.
          enum:
            - IBAN
            - QR_IBAN
        identification:
          type: string
          maxLength: 34
          example: CH9300762011623852957
          pattern: '[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}'
    paymentOtherAccount:
      title: Payment Other Account
      type: object
      required:
        - type
        - identification
      properties:
        type:
          type: string
          description: >-
            The allowed account identification type for the creditor account
            depends on the payment type. The debtor account must always be an
            IBAN.
          enum:
            - OTHER
        identification:
          type: string
          maxLength: 34
          example: 01-39139-1
    paymentCurrencyAmount:
      title: Payment Currency-Amount
      type: object
      required:
        - currency
        - amount
      properties:
        currency:
          type: string
          maxLength: 3
          minLength: 3
          example: CHF
        amount:
          type: string
          pattern: '[0-9]{1,12}([.][0-9]{1,5})?'
          maxLength: 18
          example: 10.25
    paymentIbanRemittanceReference:
      title: Payment Remittance Reference
      description: either remittanceReference or remittanceInformation must be set
      type: object
      properties:
        type:
          type: string
          enum:
            - SCOR
            - QRR
        reference:
          type: string
          maxLength: 35
          example: 2.1000000000313946e+26
    paymentOtherRemittanceReference:
      title: Payment Remittance Reference
      description: either remittanceReference or remittanceInformation must be set
      type: object
      properties:
        type:
          type: string
          enum:
            - SCOR
        reference:
          type: string
          maxLength: 35
          example: 2.1000000000313946e+26
    paymentRemittanceInformation:
      title: Payment Remittance Information
      description: either remittanceReference or remittanceInformation must be set
      type: string
      maxLength: 140
      example: Rechnung Nr. 408
    paymentStructuredAddress:
      title: Structured Address for Payments
      type: object
      properties:
        streetName:
          type: string
          maxLength: 70
          example: Rue de la gare
        buildingNumber:
          type: string
          maxLength: 16
          example: 24
        postCode:
          type: string
          maxLength: 16
          example: 2501
        townName:
          type: string
          maxLength: 35
          example: Biel
        country:
          type: string
          maxLength: 2
          example: CH
    paymentUnstructuredAddress:
      title: Unstructured Address for Payments
      type: object
      properties:
        addressLines:
          type: array
          description: max 2 lines of 70 characters
          maxItems: 2
          example:
            - Robert Schneider SA
            - Rue de la gare 24
          items:
            type: string
            maxLength: 70
        country:
          type: string
          maxLength: 2
          example: CH
    paymentStructuredOrUnstructuredAddress:
      title: Payment Structured or Unstructured Address
      description: Either structured or unstructured must be set
      type: object
      properties:
        structured:
          $ref: '#/components/schemas/paymentStructuredAddress'
        unstructured:
          $ref: '#/components/schemas/paymentUnstructuredAddress'
    commonClearingSystemMemberIdentification:
      title: Common Clearing System Member Identification
      type: object
      required:
        - code
        - memberId
      properties:
        code:
          type: string
          maxLength: 5
          example: CHBCC
        memberId:
          type: string
          maxLength: 35
          example: 230
    consentAccountItem:
      title: Consent Account Item
      required:
        - accountId
        - currency
        - iban
        - accountOwner
      type: object
      properties:
        accountId:
          type: string
          example: 13579
        iban:
          maxLength: 34
          pattern: '[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}'
          type: string
          example: CH9300762011623852957
        currency:
          maxLength: 3
          minLength: 3
          type: string
          example: CHF
        accountOwner:
          maxLength: 70
          type: string
          example: Account Owner XYZ
        designation:
          type: string
          example: Savings ABC
        allowedCurrencies:
          type: array
          items:
            type: string
            example: CHF
    healthCheckResponse:
      title: Health Check Response
      type: object
      properties:
        requestDateTime:
          title: Request Time
          type: string
          format: date-time
          example: '2018-04-13T11:11:11Z'
        receivedHeaders:
          title: Received Headers
          type: array
          items:
            type: object
            properties:
              headerName:
                type: string
                example: X-Correlation-ID
              headerValue:
                type: string
                description: As received
        receivedPayload:
          title: Received Payload
          type: string
          example: ... as received ...
    commonErrorResponse:
      title: Common Error Response
      type: object
      properties:
        type:
          $ref: '#/components/schemas/commonErrorType'
        title:
          type: string
          example: This is the general problem description
        detail:
          type: string
          example: >-
            Detailed problem description with respect to the current request,
            e.g., invalid account number format
        instance:
          type: string
          example: path/to/corresponding/resource
    commonErrorType:
      title: Common Error Type
      type: string
      description: >-
        Error Types for commonErrorResponse. See Appendix for detailed
        information.
      example: /problems/TECHNICAL_ERROR
      enum:
        - /problems/INVALID_PAYLOAD
        - /problems/MALFORMED_PAYLOAD
        - /problems/INVALID_TOKEN
        - /problems/EXPIRED_TOKEN
        - /problems/INSUFFICIENT_PRIVILEGES
        - /problems/NO_ACCESS_TO_RESOURCE
        - /problems/RESOURCE_DOES_NOT_EXIST
        - /problems/RESOURCE_NOT_READY
        - /problems/RESOURCE_TOO_LARGE
        - /problems/WRONG_METHOD
        - /problems/OPERATION_NOT_ALLOWED
        - /problems/TECHNICAL_ERROR
        - /problems/NOT_IMPLEMENTED
  parameters:
    path_submissionId:
      name: submissionId
      in: path
      description: ID of payment submission to be retrieved.
      required: true
      schema:
        maxLength: 35
        type: string
        example: submissionId
    targetid_in_header:
      name: X-CorAPI-Target-ID
      in: header
      description: >-
        ID that identifies the provider (e.g., a financial institution). (SCOPE:
        SIX required)
      required: true
      schema:
        type: string
    psu_ip_in_header:
      name: X-PSU-IP-Address
      in: header
      description: >-
        IP address of the user initiating the operation or AUTO for system
        triggered processes (SCOPE: SIX required)
      required: true
      schema:
        type: string
    psu_user_agent_in_header:
      name: X-PSU-User-Agent
      in: header
      description: >-
        User agent of the user initiating the operation or AUTO for system
        triggered processes (SCOPE: SIX required)
      required: true
      schema:
        type: string
    permissionid_in_header:
      name: Permission-ID
      in: header
      description: >-
        This contains the permission Id returned by the post permission, which
        was performed prior to any request.
      required: true
      schema:
        format: uuid,
        type: string
    correlation_in_header:
      name: X-Correlation-ID
      in: header
      description: >-
        Unique ID (defined by the caller) which will be reflected back in the
        response.
      required: true
      schema:
        type: string
        maxLength: 64
    optional_authorization_in_header:
      name: Authorization
      in: header
      description: Bearer followed by a base64 encoded OAuth access token
      required: false
      schema:
        type: string
    agent_in_header:
      name: User-Agent
      in: header
      description: Name and version of the of the Client software
      required: true
      schema:
        type: string
    optional_agent_in_header:
      name: User-Agent
      in: header
      description: Name and version of the of the client software
      required: false
      schema:
        type: string
    optional_targetid_in_header:
      name: X-CorAPI-Target-ID
      in: header
      description: 'ID of the target, e.g., a financial institution. (SCOPE: FI - optional)'
      required: false
      schema:
        type: string
    optional_correlation_in_header:
      name: X-Correlation-ID
      in: header
      description: >-
        Unique ID (defined by the caller) which will be reflected back in the
        response.
      required: false
      schema:
        type: string
        maxLength: 64
    optional_psu_ip_in_header:
      name: X-PSU-IP-Address
      in: header
      description: 'IP address of the user initiating the operation (SCOPE: FI - optional)'
      required: false
      schema:
        type: string
    optional_psu_user_agent_in_header:
      name: X-PSU-User-Agent
      in: header
      description: 'User of the client software (SCOPE: FI - optional)'
      required: false
      schema:
        type: string
    optional_instance_id_in_header:
      name: X-Instance-ID
      in: header
      description: >-
        (Deprecated) Identifies an on-prem application instance which uses a
        legacy on-prem certificate in the mTLS connection. Do not use the header
        otherwise. (SCOPE: SIX_CAAS - optional, SIX_CAAS_INTERNAL - optional).
      required: false
      schema:
        type: string
        maxLength: 64
    optional_permissionid_in_header:
      name: Permission-ID
      in: header
      description: >-
        This contains the permission Id returned by the post permission, which
        was performed prior to any request.
      required: false
      schema:
        format: uuid,
        type: string
  headers:
    Content-Language:
      description: always en
      schema:
        type: string
    Content-Type:
      description: application/problem+json; charset=utf-8 according to RFC7807
      schema:
        type: string
    ExpectedDurationInSeconds:
      description: >-
        Indicates by when Retrieve ISO20022 XML status report (PAIN.002) can be
        called to fetch the related PAIN.002.
      schema:
        type: string
    Location:
      description: >-
        Location (URI-reference) of the submitted message. The relative path
        shall be returned as URI-reference.
      schema:
        type: string
        example: /payments/618d4ac6e8a64e3d9f26aa3d8c4f323e
    X-Correlation-ID:
      description: >-
        Client defined ID from request to correlate HTTP requests between a
        client and a server
      schema:
        type: string
        maxLength: 64
        example: f058ebd6-02f7-4d3f-942e-904344e8cde5
    X-CorAPI-Source:
      description: >
        Indicates whether the response was created by the bLink platform or by
        the provider.
      schema:
        type: string
        enum:
          - PLATFORM
          - PROVIDER
  responses:
    standard400:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: |
        Bad Request - The format of the request was invalid.

        Examples:
        - InvalidPayload:
        type: /problems/INVALID_PAYLOAD
        title: Payload does not comply with API specification
        detail: Malformed JSON
        instance: path/to/corresponding/resource

        - InvalidParameter:
        type: /problems/INVALID_PAYLOAD
        title: Invalid parameter values have been detected
        detail: Sent data could not processed
        instance: path/to/corresponding/resource

        - MissingId:
        type: /problems/INVALID_PAYLOAD
        title: The payload was not valid
        detail: ID is missing
        instance: path/to/corresponding/resource
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard401:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >
        Unauthorized - The request has not been applied because it provides no
        valid authentication credentials for the target resource.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard403:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >
        Forbidden - A valid OAuth Token was received, but access was denied.
        (Depending on the security requirements, providers can return 404
        instead)


        Examples:

        - InsufficientPrivileges:

        type: /problems/INSUFFICIENT_PRIVILEGES

        title: No privileges for the requested operation

        detail: Insufficient privileges for the requested operation

        instance: path/to/corresponding/resource


        - ExpiredToken:

        type: /problems/EXPIRED_TOKEN

        title: The OAuth Token is expired

        detail: The token is no longer valid

        instance: path/to/corresponding/resource
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard404:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >
        Not Found - Either the endpoint does not exist or a requested resource
        is not yet available (e.g., account statements)


        Examples:

        - InvalidAccounts:

        type: /problems/INSUFFICIENT_PRIVILEGES

        title: Insufficient privileges to access resource

        detail: The provided token does not grant access to the requested
        account

        instance: path/to/corresponding/resource


        - InvalidToken:

        type: /problems/INSUFFICIENT_PRIVILEGES

        title: Insufficient privileges to access resource

        detail: The provided token is not valid

        instance: path/to/corresponding/resource


        - WrongEndpointUrl:

        type: /problems/TECHNICAL_ERROR

        title: URL not found

        detail: The requested endpoint does not exist

        instance: path/to/corresponding/resource
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard405:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >
        Method Not Allowed - The method received in the request-line is known by
        the origin server but not supported by the target resource.


        Examples:

        - NotSupportedOperation:

        type: /problems/WRONG_METHOD

        title: This HTTP operation is not allowed on this endpoint

        detail: Only GET operations are allowed

        instance: path/to/corresponding/resource
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard500:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >
        Internal Server Error - The server encountered an unexpected condition
        that prevented it from fulfilling the request.


        Examples:

        - TechnicalServerError:

        type: /problems/TECHNICAL_ERROR

        title: Technical error on server side

        detail: Processing yielded a technical error

        instance: path/to/corresponding/resource


        - ResourceTooLarge:

        type: /problems/RESOURCE_TOO_LARGE

        title: Generated resource was too large

        detail: The generated resource exceeded the size limit

        instance: path/to/corresponding/resource
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard501:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >
        Not Implemented - The server does not support the functionality required
        to fulfill the request.


        Examples:

        - EndpointNotImplemented:

        type: /problems/NOT_IMPLEMENTED

        title: Target endpoint is not implemented

        detail: This endpoint is not implemented

        instance: path/to/corresponding/resource
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard502:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: |
        Bad Gateway - The upstream gateway or proxy issued an invalid response.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard503:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >
        Service Unavailable - The server is currently unable to handle the
        request due to a temporary overload or scheduled maintenance.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard504:
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >
        Gateway Timeout - The upstream gateway or proxy did not provide a
        response in time.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
