Football & Leagues API

Comprehensive football data including leagues, teams, players, matches, standings, transfers, and news

10
Resources
2025-11-28
2 days ago

Favorites

User favorite teams and players

GET /api/football/favorites Auth Required User Filtering

Retrieve a paginated list of all favorites

Returns only favorites belonging to authenticated user
Request Example
GET /api/football/favorites
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "user_id": 1,
        "user_name": "James Wilson",
        "item_type": "team",
        "item_id": 1,
        "item_name": "Manchester City",
        "added_at": "2023-08-15T10:00:00Z"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/favorites/{id} Auth Required

Retrieve a single favorite by ID

Request Example
GET /api/football/favorites/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
    "user_id": 1,
    "user_name": "James Wilson",
    "item_type": "team",
    "item_id": 1,
    "item_name": "Manchester City",
    "added_at": "2023-08-15T10:00:00Z"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested favorite does not exist"
}
POST /api/football/favorites Auth Required Auto User ID

Create a new favorite

Request Body
POST /api/football/favorites
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "user_id": 1,
    "user_name": "James Wilson",
    "item_type": "team",
    "item_id": 1,
    "item_name": "Manchester City",
    "added_at": "2023-08-15T10:00:00Z"
}
Response Example 201 Created
{
    "user_id": 1,
    "user_name": "James Wilson",
    "item_type": "team",
    "item_id": 1,
    "item_name": "Manchester City",
    "added_at": "2023-08-15T10:00:00Z"
}
PUT/PATCH /api/football/favorites/{id} Public

Update an existing favorite

Request Body
PUT /api/football/favorites/1
Content-Type: application/json

{
    "user_id": 1,
    "user_name": "James Wilson",
    "item_type": "team",
    "item_id": 1,
    "item_name": "Manchester City",
    "added_at": "2023-08-15T10:00:00Z"
}
Response Example 200 OK
{
    "user_id": 1,
    "user_name": "James Wilson",
    "item_type": "team",
    "item_id": 1,
    "item_name": "Manchester City",
    "added_at": "2023-08-15T10:00:00Z"
}
DELETE /api/football/favorites/{id} Auth Required Ownership Check

Delete a favorite by ID

Only the owner can delete this resource
Request Example
DELETE /api/football/favorites/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Favorite deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Leagues

Football leagues and competitions

GET /api/football/leagues Public

Retrieve a paginated list of all leagues

Request Example
GET /api/football/leagues
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "name": "Premier League",
        "slug": "premier-league",
        "country": "England",
        "logo": "https://picsum.photos/200/200?random=league1",
        "season": "2023/2024",
        "teams_count": 20,
        "current_matchday": 15,
        "type": "Domestic League"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/leagues/{id} Public

Retrieve a single league by ID

Request Example
GET /api/football/leagues/1
Accept: application/json
Response Example 200 OK
{
    "name": "Premier League",
    "slug": "premier-league",
    "country": "England",
    "logo": "https://picsum.photos/200/200?random=league1",
    "season": "2023/2024",
    "teams_count": 20,
    "current_matchday": 15,
    "type": "Domestic League"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested league does not exist"
}
POST /api/football/leagues Auth Required

Create a new league

Admin only
Request Body
POST /api/football/leagues
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Premier League",
    "slug": "premier-league",
    "country": "England",
    "logo": "https://picsum.photos/200/200?random=league1",
    "season": "2023/2024",
    "teams_count": 20,
    "current_matchday": 15,
    "type": "Domestic League"
}
Response Example 201 Created
{
    "name": "Premier League",
    "slug": "premier-league",
    "country": "England",
    "logo": "https://picsum.photos/200/200?random=league1",
    "season": "2023/2024",
    "teams_count": 20,
    "current_matchday": 15,
    "type": "Domestic League"
}
PUT/PATCH /api/football/leagues/{id} Auth Required

Update an existing league

