{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/professorotter-com/json-schema/professorotter-com-product-schema.json",
  "title": "Product",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/professorotter-com-openapi.json#/components/schemas/Product",
  "type": "object",
  "required": [
    "id",
    "name",
    "description",
    "kind",
    "level",
    "activity",
    "bookTitle",
    "price",
    "availability",
    "url",
    "markdownUrl",
    "checkout"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "enum": [
        "digital",
        "print"
      ]
    },
    "level": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "easy",
        "challenge",
        "expert",
        null
      ]
    },
    "activity": {
      "type": "string",
      "enum": [
        "word-searches",
        "mazes",
        "color-by-number",
        "dot-to-dot",
        "criss-cross",
        "word-scrambles",
        "spot-the-difference",
        "sudoku",
        "season-books",
        "topic-packs",
        "bundle"
      ]
    },
    "bookTitle": {
      "type": "string"
    },
    "price": {
      "type": "object",
      "required": [
        "currency",
        "cents",
        "formatted"
      ],
      "properties": {
        "currency": {
          "type": "string",
          "const": "USD"
        },
        "cents": {
          "type": "integer"
        },
        "formatted": {
          "type": "string"
        }
      }
    },
    "availability": {
      "type": "string",
      "enum": [
        "in_stock",
        "coming_soon",
        "free"
      ]
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "markdownUrl": {
      "type": "string",
      "format": "uri"
    },
    "checkout": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "method",
            "url",
            "encoding",
            "fields",
            "note"
          ],
          "properties": {
            "method": {
              "type": "string",
              "const": "POST"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "encoding": {
              "type": "string"
            },
            "fields": {
              "type": "object",
              "required": [
                "product"
              ],
              "properties": {
                "product": {
                  "type": "string"
                }
              }
            },
            "note": {
              "type": "string"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}