Returns a list of competitions that the user has access to.
GET /v1/{sport}/competitions
GET /v1/{sport}/leagues/{leagueId}/competitions
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 competition belongs to. |
keywords |
string |
Display only where the competition has the given keyword |
year |
integer |
Display only when competition starts in the specified year |
clubId |
integer |
Display only when this club is part of the competition |
teamId |
integer |
Display only when this team is part of the competition |
current |
integer |
Display only when competitions in specified type. 1=Current, 0=Not current. |
useExternalForLeague |
integer |
If this value is set to the leagueId for the competition, then the URL filter parameters clubId and teamId 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 Competition resources.
Get the detail about a specific competition
GET /v1/{sport}/competitions/{competitionId}
Parameter Name | Value | Description |
---|---|---|
Required Parameters | ||
sport |
string |
The sport for which you are making the request |
competitionId |
integer |
The unique identifier for this competition |
Optional Parameters | ||
useExternalForLeague |
integer |
If this value is set to the leagueId for the competition, then the URL parameter competitionId will instead refer to the externalId of the competition in that league. |
Do not supply a request body with this method.
If successful this method returns an Competition resource.
Create a new competition
POST /v1/{sport}/leagues/{leagueId}/competitions
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 competition belongs to. |
Optional Parameters | ||
minimumResponse |
integer |
If this value is set to 1 then the response resource will only contain competitionId and externalId . |
bulk |
integer |
Create multiple records. |
In the request body supply a Competition resource. If the bulk
parameter is specified a list of resources is expected.
If successful this method returns a Competition 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 competition
PUT /v1/{sport}/competitions/{competitionId}
Parameter Name | Value | Description |
---|---|---|
Required Parameters | ||
sport |
string |
The sport for which you are making the request |
competitionId |
integer |
The unique identifier for this competition |
Optional Parameters | ||
useExternalForLeague |
integer |
If this value is set to the leagueId for the competition, then the URL parameter competitionId will instead refer to the externalId of the competition in that league. |
In the request body supply a Competition resource.
If successful this method returns a Competition resource.
Delete an existing competition
DELETE /v1/{sport}/competitions/{competitionId}
Parameter Name | Value | Description |
---|---|---|
Required Parameters | ||
sport |
string |
The sport for which you are making the request |
competitionId |
integer |
The unique identifier for this competition |
Optional Parameters | ||
useExternalForLeague |
integer |
If this value is set to the leagueId for the competition, then the URL parameter competitionId will instead refer to the externalId of the competition 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 no override is flag passed in and the competitionId is involved in any of the affected resources then the DELETE will fail (returns FAILURE). Successful this method returns SUCCESS.