> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beter-keiba.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 調教師詳細



## OpenAPI

````yaml /reference/openapi.json get /trainers/{trainerId}
openapi: 3.1.0
info:
  title: BeTerKEIBA Core API
  description: >-
    JV-Data をベースとした競馬データ配信プラットフォーム。Cloudflare Workers (Hono), D1,
    R2を組み合わせたモダンなアーキテクチャで構築されています。


    ### 特徴

    - **高速レスポンス**: Cloudflareのエッジネットワークによる低レイテンシ。

    - **完全なデータ構造**: 産駒から現役、オッズ、マイニングまで網羅。

    - **開発者フレンドリー**: MintlifyドキュメントとTypeScript SDKによる高い開発効率
  version: 1.0.0
servers:
  - url: https://api.beter-keiba.com/v1
    description: 本番環境
security:
  - bearerAuth: []
tags:
  - name: Races
    description: レースデータ。開催情報・出走表・結果など、レース単位で取得する正規データ
  - name: Odds
    description: オッズデータ。単勝・複勝・枠連・馬連・ワイド・馬単・3連複・3連単の確定オッズおよび最終オッズ
  - name: Masters
    description: マスタデータ。競走馬・騎手・調教師・生産者・馬主・繁殖牝馬といった静的な実体情報
  - name: Updates
    description: 更新データ。スケジュール・調教・WIN5・予想指数など、随時更新が発生する派生データ