Request Body
PUT /api/football/leagues/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Premier League",
    "slug": "premier-league",
    "country": "England",
    "logo": "https://picsum.photos/200/200?random=league1",
    "season": "2023/2024",
    "teams_count": 20,
    "current_matchday": 15,
    "type": "Domestic League"
}
Response Example 200 OK
{
    "name": "Premier League",
    "slug": "premier-league",
    "country": "England",
    "logo": "https://picsum.photos/200/200?random=league1",
    "season": "2023/2024",
    "teams_count": 20,
    "current_matchday": 15,
    "type": "Domestic League"
}
DELETE /api/football/leagues/{id} Auth Required

Delete a league by ID

Request Example
DELETE /api/football/leagues/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "League deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Matches

Match results and fixtures

GET /api/football/matches Public

Retrieve a paginated list of all matches

Request Example
GET /api/football/matches
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "league_id": 1,
        "league_name": "Premier League",
        "home_team_id": 1,
        "home_team_name": "Manchester City",
        "home_team_logo": "https://picsum.photos/100/100?random=team1",
        "away_team_id": 3,
        "away_team_name": "Liverpool",
        "away_team_logo": "https://picsum.photos/100/100?random=team3",
        "home_score": 1,
        "away_score": 1,
        "status": "Finished",
        "matchday": 14,
        "date": "2023-11-25T15:00:00Z",
        "stadium": "Etihad Stadium",
        "attendance": 53400,
        "referee": "Michael Oliver"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/matches/{id} Public

Retrieve a single matche by ID

Request Example
GET /api/football/matches/1
Accept: application/json
Response Example 200 OK
{
    "league_id": 1,
    "league_name": "Premier League",
    "home_team_id": 1,
    "home_team_name": "Manchester City",
    "home_team_logo": "https://picsum.photos/100/100?random=team1",
    "away_team_id": 3,
    "away_team_name": "Liverpool",
    "away_team_logo": "https://picsum.photos/100/100?random=team3",
    "home_score": 1,
    "away_score": 1,
    "status": "Finished",
    "matchday": 14,
    "date": "2023-11-25T15:00:00Z",
    "stadium": "Etihad Stadium",
    "attendance": 53400,
    "referee": "Michael Oliver"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested matche does not exist"
}
POST /api/football/matches Auth Required

Create a new matche

Request Body
POST /api/football/matches
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "league_id": 1,
    "league_name": "Premier League",
    "home_team_id": 1,
    "home_team_name": "Manchester City",
    "home_team_logo": "https://picsum.photos/100/100?random=team1",
    "away_team_id": 3,
    "away_team_name": "Liverpool",
    "away_team_logo": "https://picsum.photos/100/100?random=team3",
    "home_score": 1,
    "away_score": 1,
    "status": "Finished",
    "matchday": 14,
    "date": "2023-11-25T15:00:00Z",
    "stadium": "Etihad Stadium",
    "attendance": 53400,
    "referee": "Michael Oliver"
}
Response Example 201 Created
{
    "league_id": 1,
    "league_name": "Premier League",
    "home_team_id": 1,
    "home_team_name": "Manchester City",
    "home_team_logo": "https://picsum.photos/100/100?random=team1",
    "away_team_id": 3,
    "away_team_name": "Liverpool",
    "away_team_logo": "https://picsum.photos/100/100?random=team3",
    "home_score": 1,
    "away_score": 1,
    "status": "Finished",
    "matchday": 14,
    "date": "2023-11-25T15:00:00Z",
    "stadium": "Etihad Stadium",
    "attendance": 53400,
    "referee": "Michael Oliver"
}
PUT/PATCH /api/football/matches/{id} Auth Required

Update an existing matche

