openapi: 3.0.4
info:
  title: Network Interoperability Payment Status Request
  description: This API enables Payment Market Infrastructures (PMIs) and Financial Institutions (FIs) including Payment Service Providers (PSPs) to provide On-Behalf (OBO) updates for outbound and inbound receive scenarios ensuring the Swift network and other networks remain interoperable for end-to-end payment tracking.
  
    **v6.0.0-swift-api Release Notes**
    * Initial version
  contact:
    name: Developer Hub
    url: https://developer.swift.com
    email: developer-support@swift.com
  license:
    name: API Restricted License
    url: https://developer.swift.com/api-license
  version: 6.0.0
servers:
  # Added by API Auto Mocking Plugin
  - description: Test environment
    url: https://api-test.swiftnet.sipn.swift.com/swift-apitracker-ni-cct/v6
  - description: Production environment
    url: https://api.swiftnet.sipn.swift.com/swift-apitracker-ni-cct/v6
  - description: Sandbox environment
    url: https://sandbox.swift.com/swift-apitracker-ni-cct/v6

tags: 
  - name: NetworkInteroperabilityStatus
    description: Operation for managing on behalf payment status in the context of Network Interoperability
paths:
  /payments/{uetr}/status:
    put:
      tags: 
        - NetworkInteroperabilityStatus
      summary: Network Interoperability Status Request
      description: This API is a payment status request used by Payment Market Infrastructures (PMIs) and Financial Institutions (FIs) including Payment Service Providers (PSPs) to provide on-behalf updates to the tracker. 
      operationId: onBehalfPaymentStatusRequest
      parameters:
      - name: uetr
        in: path
        description: 'Identifies the payment transaction resource, events linked to this uetr will be retrieved'
        schema:
          $ref: '#/components/schemas/UUIDv4Identifier'
        required: true
        example: 97ed4827-7b6f-4491-a06f-b548d5a7512d
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentStatusRequest1'
            examples:
                PMIACCCOBO1Intermediary_no_FX:
                  $ref: '#/components/examples/PMIACCCOBO1Intermediary_no_FX'
                PMIACCCOBO1noFX:
                  $ref: '#/components/examples/PMIACCCOBO1noFX'     
                PMIACCCOBO2noFX:
                  $ref: '#/components/examples/PMIACCCOBO2noFX'     
                PMIACSPG007Intermediary_no_FX:
                  $ref: '#/components/examples/PMIACSPG007Intermediary_no_FX'  
                PMIACSPG007noFX:
                  $ref: '#/components/examples/PMIACSPG007noFX'     
                PMIACSPG008IntermediaryandFX:
                  $ref: '#/components/examples/PMIACSPG008IntermediaryandFX'     
                PMIACSPG008noFX:
                  $ref: '#/components/examples/PMIACSPG008noFX'    
                PMIRJCT:
                  $ref: '#/components/examples/PMIRJCT'       
                FIACCCOBO1IntermediarynoFX:
                  $ref: '#/components/examples/FIACCCOBO1IntermediarynoFX'  
                FIACCCOBO1noFX:
                  $ref: '#/components/examples/FIACCCOBO1noFX'  
                FIACCCOBO1withFX:
                  $ref: '#/components/examples/FIACCCOBO1withFX'    
                FIACCCOBO2IntermediarynoFX:
                  $ref: '#/components/examples/FIACCCOBO2IntermediarynoFX'     
                FIACCCOBO2noFX:
                  $ref: '#/components/examples/FIACCCOBO2noFX'    
                FIRJCT:
                  $ref: '#/components/examples/FIRJCT'                      
      responses:
         
        '204':
          description: No Content
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        '400':
          $ref: '#/components/responses/400-BadRequest'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        '401':
          $ref: '#/components/responses/401-Unauthorized'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        '404':
          $ref: '#/components/responses/404-NotFound'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        '413':
          $ref: '#/components/responses/413-PayloadTooLarge'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        '429':
          $ref: '#/components/responses/429-TooManyRequests'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        '500':
          $ref: '#/components/responses/500-InternalServerError'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        '503':
          $ref: '#/components/responses/503-ServerUnavailable'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        '504':
          $ref: '#/components/responses/504-GatewayTimeout'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
        default:
          $ref: '#/components/responses/500-InternalServerError'
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"             
components:
  schemas:
    ErrorMessage:
      type: object
      required: 
        - code
        - severity
        - text
      properties:
        severity:
          type: string
          enum:
             - Fatal
             - Transient
             - Logic
        code:
          type: string
        text:
          type: string
        user_message:
          type: string
        more_info:
          type: string
          format: uri
    Charges17:
      x-MXComponent: Charges17
      type: object
      description: Provides information on the charges related to the payment transaction.
      additionalProperties: false
      properties:
        amount:
          x-MXComponent: ActiveCurrencyAndAmount
          description: |
            Transaction charges to be paid by the charge bearer.

            Based on datatype ActiveCurrencyAndAmount: A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.
          type: object
          additionalProperties: false
          properties:
            currency:
              x-MXComponent: ActiveCurrencyCode
              type: string
              pattern: ^[A-Z]{3,3}$
            amount:
              type: string
              maxLength: 19
              pattern: ^0*(([0-9]{0,13}\.[0-9]{1,5})|([0-9]{0,14}\.[0-9]{1,4})|([0-9]{0,15}\.[0-9]{1,3})|([0-9]{0,16}\.[0-9]{1,2})|([0-9]{0,17}\.[0-9]{1,1})|([0-9]{0,18}\.)|0*|([0-9]{0,18}))$
          required:
          - currency
          - amount
        agent:
          x-MXComponent: BICFIDec2014Identifier
          description: |
            Agent that takes the transaction charges or to which the transaction charges are due.

            Based on datatype BICFIDec2014Identifier: Code allocated to a financial institution by the ISO 9362 Registration Authority as described in ISO 9362: 2014 - "Banking - Banking telecommunication messages - Business identifier code (BIC)".
          type: string
          pattern: ^[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}$
      required:
      - amount
      - agent
    ClearingSystemMemberIdentification4:
      x-MXComponent: ClearingSystemMemberIdentification4
      type: object
      description: Unique identification, as assigned by a clearing system, to unambiguously identify a member of the clearing system.
      additionalProperties: false
      properties:
        clearing_system_identification:
          x-MXComponent: ExternalClearingSystemIdentification1Code
          description: |
            Specification of a pre-agreed offering between clearing agents or the channel through which the payment instruction is processed.

            Specifies the clearing system identification code, as published in an external clearing system identification code list.
            External code sets can be downloaded from www.iso20022.org.
          type: string
          minLength: 1
          maxLength: 5
        member_identification:
          x-MXComponent: RestrictedFINXMax28Text
          description: |
            Identification of a member of a clearing system.

            Based on datatype RestrictedFINXMax28Text: Specifies a character string with a maximum length of 35 characters limited to character set X, that is, a-z A-Z / - ? : ( ) . , ‘ + .
          type: string
          minLength: 1
          maxLength: 28
          pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ ]{1,28}$
      required:
      - clearing_system_identification
      - member_identification
    FinancialInstitutionIdentification13Choice:
      x-MXComponent: FinancialInstitutionIdentification13Choice
      type: object
      description: Specifies the details to identify a financial institution.
      additionalProperties: true
      oneOf:
      - type: object
        additionalProperties: false
        properties:
          bicfi:
            x-MXComponent: BICFIDec2014Identifier
            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)".

              Based on datatype BICFIDec2014Identifier: Code allocated to a financial institution by the ISO 9362 Registration Authority as described in ISO 9362: 2014 - "Banking - Banking telecommunication messages - Business identifier code (BIC)".
            type: string
            pattern: ^[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}$
        required:
        - bicfi
      - type: object
        additionalProperties: false
        properties:
          clearing_system_member_identification:
            description: |
              Information used to identify a member within a clearing system.

            $ref: '#/components/schemas/ClearingSystemMemberIdentification4'
        required:
        - clearing_system_member_identification
    PaymentStatusRequest1:
      x-MXComponent: PaymentStatusRequest1
      type: object
      description: Resource for Network Interoperability
      additionalProperties: false
      properties:
        from:
          x-MXComponent: BICFIDec2014Identifier
          description: |
            Specifies the sending MessagingEndpoint that has created this Business Message for the receiving MessagingEndpoint that will process this Business Message.  The sending MessagingEndpoint might be different from the sending address potentially contained in the transport header (as defined in the transport layer).

            Based on datatype BICFIDec2014Identifier: Code allocated to a financial institution by the ISO 9362 Registration Authority as described in ISO 9362: 2014 - "Banking - Banking telecommunication messages - Business identifier code (BIC)".
          type: string
          pattern: ^[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}$
        transaction_status:
          x-MXComponent: TransactionIndividualStatus5Code
          description: "Provides detailed information on the transaction status to be updated in the tracker.\n\nSpecifies the status of a single payment transaction.\n\nCode Name Definition:\n*`ACCC` - AcceptedCreditSettlementCompleted - Settlement on the creditor's account has been completed. \n*`ACSP` - AcceptedSettlementInProcess - All preceding checks such as technical validation and customer profile were successful and therefore the payment initiation has been accepted for execution.\n*`RJCT` - Rejected - Payment initiation or individual transaction included in the payment initiation has been rejected.\n"
          type: string
          enum:
          - ACCC
          - ACSP
          - RJCT
        transaction_status_date:
          x-MXComponent: ISONoLocalDateTime
          description: |
            Date for the status.    Date Time must be expressed as UTC/Zulu time (YYYY-MM-DDThh:mm:ss.sssZ) or local time with UTC offset (YYYY-MM-DDThh:mm:ss.sss+/-hh:mm). Local time is not allowed.

            Based on datatype ISONoLocalDateTime: an ISODateTime whereby only Zulu/UTC and Local Time with UTC offset are allowed and where local time is blocked.
          type: string
          pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.[0-9]+)?(?:Z|[+-][01]\d:[0-5]\d)?$
        transaction_status_reason:
          x-MXComponent: TrackerPaymentStatusReason4Code
          description: |
            Provides detailed information on the status reason.

            Provides reason for reject/return.

            Code Name Definition:
            *`G007` - MIPaymentTransferred - The payment of the (gpi) sending MI agent was transferred to the receiving MI agent.
            *`G008` - MIPaymentTransferredAndReceived - The payment of the (gpi) sending MI agent was transferred to and received by the receiving MI agent.
            *`OBO1` - OnBehalfCreditConfirmationWithCreditAmountTransparency - On-behalf credit confirmation with credit
            amount transparency
            *`OBO2` - OnBehalfCreditConfirmationWithoutCreditAmountTransparency - On-behalf credit confirmation without
            credit amount transparency
          type: string
          enum:
          - G007
          - G008
          - OBO1
          - OBO2
        reject_return_reason:
          x-MXComponent: TrackerPaymentStatusReason3Code
          description: "Provides detailed information on the reject/return reason.\n\nProvides reason for reject/return.\n\nCode Name Definition:\n*`AC01` - IncorrectAccountNumber - Account number is invalid or missing\n*`AC02` - InvalidDebtorAccountNumber - Debtor account number invalid or missing\n\n*`AC04` - ClosedAccountNumber - Account number specified has been closed on the bank of account's books.\n*`AC06` - BlockedAccount - Account specified is blocked, prohibiting posting of transactions against it.\n*`AC07` - ClosedCreditorAccountNumber - Creditor account number closed.\n*`AC13` - InvalidDebtorAccountType - Debtor account type is missing or invalid.\n*`AGNT` - IncorrectAgent - Agent in the payment workflow is incorrect.\n*`AM02` - NotAllowedAmount - Specific transaction/message amount is greater than allowed maximum.\n*`AM03` - NotAllowedCurrency - Specific message amount is an non processable currency outside of existing agreement.\n*`AM04` - InsufficientFunds - Amount of funds available to cover specified message amount is insufficient.\n*`AM06` - AmountTooLow - Below limit.\n*`AM07` - BlockedAmount - Amount specified in message has been blocked by regulatory authorities.\n*`AM09` - WrongAmount - Amount received is not the amount agreed or expected.\n*`BE01` - InconsistentWithEndCustomer - Identification of end customer is not consistent with associated account number. (formerly CreditorConsistency).\n*`BE04` - MissingCreditorAddress - Specification of creditor's address, which is required for payment, is missing/not correct (formerly IncorrectCreditorAddress).\n*`BE05` - UnrecognisedInitiatingParty - Party who initiated the message is not recognised by the end customer.\n*`BE07` - MissingDebtorAddress - Specification of debtor's address, which is required for payment, is missing/not correct.\n*`CURR` - IncorrectCurrency - Currency of the payment is incorrect.\n*`CUST` - RequestedByCustomer - At request of creditor.\n*`DUPL` - Duplication - Payment is a duplicate of another payment.\n*`ERIN` - ERIOptionNotSupported - The Extended Remittance Information (ERI) option is not supported.\n*`FF03` - InvalidPaymentTypeInformation - Payment Type Information is missing or invalid. Generic usage if cannot specify Service Level or Local Instrument code.\n*`FF04` - InvalidServiceLevelCode - Service Level code is missing or invalid.\n*`FF05` - InvalidLocalInstrumentCode - Local Instrument code is missing or invalid.\n*`FF06` - InvalidCategoryPurposeCode - Category Purpose code is missing or invalid.\n*`FF07` - InvalidPurpose - Purpose is missing or invalid.\n*`FOCR` - FollowingCancellationRequest - Return following a cancellation request.\n*`FR01` - Fraud - Returned as a result of fraud.\n*`G004` - CreditPendingFunds - Credit to the creditor's account is pending as status Originator is waiting for funds provided via a cover.\n*`MS02` - NotSpecifiedReasonCustomerGenerated - Reason has not been specified by end customer.\n*`MS03` - NotSpecifiedReasonAgentGenerated - Reason has not been specified by agent.\n*`NOAS` - NoAnswerFromCustomer - Failed to contact beneficiary.\n*`NOCM` - NotCompliant - Customer account is not compliant with regulatory requirements, for example FICA (in South Africa) or any other regulatory requirements which render an account inactive for certain processing.\n*`RC01` - BankIdentifierIncorrect - Bank identifier code specified in the message has an incorrect format (formerly IncorrectFormatForRoutingCode).\n*`RC03` - InvalidDebtorBankIdentifier - Debtor bank identifier is invalid or missing\n*`RC04` - InvalidCreditorBankIdentifier - Creditor bank identifier is invalid or missing.\n*`RC08` - InvalidClearingSystemMemberIdentifier - Routing code not valid for local clearing.\n*`RC11` - InvalidIntermediaryAgent - Intermediary Agent is invalid or missing.\n*`RR01` - MissingDebtorAccountOrIdentification - Specification of the debtor’s account or unique identification needed for reasons of regulatory requirements is insufficient or missing\n*`RR02` - MissingDebtorNameOrAddress - Specification of the debtor’s name and/or address needed for regulatory requirements is insufficient or missing.\n\n*`RR03` - MissingCreditorNameOrAddress - Specification of the creditor's name and/or address needed for regulatory requirements is insufficient or missing.\n*`RR04` - RegulatoryReason - Regulatory Reason \n*`RR05` - RegulatoryInformationInvalid - Regulatory or Central Bank Reporting information missing, incomplete or invalid.\n*`RR06` - TaxInformationInvalid - Tax information missing, incomplete or invalid.\n*`RR07` - RemittanceInformationInvalid - Remittance information structure does not comply with rules for payment type.\n*`RR08` - RemittanceInformationTruncated - Remittance information truncated to comply with rules for payment type.\n*`RR09` - InvalidStructuredCreditorReference - Structured creditor reference invalid or missing.\n*`RR11` - InvalidDebtorAgentServiceID - Invalid or missing identification of a bank proprietary service.\n*`RR12` - InvalidPartyID - Invalid or missing identification required within a particular country or payment type.\n*`RUTA` - ReturnUponUnableToApply - Return following investigation request and no remediation possible.\n*`UPAY` - UnduePayment - Payment is not justified.\n"
          type: string
          enum:
          - AC01
          - AC02
          - AC04
          - AC06
          - AC07
          - AC13
          - AGNT
          - AM02
          - AM03
          - AM04
          - AM06
          - AM07
          - AM09
          - BE01
          - BE04
          - BE05
          - BE07
          - CURR
          - CUST
          - DUPL
          - ERIN
          - FF03
          - FF04
          - FF05
          - FF06
          - FF07
          - FOCR
          - FR01
          - G004
          - MS02
          - MS03
          - NOAS
          - NOCM
          - RC01
          - RC03
          - RC04
          - RC08
          - RC11
          - RR01
          - RR02
          - RR03
          - RR04
          - RR05
          - RR06
          - RR07
          - RR08
          - RR09
          - RR11
          - RR12
          - RUTA
          - UPAY
        tracker_informing_party:
          #  Identifies the party that issues the status.
          $ref: '#/components/schemas/FinancialInstitutionIdentification13Choice'
        instruction_identification:
          x-MXComponent: RestrictedFINXMax35Text
          description: "Unique identification, as assigned by an instructing party for an instructed party, to unambiguously identify the instruction.  Usage: 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. \n\nBased on datatype RestrictedFINXMax35Text: Specifies a character string with a maximum length of 35 characters limited to character set X, that is, a-z A-Z / - ? : ( ) . , ‘ + .\n"
          type: string
          minLength: 1
          maxLength: 35
          pattern: ^[0-9a-zA-Z/\-\?:\(\)\.,'\+ ]{1,35}$
        settlement_method:
          x-MXComponent: SettlementMethod1Code
          description: |
            Method used to settle the (batch of) payment instructions.

            Specifies the method used to settle the credit transfer instruction.

            Code Name Definition:
            *`CLRG` - ClearingSystem - Settlement is done through a payment clearing system.
            *`COVE` - CoverMethod - Settlement is done through a cover payment.
            *`INDA` - InstructedAgent - Settlement is done by the agent instructed to execute a payment instruction.
            *`INGA` - InstructingAgent - Settlement is done by the agent instructing and forwarding the payment to the next party in the payment chain.
          type: string
          enum:
          - CLRG
          - COVE
          - INDA
          - INGA
        clearing_system:
          x-MXComponent: ExternalCashClearingSystem1Code
          description: |
            Specification of a pre-agreed offering between clearing agents or the channel through which the payment instruction is processed.

            Specifies the cash clearing system, as published in an external cash clearing system code list.
            External code sets can be downloaded from www.iso20022.org.
          type: string
          minLength: 1
          maxLength: 3
        instructing_agent:
          #  Agent that instructs the next party in the chain to carry out the (set of) instruction(s).
          $ref: '#/components/schemas/FinancialInstitutionIdentification13Choice'
        instructed_agent:
          #  Agent that is instructed by the previous party in the chain (TrackerInformingParty) to carry out the (set of) instruction(s).
          $ref: '#/components/schemas/FinancialInstitutionIdentification13Choice'
        interbank_settlement_amount:
          x-MXComponent: ActiveCurrencyAndAmount
          description: |
            Amount of money moved between the instructing agent and the instructed agent.

            Based on datatype ActiveCurrencyAndAmount: A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.
          type: object
          additionalProperties: false
          properties:
            currency:
              x-MXComponent: ActiveCurrencyCode
              type: string
              pattern: ^[A-Z]{3,3}$
            amount:
              type: string
              maxLength: 19
              pattern: ^0*(([0-9]{0,13}\.[0-9]{1,5})|([0-9]{0,14}\.[0-9]{1,4})|([0-9]{0,15}\.[0-9]{1,3})|([0-9]{0,16}\.[0-9]{1,2})|([0-9]{0,17}\.[0-9]{1,1})|([0-9]{0,18}\.)|0*|([0-9]{0,18}))$
          required:
          - currency
          - amount
        source_currency:
          x-MXComponent: ActiveCurrencyCode
          description: |
            Specifies the currency from which an amount is to be converted in a currency conversion

            A code allocated to a currency by a Maintenance Agency under an international identification scheme as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".
          type: string
          pattern: ^[A-Z]{3,3}$
        target_currency:
          x-MXComponent: ActiveCurrencyCode
          description: |
            Specifies the currency into which an amount is to be converted in a currency conversion

            A code allocated to a currency by a Maintenance Agency under an international identification scheme as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".
          type: string
          pattern: ^[A-Z]{3,3}$
        exchange_rate:
          x-MXComponent: BaseOneRate
          description: |
            Specifies the factor used to convert an amount from one currency into another. This reflects the price at which one currency was bought with another currenty.   Usage: ExchangeRate expresses the ratio between UnitCurrency and QuotedCurrency (ExchangeRate = UnitCurrency/QuotedCurrency).

            Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
          type: string
          maxLength: 12
        foreign_exchange_agent:
          x-MXComponent: BICFIDec2014Identifier
          description: |
            Agent that performed the foreign exchange operation.

            Based on datatype BICFIDec2014Identifier: Code allocated to a financial institution by the ISO 9362 Registration Authority as described in ISO 9362: 2014 - "Banking - Banking telecommunication messages - Business identifier code (BIC)".
          type: string
          pattern: ^[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}$
        charge_bearer:
          x-MXComponent: ChargeBearerType1Code
          description: |
            Specifies which party/parties will bear the charges associated with the processing of the payment transaction.

            Specifies which party(ies) will pay charges due for processing of the instruction.

            Code Name Definition:
            *`CRED` - BorneByCreditor - All transaction charges are to be borne by the creditor.
            *`DEBT` - BorneByDebtor - All transaction charges are to be borne by the debtor.
            *`SHAR` - Shared - In a credit transfer context, means that transaction charges on the sender side are to be borne by the debtor, transaction charges on the receiver side are to be borne by the creditor. In a direct debit context, means that transaction charges on the sender side are to be borne by the creditor, transaction charges on the receiver side are to be borne by the debtor.
            *`SLEV` - FollowingServiceLevel - Charges are to be applied following the rules agreed in the service level and/or scheme.
          type: string
          enum:
          - CRED
          - DEBT
          - SHAR
          - SLEV
        charges_information:
          type: array
          description: Provides information on the charges to be paid by the charge bearer(s) related to the payment transaction.
          items:
            $ref: '#/components/schemas/Charges17'
        confirmed_date:
          x-MXComponent: ISONoLocalDateTime
          description: |
            Specifies the date and time at which the funds are available,  as reported in the ACCC status update.  Date Time must be expressed as UTC/Zulu time (YYYY-MM-DDThh:mm:ss.sssZ) or local time with UTC offset (YYYY-MM-DDThh:mm:ss.sss+/-hh:mm). Local time is not allowed.

            Based on datatype ISONoLocalDateTime: an ISODateTime whereby only Zulu/UTC and Local Time with UTC offset are allowed and where local time is blocked.
          type: string
          pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.[0-9]+)?(?:Z|[+-][01]\d:[0-5]\d)?$
        confirmed_amount:
          x-MXComponent: ActiveCurrencyAndAmount
          description: |
            Specifies the amount confirmed by the Tracker Informing Party for the ACCC-OBO1 status.

            Based on datatype ActiveCurrencyAndAmount: A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.
          type: object
          additionalProperties: false
          properties:
            currency:
              x-MXComponent: ActiveCurrencyCode
              type: string
              pattern: ^[A-Z]{3,3}$
            amount:
              type: string
              maxLength: 19
              pattern: ^0*(([0-9]{0,13}\.[0-9]{1,5})|([0-9]{0,14}\.[0-9]{1,4})|([0-9]{0,15}\.[0-9]{1,3})|([0-9]{0,16}\.[0-9]{1,2})|([0-9]{0,17}\.[0-9]{1,1})|([0-9]{0,18}\.)|0*|([0-9]{0,18}))$
          required:
          - currency
          - amount
        intermediary_agent1:
          #  Agent between the debtor's agent and the creditor's agent.
          $ref: '#/components/schemas/FinancialInstitutionIdentification13Choice'
        creditor_agent:
          #  Financial institution servicing an account for the creditor.
          $ref: '#/components/schemas/FinancialInstitutionIdentification13Choice'
      required:
      - from
      - transaction_status
      - transaction_status_date
      - tracker_informing_party
      - instruction_identification
      - settlement_method
      - interbank_settlement_amount
      - charge_bearer
      - creditor_agent
    UUIDv4Identifier:
      type: string
      description: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 "Universally Unique IDentifier (UUID) URN Namespace".
      pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$     
  headers:
    X-Request-ID:
      required: false
      schema:
        type: string
        format: uuid
      examples:
        XRequestIdResponseHeader:
          value: ce480d68-2612-4aef-867a-e91566a1e012
      description: |-
        A Universally Unique Identifier (UUID) generated by the API Gateway for tracking and support purposes.
        The value received by a Service Provider in the X-Request-ID request header must be copied untouched in the X-Request-ID response header.
        This X-Request-ID response header must always be returned to the API consumer, even when the response is an error message.      

  responses:
    '400-BadRequest':
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
          examples:
            invalid_request:
              value:
                severity: Fatal
                code: Sw.gpi.InvalidRequest
                text: Invalid request
            missing_mandatory_field:
              value:
                severity: Fatal
                code: Sw.gpi.MandatoryFieldMissing
                text: Mandatory field %field missing
            invalid_rbac:
              value:
                severity: Fatal
                code: Sw.gpi.InvalidRBACRole
                text: RBAC Role
            request_malformed:
              value:
                severity: Fatal
                code: SwAP501
                text: API request is malformed
            unknown_uetr:
              value:
                severity: Fatal
                code: 'INVA/X004'
                text: 'No payment information tracked for this transaction identifier, Unknown transaction identifier'
    '401-Unauthorized':
      description: 'Unauthorized'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
          examples:
            from_authorization_failure:
              value:
                severity: Fatal
                code: Sw.gpi.FromAuthorizationFailure
                text: From %From does not have the appropriate RBAC role
    '404-NotFound':
      description: 'Not Found'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
          examples:
            no_result_found:
              value:
                severity: Transient
                code: Sw.gpi.NoResultFound
                text: No result found
            resource_not_exist:
              value:
                severity: Fatal
                code: SwAP506
                text: 'Resource does not exist.'
    '413-PayloadTooLarge':
      description: 'Payload Too Large'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    '429-TooManyRequests':
      description: 'Too Many Requests'
      content:
        application/json:
          schema: 
            $ref: '#/components/schemas/ErrorMessage'
          examples:
            payload_too_large:
              value:
                severity: Transient
                code: SwAP507
                text: 'Request cannot be processed at this time. Please try later. (header Retry-After indicates how long to wait before making a follow-up request).'
    '500-InternalServerError':
      description: 'Internal Server Error'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
          examples:
            service_internal_error:
              value:
                severity: Transient
                code: Sw.gpi.InternalError
                text: Internal error
    '503-ServerUnavailable':
      description: 'ServerUnavailable'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    '504-GatewayTimeout':
      description: 'GatewayTimeout'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    'default':
      description: 'Internal Server Error'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
          examples:
            service_internal_error:
              value:
                severity: Transient
                code: Sw.gpi.InternalError
                text: Internal error

  examples:

    PMIACCCOBO1Intermediary_no_FX:
      summary: 'PMI does ACCC OBO1 Tracker update, scenario contain intermediary agent, no FX'
      value:            
        from: PMIBBEBB
        transaction_status: ACCC
        transaction_status_date: "2022-11-25T14:21:00.000Z"
        transaction_status_reason: OBO1
        tracker_informing_party:
          bicfi: BANKDEDD
        instruction_identification: "123"
        settlement_method: CLRG
        clearing_system: LYX
        instructing_agent:
          bicfi: BANKBEBB
        instructed_agent:
          bicfi: BANKCATT
        interbank_settlement_amount:
          currency: CAD
          amount: '6585.56'
        charge_bearer: CRED
        charges_information:
         - amount:
            currency: CAD
            amount: '30.00'
           agent: BANKBEBBXXX
         - amount:
            currency: CAD
            amount: '20.00'
           agent: BANKCATTXXX
         - amount:
              currency: CAD
              amount: '10.00'
           agent: BANKDEDDXXX
        confirmed_date: '2022-11-25T14:33:00.000Z'
        confirmed_amount:
          currency: CAD
          amount: '6525.56'
        intermediary_agent1:
          bicfi: BANKCATT
        creditor_agent:
          bicfi: BANKDEDD    
          
    PMIACCCOBO1noFX:
      summary: 'PMI does ACCC OBO1 Tracker update, no FX'    
      value:
        from: PMIBBEBB
        transaction_status: ACCC
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: OBO1
        tracker_informing_party:
          bicfi: BANKCATT
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        instructing_agent:
          bicfi: BANKBEBB
        instructed_agent:
          bicfi: BANKCATT
        interbank_settlement_amount:
          currency: CAD
          amount: '6555.56'
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: CAD
              amount: '30.00'
            agent: BANKBEBBXXX
          - amount:
              currency: CAD
              amount: '20.00'
            agent: BANKCATTXXX
        confirmed_date: '2022-11-25T14:33:00.000Z'
        confirmed_amount:
          currency: CAD
          amount: '6505.56'
        creditor_agent:
          bicfi: BANKCATT   
          
    PMIACCCOBO2noFX:
      summary: 'PMI does ACCC OBO2 Tracker update, no FX'     
      value:
        from: PMIBBEBB
        transaction_status: ACCC
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: OBO1
        tracker_informing_party:
          bicfi: BANKCATT
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        instructing_agent:
          bicfi: BANKBEBB
        instructed_agent:
          bicfi: BANKCATT
        interbank_settlement_amount:
          currency: CAD
          amount: '6555.56'
        charge_bearer: DEBT          
        confirmed_date: '2022-11-25T14:33:00.000Z'
        creditor_agent:
          bicfi: BANKCATT     
          
    PMIACSPG007Intermediary_no_FX:
      summary: 'PMI does ACSP G007 Tracker update, scenario contains intermediary agent, no FX'        
      value:
        from: PMIBBEBB
        transaction_status: ACSP
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: G007
        tracker_informing_party:
          bicfi: BANKBEBB
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        instructing_agent:
          bicfi: BANKBEBB
        instructed_agent:
          bicfi: BANKCATT
        interbank_settlement_amount:
          currency: CAD
          amount: '6585.56'
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: CAD
              amount: '30.00'
            agent: BANKBEBBXXX
        intermediary_agent1:
          bicfi: BANKCATT
        creditor_agent:
          bicfi: BANKDEDD      
          
          
    PMIACSPG007noFX:
      summary: 'PMI does ACSP G007 Tracker update, no FX'      
      value:
        from: PMIBBEBB
        transaction_status: ACSP
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: G007
        tracker_informing_party:
          bicfi: BANKBEBB
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        instructing_agent:
          bicfi: BANKBEBB
        instructed_agent:
          bicfi: BANKCATT
        interbank_settlement_amount:
          currency: CAD
          amount: '6585.56'
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: CAD
              amount: '30.00'
            agent: BANKBEBBXXX
        creditor_agent:
          bicfi: BANKCATT     
          
    PMIACSPG008IntermediaryandFX:
      summary: 'PMI does ACSP G008 Tracker update, scenario contains intermediary agent, no FX'          
      value:
        from: PMIBBEBB
        transaction_status: ACSP
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: G008
        tracker_informing_party:
          bicfi: BANKCATT
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        instructing_agent:
          bicfi: BANKBEBB
        instructed_agent:
          bicfi: BANKCATT
        interbank_settlement_amount:
          currency: CAD
          amount: '6585.56'
        source_currency: EUR
        target_currency: CAD
        exchange_rate: '0.60'
        foreign_exchange_agent: BANKBEBB
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: EUR
              amount: '30.00'
            agent: BANKBEBBXXX
        intermediary_agent1:
          bicfi: BANKCATT
        creditor_agent:
          bicfi: BANKDEDD       
          
    PMIACSPG008noFX:
      summary: 'PMI does ACSP G008 Tracker update, no FX'      
      value:
        from: PMIBBEBB
        transaction_status: ACSP
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: G008
        tracker_informing_party:
          bicfi: BANKCATT
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        instructing_agent:
          bicfi: BANKBEBB
        instructed_agent:
          bicfi: BANKCATT
        interbank_settlement_amount:
          currency: CAD
          amount: '6585.56'
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: CAD
              amount: '30.00'
            agent: BANKBEBBXXX
        creditor_agent:
          bicfi: BANKCATT     
          
    PMIRJCT:
      summary: 'PMI does RJCT Tracker update'      
      value:
        from: PMIBBEBB
        transaction_status: RJCT
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        reject_return_reason: MS03
        tracker_informing_party:
          bicfi: BANKCATT
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        instructing_agent:
          bicfi: BANKBEBB
        instructed_agent:
          bicfi: BANKCATT
        interbank_settlement_amount:
          currency: CAD
          amount: '6555.56'
        charge_bearer: SHAR          
        creditor_agent:
          bicfi: BANKCATT     
          
    FIACCCOBO1IntermediarynoFX:
      summary: 'FI does ACCC OBO1 Tracker update, scenario contains intermediary agent, no FX'          
      value:
        from: FINBBEBB
        transaction_status: ACCC
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: OBO1
        tracker_informing_party:
          bicfi: BANKCATT
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        interbank_settlement_amount:
          currency: CAD
          amount: '6585.56'
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: CAD
              amount: '30.00'
            agent: FINBBEBBXXX
          - amount:
              currency: CAD
              amount: '20.00'
            agent: BANKCATTXXX
          - amount:
              currency: CAD
              amount: '10.00'
            agent: BANKDEDDXXX
        confirmed_date: '2022-11-25T14:33:00.000Z'
        confirmed_amount:
          currency: CAD
          amount: '6525.56'
        intermediary_agent1:
          bicfi: BANKCATT
        creditor_agent:
          bicfi: BANKDEDD     
          
    FIACCCOBO1noFX:
      summary: 'FI does ACCC OBO1 Tracker update, no FX'      
      value:
        from: FINBBEBB
        transaction_status: ACCC
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: OBO1
        tracker_informing_party:
          bicfi: BANKCATT
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        interbank_settlement_amount:
          currency: CAD
          amount: '6555.56'
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: CAD
              amount: '30.00'
            agent: FINBBEBBXXX
          - amount:
              currency: CAD
              amount: '20.00'
            agent: BANKCATTXXX
        confirmed_date: '2022-11-25T14:33:00.000Z'
        confirmed_amount:
          currency: CAD
          amount: '6505.56'
        creditor_agent:
          bicfi: BANKCATT     
          
    FIACCCOBO1withFX:
      summary: 'FI does ACCC OBO1 Tracker update, with FX'     
      value:
        from: FINBBEBB
        transaction_status: ACCC
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: OBO1
        tracker_informing_party:
          bicfi: BANKCATT
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        interbank_settlement_amount:
          currency: EUR
          amount: '6555.56'
        source_currency: EUR
        target_currency: CAD
        exchange_rate: '0.60'
        foreign_exchange_agent: BANKCATT
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: EUR
              amount: '30.00'
            agent: FINBBEBBXXX
          - amount:
              currency: CAD
              amount: '20.00'
            agent: BANKCATTXXX
        confirmed_date: '2022-11-25T14:33:00.000Z'
        confirmed_amount:
          currency: CAD
          amount: '10855.93'
        creditor_agent:
          bicfi: BANKCATT   
          
    FIACCCOBO2IntermediarynoFX:
      summary: 'FI does ACCC OBO2 Tracker update, scenario contains intermediary agent, with FX'      
      value:
        from: FINBCATT
        transaction_status: ACCC
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: OBO2
        tracker_informing_party:
          bicfi: BANKEE2X
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        interbank_settlement_amount:
          currency: CAD
          amount: '6585.56'
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: CAD
              amount: '30.00'
            agent: FINBCATTXXX
        confirmed_date: '2022-11-25T14:33:00.000Z'
        intermediary_agent1:
          bicfi: BANKCATT
        creditor_agent:
          bicfi: BANKEE2X        
          
    FIACCCOBO2noFX:
      summary: 'FI does ACCC OBO2 Tracker update, no FX'       
      value:
        from: FINBBEBB
        transaction_status: ACCC
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        transaction_status_reason: OBO2
        tracker_informing_party:
          bicfi: BANKEE2X
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        interbank_settlement_amount:
          currency: CAD
          amount: '6555.56'
        charge_bearer: CRED
        charges_information:
          - amount:
              currency: CAD
              amount: '30.00'
            agent: FINBBEBBXXX
          - amount:
              currency: CAD
              amount: '20.00'
            agent: BANKEE2XXXX
        confirmed_date: '2022-11-25T14:33:00.000Z'
        creditor_agent:
          bicfi: BANKEE2X       
          
    FIRJCT:
      summary: 'FI does RJCT Tracker update'       
      value:
        from: FINBBEBB
        transaction_status: RJCT
        transaction_status_date: '2022-11-25T14:21:00.000Z'
        reject_return_reason: AC01
        tracker_informing_party:
          bicfi: BANKCATT  
        instruction_identification: '123'
        settlement_method: CLRG
        clearing_system: LYX
        interbank_settlement_amount:
          currency: CAD
          amount: '6555.56'
        charge_bearer: DEBT          
        creditor_agent:
          bicfi: BANKCATT          
          
          
  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.
security:
  - oauthBearerToken: []