This document will detail the calling pattern of the sports API along with the details of the response.
API call Format
Sports API: https://api.msn.com/sports/aroundtheleague?apikey=<apiKey>&id=soccer_liga&market=es-es&tzoffset=-7&datetime=2022-05-20T18:00:00&version=1.0&partnerId=<partner>&ocid=<ocid>
Sports API call details
- All the above Sample API components are required for the API call to work as expected.
- For the sample API, below are the only supported values:
- id = soccer_liga
- market=es-es
- Will provide the OCID and API key offline.
API response details
At the high level this is the structure of the response
For the provided league id, we will return the schedule with up to 20 games that are closest to the current date.
League details
The picture contains sample partial league output for es-es market, Spain La Liga league. Below is description of the metadata:
Relevant metadata
- seasonYear
- Current season year that is closest to current date. If the seasonPhase is NOT off season, then this represents the current season that is ongoing. If the seasonPhase is off season, it represent the season that has either recently ended or a new season that is yet to start.
- currentSeasonPhase
- PreSeason
- RegularSeason
- PostSeason
- OffSeason
- CurrentDetailedSeasonPhase
- Will contain additional information related to post season phase
- Eg: Round of 32, Conference playoffs etc
- SeasonStart
- Start year of the season
- SeasonEnd
- End year of season (as sometimes the season ends in a different calendar year)
- Sport
- Soccer for La Liga
- Name
- rawName
- It is always the English name
- localizedName
- It is set only if we have the localization available.
- image
- id
- fully qualified url for rendering the image associated with the league
- colors
- primaryColorHex
- Hex representation of the color associated with the league
- navUrls
- schedule
- Provides a fully qualified url to the schedule of the league
Games details (Post Game)
“Games” is an array and contains up to 20 game-related information inside it.
The above screenshot represents a single game related information in Spain La Liga league on es-es market.
Relevant metadata
- startDateTime
- Represented in Epoc Datetime
- gameState
- gameStatus
- Final – game is completed
- PreGame – game is not yet played
- InProgress – game is Live and in progress
- Other entries that are less frequent (and some are not relevant for soccer) are:
- Postponed,
- Suspended
- Cancelled
- Unscheduled
- Forfeited
- Vacated
- Delayed
- Bye
- Abandoned
- Maintenance
- detailedGameStatus
- TBD
- gameType
- simplifiedSeasonPhase
- refer to the explanation provided in the league details in the current Season phase
- detailSeasonPhase
- refer to the explanation provided in the league details in the currentDetailedSeasonPhase
- Week
- Week number
- startTimeToBeAnnounced
- Boolean . When set to true , it means the startDateTime is NOT yet announced by the League
- When set to false, the startDateTime is a reliable indicator of the game start time
- Channels
- It is an array that contains the different media details
- Screenshot represents TV channels and the list of channel names where the game will be available
- Participants
- Will describe in a later section of this document
- Sport
- Soccer for La Liga
- Contains the sport name for the league
- navUrls
- gameCenter – Contains fully qualified url for the game on microsoftstart.msn.com
Game details (Live game)
Above is screenshot of what data will be returned during a live soccer game. Most of the metadata is the same as those in the Game Details (Post game ) section above.
Additional metadata
Below are the additional metadata that will be present in the live game:
- GameClock
- minutes
- How many minutes have passed in the game
- seconds
- How many minutes have passed in the game.
- CurrentPlayingPeriod
- playingPeriodType
- Details of what type of playing period is used for the game
- Other possible values are below:
- number
- provides details of which playing period is currently in progress. Eg: In soccer there are 2 halfs that are played, and the screenshot indicates that the first half is in progress.
Participants details
Participants is an array inside each game. Each entry represents a team that is playing in the game. For soccer, there will be 2 entries in participants array.
The above screenshot represents the sample output of one participant in a game that is completed.
Relevant metadata
- Gameoutcome
- Indicates whether this participant won or lost.
- This entry won’t be present if the game has not yet been played (aka PreGame)
- Values that can show up here are:
- Won
- Last
- Tied
- NoGame
- Result
- Score
- Score this team achieved in this game.
- This entry won’t be present if the game has not yet been played (aka PreGame)
- Team
- shortName
- rawName
- team short name
- localizedName
- team short name if localization is present
- alias
- 3 letter acronym associated with this team
- Sport
- Sport this team plays. Eg: Soccer
- name
- rawName
- full name of the team. Should be used if the localized name is missing
- localizedName
- localized full name of the team.
- image
- id – fully qualified url for the image associated with the team
- colors
- primaryColorHex
- Primary color in Hex associatd with the team
- secondaryColorHex
- Secondary color in Hex associated with the team