Request Body
PUT /api/football/matches/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "league_id": 1,
    "league_name": "Premier League",
    "home_team_id": 1,
    "home_team_name": "Manchester City",
    "home_team_logo": "https://picsum.photos/100/100?random=team1",
    "away_team_id": 3,
    "away_team_name": "Liverpool",
    "away_team_logo": "https://picsum.photos/100/100?random=team3",
    "home_score": 1,
    "away_score": 1,
    "status": "Finished",
    "matchday": 14,
    "date": "2023-11-25T15:00:00Z",
    "stadium": "Etihad Stadium",
    "attendance": 53400,
    "referee": "Michael Oliver"
}
Response Example 200 OK
{
    "league_id": 1,
    "league_name": "Premier League",
    "home_team_id": 1,
    "home_team_name": "Manchester City",
    "home_team_logo": "https://picsum.photos/100/100?random=team1",
    "away_team_id": 3,
    "away_team_name": "Liverpool",
    "away_team_logo": "https://picsum.photos/100/100?random=team3",
    "home_score": 1,
    "away_score": 1,
    "status": "Finished",
    "matchday": 14,
    "date": "2023-11-25T15:00:00Z",
    "stadium": "Etihad Stadium",
    "attendance": 53400,
    "referee": "Michael Oliver"
}
DELETE /api/football/matches/{id} Public

Delete a matche by ID

Request Example
DELETE /api/football/matches/1
Accept: application/json
Response Example 200 OK
{
  "message": "Matche deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

News

Football news and updates

GET /api/football/news Public

Retrieve a paginated list of all news

Request Example
GET /api/football/news
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "title": "Haaland Breaks Premier League Record",
        "slug": "haaland-breaks-record",
        "excerpt": "Manchester City striker Erling Haaland sets new scoring record in the Premier League",
        "content": "In a stunning performance, Erling Haaland has broken the Premier League single-season scoring record...",
        "image": "https://picsum.photos/800/450?random=news1",
        "category": "Transfer News",
        "tags": [
            "Premier League",
            "Manchester City",
            "Records"
        ],
        "source": "Football Daily",
        "published_at": "2023-11-28T09:00:00Z"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/news/{id} Public

Retrieve a single new by ID

Request Example
GET /api/football/news/1
Accept: application/json
Response Example 200 OK
{
    "title": "Haaland Breaks Premier League Record",
    "slug": "haaland-breaks-record",
    "excerpt": "Manchester City striker Erling Haaland sets new scoring record in the Premier League",
    "content": "In a stunning performance, Erling Haaland has broken the Premier League single-season scoring record...",
    "image": "https://picsum.photos/800/450?random=news1",
    "category": "Transfer News",
    "tags": [
        "Premier League",
        "Manchester City",
        "Records"
    ],
    "source": "Football Daily",
    "published_at": "2023-11-28T09:00:00Z"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested new does not exist"
}
POST /api/football/news Auth Required

Create a new new

Request Body
POST /api/football/news
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "title": "Haaland Breaks Premier League Record",
    "slug": "haaland-breaks-record",
    "excerpt": "Manchester City striker Erling Haaland sets new scoring record in the Premier League",
    "content": "In a stunning performance, Erling Haaland has broken the Premier League single-season scoring record...",
    "image": "https://picsum.photos/800/450?random=news1",
    "category": "Transfer News",
    "tags": [
        "Premier League",
        "Manchester City",
        "Records"
    ],
    "source": "Football Daily",
    "published_at": "2023-11-28T09:00:00Z"
}
Response Example 201 Created
{
    "title": "Haaland Breaks Premier League Record",
    "slug": "haaland-breaks-record",
    "excerpt": "Manchester City striker Erling Haaland sets new scoring record in the Premier League",
    "content": "In a stunning performance, Erling Haaland has broken the Premier League single-season scoring record...",
    "image": "https://picsum.photos/800/450?random=news1",
    "category": "Transfer News",
    "tags": [
        "Premier League",
        "Manchester City",
        "Records"
    ],
    "source": "Football Daily",
    "published_at": "2023-11-28T09:00:00Z"
}
PUT/PATCH /api/football/news/{id} Auth Required

Update an existing new

