{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swift/json-schema/swift-eligibility-check-status1-schema.json",
  "title": "EligibilityCheckStatus1",
  "description": "Represents the response that the Eligibility service will provide to the service consumer.\n",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swift-payment-pre-validation-api-openapi.yml#/components/schemas/EligibilityCheckStatus1",
  "required": [
    "status",
    "threshold"
  ],
  "type": "object",
  "properties": {
    "status": {
      "$ref": "#/$defs/Max4Text"
    },
    "threshold": {
      "$ref": "#/$defs/SwiftGoPaymentThresholdStatus1"
    },
    "routes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SwiftGoRoutes1"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ActiveCurrencyCode": {
      "pattern": "^[A-Z]{3,3}$",
      "type": "string",
      "description": "A code allocated to a currency by a Maintenance Agency under\nan international identification scheme as described in the latest edition\nof the international standard ISO 4217 \"Codes for the representation of currencies and funds\".\n"
    },
    "Amount3": {
      "required": [
        "currency",
        "value"
      ],
      "type": "object",
      "properties": {
        "value": {
          "$ref": "#/$defs/AmountText"
        },
        "currency": {
          "$ref": "#/$defs/ActiveCurrencyCode"
        }
      },
      "additionalProperties": false,
      "description": "Amount and currency to be transferred in the transaction.\n"
    },
    "AmountText": {
      "maxLength": 20,
      "pattern": "^^-?0*(([0-9]{0,5}[\\,\\.][0-9]{1,13})|([0-9]{0,6}[\\,\\.][0-9]{1,12})|([0-9]{0,7}[\\,\\.][0-9]{1,11})|([0-9]{0,8}[\\,\\.][0-9]{1,10})|([0-9]{0,9}[\\,\\.][0-9]{1,9})|([0-9]{0,10}[\\,\\.][0-9]{1,8})|([0-9]{0,11}[\\,\\.][0-9]{1,7})|([0-9]{0,12}[\\,\\.][0-9]{1,6})|([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*|([0-9]{0,18}))$$",
      "type": "string",
      "description": "Amount as text that will be validated by the Payment Pre-Validation API services.\n"
    },
    "BICFIDec2014Identifier": {
      "pattern": "^[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}$",
      "type": "string",
      "description": "Code allocated to a financial institution by the ISO 9362 Registration\nAuthority as described in ISO 9362: 2014 - \"Banking - Banking telecommunication  messages - Business identifier code (BIC)\".\n"
    },
    "ClearingSystemIdentification2Choice": {
      "type": "object",
      "additionalProperties": true,
      "description": "Choice of a clearing system identifier.",
      "oneOf": [
        {
          "required": [
            "code"
          ],
          "type": "object",
          "properties": {
            "code": {
              "$ref": "#/$defs/ExternalClearingSystemIdentification1Code"
            }
          },
          "additionalProperties": false
        },
        {
          "required": [
            "proprietary"
          ],
          "type": "object",
          "properties": {
            "proprietary": {
              "$ref": "#/$defs/Max35Text"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "ClearingSystemMemberIdentification2": {
      "required": [
        "member_identification"
      ],
      "type": "object",
      "properties": {
        "clearing_system_identification": {
          "$ref": "#/$defs/ClearingSystemIdentification2Choice"
        },
        "member_identification": {
          "$ref": "#/$defs/Max35Text"
        }
      },
      "additionalProperties": false,
      "description": "Unique identification, as assigned by a clearing system, to unambiguously identify a member of the clearing system.\n"
    },
    "EstimatedTimeToCreditor1": {
      "required": [
        "average",
        "maximum",
        "minimum"
      ],
      "type": "object",
      "properties": {
        "minimum": {
          "$ref": "#/$defs/nonNegativeInteger"
        },
        "average": {
          "$ref": "#/$defs/nonNegativeInteger"
        },
        "maximum": {
          "$ref": "#/$defs/nonNegativeInteger"
        }
      },
      "additionalProperties": false,
      "description": "Estimated time (in minutes) to creditor account computed using statistics."
    },
    "Exact3AlphaNumericText": {
      "pattern": "^[a-zA-Z0-9]{3}$",
      "type": "string",
      "description": "Specifies an alphanumeric string with a length of exact 3 characters.\n"
    },
    "ExternalClearingSystemIdentification1Code": {
      "maxLength": 5,
      "minLength": 1,
      "type": "string",
      "description": "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.\n"
    },
    "FinancialInstitutionIdentification20": {
      "type": "object",
      "properties": {
        "bicfi": {
          "$ref": "#/$defs/BICFIDec2014Identifier"
        },
        "clearing_system_member_identification": {
          "$ref": "#/$defs/ClearingSystemMemberIdentification2"
        }
      },
      "additionalProperties": false,
      "description": "Set of elements used to identify a financial institution."
    },
    "GpiDirectoryChannelType1Code": {
      "type": "string",
      "description": "The channel through which the participant is reachable for gpi payment instructions for one of its gpi currencies.\n\n`DICO`-Direct or Cover\n\n`INTR`-Intermediary\n\n`NPMI`-Non FIN PMI\n\n`FPMI`-FIN compatible PMI\n",
      "enum": [
        "DICO",
        "INTR",
        "NPMI",
        "FPMI"
      ]
    },
    "ISODateTime": {
      "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)?$",
      "type": "string",
      "description": "A particular point in the progression of time defined by a mandatory date and a mandatory time component, expressed in either UTC time format (YYYY-MM-DDThh:mm:ss.sssZ), local time with UTC offset format (YYYY-MM-DDThh:mm:ss.sss+/-hh:mm), or local time format (YYYY-MM-DDThh:mm:ss.sss). These representations are defined in \"XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004\" which is aligned with ISO 8601.\nNote on the time format:\n1) beginning / end of calendar day\n00:00:00 = the beginning of a calendar day\n24:00:00 = the end of a calendar day\n2) fractions of second in time format\nDecimal fractions of seconds may be included. In this case, the involved parties shall agree on the maximum number of digits that are allowed.\n"
    },
    "Max35Text": {
      "maxLength": 35,
      "minLength": 1,
      "type": "string",
      "description": "Specifies a character string with a maximum length of 35 characters."
    },
    "Max4Text": {
      "maxLength": 4,
      "minLength": 1,
      "type": "string",
      "description": "Specifies a character string with a maximum length of 4 characters."
    },
    "ServicingAgentChannel1": {
      "required": [
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/GpiDirectoryChannelType1Code"
        },
        "id": {
          "$ref": "#/$defs/Exact3AlphaNumericText"
        },
        "fee": {
          "$ref": "#/$defs/SwiftGoFee1"
        },
        "cut_off_time": {
          "$ref": "#/$defs/ISODateTime"
        },
        "optimum_cut_off_time": {
          "$ref": "#/$defs/ISODateTime"
        }
      },
      "additionalProperties": false,
      "description": "Channel as defined in the gpi directory between the Requestor Agent and the Servicing Agent."
    },
    "SwiftGoFee1": {
      "required": [
        "stp_fee"
      ],
      "type": "object",
      "properties": {
        "stp_fee": {
          "$ref": "#/$defs/Amount3"
        },
        "nstp_fee": {
          "$ref": "#/$defs/Amount3"
        },
        "fee_expiration": {
          "$ref": "#/$defs/ISODateTime"
        }
      },
      "additionalProperties": false,
      "description": "Fee for the payment, taken from the fee repository (sender is requestor agent BIC and receiver is servicing agent BIC).\n\nIt will either be the bilateral fee or the default fee.\n"
    },
    "SwiftGoPaymentThresholdStatus1": {
      "required": [
        "validation_check"
      ],
      "type": "object",
      "properties": {
        "validation_check": {
          "$ref": "#/$defs/Max4Text"
        },
        "amount": {
          "$ref": "#/$defs/Amount3"
        }
      },
      "additionalProperties": false,
      "description": "Validation of the Amount and Currency received from the payment validation request. The gpi tracker checks against the existing threshold verification for traffic.\n"
    },
    "SwiftGoRoutes1": {
      "required": [
        "minimum_number_of_agents_involved",
        "servicing_agent"
      ],
      "type": "object",
      "properties": {
        "servicing_agent": {
          "$ref": "#/$defs/FinancialInstitutionIdentification20"
        },
        "channel": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ServicingAgentChannel1"
          }
        },
        "estimated_time_to_creditor_minutes": {
          "$ref": "#/$defs/EstimatedTimeToCreditor1"
        },
        "minimum_number_of_agents_involved": {
          "$ref": "#/$defs/positiveInteger"
        }
      },
      "additionalProperties": false,
      "description": "List of all possible routes returned by the routing algorithm."
    },
    "nonNegativeInteger": {
      "type": "string",
      "description": "W3C XML Schema Built-in datatype \"nonNegativeInteger\"."
    },
    "positiveInteger": {
      "type": "string",
      "description": "W3C XML Schema Built-in datatype \"positiveInteger\"."
    }
  }
}