Competitor

What does the Competitor element mean?

The competitors element provides information related to the competitors taking part in the fixture.

Here below is an example of a competitor element which is a container of many competitor elements that provide more detailed info about every competitor in the fixture.

It is shown in the example that, in case of a match between 2 teams, the competitor is a team, in case of a match between one or more players (like tennis in the second example), then, the competitors are the players themselves.

Page Contents

  • What does the Competitor element mean?

  • XML Example

  • List of attributes in the Competitor element

  • Placeholder Competitors

    • How to identify a placeholder?

    • How to handle placeholder competitors?

  • Competitor "division" and "state" attributes

XML Example

`competitor` refers to team here

<competitors>
        <competitor id="sr:competitor:3433" name="Toronto Raptors" country="USA" country_code="USA" abbreviation="TOR" qualifier="home" gender="male">
            <reference_ids>
                <reference_id name="betradar" value="19389"/>
                <reference_id name="rotation_number" value="502"/>
                <reference_id name="aams" value="3433"/>
            </reference_ids>
        </competitor>
        <competitor id="sr:competitor:5539" name="New Orleans Pelicans" state="LA" country="USA" country_code="USA" abbreviation="NOP" qualifier="away" gender="male">
            <reference_ids>
                <reference_id name="betradar" value="19449"/>
                <reference_id name="rotation_number" value="501"/>
                <reference_id name="aams" value="5539"/>
            </reference_ids>
        </competitor>
    </competitors>

`competitor` refers to player here

 <competitor id="sr:competitor:92877" name="Fossa Huergo, Nicole" country="Italy" country_code="ITA" abbreviation="FOS" qualifier="home" gender="female">
            <reference_ids>
                <reference_id name="betradar" value="6597695"/>
            </reference_ids>
        </competitor>
        <competitor id="sr:competitor:96237" name="Pieri, Jessica" country="Italy" country_code="ITA" abbreviation="PIE" qualifier="away" gender="female">
            <reference_ids>
                <reference_id name="betradar" value="6629531"/>
            </reference_ids>
        </competitor>
    </competitors>

List of attributes in the Competitor element

Attribute
Meaning
Possible values

id

Unique Id of the competitor. For team-based matches the competitors are two teams. For a singles match in Tennis it is two tennis players etc. In order to get additional info about a competitor another UOF API End point is available>: "Competitor information" which can be called through the following request /sports/<lang>/competitors/<id>/profile.xml

String value, example:

id="sr:competitor:3433"

name

Name of the competitor: name of a team in case of match between two teams, name of the players in case of match among players.

String value, example:

  • name="Pieri, Jessica"

state

State of the country: used in case of countries like USA which are divided into states.

String value, example:

  • state="LA"

country

Country where the team belongs, nationality in case of player.

String value, example:

  • country_code="ITA"

abbreviation

Abbreviated name of the player or team.

String value, example:

  • abbreviation="PIE"

qualifier

Specifies if the team of player is "Home" or "Away"

  • home

  • away

virtual

If attribute virtual="true" is present this indicates that the given competitor is a placeholder. If the virtual="false" or the virtual attribute is missing this indicates the given competitor is a real competitor

  • "true"

  • "false"

  • not present

gender

Specifies gender of the player

  • female

  • male

Reference_id Element

The reference_id element provides a list of ids used by different bookamkers or institutions.

The attribute "name" is the one which specifies which bookmaker or institution the ID belongs in.

<reference_ids>
       <reference_id name="betradar" value="6597695"/>
       <reference_id name="rotation_number" value="501"/>
       <reference_id name="aams" value="5539"/>
</reference_ids>
Attribute
Meaning
Possible values and meaning

name

Specifies which bookmaker or institution the ID belongs in

Betradar = Id of competitor used in Betradar LCoO

Betradar ctrl = id of competitor used in Betradar CTRL

Rotation_number = Rotation numbers are issued by Don Best. They comprise a numbering scheme used by most sports books in the North American market. They define the participants of a contest such that bettors and purveyors can easily refer to the same contest. Typically, the away team’s rotation number is an odd value. Rotation Numbers are not unique over the course of a season. They are however unique to the current schedule view.

AAMS = Id of competitor of AAMS (Amministrazione Autonoma dei Monopoli di Stato), Italian betting regulator.

value

Value of the ID

String value, example:

  • value="19449"

Placeholder Competitors

The matches for certain competitions will use placeholders for competitors until the Official Order of Play is released. Once the OOP is available, placeholders will be replaced with the actual/real competitors.

How to identify a placeholder?

AMQP Messages

In competitor element, if attribute virtual="true" is present this indicates that the given competitor is a placeholder. If the virtual="false" or the virtual attribute is missing this indicates the given competitor is a real competitor.

SDK example – how to identify a placeholder team

.NET (competition is any match or stage)

var competitors1 = _taskProcessor.GetTaskResult(competition.GetCompetitorsAsync());
 foreach (var competitor in competitors1)
 {
 var isVirtual = competitor.IsVirtual;
 }

JAVA

List<Competitor> competitors = event.getCompetitors();
for(Competitor competitor : competitors){
 boolean isVirtual = competitor.isVirtual();
}

How to handle placeholder competitors?

When placeholder competitors are replaced with real competitors, a fixture_change message is sent out via AMQP to indicate an update, but no details on the actual replacement are included in the fixture_change message. That must be retrieved via the fixture.xml API endpoint.

On the API response, placeholder competitors will show as the example below:

<competitor id="sr:competitor:837884" name="R16P11" abbreviation="R16"
virtual="true" qualifier="home"/>
<competitor id="sr:competitor:14844" name="Monfils, Gael" country="France"
country_code="FRA" abbreviation="MON" qualifier="away"/>

Competitor "division" and "state" attributes

This attribute is used primarily for NCAA football and basketball to signify which division the competitor belongs to, and which state the college is located in.

This attribute has been added to all endpoints where the <competitor> element is sent.

XML example

<competitors>
  <competitor id="sr:competitor:4285" name="Tulane Green Wave" state="LA" country="USA" country_code="USA" abbreviation="TUL" qualifier="home" gender="male" division="1">
    <reference_ids>
      <reference_id name="betradar" value="58892"/>
      <reference_id name="rotation_number" value="138"/>
    </reference_ids>
  </competitor>
  <competitor id="sr:competitor:47353" name="FIU Panthers" state="FL" country="USA" country_code="USA" abbreviation="FIU" qualifier="away" gender="male" division="1">
      <reference_ids>
        <reference_id name="betradar" value="427914"/>
        <reference_id name="rotation_number" value="137"/>
      </reference_ids>
  </competitor>
</competitors>

Was this helpful?