Request Body
PUT /api/football/news/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "title": "Haaland Breaks Premier League Record",
    "slug": "haaland-breaks-record",
    "excerpt": "Manchester City striker Erling Haaland sets new scoring record in the Premier League",
    "content": "In a stunning performance, Erling Haaland has broken the Premier League single-season scoring record...",
    "image": "https://picsum.photos/800/450?random=news1",
    "category": "Transfer News",
    "tags": [
        "Premier League",
        "Manchester City",
        "Records"
    ],
    "source": "Football Daily",
    "published_at": "2023-11-28T09:00:00Z"
}
Response Example 200 OK
{
    "title": "Haaland Breaks Premier League Record",
    "slug": "haaland-breaks-record",
    "excerpt": "Manchester City striker Erling Haaland sets new scoring record in the Premier League",
    "content": "In a stunning performance, Erling Haaland has broken the Premier League single-season scoring record...",
    "image": "https://picsum.photos/800/450?random=news1",
    "category": "Transfer News",
    "tags": [
        "Premier League",
        "Manchester City",
        "Records"
    ],
    "source": "Football Daily",
    "published_at": "2023-11-28T09:00:00Z"
}
DELETE /api/football/news/{id} Auth Required

Delete a new by ID

Request Example
DELETE /api/football/news/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "New deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Player-statistics

Player performance statistics

GET /api/football/player-statistics Public

Retrieve a paginated list of all player-statistics

Request Example
GET /api/football/player-statistics
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "player_id": 1,
        "player_name": "Erling Haaland",
        "team_id": 1,
        "team_name": "Manchester City",
        "season": "2023/2024",
        "appearances": 14,
        "goals": 18,
        "assists": 3,
        "yellow_cards": 2,
        "red_cards": 0,
        "minutes_played": 1180,
        "rating": 8.199999999999999289457264239899814128875732421875
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/player-statistics/{id} Public

Retrieve a single player-statistic by ID

Request Example
GET /api/football/player-statistics/1
Accept: application/json
Response Example 200 OK
{
    "player_id": 1,
    "player_name": "Erling Haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "season": "2023/2024",
    "appearances": 14,
    "goals": 18,
    "assists": 3,
    "yellow_cards": 2,
    "red_cards": 0,
    "minutes_played": 1180,
    "rating": 8.199999999999999289457264239899814128875732421875
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested player-statistic does not exist"
}
POST /api/football/player-statistics Public

Create a new player-statistic

Request Body
POST /api/football/player-statistics
Content-Type: application/json

{
    "player_id": 1,
    "player_name": "Erling Haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "season": "2023/2024",
    "appearances": 14,
    "goals": 18,
    "assists": 3,
    "yellow_cards": 2,
    "red_cards": 0,
    "minutes_played": 1180,
    "rating": 8.199999999999999289457264239899814128875732421875
}
Response Example 201 Created
{
    "player_id": 1,
    "player_name": "Erling Haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "season": "2023/2024",
    "appearances": 14,
    "goals": 18,
    "assists": 3,
    "yellow_cards": 2,
    "red_cards": 0,
    "minutes_played": 1180,
    "rating": 8.199999999999999289457264239899814128875732421875
}
PUT/PATCH /api/football/player-statistics/{id} Public

Update an existing player-statistic

Request Body
PUT /api/football/player-statistics/1
Content-Type: application/json

{
    "player_id": 1,
    "player_name": "Erling Haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "season": "2023/2024",
    "appearances": 14,
    "goals": 18,
    "assists": 3,
    "yellow_cards": 2,
    "red_cards": 0,
    "minutes_played": 1180,
    "rating": 8.199999999999999289457264239899814128875732421875
}
Response Example 200 OK
{
    "player_id": 1,
    "player_name": "Erling Haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "season": "2023/2024",
    "appearances": 14,
    "goals": 18,
    "assists": 3,
    "yellow_cards": 2,
    "red_cards": 0,
    "minutes_played": 1180,
    "rating": 8.199999999999999289457264239899814128875732421875
}
DELETE /api/football/player-statistics/{id} Public

Delete a player-statistic by ID

