{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sportstatsapi/json-schema/sportstatsapi-dto-player-response-schema.json",
  "title": "dto.PlayerResponse",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sportstatsapi-openapi.json#/components/schemas/dto.PlayerResponse",
  "properties": {
    "age": {
      "type": "integer"
    },
    "attribution": {
      "type": "string"
    },
    "bio": {
      "allOf": [
        {
          "$ref": "#/$defs/dto.PlayerBioResponse"
        }
      ],
      "description": "Bio (soccer, only on /players/{id}): the normalised profile (full\nand short name, birth date and age, position, number, club, market\nvalue); profile above stays the feed's sections as sent."
    },
    "birthdate": {
      "description": "From the soccer player profile.",
      "type": "string"
    },
    "details": {
      "description": "Details: the feed's other attributes, as sent (season stats, height,\nweight, college, injured...); keys differ per sport.",
      "type": "object"
    },
    "filled_from_wikidata": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "height": {
      "type": "string"
    },
    "id": {
      "type": "integer"
    },
    "market_value_eur": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "nationality": {
      "type": "string"
    },
    "number": {
      "type": "string"
    },
    "photo_url": {
      "description": "PhotoURL: the player's photo on this API (image licence not included).",
      "type": "string"
    },
    "position": {
      "type": "string"
    },
    "preferred_foot": {
      "type": "string"
    },
    "profile": {
      "description": "Profile: as sent, only on /players/{id}. Soccer: career statistics,\ntransfers, trophies, sidelined. Tennis: birthplace, residence, plays,\ncareer_high, earnings, recent results and tournaments. Cricket:\nbatting_style, bowling_style, role, international caps and debuts,\nphoto (Commons link with licence and credit, adults only), sources,\nattribution and filled (the columns above it filled).",
      "type": "object"
    },
    "rank": {
      "type": "integer"
    },
    "rank_movement": {
      "description": "up, down or same since the last list",
      "type": "string"
    },
    "rank_points": {
      "type": "integer"
    },
    "rating": {
      "allOf": [
        {
          "$ref": "#/$defs/dto.TeamRatingResponse"
        }
      ],
      "description": "Rating (tennis, only on /players/{id}): the player's Elo-style rating\nfrom our results (docs/ratings.md)."
    },
    "season": {
      "allOf": [
        {
          "$ref": "#/$defs/dto.PlayerSeasonResponse"
        }
      ],
      "description": "Season (soccer, only on /players/{id}): the current season in every\ncompetition we hold statistics for, summed and per competition."
    },
    "sport": {
      "type": "string"
    },
    "summary": {
      "description": "The website page's summary (English paragraphs from our data only;\nnot with ?lang; none for a player under 18) and when the site build\nwrote it, while that build is under 2 hours old\n(middleware.SiteSummary); listed here for the API docs.",
      "type": "string"
    },
    "summary_as_of": {
      "type": "string"
    },
    "summary_lang": {
      "description": "en",
      "type": "string"
    },
    "team_id": {
      "type": "integer"
    },
    "tour": {
      "description": "Tennis singles ranking (atp or wta), when the player is in it.",
      "type": "string"
    },
    "transfers": {
      "description": "Transfers (soccer, only on /players/{id}): the profile's transfers\nnormalised, latest first.",
      "items": {
        "$ref": "#/$defs/dto.TransferResponse"
      },
      "type": "array"
    },
    "updated_at": {
      "type": "string"
    },
    "weight": {
      "type": "string"
    },
    "wikidata": {
      "$ref": "#/$defs/dto.WikiPlayerProfile"
    },
    "wikidata_id": {
      "description": "Wikidata: the player's Wikidata values (cricket, tennis; only on\n/players/{id}); birthdate, height and nationality above are filled\nfrom it only where the feed has none (listed in filled_from_wikidata).\nWikidataID: the player's Wikidata item (soccer squads and\n/players/{id}, when matched).",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "dto.NamedRef": {
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "wikidata_id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.PlayerBioResponse": {
      "properties": {
        "age": {
          "description": "Age: from the birth date on today's date, else as the squad feed has it.",
          "type": "integer"
        },
        "birth_date": {
          "description": "YYYY-MM-DD",
          "type": "string"
        },
        "club": {
          "$ref": "#/$defs/dto.NamedRef"
        },
        "full_name": {
          "description": "first and last name from the profile",
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "known_as": {
          "description": "the name the feeds use",
          "type": "string"
        },
        "market_value_eur": {
          "type": "integer"
        },
        "nationality": {
          "type": "string"
        },
        "number": {
          "type": "integer"
        },
        "photo_url": {
          "type": "string"
        },
        "position": {
          "description": "Position: goalkeeper, defender, midfielder or forward.",
          "type": "string"
        },
        "short_name": {
          "description": "ShortName: the profile's common name (\"E. Haaland\").",
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.PlayerSeasonResponse": {
      "properties": {
        "leagues": {
          "items": {
            "$ref": "#/$defs/dto.PlayerSeasonStatsResponse"
          },
          "type": "array"
        },
        "season": {
          "type": "string"
        },
        "total": {
          "$ref": "#/$defs/dto.PlayerSeasonStatsResponse"
        }
      },
      "type": "object"
    },
    "dto.PlayerSeasonStatsResponse": {
      "properties": {
        "apps": {
          "type": "integer"
        },
        "assists": {
          "type": "integer"
        },
        "clean_sheets": {
          "type": "integer"
        },
        "goals": {
          "type": "integer"
        },
        "goals_conceded": {
          "type": "integer"
        },
        "last_match_date": {
          "description": "the league season's latest finished match",
          "type": "string"
        },
        "league_id": {
          "type": "integer"
        },
        "league_name": {
          "type": "string"
        },
        "matches_with_stats": {
          "type": "integer"
        },
        "minutes": {
          "type": "integer"
        },
        "own_goals": {
          "type": "integer"
        },
        "partial": {
          "description": "Partial: the season began before our live window, so the row counts\nonly its matches from then on (team_matches_played says how many).",
          "type": "boolean"
        },
        "penalty_goals": {
          "type": "integer"
        },
        "player_id": {
          "type": "integer"
        },
        "player_name": {
          "type": "string"
        },
        "rating_avg": {
          "type": "number"
        },
        "red": {
          "type": "integer"
        },
        "saves": {
          "type": "integer"
        },
        "season": {
          "type": "string"
        },
        "second_yellow": {
          "type": "integer"
        },
        "shots": {
          "type": "integer"
        },
        "shots_on_target": {
          "type": "integer"
        },
        "starts": {
          "type": "integer"
        },
        "sub_apps": {
          "type": "integer"
        },
        "team_id": {
          "type": "integer"
        },
        "team_matches_played": {
          "type": "integer"
        },
        "team_name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "xa": {
          "type": "number"
        },
        "xg": {
          "type": "number"
        },
        "yellow": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "dto.RatingHistoryResponse": {
      "properties": {
        "change": {
          "type": "number"
        },
        "date": {
          "type": "string"
        },
        "match_id": {
          "type": "integer"
        },
        "opponent_id": {
          "type": "integer"
        },
        "rating": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "dto.TeamRatingResponse": {
      "properties": {
        "history": {
          "description": "/teams/{id}: the last 10 rated matches, latest first",
          "items": {
            "$ref": "#/$defs/dto.RatingHistoryResponse"
          },
          "type": "array"
        },
        "last_match_date": {
          "type": "string"
        },
        "league_id": {
          "type": "integer"
        },
        "league_name": {
          "type": "string"
        },
        "matches_rated": {
          "type": "integer"
        },
        "of": {
          "type": "integer"
        },
        "peak": {
          "type": "number"
        },
        "provisional": {
          "type": "boolean"
        },
        "rank": {
          "type": "integer"
        },
        "rated_from": {
          "type": "string"
        },
        "rating": {
          "type": "number"
        },
        "team_id": {
          "type": "integer"
        },
        "team_name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.TransferResponse": {
      "properties": {
        "date": {
          "description": "YYYY-MM-DD",
          "type": "string"
        },
        "fee_eur": {
          "description": "only when the feed gives a number",
          "type": "integer"
        },
        "fee_text": {
          "description": "as sent, e.g. \"EUR 30.0m\"",
          "type": "string"
        },
        "from_team_id": {
          "type": "integer"
        },
        "from_team_name": {
          "type": "string"
        },
        "planned": {
          "description": "dated after today (UTC): an agreed move to come, e.g. a loan end",
          "type": "boolean"
        },
        "player_id": {
          "type": "integer"
        },
        "player_name": {
          "type": "string"
        },
        "season": {
          "description": "2026/2027: from 1 June",
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "to_team_id": {
          "type": "integer"
        },
        "to_team_name": {
          "type": "string"
        },
        "type": {
          "description": "Type: transfer, loan, loan_return, free, promoted, swap or unknown;\ntype_label as the feed writes it.",
          "type": "string"
        },
        "type_label": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "window": {
          "description": "summer, winter, other",
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.WikiPlayerProfile": {
      "properties": {
        "birth_date": {
          "type": "string"
        },
        "bowling_style": {
          "description": "cricket",
          "type": "string"
        },
        "country": {
          "description": "country for sport, else citizenship",
          "type": "string"
        },
        "hand": {
          "description": "right, left, ambidextrous: cricket batting hand, tennis playing hand",
          "type": "string"
        },
        "height_cm": {
          "type": "integer"
        },
        "role": {
          "description": "cricket: batter, bowler, all-rounder...",
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "wikidata_id": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}