{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quizgen-dev/json-schema/quizgen-dev-quiz-response-schema.json",
  "title": "QuizResponse",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quizgen-dev-openapi.json#/components/schemas/QuizResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "quiz_id": {
      "type": "string"
    },
    "definition_version": {
      "type": "integer"
    },
    "answers": {
      "type": "object",
      "additionalProperties": true,
      "description": "Flat question_id → value map (multi_choice → array of values)."
    },
    "outcome": {
      "type": [
        "string",
        "null"
      ],
      "description": "Matched bucket key, if the quiz uses outcomes."
    },
    "score": {
      "type": [
        "number",
        "null"
      ]
    },
    "respondent_email": {
      "type": [
        "string",
        "null"
      ]
    },
    "complete": {
      "type": "boolean"
    },
    "paid": {
      "type": "boolean",
      "description": "True once the response's payment succeeded."
    },
    "payment_intent": {
      "type": [
        "string",
        "null"
      ],
      "description": "Stripe PaymentIntent id, if the quiz takes payment."
    },
    "started_at": {
      "type": "string",
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "meta": {
      "type": "object",
      "additionalProperties": true
    }
  }
}