{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sportstatsapi/json-schema/sportstatsapi-dto-team-response-schema.json",
  "title": "dto.TeamResponse",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sportstatsapi-openapi.json#/components/schemas/dto.TeamResponse",
  "properties": {
    "abbreviation": {
      "type": "string"
    },
    "attribution": {
      "type": "string"
    },
    "club_fixtures": {
      "description": "ClubFixtures and ClubNews: what a club that manages its own page\nentered (soccer, only on /teams/{id}): its own fixtures (friendlies,\nyouth teams from U16; the last 30 days and the coming year) and its\nlatest 10 news posts, shown at once.",
      "items": {
        "$ref": "#/$defs/database.PublicClubFixture"
      },
      "type": "array"
    },
    "club_news": {
      "items": {
        "$ref": "#/$defs/database.PublicClubNews"
      },
      "type": "array"
    },
    "coach": {
      "allOf": [
        {
          "$ref": "#/$defs/dto.TeamCoachResponse"
        }
      ],
      "description": "Coach: the current head coach from Wikidata (soccer; only on\n/teams/{id}), with the attribution."
    },
    "coach_id": {
      "type": "integer"
    },
    "coach_name": {
      "type": "string"
    },
    "colour1": {
      "description": "Colour1, Colour2: the club colours, \"#rrggbb\" (main, second; only on\n/teams/{id}). Colours the club entered win over all others.",
      "type": "string"
    },
    "colour2": {
      "type": "string"
    },
    "country": {
      "type": "string"
    },
    "display_name": {
      "description": "DisplayName: the name to show (accents and case from official sources; a managed club's own name), else name. name stays the data provider's: filters match on it.",
      "type": "string"
    },
    "founded": {
      "type": "string"
    },
    "id": {
      "type": "integer"
    },
    "is_national": {
      "type": "boolean"
    },
    "is_women": {
      "type": "boolean"
    },
    "league_ids": {
      "description": "leagues played in during the last 120 days",
      "items": {
        "type": "integer"
      },
      "type": "array"
    },
    "logo_thumb_url": {
      "description": "LogoThumbURL: a 128 px WebP copy of the logo (a few KB) for small\nslots; only when the copy exists.",
      "type": "string"
    },
    "logo_url": {
      "description": "LogoURL: the team's logo on this API (image licence not included).",
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "players_with_value": {
      "type": "integer"
    },
    "profile": {
      "description": "Profile: soccer profile sections as sent (transfers, trophies,\nsidelined, detailed_stats); only on /teams/{id}.",
      "type": "object"
    },
    "rating": {
      "allOf": [
        {
          "$ref": "#/$defs/dto.TeamRatingResponse"
        }
      ],
      "description": "Rating: the team's Elo-style rating with its rank in its league and\nits last 10 rated matches (only on /teams/{id}; docs/ratings.md)."
    },
    "sport": {
      "type": "string"
    },
    "squad_players": {
      "type": "integer"
    },
    "squad_value_eur": {
      "description": "Squad market value (soccer, only on /teams/{id}): the sum of the current\nsquad's market values, over players_with_value of squad_players.",
      "type": "integer"
    },
    "summary": {
      "description": "The website page's summary (English paragraphs from our data only)\nand when the site build wrote it: soccer, NBA, NHL, MLB and NFL teams\nwith a site page, while that build is under 2 hours old. With ?lang\n(de, es, it, fr; sold sports; a plan with Insights): the team briefing's summary in that\nlanguage, from the briefing sentence templates only; English when\nnone (summary_lang). middleware.SiteSummary; listed here for the API\ndocs.",
      "type": "string"
    },
    "summary_as_of": {
      "type": "string"
    },
    "summary_lang": {
      "description": "en, de, es, it or fr",
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    },
    "venue_address": {
      "type": "string"
    },
    "venue_capacity": {
      "type": "integer"
    },
    "venue_city": {
      "type": "string"
    },
    "venue_id": {
      "type": "integer"
    },
    "venue_name": {
      "type": "string"
    },
    "venue_surface": {
      "type": "string"
    },
    "wikidata_id": {
      "description": "WikidataID: the club's Wikidata item (\"Q9617\"; only on /teams/{id},\nwhen the team is matched to Wikidata).",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "database.PublicClubFixture": {
      "properties": {
        "competition": {
          "type": "string"
        },
        "home": {
          "type": "boolean"
        },
        "kickoff": {
          "description": "UTC",
          "type": "string"
        },
        "label": {
          "description": "\"Friendly\" for the first team, else the age group (\"U19\")",
          "type": "string"
        },
        "opponent": {
          "type": "string"
        },
        "status": {
          "description": "scheduled, cancelled",
          "type": "string"
        },
        "team": {
          "description": "first, U16..U23",
          "type": "string"
        },
        "venue": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "database.PublicClubNews": {
      "properties": {
        "body": {
          "description": "plain text",
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "image": {
          "description": "the post's picture",
          "type": "string"
        },
        "published_at": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "dto.NamedRef": {
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "wikidata_id": {
          "type": "string"
        }
      },
      "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.TeamCoachResponse": {
      "properties": {
        "appointed": {
          "description": "YYYY-MM-DD",
          "type": "string"
        },
        "drawn": {
          "type": "integer"
        },
        "lost": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "played": {
          "description": "with appointed only",
          "type": "integer"
        },
        "previous_club": {
          "$ref": "#/$defs/dto.NamedRef"
        },
        "previous_coach": {
          "allOf": [
            {
              "$ref": "#/$defs/dto.NamedRef"
            }
          ],
          "description": "The team's coach before this one and this coach's own team before\n(a club or national team), from Wikidata; absent when not known."
        },
        "record_complete": {
          "description": "false: our history starts after the appointment, record partial",
          "type": "boolean"
        },
        "record_from": {
          "description": "first match counted, YYYY-MM-DD",
          "type": "string"
        },
        "role": {
          "description": "e.g. caretaker",
          "type": "string"
        },
        "source": {
          "description": "Wikidata, or provider (name only)",
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "wikidata_id": {
          "type": "string"
        },
        "won": {
          "type": "integer"
        }
      },
      "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"
    }
  }
}