{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swift/json-schema/swift-payment-purpose-validation-status1-schema.json",
  "title": "PaymentPurposeValidationStatus1",
  "description": "This represents the response details that the Payment Purpose validation 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/PaymentPurposeValidationStatus1",
  "required": [
    "reason",
    "status"
  ],
  "type": "object",
  "properties": {
    "status": {
      "$ref": "#/$defs/PaymentPurposeValidationStatus1Code"
    },
    "reason": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PaymentPurposeValidationReason1Code"
      }
    },
    "validation_check": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PaymentPurposeValidationCheck1"
      }
    },
    "available_purpose_code": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GenericCodeIdentification1"
      }
    },
    "purpose_code": {
      "$ref": "#/$defs/GenericCodeIdentification1"
    },
    "country_code": {
      "$ref": "#/$defs/CountryCode"
    },
    "purpose_description": {
      "$ref": "#/$defs/Max140Text"
    },
    "clearing_system_identification": {
      "$ref": "#/$defs/ClearingSystemIdentification2Choice"
    },
    "currency_code": {
      "$ref": "#/$defs/ActiveCurrencyCode"
    }
  },
  "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"
    },
    "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
        }
      ]
    },
    "CountryCode": {
      "pattern": "^[A-Z]{2,2}$",
      "type": "string",
      "description": "Code to identify a country, a dependency, or another area of particular geopolitical interest, on the basis of country names obtained from the United Nations (ISO 3166, Alpha-2 code).\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"
    },
    "GenericCodeIdentification1": {
      "required": [
        "id",
        "name_english"
      ],
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/Max35Text"
        },
        "description_english": {
          "$ref": "#/$defs/Max20000Text"
        },
        "name_english": {
          "$ref": "#/$defs/Max1000Text"
        },
        "name_local_language": {
          "$ref": "#/$defs/Max1000Text"
        },
        "description_local_language": {
          "$ref": "#/$defs/Max20000Text"
        }
      },
      "additionalProperties": false,
      "description": "Information for the identification of a code use in the payment validation."
    },
    "Max1000Text": {
      "maxLength": 1000,
      "minLength": 1,
      "type": "string",
      "description": "Specifies a character string with a maximum length of 1000 characters."
    },
    "Max140Text": {
      "maxLength": 140,
      "minLength": 1,
      "type": "string",
      "description": "Specifies a character string with a maximum length of 140 characters."
    },
    "Max20000Text": {
      "maxLength": 20000,
      "minLength": 1,
      "type": "string",
      "description": "Specifies a character string with a maximum length of 20, 000 characters."
    },
    "Max256Text": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "Specifies a character string with a maximum length of 256 characters."
    },
    "Max35Text": {
      "maxLength": 35,
      "minLength": 1,
      "type": "string",
      "description": "Specifies a character string with a maximum length of 35 characters."
    },
    "PaymentPurposeValidationCheck1": {
      "required": [
        "code",
        "reason",
        "severity",
        "status"
      ],
      "type": "object",
      "properties": {
        "code": {
          "$ref": "#/$defs/PaymentPurposeValidationCheckCode"
        },
        "description": {
          "$ref": "#/$defs/Max256Text"
        },
        "status": {
          "$ref": "#/$defs/PaymentPurposeValidationStatus1Code"
        },
        "reason": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentPurposeValidationReason1Code"
          }
        },
        "severity": {
          "$ref": "#/$defs/PaymentValidationSeverity1"
        },
        "validated_payment_information": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PaymentValidationInputParameter1"
          }
        }
      },
      "additionalProperties": false,
      "description": "Details the outcome of each individual payment purpose validation check.\n"
    },
    "PaymentPurposeValidationCheckCode": {
      "type": "string",
      "description": "The list of unique identifiers for the individual payment purpose validation checks. \n\n`PCCT_purpose_and_country`-The unique identifier of the individual payment purpose validation check  that validates the instructed payment purpose information against the payment purpose requirements available in the SWIFT repository for the instructed creditor country.\n\n`PCCC_purpose_and_country_and_currency`-The unique identifier of the individual payment purpose validation check that validates the instructed payment purpose information against the payment purpose requirements available in the SWIFT repository for the instructed creditor country and creditor account currency\n\n`PCCP_purpose_and_country_and_currency_and_clearing_system`-The unique identifier of the individual payment purpose validation check that validates the instructed payment purpose information against the payment purpose requirements available in the SWIFT repository for the instructed creditor country, creditor account currency and local clearing system.\n\n`PCCS_purpose_and_country_and_clearing_system`-The unique identifier of the individual payment purpose validation check  that validates the instructed payment purpose information against the payment purpose requirements available in the SWIFT repository for the instructed creditor country and the instructed clearing system.\n",
      "enum": [
        "PCCT_purpose_and_country",
        "PCCC_purpose_and_country_and_currency",
        "PCCP_purpose_and_country_and_currency_and_clearing_system",
        "PCCS_purpose_and_country_and_clearing_system"
      ]
    },
    "PaymentPurposeValidationReason1Code": {
      "type": "string",
      "description": "The list of unique identifiers which describe the reasons for Payment Purpose validation status. \n\n`PINP_no_purpose_code_data_available`-No purpose code data available in the SWIFT repository for the instructed context. This may relate to the country specific requirements not mandating purpose codes for the instructed context.\n\n`VPPD_valid_purpose_description`-The instructed payment purpose description has been successfully validated according to the specific requirements available in the SWIFT repository for the instructed context.\n\n`MPPD_missing_purpose_description`-There are specific rules for the provided context that require the presence of the payment purpose description which is missing from the payment purpose validation request.\n\n`PCME_purpose_code_description_max_length_exceeded`-Instructed payment purpose code description has exceeded the mandated maximum length registered in the SWIFT repository for the given  context\n\n`UPPC_unrecognized_purpose_code`-The instructed payment purpose code subject to validation could not be found in the purpose code data available in the SWIFT repository for the instructed payment context.\n\n`VPPC_valid_purpose_code`-The instructed payment purpose code has been successfully validated against the purpose  code list(s) available in the SWIFT repository for the instructed payment context.\n\n`ICTY_invalid_country`-Instructed country code is not a valid country code on the basis of country names obtained from the United Nations (ISO 3166, Alpha-2 code)\n\n`UCSI_unrecognized_clearing_system_identification`-Instructed clearing system identifier has not been found in the SWIFT directory for the instructed payment context. \n\n`MPPC_missing_payment_purpose_code`-Payment Purpose code has not been instructed for the payment validation to be performed.\n\n`ICCY_invalid_currency_code`-Instructed currency code is not a valid ISO currency code\n\n`MCSI_missing_clearing_system_identifier`-Clearing system identifier  is missing from the payment context in order for the validation of the instructed payment information to be performed.\n\n`MCCC_missing_currency_code`-Currency code  is missing from the payment context in order for the validation of the instructed payment information to be performed.\n\n`ICCH_check_not_applied`-The individual payment validation check has not been applied for the instructed context. Other individual payment validation checks are more relevant and will be applied instead.\n",
      "enum": [
        "PINP_no_purpose_code_data_available",
        "VPPD_valid_purpose_description",
        "MPPD_missing_purpose_description",
        "PCME_purpose_code_description_max_length_exceeded",
        "UPPC_unrecognized_purpose_code",
        "VPPC_valid_purpose_code",
        "ICTY_invalid_country",
        "UCSI_unrecognized_clearing_system_identification",
        "MPPC_missing_payment_purpose_code",
        "ICCY_invalid_currency_code",
        "MCSI_missing_clearing_system_identifier",
        "MCCC_missing_currency_code",
        "ICCH_check_not_applied"
      ]
    },
    "PaymentPurposeValidationStatus1Code": {
      "type": "string",
      "description": "The list of unique status identifiers for the Payment Purpose Validation service.\n\n`IVAL_invalid`-The payment information instructed for validation it is not valid in  the instructed payment context.\n\n`FVAL_valid`-The payment information instructed for validation it is valid in the instructed payment context.\n\n`UNRE_unrecognised`-The payment information instructed for validation has not been found in the SWIFT repository for the instructed payment context.\n\n`CVAL_valid_with_comments`-The payment information instructed for validation  is valid but the instructed payment context can be further improved.\n\n`NAVL_not_available`-The validation of the instructed payment information is not available in the instructed payment context, typically due to payment data collection process being in progress and insufficient data coverage. \n\n`CNPR_could_not_perform`-The validation of the instructed payment information could not be performed in the instructed payment context typically due to missing payment context information.\n\n`NOAP_not_applicable`-The validation of the instructed payment information has not been applied because didn't make sense for the given context.\n",
      "enum": [
        "IVAL_invalid",
        "FVAL_valid",
        "UNRE_unrecognised",
        "CVAL_valid_with_comments",
        "NAVL_not_available",
        "CNPR_could_not_perform",
        "NOAP_not_applicable"
      ]
    },
    "PaymentValidationInputParameter1": {
      "type": "string",
      "description": "The list of unique identifiers which describe the request parameters for Payment Validation service suite.\n\n`PPCO_payment_purpose_code`-Payment purpose code subject to the instructed Payment Validation service.\n\n`PDCO_payment_purpose_description`-Payment purpose description subject to the instructed Payment Validation service.\n",
      "enum": [
        "PPCO_payment_purpose_code",
        "PDCO_payment_purpose_description"
      ]
    },
    "PaymentValidationSeverity1": {
      "type": "string",
      "description": "Severity of the payment validation between error, warning and informative\n\n`ERRO_error`-Payment validation status indicates an error\n\n`INFO_info`-Payment validation status is informative\n\n`WARN_warning`-Payment validation status represents a warning\n",
      "enum": [
        "ERRO_error",
        "INFO_info",
        "WARN_warning"
      ]
    }
  }
}