Team Competition Statistics

Request: GET

GET a list of a number of teams' performance in a particular competition

HTTP Request

GET /v1/{sport}/statistics/teamcompetition/competitions/{competitionId}
GET /v1/{sport}/statistics/teamcompetition/competitions/{competitionId}/teams/{teamId}
GET /v1/{sport}/statistics/teamcompetition/teams/{teamId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
Optional Parameters
competitionId integer The unique identifier for the competition
teamId integer The unique identifier for the team
periodNumber integer Return statistics for only a given period
periodType string The type of period.
  • REGULAR
  • OVERTIME
homeAway string Return statistics for when the team is playing at home/away or either. If not provided, then 'ALL' is assumed.
  • HOME
  • AWAY
  • ALL
winLoss string Return statistics for when the team has won or loss or either. If not provided, then 'ALL' is assumed.
  • WIN
  • LOSS
  • ALL
inConference string Return statistics for when the team is playing in or out of it's own conference or either. If not provided, then 'ALL' is assumed.
  • IN
  • OUT
  • ALL
matchType string Return statistics for what type of matches the team was in. If not provided, then 'ALL' is assumed.
  • PRESEASON
  • REGULAR default
  • FINALS
  • ALL
useExternalForLeague integer If this value is set to the leagueId for the team, then the URL parameters teamId 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 an array of Team Competition Statistics resources.

Request: GET

Get the detail about a specific team's performance in a particular competition

HTTP Request

GET /v1/{sport}/statistics/teamcompetition/competitions/{competitionId}/teams/{teamId}/periods/{periodNumber}/{periodType}
GET /v1/{sport}/statistics/teamcompetition/competitions/{competitionId}/teams/{teamId}/periods/{periodNumber} (Assuming period isn't overtime)

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
teamId integer The unique identifier for this team
periodNumber integer Statistics for only a given period. 0 = all total
Optional Parameters
periodType string The type of period.
  • REGULAR
  • OVERTIME
homeAway string Is this value for when the team is playing at home/away or either. If not provided, then 'ALL' is assumed.
  • HOME
  • AWAY
  • ALL
winLoss string Is this value for when the team has won or loss or either. If not provided, then 'ALL' is assumed.
  • WIN
  • LOSS
  • ALL
inConference string Is this value for when the team is in or out of it's own conference or either. If not provided, then 'ALL' is assumed.
  • IN
  • OUT
  • ALL
matchType string Return statistics for what type of matches the team was in. If not provided, then 'ALL' is assumed.
  • PRESEASON
  • REGULAR default
  • FINALS
  • ALL
useExternalForLeague integer If this value is set to the leagueId for the team, then the URL parameters teamId 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 an Team Competition Statistics resource.

Request: POST, Request: PUT

Create detail about a specific team's performance in a particular competition. Both the PUT and POST verbs are accepted as the system will handle any creation/editing logic.

Note: In most cases competition statistics should be automatically generated by the use of the Match Statitics Build call and should not be manually entered using the API. Only use these API functions if you want to manually generate competition and career statistics.

Note: Only the fields being sent for the resource will be returned. For a full list of fields, do a detail call as above.

HTTP Request

POST /v1/{sport}/leagues/{leagueId}/statistics/teamcompetition

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
leagueId integer The unique identifier for this league
Optional Parameters
minimumResponse integer If this value is set to 1 then the response resource will only contain contain minimal identifying fields.
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 Competition Statistics 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 Competition Statistics resource. If the bulk parameter is specified it will return a list of resources. Any errors returned are against the specific resource.