{
  "id": "ca_postcode",
  "kind": "pattern",
  "status": "draft",
  "name": "Canadian postal code",
  "doc": "Canadian postal code: six characters in the form A1A 1A1, a letter, a digit and a letter, a space, then a digit, a letter and a digit. The letters D, F, I, O, Q and U are not used, and W and Z do not start a code.",
  "semantic_type": "postindex",
  "aliases": [
    "ca_postalcode"
  ],
  "is_pii": true,
  "categories": [
    "geo",
    "pii",
    "common"
  ],
  "country": [
    "CA"
  ],
  "langs": [
    "en",
    "fr"
  ],
  "classification": "categorical",
  "regexp": "^[ABCEGHJ-NPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z] ?\\d[ABCEGHJ-NPRSTV-Z]\\d$",
  "examples": [
    {
      "value": "K1A 0B1",
      "description": "Ottawa",
      "valid": true
    },
    {
      "value": "H0H 0H0",
      "description": "Santa Claus, used by Canada Post for letters to him",
      "valid": true
    },
    {
      "value": "M5V3L9",
      "description": "Toronto, written without the space",
      "valid": true
    },
    {
      "value": "W1A 1AA",
      "description": "a UK postcode",
      "valid": false
    }
  ],
  "mappings": {
    "fta": "POSTAL_CODE.POSTAL_CODE_CA"
  },
  "links": [
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/Postal_codes_in_Canada"
    },
    {
      "type": "other",
      "url": "https://github.com/tsegall/fta/blob/main/SemanticTypes.md"
    }
  ],
  "translations": {
    "ru": {
      "name": "Почтовый индекс Канады"
    }
  },
  "detected_by": {
    "tools": [
      "collibra",
      "fta",
      "ibmknowledgecatalog",
      "metacrafter",
      "snowflake"
    ],
    "metacrafter_rules": [
      {
        "rule": "ca_pii_postalcodefield",
        "type": "field",
        "match": "text",
        "file": "pii/ca/ca_pii.yaml",
        "key": "ca_postalcode"
      }
    ]
  },
  "quality": {
    "score": 100,
    "missing": []
  },
  "source": {
    "path": "data/datatypes/CA/geo/ca_postcode.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/CA/geo/ca_postcode.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/CA/geo/ca_postcode.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/ca_postcode",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/ca_postcode.json"
  }
}