Players
Endpoint: /wp-json/sportspress/v2/players
Field Definitions
Identification and Publishing Fields
Field | Description |
| Unique identifier for the object (integer, read-only) |
| Globally unique identifier (read-only) |
| URL-friendly alphanumeric identifier unique to its type |
| URL to the object (read-only) |
| Publication timestamp in site timezone (ISO 8601) |
| Publication date as GMT (ISO 8601) |
| Last modification date in site timezone (read-only) |
| Last modification date as GMT (read-only) |
| Publishing state; one of |
Content and Metadata Fields
Field | Description |
| The player's name |
| The player's biography or description |
| A brief summary for the player |
| The ID of the player's photo (featured image) |
| The ID of the creator's user account |
Status and Access Fields
Field | Description |
| A password to protect access to the content and excerpt |
| Whether or not comments are open; |
| Whether or not the object can be pinged; |
| The order of the object in relation to other objects of its type |
Taxonomy Fields
Field | Description |
| The terms assigned to the object in the league taxonomy (array of term IDs) |
| The terms assigned to the object in the season taxonomy (array of term IDs) |
| The terms assigned to the object in the position taxonomy (array of term IDs) |
Player-Specific Fields
Field | Description |
| The player's squad number (integer) |
| 3-letter country codes for the player's nationalities (array of strings) |
| The IDs of all teams the player is affiliated with (array — current and past) |
| The IDs of the player's current active team affiliations (array) |
| The IDs of the player's historical team affiliations (array) |
| Player performance measurements (static values like height, weight) |
| League and season-based performance data (calculated values) |
Most fields support multiple contexts (view, edit, embed), controlling visibility and modification permissions across different API access scenarios.
Known Limitation
Players created via the REST API may not appear automatically in player lists. This is a known gap documented in the support forum. After creating a player via API, verify that the player is assigned to the correct team in the WordPress admin, and that the player list is configured to include players from that team.
Example Requests
List All Players
GET /wp-json/sportspress/v2/players
Retrieve a Single Player
GET /wp-json/sportspress/v2/players/55
Create a Player
POST /wp-json/sportspress/v2/players
Content-Type: application/json{
"title": "John Smith",
"status": "publish",
"number": 10,
"nationalities": ["eng"],
"current_teams": [10],
"leagues": [5],
"seasons": [3],
"positions": [7]
}Update Player Metrics
PUT /wp-json/sportspress/v2/players/55
Content-Type: application/json{
"metrics": {
"height": "180",
"weight": "75"
}
}Note: Updating player metrics via REST API requires SportsPress Pro 2.7.3 or later.
Filter Players by League and Season
GET /wp-json/sportspress/v2/players?leagues=5&seasons=3
Player list endpoint filtering was added in SportsPress Pro 2.5.5.
