Skip to main content

Players

**Endpoint:** `/wp-json/sportspress/v2/players`

Updated today

Players

Endpoint: /wp-json/sportspress/v2/players

Field Definitions

Identification and Publishing Fields

Field

Description

id

Unique identifier for the object (integer, read-only)

guid

Globally unique identifier (read-only)

slug

URL-friendly alphanumeric identifier unique to its type

link

URL to the object (read-only)

date

Publication timestamp in site timezone (ISO 8601)

date_gmt

Publication date as GMT (ISO 8601)

modified

Last modification date in site timezone (read-only)

modified_gmt

Last modification date as GMT (read-only)

status

Publishing state; one of publish, future, draft, pending, or private

Content and Metadata Fields

Field

Description

title

The player's name

content

The player's biography or description

excerpt

A brief summary for the player

featured_media

The ID of the player's photo (featured image)

author

The ID of the creator's user account

Status and Access Fields

Field

Description

password

A password to protect access to the content and excerpt

comment_status

Whether or not comments are open; open or closed

ping_status

Whether or not the object can be pinged; open or closed

menu_order

The order of the object in relation to other objects of its type

Taxonomy Fields

Field

Description

leagues

The terms assigned to the object in the league taxonomy (array of term IDs)

seasons

The terms assigned to the object in the season taxonomy (array of term IDs)

positions

The terms assigned to the object in the position taxonomy (array of term IDs)

Player-Specific Fields

Field

Description

number

The player's squad number (integer)

nationalities

3-letter country codes for the player's nationalities (array of strings)

teams

The IDs of all teams the player is affiliated with (array — current and past)

current_teams

The IDs of the player's current active team affiliations (array)

past_teams

The IDs of the player's historical team affiliations (array)

metrics

Player performance measurements (static values like height, weight)

statistics

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.

Did this answer your question?