{
  "id": "unece_rec20_unit_code",
  "kind": "pattern",
  "status": "draft",
  "name": "UN/ECE Recommendation 20 unit code (UN/CEFACT common code)",
  "doc": "Two- or three-character code of a unit of measure from UN/ECE Recommendation 20, used in trade documents such as UN/EDIFACT and UBL invoices, for example KGM for kilogram or H87 for piece. Codes use uppercase letters and digits. Some lists, such as Peppol, add package codes from Recommendation 21 with an X prefix; they have the same shape but are not units.",
  "semantic_type": "unit_of_measure",
  "is_pii": false,
  "categories": [
    "values"
  ],
  "langs": [
    "common"
  ],
  "classification": "categorical",
  "regexp": "^[A-Z0-9]{2,3}$",
  "examples": [
    {
      "value": "KGM",
      "description": "kilogram",
      "valid": true
    },
    {
      "value": "MTR",
      "description": "metre",
      "valid": true
    },
    {
      "value": "LTR",
      "description": "litre",
      "valid": true
    },
    {
      "value": "C62",
      "description": "one (unit)",
      "valid": true
    },
    {
      "value": "H87",
      "description": "piece",
      "valid": true
    },
    {
      "value": "KGMS",
      "description": "four characters",
      "valid": false
    }
  ],
  "mappings": {
    "wikidata": "P6512"
  },
  "links": [
    {
      "type": "doc",
      "url": "https://unece.org/trade/documents/2021/06/uncefact-rec20-0"
    },
    {
      "type": "wikidata",
      "url": "https://www.wikidata.org/wiki/Property:P6512"
    },
    {
      "type": "other",
      "url": "https://github.com/datasets/unece-units-of-measure"
    }
  ],
  "quality": {
    "score": 85,
    "missing": [
      "translation",
      "detector coverage"
    ]
  },
  "source": {
    "path": "data/datatypes/any/values/unece_rec20_unit_code.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/values/unece_rec20_unit_code.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/values/unece_rec20_unit_code.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/unece_rec20_unit_code",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/unece_rec20_unit_code.json"
  }
}