Teams

Request: GET

Returns a list of teams that the user has access to.

HTTP Request

GET /v1/{sport}/teams
GET /v1/{sport}/leagues/{leagueId}/teams
GET /v1/{sport}/clubs/{clubId}/teams
GET /v1/{sport}/competition/{competitionId}/teams

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
Optional Parameters
leagueId integer Unique identifier for the league the team belongs to.
keywords string Display only where the team has the given keyword
countryCode string Display only when the team is in the country. ISO 3166 two letter country code.
clubId integer Unique ID of a club to get its teams
competitionId integer Unique ID of a comp to get its teams
useExternalForLeague integer If this value is set to the leagueId for the team, then the URL filter parameters clubId and competitionId will instead refer to the externalId fields of the respective entities in that league.

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a list of Team resources.

Request: GET

Get the detail about a specific team

HTTP Request

GET /v1/{sport}/teams/{teamId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
teamId integer The unique identifier for this team
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the team, then the URL parameter teamId will instead refer to the externalId of the team in that league.

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a Team resource.

Request: POST

Create a new team

HTTP Request

POST /v1/{sport}/leagues/{leagueId}/teams

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
leagueId integer Unique identifier for the league the team belongs to.
Optional Parameters
minimumResponse integer If this value is set to 1 then the response resource will only contain teamId and externalId.
bulk integer Create multiple records.
useExternalForLeague integer If this value is set to the leagueId for the team, then the content of the request body is interpreted differently. See the Request Body section for more information.

Request Body

In the request body supply a Team resource. If the bulk parameter is specified a list of resources is expected.

If the useExternalForLeague parameter is specified, then the following fields in the resource will be interpreted as the externalId of the specific entity instead of the unique identifier.

Response

If successful this method returns a Team resource. If the bulk parameter is specified it will return a list of resources. Any errors returned are against the specific resource.

Request: PUT

Update an existing team

HTTP Request

PUT /v1/{sport}/teams/{teamId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
teamId integer The unique identifier for this team
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the team, then the URL parameter teamId will instead refer to the externalId of the team in that league. The content of the request body is also interpreted differently. See the Request Body section for more information.

Request Body

A Team resource should be supplied in the request body. Only the fields to be changed need to be specified.

If the useExternalForLeague parameter is specified, then the following fields in the resource will be interpreted as the externalId of the specific entity instead of the unique identifier.

Response

If successful this method returns a Team resource.

Request: DELETE

Delete an existing team

HTTP Request

DELETE /v1/{sport}/teams/{teamId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
teamId integer The unique identifier for this team
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the team, then the URL parameter teamId will instead refer to the externalId of the team in that league.
confirm integer 0 = Default. FAILURE returned if cascade records found.
1 = override cascades

Affected resources:

Request Body

Do not supply a request body with this method.

Response

If the teamId is involved in a COMPLETE match, then the delete will fail.

If no override is flag passed in and the teamId is involved in any of the affected resources then the DELETE will fail (returns FAILURE). Successful this method returns SUCCESS.