Request Example
DELETE /api/football/player-statistics/1
Accept: application/json
Response Example 200 OK
{
  "message": "Player-statistic deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Players

Football players and their details

GET /api/football/players Public

Retrieve a paginated list of all players

Request Example
GET /api/football/players
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "name": "Erling Haaland",
        "slug": "erling-haaland",
        "team_id": 1,
        "team_name": "Manchester City",
        "photo": "https://i.pravatar.cc/200?img=15",
        "position": "Forward",
        "jersey_number": 9,
        "nationality": "Norway",
        "date_of_birth": "2000-07-21",
        "age": 23,
        "height": "194 cm",
        "weight": "88 kg",
        "preferred_foot": "Left",
        "market_value": 180000000
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/players/{id} Public

Retrieve a single player by ID

Request Example
GET /api/football/players/1
Accept: application/json
Response Example 200 OK
{
    "name": "Erling Haaland",
    "slug": "erling-haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "photo": "https://i.pravatar.cc/200?img=15",
    "position": "Forward",
    "jersey_number": 9,
    "nationality": "Norway",
    "date_of_birth": "2000-07-21",
    "age": 23,
    "height": "194 cm",
    "weight": "88 kg",
    "preferred_foot": "Left",
    "market_value": 180000000
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested player does not exist"
}
POST /api/football/players Auth Required

Create a new player

Request Body
POST /api/football/players
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Erling Haaland",
    "slug": "erling-haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "photo": "https://i.pravatar.cc/200?img=15",
    "position": "Forward",
    "jersey_number": 9,
    "nationality": "Norway",
    "date_of_birth": "2000-07-21",
    "age": 23,
    "height": "194 cm",
    "weight": "88 kg",
    "preferred_foot": "Left",
    "market_value": 180000000
}
Response Example 201 Created
{
    "name": "Erling Haaland",
    "slug": "erling-haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "photo": "https://i.pravatar.cc/200?img=15",
    "position": "Forward",
    "jersey_number": 9,
    "nationality": "Norway",
    "date_of_birth": "2000-07-21",
    "age": 23,
    "height": "194 cm",
    "weight": "88 kg",
    "preferred_foot": "Left",
    "market_value": 180000000
}
PUT/PATCH /api/football/players/{id} Auth Required

Update an existing player

Request Body
PUT /api/football/players/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Erling Haaland",
    "slug": "erling-haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "photo": "https://i.pravatar.cc/200?img=15",
    "position": "Forward",
    "jersey_number": 9,
    "nationality": "Norway",
    "date_of_birth": "2000-07-21",
    "age": 23,
    "height": "194 cm",
    "weight": "88 kg",
    "preferred_foot": "Left",
    "market_value": 180000000
}
Response Example 200 OK
{
    "name": "Erling Haaland",
    "slug": "erling-haaland",
    "team_id": 1,
    "team_name": "Manchester City",
    "photo": "https://i.pravatar.cc/200?img=15",
    "position": "Forward",
    "jersey_number": 9,
    "nationality": "Norway",
    "date_of_birth": "2000-07-21",
    "age": 23,
    "height": "194 cm",
    "weight": "88 kg",
    "preferred_foot": "Left",
    "market_value": 180000000
}
DELETE /api/football/players/{id} Auth Required

Delete a player by ID

Request Example
DELETE /api/football/players/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Player deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Standings

League standings and tables

GET /api/football/standings Public

Retrieve a paginated list of all standings

Request Example
GET /api/football/standings
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "league_id": 1,
        "league_name": "Premier League",
        "team_id": 1,
        "team_name": "Manchester City",
        "team_logo": "https://picsum.photos/80/80?random=team1",
        "position": 1,
        "played": 14,
        "won": 10,
        "drawn": 3,
        "lost": 1,
        "goals_for": 35,
        "goals_against": 12,
        "goal_difference": 23,
        "points": 33,
        "form": "WWDWW"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/standings/{id} Public

Retrieve a single standing by ID

Request Example
GET /api/football/standings/1
Accept: application/json
Response Example 200 OK
{
    "league_id": 1,
    "league_name": "Premier League",
    "team_id": 1,
    "team_name": "Manchester City",
    "team_logo": "https://picsum.photos/80/80?random=team1",
    "position": 1,
    "played": 14,
    "won": 10,
    "drawn": 3,
    "lost": 1,
    "goals_for": 35,
    "goals_against": 12,
    "goal_difference": 23,
    "points": 33,
    "form": "WWDWW"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested standing does not exist"
}
POST /api/football/standings Public

Create a new standing

Request Body
POST /api/football/standings
Content-Type: application/json

