# Team Player Files

Use one JSON file per club, named with the same underscore slug used by `.legacy-player-names.json`, for example `afc_fylde.json`.

The API reads these files before the old shared catalog. This lets one club be updated without rewriting every team.

Format:

```json
{
  "updated": "2026-07-06",
  "primarySource": "https://example.com/teams/",
  "players": [
    {
      "name": "Player Name",
      "shirtName": "NAME",
      "legacyRole": "Centre-Forward",
      "legacyNumber": 9,
      "source": "https://example.com/player-or-signing-source"
    }
  ]
}
```

`name` is required. `shirtName`, `legacyRole`, `legacyNumber`, and `source` are optional.

Useful tools:

```bash
php tools/import_transfermarkt_team_players.php
php tools/import_transfermarkt_team_players.php --force brighton
php tools/audit_team_players.php
```

The Transfermarkt importer skips existing files unless `--force` is passed. Keep official club files in place and only force teams you explicitly want to refresh from Transfermarkt.
