{ "$schema":              "https://json-schema.org/draft/2020-12/schema",
  "$id":                  "https://schemas.mpai.community/AIH1/V1.1/data/Tokens.json",
  "title":                "Tokens V1.1",
  "description":          "Schema for token allocation and associated metadata.",
  "type":                 "object",
  "additionalProperties": false,
  "required":             [ "Header", "UserID", "TokensID", "TokensTime", "Tokens" ],
  "properties":           {

    "Header":             { "type": "string", "const": "AIH-TKN-V1.1" },
    "MInstanceID":        { "type": "string" },
    "UEnvironment":       { "type": "string" },
    "UserID":             { "type": "string", "description": "User identifier." },
    "TokensID":           { "type": "string", "description": "Unique identifier for the token record." },
    "TokensTime":         { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/Time.json",
                            "description": "Timestamp of token issuance." },

    "Tokens":             { "type": "array", "minItems": 1, "description": "Array of token.", "items": { "type": "object",
                            "required": [ "ProcessType" ], "additionalProperties": false, "properties": {

      "ProcessType":      { "$ref": "https://schemas.mpai.community/AIH1/V1.1/data/ProcessTypes.json",
                            "description": "Token service type." } } } },

    "DataXMData":         { "$ref": "https://schemas.mpai.community/PTF/V1.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":      { "type": "string", "maxLength": 2048 } } }
