{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ptpge.org/ucp/schemas/identity.json",
  "name": "org.ptpge.print.identity",
  "title": "PTPGE Product Identity",
  "description": "Adds the PTPGE configuration fingerprint — the open, computable identity of a print product configuration — to UCP checkout line items.",
  "version": "2026-08-05",
  "requires": {
    "protocol": {
      "min": "2026-04-08"
    },
    "capabilities": {
      "dev.ucp.shopping.checkout": {
        "min": "2026-04-08"
      }
    }
  },
  "$defs": {
    "ptpge_identity": {
      "title": "PTPGE Identity",
      "type": "object",
      "required": [
        "fingerprint"
      ],
      "additionalProperties": false,
      "properties": {
        "fingerprint": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "description": "SHA-256 over the ptpge-cfs/1 canonical serialization of the product configuration, lowercase hex. Resolvable at https://ptpge.org/f/{fingerprint}; verifiable by recomputation from the open specification."
        },
        "profile": {
          "type": "string",
          "enum": [
            "spec",
            "offer"
          ],
          "description": "Which ptpge-cfs/1 profile the fingerprint identifies: a product configuration (spec) or a vendor-attributed offer (offer)."
        },
        "serialization": {
          "type": "string",
          "const": "ptpge-cfs/1",
          "description": "Canonical serialization profile used to derive the fingerprint."
        }
      }
    },
    "dev.ucp.shopping.checkout": {
      "title": "Checkout with PTPGE Product Identity",
      "allOf": [
        {
          "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/checkout.json"
        },
        {
          "type": "object",
          "properties": {
            "line_items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "item": {
                    "type": "object",
                    "properties": {
                      "ptpge": {
                        "$ref": "#/$defs/ptpge_identity"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}
