{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sportstatsapi/json-schema/sportstatsapi-dto-horse-racing-runner-response-schema.json",
  "title": "dto.HorseRacingRunnerResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sportstatsapi-horse-racing-api-openapi.yml#/components/schemas/dto.HorseRacingRunnerResponse",
  "properties": {
    "age": {
      "type": "string"
    },
    "distance": {
      "type": "string"
    },
    "gender": {
      "type": "string"
    },
    "horse_name": {
      "type": "string"
    },
    "id": {
      "description": "ID is the data provider's horse id.",
      "type": "integer"
    },
    "jockey": {
      "$ref": "#/$defs/dto.HorseRacingJockeyInfo"
    },
    "morning_line": {
      "$ref": "#/$defs/dto.HorseRacingMorningLine"
    },
    "number": {
      "description": "Number is the saddle-cloth number; outcome codes never appear here.",
      "type": "string"
    },
    "odds": {
      "$ref": "#/$defs/dto.HorseRacingRunnerOdds"
    },
    "pedigree": {
      "allOf": [
        {
          "$ref": "#/$defs/database.HorseRacingPedigree"
        }
      ],
      "description": "Pedigree is the horse's sire and dam where the source names them\n(Hong Kong: every runner of the race card, the winner of a result)."
    },
    "race_id": {
      "type": "integer"
    },
    "rating": {
      "type": "string"
    },
    "recent_form": {
      "type": "object"
    },
    "records": {
      "allOf": [
        {
          "$ref": "#/$defs/dto.HorseRacingRunnerRecords"
        }
      ],
      "description": "Records are the horse's course, distance, going and jockey/trainer\nrecords read from recent_form (UK and Irish cards), with C/D/CD badges."
    },
    "result": {
      "$ref": "#/$defs/dto.HorseRacingRunnerResult"
    },
    "stall": {
      "type": "string"
    },
    "status": {
      "description": "Status is \"runner\", \"non_runner\" (withdrawn) or \"did_not_finish\".",
      "enum": [
        "runner",
        "non_runner",
        "did_not_finish"
      ],
      "type": "string"
    },
    "trainer": {
      "$ref": "#/$defs/dto.HorseRacingTrainerInfo"
    },
    "updated_at": {
      "description": "UpdatedAt is when anything about this runner last changed (UTC, RFC 3339).",
      "type": "string"
    },
    "weight": {
      "type": "string"
    },
    "weight_lbs": {
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "database.HorseRacingPedigree": {
      "properties": {
        "dam": {
          "type": "string"
        },
        "sire": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingEachWay": {
      "properties": {
        "fraction": {
          "type": "string"
        },
        "places": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingJockeyInfo": {
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingMorningLine": {
      "properties": {
        "decimal": {
          "type": "number"
        },
        "fractional": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingPayouts": {
      "properties": {
        "place": {
          "type": "string"
        },
        "show": {
          "type": "string"
        },
        "win": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingQuote": {
      "properties": {
        "bookmaker_id": {
          "description": "BookmakerID is our stable registry id (see GET /horse-racing/bookmakers).",
          "type": "integer"
        },
        "decimal": {
          "description": "Decimal odds; null unless price_type is \"fixed\".",
          "type": "number"
        },
        "each_way": {
          "$ref": "#/$defs/dto.HorseRacingEachWay"
        },
        "fractional": {
          "description": "Fractional odds as displayed by UK bookmakers; null when unknown.",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "price_type": {
          "description": "PriceType is \"fixed\" (a price), \"sp\" (starting price only) or \"none\"\n(not priced yet).",
          "enum": [
            "fixed",
            "sp",
            "none"
          ],
          "type": "string"
        },
        "slug": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingRecord": {
      "properties": {
        "name": {
          "description": "Name is the jockey or trainer the record is with (connections only).",
          "type": "string"
        },
        "places": {
          "type": "integer"
        },
        "runs": {
          "type": "integer"
        },
        "wins": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingRunnerOdds": {
      "properties": {
        "best": {
          "allOf": [
            {
              "$ref": "#/$defs/dto.HorseRacingQuote"
            }
          ],
          "description": "Best is the highest fixed decimal price among Bookmakers; null when none is fixed."
        },
        "bookmakers": {
          "items": {
            "$ref": "#/$defs/dto.HorseRacingQuote"
          },
          "type": "array"
        },
        "updated_at": {
          "description": "UpdatedAt is when our sync first saw these prices (UTC, RFC 3339).\nThe data provider publishes no price timestamp.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingRunnerRecords": {
      "properties": {
        "badges": {
          "description": "Badges: C won at this course, D won at this distance, CD won at this\ncourse and distance (the race-card letters).",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "course": {
          "$ref": "#/$defs/dto.HorseRacingRecord"
        },
        "course_distance": {
          "$ref": "#/$defs/dto.HorseRacingRecord"
        },
        "distance": {
          "$ref": "#/$defs/dto.HorseRacingRecord"
        },
        "going": {
          "allOf": [
            {
              "$ref": "#/$defs/dto.HorseRacingRecord"
            }
          ],
          "description": "Going is the record on similar going."
        },
        "jockey": {
          "allOf": [
            {
              "$ref": "#/$defs/dto.HorseRacingRecord"
            }
          ],
          "description": "Jockey and Trainer are the horse's record with them."
        },
        "surface": {
          "$ref": "#/$defs/dto.HorseRacingRecord"
        },
        "trainer": {
          "$ref": "#/$defs/dto.HorseRacingRecord"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingRunnerResult": {
      "properties": {
        "dead_heat": {
          "description": "DeadHeat is true when the runner shares its position with another.",
          "type": "boolean"
        },
        "distance": {
          "type": "string"
        },
        "finish_code": {
          "description": "FinishCode is set when the runner did not finish: PU (pulled up),\nF (fell), U/UR (unseated), B/BD (brought down), RR/RO (refused/ran out),\nS (slipped), and other upstream codes.",
          "type": "string"
        },
        "payouts": {
          "allOf": [
            {
              "$ref": "#/$defs/dto.HorseRacingPayouts"
            }
          ],
          "description": "Payouts are the USA pari-mutuel payouts per $2 stake, only for the\npools the runner paid in (win: 1st, place: 1st-2nd, show: 1st-3rd)."
        },
        "position": {
          "description": "Position is null when the runner did not finish.",
          "type": "integer"
        },
        "sp": {
          "type": "string"
        },
        "sp_decimal": {
          "type": "number"
        },
        "time": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.HorseRacingTrainerInfo": {
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}