Skip to main content

Teams

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

Updated today

Teams

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

Field Definitions

Date and Time Fields

Field

Description

date

Publication date in site timezone (ISO 8601 format)

date_gmt

Publication date as GMT (ISO 8601 format)

modified

Last modification date in site timezone (read-only)

modified_gmt

Last modification date as GMT (read-only)

Identification Fields

Field

Description

id

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

guid

Globally unique identifier (read-only)

slug

Alphanumeric identifier unique to its type

link

URL to the object (read-only)

parent

The ID for the parent of the object

Content Fields

Field

Description

title

The title for the team object

content

The content for the team object

excerpt

The excerpt for the team object

author

The ID for the author of the object

featured_media

The ID of the featured media for the object

Status and Access Fields

Field

Description

status

Named status for the object; one of publish, future, draft, pending, or private

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 and Relationship 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)

venues

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

staff

The IDs of the staff members associated with the team (array)

tables

The IDs of the league tables the team belongs to (array)

lists

The IDs of the player lists assigned to the team (array)

events

The IDs of events the team has participated in (array)

Team-Specific Fields

Field

Description

abbreviation

The abbreviation for the team (string)

url

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"
}

Did this answer your question?