Teams
Endpoint: /wp-json/sportspress/v2/teams
Field Definitions
Date and Time Fields
Field | Description |
| Publication date in site timezone (ISO 8601 format) |
| Publication date as GMT (ISO 8601 format) |
| Last modification date in site timezone (read-only) |
| Last modification date as GMT (read-only) |
Identification Fields
Field | Description |
| Unique identifier for the object (integer, read-only) |
| Globally unique identifier (read-only) |
| Alphanumeric identifier unique to its type |
| URL to the object (read-only) |
| The ID for the parent of the object |
Content Fields
Field | Description |
| The title for the team object |
| The content for the team object |
| The excerpt for the team object |
| The ID for the author of the object |
| The ID of the featured media for the object |
Status and Access Fields
Field | Description |
| Named status for the object; one of |
| 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 and Relationship 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 venue taxonomy (array of term IDs) |
| The IDs of the staff members associated with the team (array) |
| The IDs of the league tables the team belongs to (array) |
| The IDs of the player lists assigned to the team (array) |
| The IDs of events the team has participated in (array) |
Team-Specific Fields
Field | Description |
| The abbreviation for the team (string) |
| The URL to the team's external site (URI string) |
Fields support different visibility contexts (view, edit, embed) to control which contexts expose specific information. Fields such as id, link, and modification timestamps are read-only.
Example Requests
List All Teams
GET /wp-json/sportspress/v2/teams
Retrieve a Single Team
GET /wp-json/sportspress/v2/teams/10
Create a Team
POST /wp-json/sportspress/v2/teams
Content-Type: application/json{
"title": "Athletic FC",
"status": "publish",
"abbreviation": "AFC",
"url": "https://athleticfc.example.com",
"leagues": [5],
"seasons": [3]
}Update a Team
PUT /wp-json/sportspress/v2/teams/10
Content-Type: application/json{
"abbreviation": "ATH"
}