{
    "league_id": 1,
    "league_name": "Premier League",
    "team_id": 1,
    "team_name": "Manchester City",
    "team_logo": "https://picsum.photos/80/80?random=team1",
    "position": 1,
    "played": 14,
    "won": 10,
    "drawn": 3,
    "lost": 1,
    "goals_for": 35,
    "goals_against": 12,
    "goal_difference": 23,
    "points": 33,
    "form": "WWDWW"
}
Response Example 201 Created
{
    "league_id": 1,
    "league_name": "Premier League",
    "team_id": 1,
    "team_name": "Manchester City",
    "team_logo": "https://picsum.photos/80/80?random=team1",
    "position": 1,
    "played": 14,
    "won": 10,
    "drawn": 3,
    "lost": 1,
    "goals_for": 35,
    "goals_against": 12,
    "goal_difference": 23,
    "points": 33,
    "form": "WWDWW"
}
PUT/PATCH /api/football/standings/{id} Public

Update an existing standing

Request Body
PUT /api/football/standings/1
Content-Type: application/json

{
    "league_id": 1,
    "league_name": "Premier League",
    "team_id": 1,
    "team_name": "Manchester City",
    "team_logo": "https://picsum.photos/80/80?random=team1",
    "position": 1,
    "played": 14,
    "won": 10,
    "drawn": 3,
    "lost": 1,
    "goals_for": 35,
    "goals_against": 12,
    "goal_difference": 23,
    "points": 33,
    "form": "WWDWW"
}
Response Example 200 OK
{
    "league_id": 1,
    "league_name": "Premier League",
    "team_id": 1,
    "team_name": "Manchester City",
    "team_logo": "https://picsum.photos/80/80?random=team1",
    "position": 1,
    "played": 14,
    "won": 10,
    "drawn": 3,
    "lost": 1,
    "goals_for": 35,
    "goals_against": 12,
    "goal_difference": 23,
    "points": 33,
    "form": "WWDWW"
}
DELETE /api/football/standings/{id} Public

Delete a standing by ID

Request Example
DELETE /api/football/standings/1
Accept: application/json
Response Example 200 OK
{
  "message": "Standing deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Teams

Football teams and clubs

GET /api/football/teams Public

Retrieve a paginated list of all teams

Request Example
GET /api/football/teams
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "name": "Manchester City",
        "slug": "manchester-city",
        "league_id": 1,
        "league_name": "Premier League",
        "logo": "https://picsum.photos/150/150?random=team1",
        "stadium": "Etihad Stadium",
        "founded": 1880,
        "country": "England",
        "city": "Manchester",
        "manager": "Pep Guardiola",
        "website": "https://mancity.com",
        "squad_size": 25
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/teams/{id} Public

Retrieve a single team by ID

Request Example
GET /api/football/teams/1
Accept: application/json
Response Example 200 OK
{
    "name": "Manchester City",
    "slug": "manchester-city",
    "league_id": 1,
    "league_name": "Premier League",
    "logo": "https://picsum.photos/150/150?random=team1",
    "stadium": "Etihad Stadium",
    "founded": 1880,
    "country": "England",
    "city": "Manchester",
    "manager": "Pep Guardiola",
    "website": "https://mancity.com",
    "squad_size": 25
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested team does not exist"
}
POST /api/football/teams Auth Required

Create a new team

Request Body
POST /api/football/teams
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Manchester City",
    "slug": "manchester-city",
    "league_id": 1,
    "league_name": "Premier League",
    "logo": "https://picsum.photos/150/150?random=team1",
    "stadium": "Etihad Stadium",
    "founded": 1880,
    "country": "England",
    "city": "Manchester",
    "manager": "Pep Guardiola",
    "website": "https://mancity.com",
    "squad_size": 25
}
Response Example 201 Created
{
    "name": "Manchester City",
    "slug": "manchester-city",
    "league_id": 1,
    "league_name": "Premier League",
    "logo": "https://picsum.photos/150/150?random=team1",
    "stadium": "Etihad Stadium",
    "founded": 1880,
    "country": "England",
    "city": "Manchester",
    "manager": "Pep Guardiola",
    "website": "https://mancity.com",
    "squad_size": 25
}
PUT/PATCH /api/football/teams/{id} Auth Required