paths:
  /trainers/{trainerId}:
    get:
      tags:
        - Masters
      summary: 調教師詳細
      operationId: getTrainer
      parameters:
        - $ref: '#/components/parameters/trainerId'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Trainer'
              example:
                code: SUCCESS
                data:
                  id: ch_01124
                  dataType: '2'
                  dataUpdatedAt: 1716715200
                  name: 安田翔伍
                  nameKana: ﾔｽﾀﾞ ｼｮｳｺﾞ
                  nameAbbr: 安田翔
                  nameEng: YASUDA Shogo
                  birthday: '19811013'
                  isRetired: false
                  licenseIssuedAt: '20140301'
                  genderCode: '1'
                  locationCode: '1'
                  invitationRegionName: ''
                  milestones:
                    recentGradedWins:
                      - raceId: ra_2024052605021211
                        raceTitle: 東京優駿
                        raceTitleShort10: 日本ダービー
                        raceTitleShort6: ダービー
                        raceTitleShort3: ダービー
                        gradeCode: A
                        fieldSize: 18
                        horseId: um_2021105477
                        horseName: ドウデュース
                  stats:
                    thisYear:
                      year: 2024
                      earnings:
                        baseFlat: 0
                        baseObstacle: 0
                        addedFlat: 0
                        addedObstacle: 0
                      placings:
                        flat:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        obstacle:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        byVenue:
                          sapporo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hakodate:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          fukushima:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          niigata:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          tokyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          nakayama:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          chukyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kyoto:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hanshin:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kokura:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                        byDistance:
                          turfUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirtUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                    lastYear:
                      year: 2024
                      earnings:
                        baseFlat: 0
                        baseObstacle: 0
                        addedFlat: 0
                        addedObstacle: 0
                      placings:
                        flat:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        obstacle:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        byVenue:
                          sapporo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hakodate:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          fukushima:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          niigata:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          tokyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          nakayama:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          chukyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kyoto:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hanshin:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kokura:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                        byDistance:
                          turfUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirtUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                    total:
                      year: 2024
                      earnings:
                        baseFlat: 0
                        baseObstacle: 0
                        addedFlat: 0
                        addedObstacle: 0
                      placings:
                        flat:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        obstacle:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        byVenue:
                          sapporo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hakodate:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          fukushima:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          niigata:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          tokyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          nakayama:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          chukyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kyoto:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hanshin:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kokura:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                        byDistance:
                          turfUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirtUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                  createdAt: 1716716000
                  updatedAt: 1716716000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    trainerId:
      name: trainerId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/TrainerId'
    fields:
      name: fields
      in: query
      schema:
        type: string
        maxLength: 500
      description: 取得するフィールドの絞り込み（カンマ区切り）
  schemas:
    SuccessResponse:
      type: object
      description: >-
        成功レスポンスの共通ラッパー。code は常に "SUCCESS"、data にエンドポイント固有のレスポンスボディ、extensions
        に補助情報 (pagination や統計など) を含みます。
      required:
        - code
        - data
      properties:
        code:
          type: string
          description: 処理結果コード。成功時は常に 'SUCCESS'
          example: SUCCESS
        data:
          description: 取得されたデータ本体
        extensions:
          $ref: '#/components/schemas/ResponseExtensions'
    Trainer:
      type: object
      description: 調教師データ。所属拠点 (locationCode) や本年・前年・通算成績を含みます。
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/TrainerId'
        dataType:
          type: string
          description: データ区分 (JV-Data CH レコード §2 由来)。1:新規登録, 2:更新, 0:該当レコード削除(提供ミスなどの理由による)
          example: '2'
          maxLength: 1
        dataUpdatedAt:
          type: integer
          description: データ作成日時 (JV-Data CH レコード §3 由来、Unix Timestamp)
          example: 1716715200
        name:
          type: string
          description: 調教師名 (JV-Data CH レコード §9 由来、全角17文字。日本人調教師は姓+全角空白1文字+名、外国人調教師は連続17文字)
          example: 安田翔伍
          maxLength: 34
        nameKana:
          type: string
          description: 調教師名半角ｶﾅ (JV-Data CH レコード §10 由来、姓15文字+名15文字)
          example: ﾔｽﾀﾞ ｼｮｳｺﾞ
          maxLength: 30
        nameAbbr:
          type: string
          description: 調教師名略称 (JV-Data CH レコード §11 由来、全角4文字)
          example: 安田翔
          maxLength: 8
        nameEng:
          type: string
          description: 調教師名欧字 (JV-Data CH レコード §12 由来、姓+半角空白+名のフルネーム)
          example: YASUDA Shogo
          maxLength: 80
        birthday:
          type: string
          description: 生年月日 (JV-Data CH レコード §8 由来、yyyymmdd)
          example: '19811013'
          maxLength: 8
        isRetired:
          type: boolean
          description: 調教師抹消区分 (JV-Data CH レコード §5 由来、true:抹消, false:現役)
          example: false
        licenseIssuedAt:
          type: string
          description: 調教師免許交付年月日 (JV-Data CH レコード §6 由来、yyyymmdd)
          example: '20140301'
          maxLength: 8
        licenseRevokedAt:
          type: string
          description: 調教師免許抹消年月日 (JV-Data CH レコード §7 由来、yyyymmdd)。現役調教師は null
          example: null
          nullable: true
          maxLength: 8
        genderCode:
          $ref: '#/components/schemas/GenderCode'
        locationCode:
          $ref: '#/components/schemas/LocationCode'
        invitationRegionName:
          type: string
          description: 招待地域名 (JV-Data CH レコード §15 由来、全角10文字)
          example: ''
          maxLength: 20
        milestones:
          $ref: '#/components/schemas/TrainerMilestones'
        stats:
          $ref: '#/components/schemas/TrainerStats'
        createdAt:
          type: integer
          description: >-
            API 側の行作成タイムスタンプ (Unix 秒、内部管理メタデータ)。JV-Data 由来の `dataUpdatedAt` (CH
            §3、データ作成年月日) とは独立した別軸
        updatedAt:
          type: integer
          description: >-
            API 側の行更新タイムスタンプ (Unix 秒、内部管理メタデータ)。JV-Data 由来の `dataUpdatedAt` (CH
            §3、データ作成年月日) とは独立した別軸
    TrainerId:
      type: string
      pattern: ^ch_[0-9]{5}$
      example: ch_01124
      description: >-
        Trainer entity ID。JV-Data CH レコード由来の調教師コード (5 桁)。フリー所属
        (`Jockey.stableTrainerId`) を表す `ch_00000` (JV-Data 上の "ALL0" 相当) も
        pattern に合致する
    ResponseExtensions:
      type: object
      description: レスポンスに関する補助情報（メタデータ）。一覧取得時にはページネーション情報が含まれます。
      properties:
        totalCount:
          type: integer
          description: 検索条件に一致する全データの総件数
          example: 150
        limit:
          type: integer
          description: 1リクエストあたりの最大取得件数
          example: 50
        page:
          type: integer
          description: 現在のページ番号
          example: 1
        totalPages:
          type: integer
          description: 全件数をlimitで割った合計ページ数
          example: 3
        dataUpdatedAt:
          type: integer
          description: 返却されたデータの最終更新日時 (Unix Timestamp)。キャッシュ制御などに利用します。
          example: 1716715200
    GenderCode:
      type: string
      description: |-
        騎手・調教師など人物の性別区分。馬の性別を表す `SexCode` とは別の code table に基づきます。

        | コード | 名称 |
        | :--- | :--- |
        | 1 | 男性 |
        | 2 | 女性 |
        | 0 | 未設定 |
      enum:
        - '0'
        - '1'
        - '2'
      example: '1'
      maxLength: 1
    LocationCode:
      type: string
      description: |-
        所属するトレーニングセンターや地域を表すコード。

        | コード | 名称1 | 名称2 | 説明 |
        | :--- | :--- | :--- | :--- |
        | 1 | 関東 | 美浦 | 美浦トレーニングセンター所属 |
        | 2 | 関西 | 栗東 | 栗東トレーニングセンター所属 |
        | 3 | 地方招待 | 招待 | 地方競馬からの招待 |
        | 4 | 外国招待 | 招待 | 外国からの招待 |
        | 0 | 未設定 | - | 地方・海外等の初期値 |
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
      example: '1'
      maxLength: 1
    TrainerMilestones:
      type: object
      description: >-
        調教師のマイルストーン記録 (JV-Data CH レコード項番16 由来)。event 1 件分の primitive
        (`GradedWin`) は Jockey 側と $ref 共有する一方、top-level の `TrainerMilestones` は
        entity 別に分離 (`JockeyMilestones` とは別 schema)
      properties:
        recentGradedWins:
          type: array
          description: 最近の重賞勝利情報 (JV-Data CH レコード項番16 由来)。新しい順に保持
          items:
            $ref: '#/components/schemas/GradedWin'
    TrainerStats:
      type: object
      description: 調教師の年度別成績情報 (JV-Data CH レコード項番17 由来)。本年・前年・累計の 3 周期分を保持する。
      properties:
        thisYear:
          $ref: '#/components/schemas/TrainerPeriod'
        lastYear:
          $ref: '#/components/schemas/TrainerPeriod'
        total:
          $ref: '#/components/schemas/TrainerPeriod'
    ErrorResponse:
      type: object
      description: >-
        エラーレスポンスの共通ラッパー。すべての 4xx / 5xx で同一構造を返します。トップレベルの `error`
        フィールドに、プログラム判定用の `code`、人間向け `message`、問い合わせ追跡用の `requestId` を入れます。
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: エラーコード。プログラムで判定可能な SCREAMING_SNAKE_CASE 文字列
              example: UNAUTHORIZED
            message:
              type: string
              description: エラーの内容（人間向けメッセージ）
              example: 有効なAPIアクセスキーが必要です。
            requestId:
              type: string
              description: 問い合わせ用ID
              example: req_abcd1234
    GradedWin:
      type: object
      description: >-
        重賞勝利 1 件分の event record (JV-Data KS レコード項番23 / CH レコード項番16
        由来)。Jockey/Trainer 間で $ref 共有する entity 横断 primitive。競走名 4 variants は
        Race entity の `title` 慣習に揃え `raceTitle` 系列で flat sibling として保持する (group
        化しない)
      properties:
        raceId:
          $ref: '#/components/schemas/RaceId'
        raceTitle:
          type: string
          description: 競走名本題
          example: 東京優駿
          maxLength: 60
        raceTitleShort10:
          type: string
          description: 競走名略称10文字
          example: 日本ダービー
          maxLength: 20
        raceTitleShort6:
          type: string
          description: 競走名略称6文字
          example: ダービー
          maxLength: 12
        raceTitleShort3:
          type: string
          description: 競走名略称3文字
          example: ダービー
          maxLength: 6
        gradeCode:
          $ref: '#/components/schemas/GradeCode'
        fieldSize:
          type: integer
          description: 出走頭数
          example: 18
        horseId:
          $ref: '#/components/schemas/HorseId'
        horseName:
          type: string
          description: 馬名
          example: ドウデュース
          maxLength: 36
    TrainerPeriod:
      type: object
      description: >-
        調教師の 1 周期分 (本年 / 前年 / 累計) の成績。中央のみのカウント (`earnings: { baseFlat,
        baseObstacle, addedFlat, addedObstacle }`、`placings: { flat[6],
        obstacle[6], byVenue, byDistance }`)。
      properties:
        year:
          type: integer
          description: 成績情報に設定されている年度 (西暦)
          example: 2024
        earnings:
          type: object
          description: 賞金合計 (円単位)。CH は平地/障害 × 本/付加 の 4 通り
          properties:
            baseFlat:
              type: integer
              description: 平地本賞金合計 (円)
            baseObstacle:
              type: integer
              description: 障害本賞金合計 (円)
            addedFlat:
              type: integer
              description: 平地付加賞金合計 (円)
            addedObstacle:
              type: integer
              description: 障害付加賞金合計 (円)
        placings:
          type: object
          description: 着回数群 (各 array は [1着, 2着, 3着, 4着, 5着, 着外] の固定 6 要素)
          properties:
            flat:
              type: array
              description: 平地着回数
              items:
                type: integer
              minItems: 6
              maxItems: 6
            obstacle:
              type: array
              description: 障害着回数
              items:
                type: integer
              minItems: 6
              maxItems: 6
            byVenue:
              type: object
              description: 競馬場別着回数 (中央 10 場 × 平地/障害)
              properties:
                sapporo:
                  $ref: '#/components/schemas/VenuePlacings'
                hakodate:
                  $ref: '#/components/schemas/VenuePlacings'
                fukushima:
                  $ref: '#/components/schemas/VenuePlacings'
                niigata:
                  $ref: '#/components/schemas/VenuePlacings'
                tokyo:
                  $ref: '#/components/schemas/VenuePlacings'
                nakayama:
                  $ref: '#/components/schemas/VenuePlacings'
                chukyo:
                  $ref: '#/components/schemas/VenuePlacings'
                kyoto:
                  $ref: '#/components/schemas/VenuePlacings'
                hanshin:
                  $ref: '#/components/schemas/VenuePlacings'
                kokura:
                  $ref: '#/components/schemas/VenuePlacings'
            byDistance:
              type: object
              description: >-
                距離別着回数 ({surface}UpTo1600 / {surface}1601To2200 /
                {surface}2201Plus の 3 段 bucket)
              properties:
                turfUpTo1600:
                  type: array
                  description: 芝・1600m以下
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                turf1601To2200:
                  type: array
                  description: 芝・1601-2200m
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                turf2201Plus:
                  type: array
                  description: 芝・2201m以上
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                dirtUpTo1600:
                  type: array
                  description: ダート・1600m以下
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                dirt1601To2200:
                  type: array
                  description: ダート・1601-2200m
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                dirt2201Plus:
                  type: array
                  description: ダート・2201m以上
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
    RaceId:
      type: string
      pattern: ^ra_[0-9]{16}$
      example: ra_2024052605021211
      description: >-
        Race entity ID。JV-Data RA レコード由来の合成 PK (開催年月日 8 桁 + 場コード 2 桁 + 開催回 2 桁 +
        開催日目 2 桁 + レース番号 2 桁)
    GradeCode:
      type: string
      description: |-
        競走のグレードを表すコード。

        | コード | 内容 | 欧字表記 |
        | :--- | :--- | :--- |
        | A | G1（平地） | G1 |
        | B | G2（平地） | G2 |
        | C | G3（平地） | G3 |
        | D | グレードのない重賞 | - |
        | E | 重賞以外の特別競走 | - |
        | F | J・G1（障害） | J・G1 |
        | G | J・G2（障害） | J・G2 |
        | H | J・G3（障害） | J・G3 |
        | L | L（リステッド） | L |
        | _ | 一般競走 または 未設定 | - |

        ※ `_` は半角スペース(0x20)をアンダースコアに置換しています。
      enum:
        - A
        - B
        - C
        - D
        - E
        - F
        - G
        - H
        - L
        - _
      x-fern-enum:
        _:
          name: Open
          description: 一般競走 または 未設定 (元の JV-Data コードは半角スペース 0x20)
      example: A
      maxLength: 1
    HorseId:
      type: string
      pattern: ^um_[0-9]{10}$
      example: um_2021105477
      description: Horse entity ID。JV-Data UM レコード由来の血統登録番号 (10 桁)
    VenuePlacings:
      type: object
      description: >-
        競馬場 1 場分の平地・障害着回数 (各 array は [1着, 2着, 3着, 4着, 5着, 着外] の固定 6 要素)。KS/CH 間で
        $ref 共有する entity 横断 primitive。
      properties:
        flat:
          type: array
          description: 平地
          items:
            type: integer
          minItems: 6
          maxItems: 6
        obstacle:
          type: array
          description: 障害
          items:
            type: integer
          minItems: 6
          maxItems: 6
  responses:
    BadRequest:
      description: リクエストの構文エラーや型不整合
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: BAD_REQUEST
              message: リクエストの形式が正しくありません。
    Unauthorized:
      description: >-
        認証エラー（APIキー未設定、または無効）。`Authorization: Bearer <sk_live_... or
        sk_test_...>` を必ず付与してください。失敗理由（キー欠落 / 不明 / 失効）は同一 body で返します。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHORIZED
              message: 有効なAPIキーが必要です。
    NotFound:
      description: リソースが見つからない場合
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: 指定されたIDのリソースが見つかりませんでした。
    InternalServerError:
      description: サーバー内部エラー
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL_SERVER_ERROR
              message: サーバー内部で予期せぬエラーが発生しました。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        APIダッシュボードで発行された `sk_live_...` または `sk_test_...` キーを入力してください。prefix は
        mode を示し、両 mode とも同じ API URL で利用できます (`sk_live_*` = live mode /
        本番、`sk_test_*` = test mode / 開発・自動テスト)。

````