{
  "$defs": {
    "IdentifierKind": {
      "description": "The kinds of identifier we know how to record. Multiple identifiers per\nproduct are normal (a SaaS product can carry an SWID tag and a PURL; a\nphysical good can carry a GTIN-13 and a UPC alias).",
      "oneOf": [
        {
          "const": "gtin8",
          "description": "GS1 GTIN-8.",
          "type": "string"
        },
        {
          "const": "gtin12",
          "description": "GS1 GTIN-12 (UPC).",
          "type": "string"
        },
        {
          "const": "gtin13",
          "description": "GS1 GTIN-13 (EAN).",
          "type": "string"
        },
        {
          "const": "gtin14",
          "description": "GS1 GTIN-14 (case-level).",
          "type": "string"
        },
        {
          "const": "swid_tag",
          "description": "ISO/IEC 19770-2 Software Identification (SWID) tag.",
          "type": "string"
        },
        {
          "const": "cpe",
          "description": "NIST Common Platform Enumeration 2.3 (CPE).",
          "type": "string"
        },
        {
          "const": "purl",
          "description": "CycloneDX / OWASP Package URL (PURL).",
          "type": "string"
        },
        {
          "const": "sku",
          "description": "Internal SKU.",
          "type": "string"
        },
        {
          "const": "upc",
          "description": "UPC alias of GTIN-12 in North America (retained for explicit\nlabeling).",
          "type": "string"
        },
        {
          "const": "ean",
          "description": "EAN alias of GTIN-13 in Europe.",
          "type": "string"
        },
        {
          "const": "isbn",
          "description": "ISBN (books).",
          "type": "string"
        },
        {
          "const": "mpn",
          "description": "Manufacturer Part Number.",
          "type": "string"
        },
        {
          "const": "asin",
          "description": "Amazon Standard Identification Number (de facto, not formal\nstandard).",
          "type": "string"
        },
        {
          "const": "isrc",
          "description": "International Standard Recording Code (music).",
          "type": "string"
        }
      ]
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/product-identifier.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Typed product identifier record.",
  "properties": {
    "issued_by": {
      "description": "Issuing authority (e.g. \"GS1\", \"USPTO\", \"MyCompany Internal\").",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "$ref": "#/$defs/IdentifierKind"
    },
    "valid_from": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ],
      "description": "When this identifier became valid for the product."
    },
    "valid_to": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ],
      "description": "When this identifier was retired (rare; GTINs are typically\nproduct-lifetime stable)."
    },
    "value": {
      "description": "The identifier value. Validation is per-kind: GTIN values must\nmatch the expected digit length; PURL values must parse per the\nCycloneDX PURL spec; etc.",
      "type": "string"
    }
  },
  "required": [
    "kind",
    "value"
  ],
  "title": "ProductIdentifier",
  "type": "object",
  "x-corpospec-pillar": "product"
}