openapi: 3.0.1
info:
  title: Bank of England RTGS Raw Payment Messages API
  version: 2.4.0
  description: >-
    The Raw Payment Messages API enables an organisation to retrieve the payment
    information for CHAPS ISO 20022 payment messages submitted to Bank of
    England (pacs.008, pacs.009 (/COV) and pacs.004) to which it is a party. The
    API will allow access to 1 month worth of such data. The API is flexible,
    providing organisations the ability to retrieve only limited information for
    analysing CHAPS activities or to retrieve the full raw MX message for single
    CHAPS message investigation. This API will allow retrieval of settled
    transactions only.
  contact:
    email: APITeam@bankofengland.co.uk
    name: RTGS API team
  license:
    url: https://www.bankofengland.co.uk/payment-and-settlement
    name: >-
      Please refer to the API Annex under the "Requirements for use of RTGS
      accounts" section
servers:
  - url: >-
      https://api-test.swiftnet.sipn.swift.com/boe-rtgs-api-pilot-i1/raw-payment-message-mgmt/np4/v2
    description: NP4 Environment (Non-Prod)
    variables:
      apiPath:
        default: /boe-rtgs-api-pilot-i1/raw-payment-message-mgmt/np4
      taskApiPath:
        default: /boe-rtgs-api-pilot-i1/task-mgmt/np4
  - url: >-
      https://api-test.swiftnet.sipn.swift.com/boe-rtgs-api-pilot-i1/raw-payment-message-mgmt/np5/v2
    description: NP5 Environment (Non-Prod)
    variables:
      apiPath:
        default: /boe-rtgs-api-pilot-i1/raw-payment-message-mgmt/np5
      taskApiPath:
        default: /boe-rtgs-api-pilot-i1/task-mgmt/np5
  - url: >-
      https://api-test.swiftnet.sipn.swift.com/boe-rtgs-api-pilot-i2/raw-payment-message-mgmt/pp2/v2
    description: PP2 Environment (Dress-Rehearsals)
    variables:
      apiPath:
        default: /boe-rtgs-api-pilot-i2/raw-payment-message-mgmt/pp2
      taskApiPath:
        default: /boe-rtgs-api-pilot-i2/task-mgmt/pp2
  - url: >-
      https://api-test.swiftnet.sipn.swift.com/boe-rtgs-api-pilot-i3/raw-payment-message-mgmt/pp2/v2
    description: PP2 Environment (Pre-Prod)
    variables:
      apiPath:
        default: /boe-rtgs-api-pilot-i3/raw-payment-message-mgmt/pp2
      taskApiPath:
        default: /boe-rtgs-api-pilot-i3/task-mgmt/pp2
  - url: >-
      https://api.swiftnet.sipn.swift.com/boe-rtgs-api/raw-payment-message-mgmt/v2
    description: Live Environment (Prod)
    variables:
      apiPath:
        default: /boe-rtgs-api/raw-payment-message-mgmt/v2
      taskApiPath:
        default: /boe-rtgs-api/task-mgmt/v2
