Returns a list of teams that the user has access to.
GET /v1/{sport}/teams
GET /v1/{sport}/leagues/{leagueId}/teams
GET /v1/{sport}/clubs/{clubId}/teams
GET /v1/{sport}/competition/{competitionId}/teams
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. |
Do not supply a request body with this method.
If successful this method returns a list of Team resources.
Get the detail about a specific team
GET /v1/{sport}/teams/{teamId}
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. |
Do not supply a request body with this method.
If successful this method returns a Team resource.
Create a new team
POST /v1/{sport}/leagues/{leagueId}/teams
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. |
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.
clubId
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.
Update an existing team
PUT /v1/{sport}/teams/{teamId}
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. |
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.
clubId
If successful this method returns a Team resource.
Delete an existing team
DELETE /v1/{sport}/teams/{teamId}
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: |
Do not supply a request body with this method.
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.