{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/odds-api-io/json-schema/odds-api-io-controllers-grades-response-schema.json",
  "title": "controllers.GradesResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/odds-api-io-settlement-api-openapi.yml#/components/schemas/controllers.GradesResponse",
  "type": "object",
  "properties": {
    "grades": {
      "type": "array",
      "description": "One grade per selection, in the order sent.",
      "items": {
        "$ref": "#/$defs/controllers.GradeResponse"
      }
    }
  },
  "$defs": {
    "controllers.GradeResponse": {
      "type": "object",
      "properties": {
        "ref": {
          "type": "string"
        },
        "eventId": {
          "type": "integer"
        },
        "result": {
          "type": "string",
          "enum": [
            "won",
            "lost",
            "void",
            "half_won",
            "half_lost",
            "pending",
            "ungradeable"
          ]
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "description": "Null for won, lost, half_won and half_lost. Always set otherwise.",
          "enum": [
            "push",
            "event_cancelled",
            "event_not_started",
            "event_live",
            "awaiting_result",
            "awaiting_stats",
            "event_not_found",
            "unsupported_market",
            "invalid_side",
            "invalid_line",
            "invalid_label",
            "incomplete_score",
            "ambiguous_tie",
            "player_not_matched",
            "stats_unavailable",
            "result_unavailable",
            null
          ]
        },
        "final": {
          "type": "boolean",
          "description": "True when you can stop polling this selection."
        },
        "basis": {
          "$ref": "#/$defs/settlement.Basis"
        }
      }
    },
    "settlement.Basis": {
      "type": "object",
      "description": "The score the verdict was computed from. Only on graded score markets.",
      "properties": {
        "scope": {
          "type": "string",
          "enum": [
            "regulation",
            "full_game",
            "match_result",
            "first_half",
            "second_half",
            "first_period",
            "period_2",
            "period_3",
            "period_4",
            "period_5",
            "games",
            "map_1",
            "map_2",
            "map_3",
            "map_4",
            "map_5"
          ]
        },
        "home": {
          "type": "integer"
        },
        "away": {
          "type": "integer"
        }
      }
    }
  }
}