Competitions

Request: GET

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

HTTP Request

GET /v1/{sport}/competitions
GET /v1/{sport}/leagues/{leagueId}/competitions

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 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.

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a list of Competition resources.

Request: GET

Get the detail about a specific competition

HTTP Request

GET /v1/{sport}/competitions/{competitionId}

Parameters

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.

Request Body

Do not supply a request body with this method.

Response

If successful this method returns an Competition resource.

Request: POST

Create a new competition

HTTP Request

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

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 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.

Request Body

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

Response

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.

Request: PUT

Update an existing competition

HTTP Request

PUT /v1/{sport}/competitions/{competitionId}

Parameters

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.

Request Body

In the request body supply a Competition resource.

Response

If successful this method returns a Competition resource.

Request: DELETE

Delete an existing competition

HTTP Request

DELETE /v1/{sport}/competitions/{competitionId}

Parameters

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:

Request Body

Do not supply a request body with this method.

Response

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.