Update an existing team

Request Body
PUT /api/football/teams/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Manchester City",
    "slug": "manchester-city",
    "league_id": 1,
    "league_name": "Premier League",
    "logo": "https://picsum.photos/150/150?random=team1",
    "stadium": "Etihad Stadium",
    "founded": 1880,
    "country": "England",
    "city": "Manchester",
    "manager": "Pep Guardiola",
    "website": "https://mancity.com",
    "squad_size": 25
}
Response Example 200 OK
{
    "name": "Manchester City",
    "slug": "manchester-city",
    "league_id": 1,
    "league_name": "Premier League",
    "logo": "https://picsum.photos/150/150?random=team1",
    "stadium": "Etihad Stadium",
    "founded": 1880,
    "country": "England",
    "city": "Manchester",
    "manager": "Pep Guardiola",
    "website": "https://mancity.com",
    "squad_size": 25
}
DELETE /api/football/teams/{id} Auth Required

Delete a team by ID

Request Example
DELETE /api/football/teams/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Team deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Transfers

Player transfers and signings

GET /api/football/transfers Public

Retrieve a paginated list of all transfers

Request Example
GET /api/football/transfers
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "player_id": 5,
        "player_name": "Jude Bellingham",
        "from_team_id": 99,
        "from_team_name": "Borussia Dortmund",
        "to_team_id": 4,
        "to_team_name": "Real Madrid",
        "transfer_fee": 103000000,
        "transfer_type": "Permanent",
        "contract_length": "6 years",
        "announced_at": "2023-06-14T12:00:00Z"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/transfers/{id} Public

Retrieve a single transfer by ID

Request Example
GET /api/football/transfers/1
Accept: application/json
Response Example 200 OK
{
    "player_id": 5,
    "player_name": "Jude Bellingham",
    "from_team_id": 99,
    "from_team_name": "Borussia Dortmund",
    "to_team_id": 4,
    "to_team_name": "Real Madrid",
    "transfer_fee": 103000000,
    "transfer_type": "Permanent",
    "contract_length": "6 years",
    "announced_at": "2023-06-14T12:00:00Z"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested transfer does not exist"
}
POST /api/football/transfers Auth Required

Create a new transfer

Request Body
POST /api/football/transfers
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "player_id": 5,
    "player_name": "Jude Bellingham",
    "from_team_id": 99,
    "from_team_name": "Borussia Dortmund",
    "to_team_id": 4,
    "to_team_name": "Real Madrid",
    "transfer_fee": 103000000,
    "transfer_type": "Permanent",
    "contract_length": "6 years",
    "announced_at": "2023-06-14T12:00:00Z"
}
Response Example 201 Created
{
    "player_id": 5,
    "player_name": "Jude Bellingham",
    "from_team_id": 99,
    "from_team_name": "Borussia Dortmund",
    "to_team_id": 4,
    "to_team_name": "Real Madrid",
    "transfer_fee": 103000000,
    "transfer_type": "Permanent",
    "contract_length": "6 years",
    "announced_at": "2023-06-14T12:00:00Z"
}
PUT/PATCH /api/football/transfers/{id} Auth Required

Update an existing transfer

Request Body
PUT /api/football/transfers/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "player_id": 5,
    "player_name": "Jude Bellingham",
    "from_team_id": 99,
    "from_team_name": "Borussia Dortmund",
    "to_team_id": 4,
    "to_team_name": "Real Madrid",
    "transfer_fee": 103000000,
    "transfer_type": "Permanent",
    "contract_length": "6 years",
    "announced_at": "2023-06-14T12:00:00Z"
}
Response Example 200 OK
{
    "player_id": 5,
    "player_name": "Jude Bellingham",
    "from_team_id": 99,
    "from_team_name": "Borussia Dortmund",
    "to_team_id": 4,
    "to_team_name": "Real Madrid",
    "transfer_fee": 103000000,
    "transfer_type": "Permanent",
    "contract_length": "6 years",
    "announced_at": "2023-06-14T12:00:00Z"
}
DELETE /api/football/transfers/{id} Public

