Matches

Request: GET

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

HTTP Request

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

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
competitionId integer Unique identifier for the competition the match belongs to.
Optional Parameters
phaseName string phase/stage name for pools
poolNumber integer pool number
fromDate date from date range to filter matches
toDate date to date range to filter matches
fromDateUTC date from date range to filter matches
toDateUTC date to date range to filter matches
roundNumber string round number
venueId integer Unique identifier for the venue where the match takes place
teamId integer show if team is a competitor in this match
clubId integer show if club is a competitor in this match
personId integer show if person is a competitor in this match (only used if competition is a non team based competition)
matchType string What part of the competition is this match part of.
  • PRE Pre Season
  • REGULAR Regular matches - Default
  • FINALS Finals/Playoffs
liveStream integer Will the match be live streamed? 1=Yes, 0=No.
useExternalForLeague integer If this value is set to the leagueId for the team, then the URL filter parameters competitionId, venueId, teamId, clubId, personId 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 Match resources.

Request: GET

Get the detail about a specific match

HTTP Request

GET /v1/{sport}/matches/{matchId}

Parameters

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

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a Match resource.

Request: POST

Create a new match

HTTP Request

POST /v1/{sport}/competitions/{competitionId}/matches

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 match belongs to.
competitionId integer Unique identifier for the competition the match belongs to.
Optional Parameters
minimumResponse integer If this value is set to 1 then the response resource will only contain matchId and externalId.
bulk integer Create multiple records.
useExternalForLeague integer If this value is set to the leagueId for the team, then the URL parameter competitionId will instead refer to the externalId of the competition in that league. The content of the request body is also interpreted differently. See the Request Body section for more information.

Request Body

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

Example
        {
            "matchNumber" : 10,
            "matchName" : "Grand Final",
            "poolNumber" : 2,
            "roundNumber" : 3,
            "matchStatus" : "SCHEDULED",
            "matchTime" : "2013-04-20 18:30:00",
            "externalId" : "M123",
            "matchType" : "REGULAR",
            "competitors": [
                {
                  "teamId": 10,
                  "competitorType": "TEAM",
                  "isHomeCompetitor": 1,
                  "completionStatus": "NOT_COMPLETE"
                },
                {
                  "teamId": 23,
                  "competitorType": "TEAM",
                  "isHomeCompetitor": 0,
                  "completionStatus": "NOT_COMPLETE"
                }
            ]
        }
        

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 Match 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 match

HTTP Request

PUT /v1/{sport}/matches/{matchId}

Parameters

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

Request Body

In the request body supply a Match resource.

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

Request: DELETE

Delete an existing match

HTTP Request

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

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
matchId integer The unique identifier for this match
competitionId integer The unique identifier for the competition
Optional Parameters
confirm integer 0 = Default. FAILURE returned if cascade records found.
1 = override cascades

Affected resources:
roundNumber string round number
poolNumber string pool number
phaseName string phase Name
matchType string What part of the competition is this match part of.
  • PRE Pre Season
  • REGULAR Regular matches - Default
  • FINALS Finals/Playoffs
useExternalForLeague integer If this value is set to the leagueId for the match , then the URL filter parameters matchId, competitionId and poolNumber will instead refer to the externalId fields of the respective entities in that league.

Request Body

Do not supply a request body.

Response

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