{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vatfind-com/json-schema/vatfind-com-country-capability-schema.json",
  "title": "CountryCapability",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vatfind-com-openapi.yml#/components/schemas/CountryCapability",
  "type": "object",
  "required": [
    "country_code",
    "name",
    "company_search",
    "identifier_capabilities",
    "updated_at"
  ],
  "properties": {
    "country_code": {
      "$ref": "#/$defs/CountryCode"
    },
    "name": {
      "type": "string"
    },
    "company_search": {
      "type": "string",
      "description": "not_verified means the provider has not published a country-level coverage guarantee; searches remain best-effort.",
      "enum": [
        "supported",
        "partial",
        "not_verified",
        "not_supported"
      ]
    },
    "identifier_capabilities": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "identifier_type",
          "format_check",
          "registry_match",
          "tax_authority_check",
          "company_legal_status",
          "format"
        ],
        "properties": {
          "identifier_type": {
            "$ref": "#/$defs/IdentifierType"
          },
          "format_check": {
            "type": "string",
            "enum": [
              "supported",
              "partial",
              "not_supported"
            ]
          },
          "registry_match": {
            "type": "string",
            "enum": [
              "supported",
              "partial",
              "not_verified",
              "not_supported"
            ]
          },
          "tax_authority_check": {
            "type": "string",
            "enum": [
              "supported",
              "partial",
              "not_supported",
              "not_applicable"
            ]
          },
          "company_legal_status": {
            "type": "string",
            "enum": [
              "supported",
              "partial",
              "not_verified",
              "not_supported"
            ]
          },
          "format": {
            "type": "object",
            "required": [
              "description",
              "examples"
            ],
            "properties": {
              "description": {
                "type": "string"
              },
              "pattern": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "CountryCode": {
      "type": "string",
      "pattern": "^[A-Z]{2}$"
    },
    "IdentifierType": {
      "type": "string",
      "enum": [
        "vat_number",
        "tax_identifier",
        "registration_number"
      ]
    }
  }
}