Football & Leagues API
Comprehensive football data including leagues, teams, players, matches, standings, transfers, and news
Favorites
User favorite teams and players
/api/football/favorites
Auth Required
User Filtering
Retrieve a paginated list of all favorites
GET /api/football/favorites
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"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
}
}
/api/football/favorites/{id}
Auth Required
Retrieve a single favorite by ID
GET /api/football/favorites/1
Authorization: Bearer YOUR_API_TOKEN
Accept: 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"
}
{
"error": "Resource not found",
"message": "The requested favorite does not exist"
}
/api/football/favorites
Auth Required
Auto User ID
Create a new favorite
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"
}
{
"user_id": 1,
"user_name": "James Wilson",
"item_type": "team",
"item_id": 1,
"item_name": "Manchester City",
"added_at": "2023-08-15T10:00:00Z"
}
/api/football/favorites/{id}
Public
Update an existing favorite
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"
}
{
"user_id": 1,
"user_name": "James Wilson",
"item_type": "team",
"item_id": 1,
"item_name": "Manchester City",
"added_at": "2023-08-15T10:00:00Z"
}
/api/football/favorites/{id}
Auth Required
Ownership Check
Delete a favorite by ID
DELETE /api/football/favorites/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "Favorite deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Leagues
Football leagues and competitions
/api/football/leagues
Public
Retrieve a paginated list of all leagues
GET /api/football/leagues
Accept: application/json
{
"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
}
}
/api/football/leagues/{id}
Public
Retrieve a single league by ID
GET /api/football/leagues/1
Accept: 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"
}
{
"error": "Resource not found",
"message": "The requested league does not exist"
}
/api/football/leagues
Auth Required
Create a new league
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"
}
{
"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"
}
/api/football/leagues/{id}
Auth Required
Update an existing league
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"
}
{
"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"
}
/api/football/leagues/{id}
Auth Required
Delete a league by ID
DELETE /api/football/leagues/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "League deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Matches
Match results and fixtures
/api/football/matches
Public
Retrieve a paginated list of all matches
GET /api/football/matches
Accept: application/json
{
"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
}
}
/api/football/matches/{id}
Public
Retrieve a single matche by ID
GET /api/football/matches/1
Accept: 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"
}
{
"error": "Resource not found",
"message": "The requested matche does not exist"
}
/api/football/matches
Auth Required
Create a new matche
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"
}
{
"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"
}
/api/football/matches/{id}
Auth Required
Update an existing matche
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"
}
{
"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"
}
/api/football/matches/{id}
Public
Delete a matche by ID
DELETE /api/football/matches/1
Accept: application/json
{
"message": "Matche deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
News
Football news and updates
/api/football/news
Public
Retrieve a paginated list of all news
GET /api/football/news
Accept: application/json
{
"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
}
}
/api/football/news/{id}
Public
Retrieve a single new by ID
GET /api/football/news/1
Accept: 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"
}
{
"error": "Resource not found",
"message": "The requested new does not exist"
}
/api/football/news
Auth Required
Create a new new
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"
}
{
"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"
}
/api/football/news/{id}
Auth Required
Update an existing new
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"
}
{
"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"
}
/api/football/news/{id}
Auth Required
Delete a new by ID
DELETE /api/football/news/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "New deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Player-statistics
Player performance statistics
/api/football/player-statistics
Public
Retrieve a paginated list of all player-statistics
GET /api/football/player-statistics
Accept: application/json
{
"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
}
}
/api/football/player-statistics/{id}
Public
Retrieve a single player-statistic by ID
GET /api/football/player-statistics/1
Accept: 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
}
{
"error": "Resource not found",
"message": "The requested player-statistic does not exist"
}
/api/football/player-statistics
Public
Create a new player-statistic
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
}
{
"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
}
/api/football/player-statistics/{id}
Public
Update an existing player-statistic
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
}
{
"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
}
/api/football/player-statistics/{id}
Public
Delete a player-statistic by ID
DELETE /api/football/player-statistics/1
Accept: application/json
{
"message": "Player-statistic deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Players
Football players and their details
/api/football/players
Public
Retrieve a paginated list of all players
GET /api/football/players
Accept: application/json
{
"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
}
}
/api/football/players/{id}
Public
Retrieve a single player by ID
GET /api/football/players/1
Accept: 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
}
{
"error": "Resource not found",
"message": "The requested player does not exist"
}
/api/football/players
Auth Required
Create a new player
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
}
{
"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
}
/api/football/players/{id}
Auth Required
Update an existing player
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
}
{
"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
}
/api/football/players/{id}
Auth Required
Delete a player by ID
DELETE /api/football/players/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "Player deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Standings
League standings and tables
/api/football/standings
Public
Retrieve a paginated list of all standings
GET /api/football/standings
Accept: application/json
{
"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
}
}
/api/football/standings/{id}
Public
Retrieve a single standing by ID
GET /api/football/standings/1
Accept: 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"
}
{
"error": "Resource not found",
"message": "The requested standing does not exist"
}
/api/football/standings
Public
Create a new standing
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"
}
{
"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"
}
/api/football/standings/{id}
Public
Update an existing standing
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"
}
{
"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"
}
/api/football/standings/{id}
Public
Delete a standing by ID
DELETE /api/football/standings/1
Accept: application/json
{
"message": "Standing deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Teams
Football teams and clubs
/api/football/teams
Public
Retrieve a paginated list of all teams
GET /api/football/teams
Accept: application/json
{
"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
}
}
/api/football/teams/{id}
Public
Retrieve a single team by ID
GET /api/football/teams/1
Accept: 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
}
{
"error": "Resource not found",
"message": "The requested team does not exist"
}
/api/football/teams
Auth Required
Create a new team
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
}
{
"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
}
/api/football/teams/{id}
Auth Required
Update an existing team
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
}
{
"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
}
/api/football/teams/{id}
Auth Required
Delete a team by ID
DELETE /api/football/teams/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "Team deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Transfers
Player transfers and signings
/api/football/transfers
Public
Retrieve a paginated list of all transfers
GET /api/football/transfers
Accept: application/json
{
"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
}
}
/api/football/transfers/{id}
Public
Retrieve a single transfer by ID
GET /api/football/transfers/1
Accept: 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"
}
{
"error": "Resource not found",
"message": "The requested transfer does not exist"
}
/api/football/transfers
Auth Required
Create a new transfer
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"
}
{
"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"
}
/api/football/transfers/{id}
Auth Required
Update an existing transfer
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"
}
{
"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"
}
/api/football/transfers/{id}
Public
Delete a transfer by ID
DELETE /api/football/transfers/1
Accept: application/json
{
"message": "Transfer deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}
Users
Registered football fans
/api/football/users
Public
Retrieve a paginated list of all users
GET /api/football/users
Accept: application/json
{
"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
}
}
/api/football/users/{id}
Public
Retrieve a single user by ID
GET /api/football/users/1
Accept: 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"
}
{
"error": "Resource not found",
"message": "The requested user does not exist"
}
/api/football/users
Public
Create a new user
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"
}
{
"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"
}
/api/football/users/{id}
Auth Required
Ownership Check
Update an existing user
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"
}
{
"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"
}
/api/football/users/{id}
Auth Required
Ownership Check
Delete a user by ID
DELETE /api/football/users/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
{
"message": "User deleted successfully"
}
{
"error": "Deletion failed",
"message": "Unable to delete the resource"
}