{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/insurers-global/json-schema/insurers-global-country-schema.json",
  "title": "Country",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/insurers-global-openapi.json#/components/schemas/Country",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "continent": {
      "type": "string",
      "enum": [
        "africa",
        "europe",
        "asia-pacific",
        "south-america",
        "north-america"
      ]
    },
    "iso2": {
      "type": [
        "string",
        "null"
      ]
    },
    "iso3": {
      "type": [
        "string",
        "null"
      ]
    },
    "isoNum": {
      "type": [
        "string",
        "null"
      ]
    },
    "composite": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "ISO alpha-2 codes of the jurisdictions a composite market combines"
    },
    "region": {
      "type": "string"
    },
    "regulator": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "acronym": {
          "type": "string"
        },
        "website": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "regime": {
          "type": [
            "string",
            "null"
          ]
        },
        "registerSource": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "currency": {
      "type": "string"
    },
    "currencies": {
      "type": "array",
      "description": "ISO 4217 currencies of the market, primary first; empty for composite markets whose members share none. usdRate is local units per US dollar, year-average, from the World Bank (CC BY 4.0), or null where no series is published.",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "ISO 4217"
          },
          "name": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "decimalDigits": {
            "type": "integer"
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "usdRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "usdRateYear": {
            "type": [
              "integer",
              "null"
            ]
          },
          "rateSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "rateLicence": {
            "type": [
              "string",
              "null"
            ]
          },
          "rateSeen": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      }
    },
    "total": {
      "type": "integer"
    },
    "byClass": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      },
      "description": "Counts by class count entities, not licences: every company appears once, under the class its register row records, and byClass sums to total. A regulator’s own per-class licence tally is broader and will not match."
    },
    "byGroupType": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "verification": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "verified",
            "partial",
            "unverified"
          ]
        },
        "basis": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "register",
            "statute",
            null
          ],
          "description": "What the rows were checked against: the supervisor’s register, or, where no register is published, the statute that provides for the insurers. Null when unverified."
        },
        "status": {
          "type": "string"
        },
        "source": {
          "type": [
            "string",
            "null"
          ]
        },
        "corrections": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "marketNotes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string"
          },
          "effect": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "api": {
      "type": "string",
      "format": "uri"
    },
    "insurersApi": {
      "type": "string",
      "format": "uri",
      "description": "Full insurer list for this market"
    },
    "insurersPagesApi": {
      "type": "string",
      "format": "uri",
      "description": "First page of the market's insurers, 25 a page"
    }
  }
}