paths:
  /rawPaymentMessages:
    get:
      tags:
        - Bulk CHAPS Raw Payment Message
      summary: Bulk CHAPS Raw Payment Message.
      description: >-
        This endpoint retrieves a list of key information of the CHAPS ISO
        payment messages (Settlement Date/Time,Creation Date/Time, UETR,
        Instructing and Instructed Agent IDs, Amount, Currency, Status and Type)
        together with a systemId. It can be used in combination with the Single
        Raw Payment Message endpoint to retrieve the full raw payment message.
        Results will be returned in descending order with the most recent
        payment returned first.


        Limit of items per page by default is 20.


        Note: The samples provided below are illustrative static examples of the
        response payload from these endpoints. These endpoints are not currently
        active and hence do not generate real-time responses. Please refrain
        from using the "Try it out" option at the moment. The taskApiPath is not
        applicable for this endpoint.
      operationId: getPaymentMessageMetaInfo
      parameters:
        - name: instructingAgentId
          in: query
          description: >-
            Code allocated to a financial institution by the ISO 9362
            Registration Authority as described in ISO 9362 "Banking - Banking
            telecommunication messages - Business identifier code (BIC)". Agent
            that instructs the next party in the chain to carry out the (set of)
            instructions(s).

            <ul><li> If the query contain a <strong>BIC8</strong> (8
            characters), the API will treat it as a substring and match all BICs
            that start with those 8 characters</li><li> If the query is a
            <strong>BIC11</strong> (11 characters) then the API will do an
            explicit match <li> Minimum Length <strong>- 8</strong> <li> Maximum
            Length <strong>- 11</strong> <li> When only "instructingAgentId" is
            present, the primary BICs associated with the BIC from the user
            context, are automatically added as "instructedAgentId". <li> When
            both of the "instructingAgentId" and "instructedAgentId" are
            present, the primary BIC associated to the provided BIC from the
            user context must be either in "instructedAgentId" and
            "instructingAgentId" otherwise an error is returned. <li> When
            neither "instructingAgentId" nor "instructingAgentId" are present, a
            query is constructed to return results where the primary BICs
            associated with the BIC from the user context are <em>either</em>
            the instructing or instructed agent. </li></ul>
          required: false
          schema:
            pattern: '[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3}){0,1}$'
            type: string
          example: ZYAZGB50XXX
        - name: instructedAgentId
          in: query
          description: >-
            Code allocated to a financial institution by the ISO 9362
            Registration Authority as described in ISO 9362 "Banking - Banking
            telecommunication messages - Business identifier code (BIC)". Agent
            that is instructed by the previous party in the chain to carry out
            the (set of) instructions(s).

            <ul><li> If the query contain a <strong>BIC8</strong> (8
            characters), the API will treat it as substring and match all BICs
            that start with those 8 characters

            <li>If the query is a <strong>BIC11</strong> (11 characters) then
            the API will do an explicit match

            <li> Minimum Length <strong>- 8</strong>

            <li> Maximum Length <strong>- 11</strong>

            <li> When only "instructedAgentId" is present, the primary BICs
            associated with the BIC from the user context, are automatically
            added as "instructingAgentI".

            <li> When both of the "instructingAgentId" and "instructedAgentId"
            are present, the primary BIC associated to the provided BIC from the
            user context must be either of "instructedAgentId" and
            "instructingAgentId" otherwise an error is returned.

            <li> When neither "instructingAgentId" nor "instructedAgentId" are
            present, a query is constructed to return results where the primary
            BICs associated with the BIC from the user context are
            <em>either</em> the instructing or instructed agent. </li></ul>
          required: false
          schema:
            pattern: '[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3}){0,1}$'
            type: string
          example: YQQYGB30XXX
        - name: settlementDate
          in: query
          description: >-
            Date (ISO 8601 format) on which a transaction is completed and
            cleared, that is, payment is effected.

            <ul><li> A valid date is any date between now and 12 months in the
            past. </li></ul><ul><li> You must specify a "settlementDate".
            </li></ul><ul><li> Date format is YYYY-MM-DD</li></ul>
          required: true
          schema:
            type: string
            format: date
          example: '2020-12-21'
        - name: amount
          in: query
          description: >-
            <strong>Total</strong> amount of money moved between the instructing
            agent (Sender) and the instructed agent (Receiver).

            <ul><li> This parameter <strong>must not</strong> be used in
            conjunction with "amountTo" and "amountFrom". </li></ul><ul><li>
            This parameter may be used in conjunction with "currency", if no
            "currency" is  provided it will be defaulted to
            <strong>GBP</strong>. </li></ul><ul><li> <strong>Minimum >=
            0</li></ul><ul><li> <strong>Maximum <= 1 trillion</li></ul><ul><li>
            <strong>Multiple of 0.0001</li></ul>
          required: false
          schema:
            multipleOf: 0.0001
            maximum: 1000000000000
            minimum: 0
            type: string
          example: 10000
        - name: amountFrom
          in: query
          description: >-
            <strong>Minimum</strong> amount of money moved between the
            instructing agent (Sender) and the instructed agent (Receiver).

            <ul><li> This parameter <strong>must not</strong> be used in
            conjunction with amount. </li></ul><ul><li> This parameter
            <strong>must</strong> be used in conjunction with "amountTo".
            </li></ul><ul><li> This parameter may be used in conjunction with
            "currency", if no "currency" is provided it will be defaulted to
            <strong>GBP. </li></ul><ul><li> <strong>Minimum
            >=0</li></ul><ul><li> <strong>Multiple of 0.0001</li></ul>
          required: false
          schema:
            multipleOf: 0.0001
            minimum: 0
            type: string
          example: 10000
        - name: amountTo
          in: query
          description: >-
            <strong>Maximum</strong> amount of money moved between the
            instructing agent (Sender) and the instructed agent (Receiver).

            <ul><li> This parameter <strong>must not</strong> be used in
            conjunction with amount. </li></ul><ul><li> This parameter
            <strong>must</strong> be used in conjunction with "amountFrom".
            </li></ul><ul><li> This parameter may be used in conjunction with
            "currency", if no "currency"is provided it will be defaulted to
            <strong>GBP</strong>. </li></ul><ul><li> <strong>Maximum <= 1
            trillion</li></ul><ul><li> <strong>Multiple of 0.0001</li></ul>
          required: false
          schema:
            multipleOf: 0.0001
            maximum: 1000000000000
            type: string
          example: 100000
        - name: currency
          in: query
          description: >-
            Medium of exchange of value.

            <ul><li> Currently value is limited to <strong>GBP</strong>.
            </li></ul><ul><li> Must be valid ISO 4217 value. <p> Will return 400
            http status Code, if the "currency" is not valid ISO 4217 value.
            </li></ul><p> Parameter included in specification for forward
            compatibility. <p> Currently and valid value provided in the
            "currency" parameter will be ignored. Payments in GBP will be
            returned.
          required: false
          schema:
            type: string
          example: GBP
        - name: instructionId
          in: query
          description: >-
            Unique identification, as assigned by an instructing party for an
            instructed party, to unambiguously identify the instruction.

            The instruction identification is a point to point reference that
            can be used between the instructing party and the instructed party
            to refer to the individual instruction. It can be included in
            several messages related to the instruction.

            <ul><li> <strong>pacs.008</strong> & <strong>pacs.009:</strong> This
            corresponds to the "Instruction Identification" field in the MX
            message. </li></ul><ul><li> <strong>pacs.004</strong> This
            corresponds to the "Return Id" field in the MX message. </li></ul>
          required: false
          schema:
            pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ ]{1,16}$
            type: string
          example: InsID8b445468595
        - name: uetr
          in: query
          description: >-
            Universally unique identifier to provide an end-to-end reference of
            a payment transaction.

            <ul><li> <strong>pacs.004</strong> doesn't have its own "UETR" and
            only points to original payments messages "UETR". </li></ul>
          required: false
          schema:
            pattern: >-
              ^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$
            type: string
          example: 89650494-15ca-45d5-af58-0f25a265b2a8
        - name: messageDefinitionId
          in: query
          description: >-
            MessageIdentifier that defines the BusinessMessage.

            <ul><li>  Supports only the following available values: </li></ul>


            <ul><li> Error will be thrown if any other values are provided
            </li></ul><p> <em>Available values:</em> RETURN_PAYMENT,
            CUSTOMER_PAYMENT, INTERBANK_PAYMENT, INTERBANK_COV.


            See the table below to understand the mapping between pacs messages
            and the allowable values.

            <table><tr><th>pacs message</th><th>allowable
            value</th></tr><tr><td>pacs.004</td><td>RETURN_PAYMENT</td></tr><tr><td>pacs.008</td><td>CUSTOMER_PAYMENT</td></tr><tr><td>pacs.009(COV)</td><td>INTERBANK_COV</td></tr><tr><td>pacs.009</td><td>INTERBANK_PAYMENT</td></tr></table>
          required: false
          schema:
            pattern: >-
              ^(RETURN_PAYMENT|CUSTOMER_PAYMENT|INTERBANK_PAYMENT|INTERBANK_COV)$
            type: string
          example: INTERBANK_PAYMENT
        - name: businessService
          in: query
          description: >-
            Specifies the business service agreed between the two Messaging
            Endpoints under which rules the Business Message is exchanged. Note:
            This field has been deprecated.
          required: false
          schema:
            type: string
            enum:
              - DEPRECATED
          example: DEPRECATED
        - name: status
          in: query
          description: >-
            Status if Payment Message in RTGS.

            <ul><li> Currently participants will be able to fetch
            <strong>'Settled'</strong> "status" only. </li></ul>Parameter is
            included for forward compatibility. <ul><li> Will return 400 http
            status code, if the "status" is not Settled. </li></ul><p>
            <em>Available values:</em> Settled
          required: false
          schema:
            pattern: ^(Settled)$
            type: string
          example: Settled
        - name: limit
          in: query
          description: Number of items to return in a page.  (Default 20)
          required: false
          schema:
            maximum: 500
            minimum: 1
            type: integer
            format: int32
        - name: before
          in: query
          description: Cursor of item to return records after
          required: false
          schema:
            type: string
        - name: after
          in: query
          description: Cursor of item to return records before
          required: false
          schema:
            type: string
        - name: x-subject
          in: header
          description: >-
            The header of the API request provides Security Certificate Details
            (SSL) of the participants.


            The participants need not to send this value.
          required: false
          schema:
            type: string
          example: cn=tom,o=zyazgb50,o=swift
        - name: Accept-Encoding
          in: header
          description: >-
            The Accept-Encoding request HTTP header advertises which content
            encoding, usually a compression algorithm, the participant is able
            to understand. Using content negotiation, the BoE selects one of the
            proposals, uses it and informs the participants of its choice with
            the Content-Encoding response header.


            Multiple algorithms, weighted with the quality value syntax-
            <strong>"Accept-Encoding:gzip;q=1.0,*;q=0"</strong>
          required: false
          schema:
            type: string
          example: gzip;q=1.0,*;q=0
        - name: x-userContext
          in: header
          description: >-
            User context is in base64 format. It will include the institution
            BIC. Participants do not need to send this value. This will be
            populated at Network Level.
          required: false
          schema:
            type: string
            format: byte
          example: >-
            eyJhbGciOiJSUzI1NiIsImtpZCI6ImN1cmwgLXYgbGRhcDovL0RJUkwwMS5zd2lmdG5ldC5zaXBuLnN3aWZ0LmNvbTozODkvY249dHNzY2hhbm5lbCxvPXN3bGliZWIzLG89c3dpZnQ/dXNlckNlcnRpZmljYXRlIiwidHlwIjoiSldUIn0=
        - name: x-journeyId
          in: header
          description: >-
            Used to uniquely identify end to end journey of the API request. If
            header is provided in the request, then the same will be replayed in
            response headers. This will be populated at Network Level.
          required: false
          schema:
            maxLength: 64
            minLength: 64
            type: string
          example: 721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        - name: X-Forwarded-Host
          in: header
          description: >-
            Identifies the original host and port requested by the client in the
            Host HTTP request header. If no port is included, the default port
            for the service requested is implied. This will be populated at
            Network Level.
          required: false
          schema:
            pattern: ^[-a-zA-Z0-9@:%._+~#]{2,256}(:[0-9]{2,4})*$
            type: string
          example: example.com:8080
        - name: X-Forwarded-Path
          in: header
          description: >-
            Identifies the original URL path requested by the client, including
            any query string. This will be populated at Network Level.
          required: false
          schema:
            type: string
          example: /boe-rtgs-api/resource-mgmt/v1/resources?parentName=eq%3Aparent
      responses:
        '200':
          description: OK
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
            Cache-Control:
              description: >-
                Holds directives (instructions) for caching in responses. No
                caching done from API gateway side.
              style: simple
              schema:
                type: string
                example: no-cache, no-store, no-transform
            Content-Encoding:
              description: >-
                Optional header provided if Accepted- string Encoding is present
                in the request.
              style: simple
              schema:
                type: string
                example: gzip
            Content-Language:
              description: >-
                Describes the language(s) intended for the audience. Allowed
                values: "en-GB".
              style: simple
              schema:
                type: string
                example: en-GB
          content:
            application/json;charset=utf-8:
              schema:
                $ref: >-
                  #/components/schemas/RawPaymentMessagesSingleResponseListRawPaymentMessages_OperatorListEndpoints
        '400':
          description: Bad request
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
            Cache-Control:
              description: >-
                Holds directives (instructions) for caching in responses. No
                caching done from API gateway side.
              style: simple
              schema:
                type: string
                example: no-cache, no-store, no-transform
            Content-Language:
              description: >-
                Describes the language(s) intended for the audience. Allowed
                values: "en-GB".
              style: simple
              schema:
                type: string
                example: en-GB
          content:
            application/json;charset=utf-8:
              schema:
                $ref: >-
                  #/components/schemas/APIErrorResponseWrapperDTO_OperatorListEndpoints
              example:
                error:
                  status: '400'
                  id: a1aa1111-1a11-1111-11a1-1aa1aa111a13
                  detail: Invalid Request parameter
                  errors:
                    - errorCode: EAPIGTW2002
                      detail: 'Invalid id '
                      path: Data.Initiation.Payment.Currency
                      uri: /v2/rawPaymentMessages?settlementDate%3D2021-06-11
        '401':
          description: Unauthorized
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '403':
          description: Forbidden
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '404':
          description: Record not found
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
            Cache-Control:
              description: >-
                Holds directives (instructions) for caching in responses. No
                caching done from API gateway side.
              style: simple
              schema:
                type: string
                example: no-cache, no-store, no-transform
            Content-Language:
              description: >-
                Describes the language(s) intended for the audience. Allowed
                values: "en-GB".
              style: simple
              schema:
                type: string
                example: en-GB
          content:
            application/json;charset=utf-8:
              schema:
                $ref: >-
                  #/components/schemas/APIErrorResponseWrapperDTO_OperatorListEndpoints
              example:
                error:
                  status: '404'
                  id: a1aa1111-1a11-1111-11a1-1aa1aa111a15
                  detail: Record not found
                  errors:
                    - errorCode: EAPIGTW2017
                      detail: 'Record does not exist for given ID : 88'
        '405':
          description: Method not allowed
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '406':
          description: Not acceptable
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '429':
          description: Too many request
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '500':
          description: Internal server error
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
      path: /rawPaymentMessages
      method: GET
  /rawPaymentMessages/{systemId}:
    get:
      tags:
        - Single CHAPS Raw Payment Message
      summary: Single CHAPS Raw Payment Message.
      description: >-
        Given a systemId (as obtained by the rawPaymentMessages endpoint) this
        endpoint retrieves the base64 encoded raw MX message along with its key
        information (Settlement Date/Time, Creation Date/Time, UETR, Instructing
        and Instructed Agent IDs, Amount, Currency, Status and Type)


        Note: The samples provided below are illustrative static examples of the
        response payload from these endpoints. These endpoints are not currently
        active and hence do not generate real-time responses. Please refrain
        from using the "Try it out" option at the moment.  The taskApiPath is
        not applicable for this endpoint.
      operationId: getPaymentMessage
      parameters:
        - name: x-subject
          in: header
          description: >-
            The header of the API request provides Security Certificate Details
            (SSL) of the participants.


            The participants need not to send this value.
          required: false
          schema:
            pattern: ^[A-Za-z0-9-\s]{1,64}$
            type: string
          example: cn=tom,o=zyazgb50,o=swift
        - name: Accept-Encoding
          in: header
          description: >-
            The Accept-Encoding request HTTP header advertises which content
            encoding, usually a compression algorithm, the participant is able
            to understand. Using content negotiation, the BoE selects one of the
            proposals, uses it and informs the participants of its choice with
            the Content-Encoding response header.


            Multiple algorithms, weighted with the quality value syntax-
            <strong>"Accept-Encoding:gzip;q=1.0,*;q=0"</strong>
          required: false
          schema:
            type: string
          example: gzip;q=1.0,*;q=0
        - name: systemId
          in: path
          description: 'The unique identifier of a single payment message. '
          required: true
          schema:
            pattern: ^[A-Za-z0-9-\s]{1,64}$
            type: string
          example: 210125083047210721AAMDQAAAAAAA866854844.
        - name: x-userContext
          in: header
          description: >-
            User context is in base64 format. It will include the institution
            BIC. Participants do not need to send this value. This will be
            populated at Network Level.
          required: false
          schema:
            type: string
            format: byte
          example: >-
            eyJhbGciOiJSUzI1NiIsImtpZCI6ImN1cmwgLXYgbGRhcDovL0RJUkwwMS5zd2lmdG5ldC5zaXBuLnN3aWZ0LmNvbTozODkvY249dHNzY2hhbm5lbCxvPXN3bGliZWIzLG89c3dpZnQ/dXNlckNlcnRpZmljYXRlIiwidHlwIjoiSldUIn0=
        - name: x-journeyId
          in: header
          description: >-
            Used to uniquely identify end to end journey of the API request. If
            header is provided in the request, then the same will be replayed in
            response headers. This will be populated at Network Level.
          required: false
          schema:
            maxLength: 64
            minLength: 64
            type: string
          example: 721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        - name: X-Forwarded-Host
          in: header
          description: >-
            Identifies the original host and port requested by the client in the
            Host HTTP request header. If no port is included, the default port
            for the service requested is implied. This will be populated at
            Network Level.
          required: false
          schema:
            pattern: ^[-a-zA-Z0-9@:%._+~#]{2,256}(:[0-9]{2,4})*$
            type: string
          example: example.com:8080
        - name: X-Forwarded-Path
          in: header
          description: >-
            Identifies the original URL path requested by the client, including
            any query string. This will be populated at Network Level.
          required: false
          schema:
            type: string
          example: /boe-rtgs-api/resource-mgmt/v1/resources?parentName=eq%3Aparent
      responses:
        '200':
          description: OK
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
            Cache-Control:
              description: >-
                Holds directives (instructions) for caching in responses. No
                caching done from API gateway side.
              style: simple
              schema:
                type: string
                example: no-cache, no-store, no-transform
            Content-Encoding:
              description: >-
                Optional header provided if Accepted- string Encoding is present
                in the request.
              style: simple
              schema:
                type: string
                example: gzip
            Content-Language:
              description: >-
                Describes the language(s) intended for the audience. Allowed
                values: "en-GB".
              style: simple
              schema:
                type: string
                example: en-GB
          content:
            application/json;charset=utf-8:
              schema:
                $ref: >-
                  #/components/schemas/RawPaymentMessagesSingleSingleResponseRawPaymentMessages_OperatorSingleEndpoints
        '400':
          description: Bad request
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
            Cache-Control:
              description: >-
                Holds directives (instructions) for caching in responses. No
                caching done from API gateway side.
              style: simple
              schema:
                type: string
                example: no-cache, no-store, no-transform
            Content-Language:
              description: >-
                Describes the language(s) intended for the audience. Allowed
                values: "en-GB".
              style: simple
              schema:
                type: string
                example: en-GB
          content:
            application/json;charset=utf-8:
              schema:
                $ref: >-
                  #/components/schemas/APIErrorResponseWrapperDTO_OperatorSingleEndpoints
              example:
                error:
                  status: '400'
                  id: a1aa1111-1a11-1111-11a1-1aa1aa111a13
                  detail: Invalid Request parameter
                  errors:
                    - errorCode: EAPIGTW2002
                      detail: 'Invalid id '
                      path: Data.Initiation.Payment.Currency
                      uri: /v2/rawPaymentMessages?settlementDate%3D2021-06-11
        '401':
          description: Unauthorized
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '403':
          description: Forbidden
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '404':
          description: Record not found
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
            Cache-Control:
              description: >-
                Holds directives (instructions) for caching in responses. No
                caching done from API gateway side.
              style: simple
              schema:
                type: string
                example: no-cache, no-store, no-transform
            Content-Language:
              description: >-
                Describes the language(s) intended for the audience. Allowed
                values: "en-GB".
              style: simple
              schema:
                type: string
                example: en-GB
          content:
            application/json;charset=utf-8:
              schema:
                $ref: >-
                  #/components/schemas/APIErrorResponseWrapperDTO_OperatorSingleEndpoints
              example:
                error:
                  status: '404'
                  id: a1aa1111-1a11-1111-11a1-1aa1aa111a15
                  detail: Record not found
                  errors:
                    - errorCode: EAPIGTW2017
                      detail: 'Record does not exist for given ID : 88'
        '405':
          description: Method not allowed
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '406':
          description: Not acceptable
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '429':
          description: Too many request
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
        '500':
          description: Internal server error
          headers:
            x-journeyId:
              description: Used to identify end to end journey of the API request.
              style: simple
              schema:
                type: string
                example: >-
                  721C04F0B91A53908E4233D56E07E35D7C62AE63B881DD50B24FF19315CB4F92
      path: /rawPaymentMessages/{systemId}
      method: GET
components:
  schemas:
    CursorPaginatedListResponseSchemaWithReqParamsRawPaymentMessagesRequestParametersRawPaymentMessages_OperatorListEndpoints:
      title: CursorPaginatedListResponseSchemaWithReqParams
      type: object
      properties:
        requestParameters:
          type: array
          items:
            $ref: >-
              #/components/schemas/RawPaymentMessagesRequestParameters_OperatorListEndpoints
        results:
          type: array
          items:
            $ref: '#/components/schemas/RawPaymentMessages_OperatorListEndpoints'
    CursorResponseLinksSchemaRawPaymentMessages_OperatorListEndpoints:
      title: Links
      required:
        - first
        - self
      type: object
      properties:
        self:
          type: string
          description: A URL to reproduce the current request.
          example: '{apiPath}/v2/resource?after={value}'
        first:
          type: string
          description: A URL to retrieve the first page of resources.
          example: '{apiPath}/v2/resource'
    RawPaymentMessagesRequestParameters_OperatorListEndpoints:
      title: ReqParameters
      required:
        - name
        - value
      type: object
      properties:
        name:
          type: string
          description: 'Parameter name used in API request by participants. '
          example: instructedAgentId
        value:
          type: string
          description: 'Parameter value provided in API request by participants. '
          example: 'YQQYGB30XXX. '
    RawPaymentMessagesSingleResponseListRawPaymentMessages_OperatorListEndpoints:
      title: RawPaymentMessagesResponseList
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/CursorPaginatedListResponseSchemaWithReqParamsRawPaymentMessagesRequestParametersRawPaymentMessages_OperatorListEndpoints
        links:
          $ref: >-
            #/components/schemas/CursorResponseLinksSchemaRawPaymentMessages_OperatorListEndpoints
    RawPaymentMessages_OperatorListEndpoints:
      title: RawPaymentMessages
      required:
        - amount
        - businessService
        - creationDate
        - creationTime
        - currency
        - href
        - instructedAgentId
        - instructingAgentId
        - instructionId
        - messageDefinitionId
        - settlementDate
        - settlementTime
        - status
        - systemId
        - type
        - uetr
      type: object
      properties:
        systemId:
          pattern: ^[A-Za-z0-9-\s]{1,64}$
          type: string
          description: 'The unique identifier of a single payment message. '
          example: 65cb18a4ac8a76c1fae5360f206db6ed22fee016d2ccaba8c7b6b8272b91ebf1
        instructingAgentId:
          pattern: '[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3}){0,1}$'
          type: string
          description: >-
            Code allocated to a financial institution by the ISO 9362
            Registration Authority as described in ISO 9362 'Banking - Banking
            telecommunication messages - Business identifier code (BIC)'.
          example: ZYAZGB50XXX
        instructedAgentId:
          pattern: '[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3}){0,1}$'
          type: string
          description: >-
            Code allocated to a financial institution by the ISO 9362
            Registration Authority as described in ISO 9362 'Banking - Banking
            telecommunication messages - Business identifier code (BIC)'.
          example: YQQYGB30XXX
        settlementDate:
          type: string
          description: >-
            Date at which a transaction is completed and cleared, that is,
            payment is effected.
          format: date
          example: '2021-01-01'
        settlementTime:
          type: string
          description: >-
            Time at which a transaction is completed and cleared, that is,
            payment is effected.
          example: 16:50:27Z
        creationDate:
          type: string
          description: 'Date on which the message was created. '
          format: date
          example: '2021-01-01'
        creationTime:
          type: string
          description: 'Time at which the message was created. '
          example: 16:50:00Z
        amount:
          multipleOf: 0.0001
          maximum: 1000000000000
          minimum: 1
          type: number
          description: >-
            Total amount of money moved between the instructing agent (Sender)
            and the instructed agent (Receiver) .
          example: 13.99
        currency:
          pattern: ^[A-Z]{3}$
          type: string
          description: 'Medium of exchange of value. '
          example: GBP
        instructionId:
          pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ ]{1,16}$
          type: string
          description: >-
            Unique identification, as assigned by an instructing party for an
            instructed party, to unambiguously identify the instruction.
          example: InsID8b445468595
        messageDefinitionId:
          type: string
          description: >-
            MessageIdentifier that defines the BusinessMessage. See the table
            below to understand the mapping between pacs messages and the
            allowable values.

            <table><tr><th>pacs message</th><th>allowable
            value</th></tr><tr><td>pacs.004</td><td>RETURN_PAYMENT</td></tr><tr><td>pacs.008</td><td>CUSTOMER_PAYMENT</td></tr><tr><td>pacs.009(COV)</td><td>INTERBANK_COV</td></tr><tr><td>pacs.009</td><td>INTERBANK_PAYMENT</td></tr></table>
          example: INTERBANK_PAYMENT
          enum:
            - RETURN_PAYMENT
            - CUSTOMER_PAYMENT
            - INTERBANK_PAYMENT
            - INTERBANK_COV
        businessService:
          type: string
          description: >-
            Specifies the business service agreed between the two Messaging
            Endpoints under which rules this Business Message is exchanged.
            Note: This field has been deprecated.
          example: DEPRECATED
          enum:
            - DEPRECATED
        uetr:
          maximum: 36
          minimum: 36
          pattern: >-
            ^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$
          type: string
          description: >-
            Universally unique identifier to provide an end-to-end reference of
            a payment transaction.
          format: uuid
          example: 89650494-15ca-45d5-af58-0f25a265b2a8
        status:
          type: string
          description: >-
            Status of Payment Message in RTGS. Will return 400, if the status is
            not settled.
          example: Settled
          enum:
            - Settled
        type:
          type: string
          description: 'The type of object returned by the API. '
          example: rawPaymentMessages
          enum:
            - rawPaymentMessages
            - rawPaymentMessage
        href:
          type: string
          description: 'The relative URL component providing link to the result object. '
          format: uri
          example: /v2/rawPaymentMessages/swi54321-2020-11-03T10%3A52%3A43.3177.003313Z
    APIErrorResponseDTO_OperatorListEndpoints:
      title: APIErrorResponse
      required:
        - detail
        - errors
        - id
        - status
      type: object
      properties:
        status:
          pattern: ^\d{3}$
          type: string
          description: >-
            Standard HTTP Status code defined in <a
            href=https://datatracker.ietf.org/doc/html/rfc7231>RFC 7231</a>
        id:
          maxLength: 36
          minLength: 36
          type: string
          description: >-
            A unique reference (GUID) for the error instance, for audit purposes
            and traceability.
          format: uuid
          example: fb06dbc9-da8d-4927-b0f8-0eec823aaaa7
        detail:
          type: string
          description: Brief error message explaining the error
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorsFragment_OperatorListEndpoints'
    APIErrorResponseWrapperDTO_OperatorListEndpoints:
      title: APIErrorResponseWrapper
      type: object
      properties:
        error:
          $ref: '#/components/schemas/APIErrorResponseDTO_OperatorListEndpoints'
    ErrorsFragment_OperatorListEndpoints:
      title: ErrorInfo
      required:
        - detail
        - errorCode
      type: object
      properties:
        errorCode:
          maxLength: 11
          minLength: 11
          pattern: E[A-Z0-9]{6}[0-9]{4}
          type: string
          description: |-
            Custom Error Code consists of the following
             <ul><li>1 char type specifier - 'E' for error codes</li><li>6 character base pattern - A concatenation of 'APIGTW'</li><li>4 digit sequence number - 1000<=x<2000 for system errors, 2000<=x<3000 for business errors, 3000<=x<4000 for technical errors</li></ul>
          example: EAPIGTW2039
        detail:
          type: string
          description: Description of the error detail with further granularity
        uri:
          type: string
          description: >-
            URL to help remediate the problem, or provide more information, or
            to API Reference or help etc.
          format: uri
    RawPaymentMessageContent_OperatorSingleEndpoints:
      title: RawPaymentMessageContent
      type: object
      properties:
        encoding:
          type: string
          description: 'The encoding format of the MX payload against a specific id. '
          nullable: true
          example: base64
          enum:
            - base64
        content:
          type: string
          description: 'The MX payload against a specific id. '
          nullable: true
          example: >-
            eyJzYW1BY2NvdW50TmFtZSI6IjMzNTQyMiIsImdpdmVuTmFtZSI6IkpvZSIsImZhbWlseU5hbWUiOiJiboiuytrewsdzetrytuilkoiuytredasdfgtyuikmsxcvkgfgdfvcmiolkjhnbvaszxcvbnG9nZ3MiLCAidXNlclR5cGUiOiJpbnRlcm5hbCIsI9iuy5tr4edfg8iukjhgrfdesazdfghmVkbVBhcnR5SWQiOiI0NDQ0NDQ0NDQ0IiwgImdyb3VwTGV2ZWxBY2Nlc3MiOiJmYWxzZSIsICJjaGFubmVsIjoic3ZjT3BlcmF0b3JVSSIsICJlbnRpdGxlbWVudHMiOlsiZ2dfYXBpX0JDSV9wcmRfYWxsX3BhcnJJUOLIUYTREWAES78678PIKLpoiuytredscdfcxzs567dsdtythjIU7rdsw546567uipooiuytrewsadzxsdxcvbnbjuioplkiuytrewlkmo98u76RpY2lwYW50cyJdLCAidGVhbSI6IkJPRV9PTkxZX1BTQ19UZWFtX01lbWJlcnMifQo==
    RawPaymentMessagesRequestParameters_OperatorSingleEndpoints:
      title: ReqParameters
      required:
        - name
        - value
      type: object
      properties:
        name:
          type: string
          description: 'Parameter name used in API request by participants. '
          example: instructedAgentId
        value:
          type: string
          description: 'Parameter value provided in API request by participants. '
          example: 'YQQYGB30XXX. '
    RawPaymentMessagesSingleSingleResponseRawPaymentMessages_OperatorSingleEndpoints:
      title: RawPaymentMessagesSingleResponse
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/SingleResponseSchemaWithReqParamsRawPaymentMessagesRequestParametersRawPaymentMessages_OperatorSingleEndpoints
        links:
          $ref: >-
            #/components/schemas/SingleResponseLinksSchema_OperatorSingleEndpoints
    RawPaymentMessages_OperatorSingleEndpoints:
      title: RawPaymentMessages
      required:
        - amount
        - businessService
        - creationDate
        - creationTime
        - currency
        - href
        - instructedAgentId
        - instructingAgentId
        - instructionId
        - message
        - messageDefinitionId
        - settlementDate
        - settlementTime
        - status
        - systemId
        - type
        - uetr
      type: object
      properties:
        systemId:
          pattern: ^[A-Za-z0-9-\s]{1,64}$
          type: string
          description: 'The unique identifier of a single payment message. '
          example: 65cb18a4ac8a76c1fae5360f206db6ed22fee016d2ccaba8c7b6b8272b91ebf1
        instructingAgentId:
          pattern: '[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3}){0,1}$'
          type: string
          description: >-
            Code allocated to a financial institution by the ISO 9362
            Registration Authority as described in ISO 9362 'Banking - Banking
            telecommunication messages - Business identifier code (BIC)'.
          example: ZYAZGB50XXX
        instructedAgentId:
          pattern: '[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3}){0,1}$'
          type: string
          description: >-
            Code allocated to a financial institution by the ISO 9362
            Registration Authority as described in ISO 9362 'Banking - Banking
            telecommunication messages - Business identifier code (BIC)'.
          example: YQQYGB30XXX
        settlementDate:
          type: string
          description: >-
            Date at which a transaction is completed and cleared, that is,
            payment is effected.
          format: date
          example: '2021-01-01'
        settlementTime:
          type: string
          description: >-
            Time at which a transaction is completed and cleared, that is,
            payment is effected.
          example: 16:50:27Z
        creationDate:
          type: string
          description: 'Date on which the message was created. '
          format: date
          example: '2021-01-01'
        creationTime:
          type: string
          description: 'Time at which the message was created. '
          example: 16:50:00Z
        amount:
          multipleOf: 0.0001
          maximum: 1000000000000
          minimum: 1
          type: number
          description: >-
            Total amount of money moved between the instructing agent (Sender)
            and the instructed agent (Receiver) .
          example: 13.99
        currency:
          pattern: ^[A-Z]{3}$
          type: string
          description: 'Medium of exchange of value. '
          example: GBP
        instructionId:
          pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ ]{1,16}$
          type: string
          description: >-
            Unique identification, as assigned by an instructing party for an
            instructed party, to unambiguously identify the instruction.
          example: InsID8b445468595
        messageDefinitionId:
          type: string
          description: >-
            MessageIdentifier that defines the BusinessMessage. See the table
            below to understand the mapping between pacs messages and the
            allowable values.

            <table><tr><th>pacs message</th><th>allowable
            value</th></tr><tr><td>pacs.004</td><td>RETURN_PAYMENT</td></tr><tr><td>pacs.008</td><td>CUSTOMER_PAYMENT</td></tr><tr><td>pacs.009(COV)</td><td>INTERBANK_COV</td></tr><tr><td>pacs.009</td><td>INTERBANK_PAYMENT</td></tr></table>
          example: INTERBANK_PAYMENT
          enum:
            - RETURN_PAYMENT
            - CUSTOMER_PAYMENT
            - INTERBANK_PAYMENT
            - INTERBANK_COV
        businessService:
          type: string
          description: >-
            Specifies the business service agreed between the two Messaging
            Endpoints under which rules this Business Message is exchanged.
            Note: This field has been deprecated.
          example: DEPRECATED
          enum:
            - DEPRECATED
        uetr:
          maximum: 36
          minimum: 36
          pattern: >-
            ^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$
          type: string
          description: >-
            Universally unique identifier to provide an end-to-end reference of
            a payment transaction.
          format: uuid
          example: 89650494-15ca-45d5-af58-0f25a265b2a8
        status:
          type: string
          description: >-
            Status of Payment Message in RTGS. Will return 400, if the status is
            not settled.
          example: Settled
          enum:
            - Settled
        type:
          type: string
          description: 'The type of object returned by the API. '
          example: rawPaymentMessages
          enum:
            - rawPaymentMessages
            - rawPaymentMessage
        href:
          type: string
          description: 'The relative URL component providing link to the result object. '
          format: uri
          example: /v2/rawPaymentMessages/swi54321-2020-11-03T10%3A52%3A43.3177.003313Z
        message:
          $ref: >-
            #/components/schemas/RawPaymentMessageContent_OperatorSingleEndpoints
    SingleResponseLinksSchema_OperatorSingleEndpoints:
      title: Links
      required:
        - self
      type: object
      properties:
        self:
          type: string
          description: A URL to reproduce the current request.
          example: '{apiPath}/v1/resource/1f740fe7-c251-4d82-8abd-11953d76f594'
        taskUrl:
          type: string
          description: A URL to retrieve task information associated to a resource.
          example: '{taskApiPath}/v1/tasks/0e740fe7-c251-4d82-8abd-11953d76f593'
    SingleResponseSchemaWithReqParamsRawPaymentMessagesRequestParametersRawPaymentMessages_OperatorSingleEndpoints:
      title: SingleResponse
      type: object
      properties:
        requestParameters:
          type: array
          items:
            $ref: >-
              #/components/schemas/RawPaymentMessagesRequestParameters_OperatorSingleEndpoints
        results:
          type: array
          items:
            $ref: '#/components/schemas/RawPaymentMessages_OperatorSingleEndpoints'
    APIErrorResponseDTO_OperatorSingleEndpoints:
      title: APIErrorResponse
      required:
        - detail
        - errors
        - id
        - status
      type: object
      properties:
        status:
          pattern: ^\d{3}$
          type: string
          description: >-
            Standard HTTP Status code defined in <a
            href=https://datatracker.ietf.org/doc/html/rfc7231>RFC 7231</a>
        id:
          maxLength: 36
          minLength: 36
          type: string
          description: >-
            A unique reference (GUID) for the error instance, for audit purposes
            and traceability.
          format: uuid
          example: fb06dbc9-da8d-4927-b0f8-0eec823aaaa7
        detail:
          type: string
          description: Brief error message explaining the error
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorsFragment_OperatorSingleEndpoints'
    APIErrorResponseWrapperDTO_OperatorSingleEndpoints:
      title: APIErrorResponseWrapper
      type: object
      properties:
        error:
          $ref: '#/components/schemas/APIErrorResponseDTO_OperatorSingleEndpoints'
    ErrorsFragment_OperatorSingleEndpoints:
      title: ErrorInfo
      required:
        - detail
        - errorCode
      type: object
      properties:
        errorCode:
          maxLength: 11
          minLength: 11
          pattern: E[A-Z0-9]{6}[0-9]{4}
          type: string
          description: |-
            Custom Error Code consists of the following
             <ul><li>1 char type specifier - 'E' for error codes</li><li>6 character base pattern - A concatenation of 'APIGTW'</li><li>4 digit sequence number - 1000<=x<2000 for system errors, 2000<=x<3000 for business errors, 3000<=x<4000 for technical errors</li></ul>
          example: EAPIGTW2039
        detail:
          type: string
          description: Description of the error detail with further granularity
        uri:
          type: string
          description: >-
            URL to help remediate the problem, or provide more information, or
            to API Reference or help etc.
          format: uri
  securitySchemes:
    oauthBearerToken:
      type: http
      scheme: bearer
      bearerFormat: opaque OAuth 2.0
      description: >-

        The access token obtained as a result of OAuth 2.0 flows. SWIFT supports
        two OAuth grant types depending on the API service.

        * JWT-Bearer grant type [RFC 7523](https://tools.ietf.org/html/rfc7523)

        * Password grant type


        This API uses JWT-Bearer grant type.


        Please visit [SWIFT OAuth Token
        API](https://developer.swift.com/swift-oauth-token-api) page for more
        information and examples on how to generate an OAuth token.

        In this declaration only the basic security element to transport the
        bearer token of an OAuth2 process is declared.securitySchemes:
security:
  - oauthBearerToken: [ ]