Delete a transfer by ID

Request Example
DELETE /api/football/transfers/1
Accept: application/json
Response Example 200 OK
{
  "message": "Transfer deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Users

Registered football fans

GET /api/football/users Public

Retrieve a paginated list of all users

Request Example
GET /api/football/users
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "name": "James Wilson",
        "email": "james@football.fan",
        "password": "$2y$12$l6tNRZeEC8rUuiLQQSHdaeSoNP/nUun8xRjDC5bPSdFEUZz5zho6S",
        "api_token": "19312a89f1007bcaa98130f83e0f8618f5da7c8e3b37e5c6f1d17ec06b79c9bc",
        "avatar": "https://i.pravatar.cc/150?img=12",
        "favorite_team_id": 1,
        "favorite_team_name": "Manchester City",
        "joined_at": "2023-08-15"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/football/users/{id} Public

Retrieve a single user by ID

Request Example
GET /api/football/users/1
Accept: application/json
Response Example 200 OK
{
    "name": "James Wilson",
    "email": "james@football.fan",
    "password": "$2y$12$l6tNRZeEC8rUuiLQQSHdaeSoNP/nUun8xRjDC5bPSdFEUZz5zho6S",
    "api_token": "19312a89f1007bcaa98130f83e0f8618f5da7c8e3b37e5c6f1d17ec06b79c9bc",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "favorite_team_id": 1,
    "favorite_team_name": "Manchester City",
    "joined_at": "2023-08-15"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested user does not exist"
}
POST /api/football/users Public

Create a new user

Request Body
POST /api/football/users
Content-Type: application/json

{
    "name": "James Wilson",
    "email": "james@football.fan",
    "password": "$2y$12$l6tNRZeEC8rUuiLQQSHdaeSoNP/nUun8xRjDC5bPSdFEUZz5zho6S",
    "api_token": "19312a89f1007bcaa98130f83e0f8618f5da7c8e3b37e5c6f1d17ec06b79c9bc",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "favorite_team_id": 1,
    "favorite_team_name": "Manchester City",
    "joined_at": "2023-08-15"
}
Response Example 201 Created
{
    "name": "James Wilson",
    "email": "james@football.fan",
    "password": "$2y$12$l6tNRZeEC8rUuiLQQSHdaeSoNP/nUun8xRjDC5bPSdFEUZz5zho6S",
    "api_token": "19312a89f1007bcaa98130f83e0f8618f5da7c8e3b37e5c6f1d17ec06b79c9bc",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "favorite_team_id": 1,
    "favorite_team_name": "Manchester City",
    "joined_at": "2023-08-15"
}
PUT/PATCH /api/football/users/{id} Auth Required Ownership Check

Update an existing user

Only the owner can update this resource
Request Body
PUT /api/football/users/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "James Wilson",
    "email": "james@football.fan",
    "password": "$2y$12$l6tNRZeEC8rUuiLQQSHdaeSoNP/nUun8xRjDC5bPSdFEUZz5zho6S",
    "api_token": "19312a89f1007bcaa98130f83e0f8618f5da7c8e3b37e5c6f1d17ec06b79c9bc",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "favorite_team_id": 1,
    "favorite_team_name": "Manchester City",
    "joined_at": "2023-08-15"
}
Response Example 200 OK
{
    "name": "James Wilson",
    "email": "james@football.fan",
    "password": "$2y$12$l6tNRZeEC8rUuiLQQSHdaeSoNP/nUun8xRjDC5bPSdFEUZz5zho6S",
    "api_token": "19312a89f1007bcaa98130f83e0f8618f5da7c8e3b37e5c6f1d17ec06b79c9bc",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "favorite_team_id": 1,
    "favorite_team_name": "Manchester City",
    "joined_at": "2023-08-15"
}
DELETE /api/football/users/{id} Auth Required Ownership Check

Delete a user by ID

Only the owner can delete this resource
Request Example
DELETE /api/football/users/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "User deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}