Response Objects Reference

Complete documentation of API response object structures

Overview

All structural data including response from the API are represented as XML. The API can also return JSON format when the Accept: application/json header is specified.

Response

The root element of all responses is the Response element. The element has a success and a server timestamp attribute which is the server time of the response as UNIX time. It also has a metadataHash attribute which is the latest metadata hash code (see the metadata section for more info). Finally, the root element may contain an appVersion attribute containing the current version number of the application specified in the request.

The root element contains a UserInfo element and, if the call is successful, the appropriate container element of the actual response data. If the call is unsuccessful the root element contains the ErrorResponse container element.

Example

<Response success="true" timestamp="1279612806" metadataHash="f23ffdbb97027412c39cdba36e28b363" appVersion="3">

UserInfo

The UserInfo element contains information of the authenticated user.

If the resource doesn't require authentication, or no authentication is provided the UserInfo element only contains the free remaining searches (and an optional Error string if authentication was required).

The UserInfo element should be checked to confirm that authentication was successful (loggedIn="true") and to report the number of remaining searches.

Example

<UserInfo loggedIn="true">
  <Username>someone@somewhere.com</Username>
  <Regions name="Non US" code="NonUS"/>
  <Regions name="International" code="All"/>
  <RemainingSearches>56</RemainingSearches>
  <ExpirationDate>1523644928</ExpirationDate>
  <RequestLanguages>en-gb,en;q=0.7,el;q=0.3</RequestLanguages>
  <AuthorizedNetworks all="true"/>
</UserInfo>
<UserInfo loggedIn="false">
  <Regions name="Non US" code="NonUS"/>
  <Regions name="International" code="All"/>
  <RemainingSearches>5</RemainingSearches>
  <RequestLanguages>en-gb,en;q=0.7,el;q=0.3</RequestLanguages>
</UserInfo>

ErrorResponse

The ErrorResponse root element contains error information and is returned when the call is unsuccessful.

The ErrorResponse contains an Error element. The value is the description of the error in English and the id attribute contains the error code. The error code can be used to localize the error string.

Example

<Response success="false" timestamp="1279613507">
  <ErrorResponse>
    <Error id="101002">Invalid password.</Error>
  </ErrorResponse>
</Response>

MetadataResponse

The metadata response object contains metadata information about the API. It wraps the following objects:

  • FilterDefinition: Container of ConstraintDefinition objects
  • Regions: Container of Region objects
  • Networks: Container of Network objects
  • Currencies: Container of Currency objects
  • PlayerStatisticsDefinitions: Container of PlayerStatisticDefinition and PlayerStatisticalDataSetDefinition objects
  • TournamentStatisticsDefinitions: Container of TournamentStatisticDefinition and TournamentStatisticalDataSetDefinition objects
  • DefaultPlayerClasses: Container of PlayerClass definitions

The MetadataResponse is wrapped inside a standard Response object, which contains UserInfo and the metadata payload.

FilterDefinition

This is effectively a container of ConstraintDefinition objects.

ConstraintDefinition

Represents a description of a filter constraint. It has an "id" and a "type" attribute. If the type is "Multiselect" or "Selection" it also contains Option elements that define the possible values for the selection.

Example

<ConstraintDefinition type="Multiselect" id="Type">
  <Option type="Format" name="Tiered" description="The prize is a ticket to the next tournament tier. Also known as Step tournaments." id="TR" />
  <Option type="Format" name="Matrix" description="4 simultaneous Sit&Goes against the same players, with additional prizes for overall performances." id="M" />
  <Option type="Format" name="Bounty" description="Additional prizes are given for knocking players out. Also known as Knockout, Hitman and HeadHunter tournaments." id="B" />
  ...
</ConstraintDefinition>

Regions

This is effectively a container of Region objects.

Region

Represents poker network regions. Contains code, name and optional image attributes.

Networks

This is effectively a container of Network objects.

Network

Represents a poker network. It contains the following attributes:

name: the human-readable network name.

code: a two-letter code of the network.

region: the network's region.

closed: true if the network is closed, false otherwise.

There are also the following coverage/availability Boolean attributes.

hudCoverage, scheduledCoverage, sitngoCoverage, tournamentSelector, tournamentOpener.

The network element also contains the following elements:

FullCoverageStartDate: the date when full coverage started.

FullCoverageTrackingRate: the percentage of the tracking rate of the full coverage.

UpdateInterval: how often the coverage data is updated in minutes.

EarliestGameTrackDate: the date of the earliest tracked game.

TrackedGamesCount: the number of tracked games.

CoverageStage: The coverage stage. "Full" means the network is fully covered.

If the network has skins these are included as simple elements.

Example

<Network name="Live Events" code="li" ...>
  ...
  </Skins>
  <Skin>Aussie Millions 100k</Skin>
  <Skin>Hollywood Home Game</Skin>
  <Skin>NHPC</Skin>
  <Skin>PPT</Skin>
  <Skin>WPT</Skin>
  </Skins>
</Network>

Currencies

This is effectively a container of Currency objects.

Currency

Represents one of the currently supported currency. The attributes "symbol" and "iso" contain the currency symbol and iso code respectively. The value contains the exchange rate value.

Example

<Currency symbol="C$" iso="CAD" />
<Currency symbol="€" iso="EUR" />

PlayerStatisticsDefinitions

This is effectively a container of PlayerStatisticDefinition and StatisticalDataSetDefinition objects.

PlayerStatisticDefinition

Defines a player statistic. The id attribute contains the identifier included in player responses, the name is the human-readable name of the statistic and the type defines the value type.

Example

<PlayerStatisticDefinition name="Av Stake" type="Currency" id="AvStake"/>
<PlayerStatisticDefinition name="Av ROI" type="Percentage" id="AvROI"/>

PlayerStatisticalDataSetDefinition

Defines a player statistical data set. The id attribute contains the identifier included in player responses, while the xAxisTitle and xAxisType define the name and type of the x axis for the z axis. If the dataset is three-dimensional it will also contain zAxisTitle and zAxisType. It also contains Series elements that define the id, type, and title of included data series.

Example

<StatisticalDataSetDefinition xAxisType="Timestamp" xAxisTitle="Date" id="byDate">
  <Series type="Currency" title="Total Profit ($)" id="totalProfit" />
  <Series type="Currency" title="Average ROI ($)" id="averageROI" />
  <Series type="Currency" title="Average Stake ($)" id="averageStake" />
  <Series type="Number" title="Games Played" id="gamesPlayed" />
</StatisticalDataSetDefinition>

TournamentStatisticsDefinitions

Similar to PlayerStatisticsDefinitions, this is effectively a container of TournamentStatisticDefinition and TournamentStatisticalDataSetDefinition objects.

TournamentStatisticDefinition

Defines a tournament statistic. The id attribute contains the identifier included in tournament responses, the name is the human-readable name of the statistic and the type defines the value type.

TournamentStatisticalDataSetDefinition

Defines a tournament statistical data set. The id attribute contains the identifier included in player responses, while the xAxisTitle and xAxisType define the name and type of the x axis. If the dataset is three-dimensional it will also contain zAxisTitle and zAxisType for the z axis. It also contains Series elements that define the id, type, and title of included data series.

DefaultPlayerClasses

This is a container of the default PlayerClass definitions. These can be overridden by users.

PlayerClass

Represents a named set of rules that identify a particular player as a member of that class. The object contains the name, priority and iconUri attributes, as well as the categories assigned to the player class. The name is the identifier in other elements.

Rule

The player class rule represents a range of values for specific player statistics. A player's relevant statistic must fall within the defined range for the rule to be satisfied. All rules within a player class must be satisfied for the player to be considered a member of the player class.

Also note that the player classes are relevant and depend upon any applied search filters. So, for example, a particular player may be a "Fish" in scheduled tournaments and a "Shark" in $10-20 sit & go tournaments.

UserFilters

This is effectively a container of SavedFilter objects.

SavedFilter

Represents a filter saved by the user. It has an "name" and a "type" attribute. The type attribute determines if the filter is a player filter or a tournament selector filter or both. The value of the element is the filter string.

Example

<UserFilters>
  <SavedFilter type="All" name="SNG Only">Class:SNG</SavedFilter>
  <SavedFilter type="Player" name="TestFilter">Entrants:5~10</SavedFilter>
</UserFilters>

UserDefinedPlayerClasses

This is a container of the user defined PlayerClass definitions.

PlayerView

This is a view to player's data. It is defined by the filter and player network/name. It contains the Filter and Player objects. The latter contains sparsely populated data depending on the request.

Filter

The filter object represents the filter applied to the request. It is effectively a container of Constraint objects that define individual filter constraints.

Constraint

The Constraint object represents individual filter constraints. The id attribute maps directly to a ConstraintDefinition object in the metadata. Depending on the type it contains the value(s) of the constraint in appropriate sub-elements.

Example

<Constraint id="Game">
  <Selection id="O" />
  <Selection id="OHL" />
  <Selection id="7CS" />
  <Selection id="7CSHL" />
</Constraint>
<Constraint id="Format">
  <Selection id="HU" />
  <Selection id="SAT" />
</Constraint>
<Constraint id="Stake">
  <Minimum>2.00</Minimum>
</Constraint>
<Constraint id="Structure">
  <Selection id="PL" />
  <Selection id="FL" />
</Constraint>
<Constraint id="Limit">
  <Value>100</Value>
</Constraint>

PlayerResponse

The PlayerResponse object is a container that wraps player-related data. It contains one or more PlayerView objects, each representing a view of player data defined by the filter and player network/name.

Most player resources return a PlayerResponse object sparsely populated according to the request. The PlayerResponse is wrapped inside a standard Response object, which contains UserInfo and the player data payload.

The PlayerResponse object contains:
- PlayerView: A view to player's data, containing Filter and Player objects

Player

The player object contains sparsely populated data depending on the request. It always contains a name and a network attribute that uniquely identifies the player. It may also optionally contain the following objects:

Icon: If the player has associated icons.

Statistics: if statistics were requested and the player is not blocked.

recentTournaments: A list of the most recent tournaments, or

completedTournaments: A list of the current tournaments.

activeTournaments: A list of the current tournaments.

The player may also be a consolidated player group in which case the element name is PlayerGroup. A player group doesn't have a network attribute and contains one or more Player objects. These player objects may only contain Icon objects, the statistics and recent tournaments for those players are consolidated at the top level player group object.

Example

<Player network="PokerStars" name="someone">
  <Icon type="blog" tip="Visit my Blog" image="images/icons/blog.gif" url="http://www.sharkscopers.com/blog/21210" />
  <Statistics ...
  <RecentTournaments ...
</Player>
<PlayerGroup name="somePlayerGroup">
  <Players>
    <Player network="PokerStars" name="someone">
      <Icon type="blog" tip="Visit my Blog" image="images/icons/blog.gif" url="http://www.sharkscopers.com/blog/21210" />
    </Player>
    <Player network="FullTilt" name="someone" />
  </Players>
  <Statistics ...
  <RecentTournaments ...
</PlayerGroup>

Statistics

The statistics object is effectively a container of Statistic and StatisticalDataSet objects. It contains two attributes: "optedIn" and "displayCurrency". The "optedIn" attribute contains a Boolean value and is "true" if the player has opted in. The display currency contains the currency used in statistic values.

Example

<Statistics optedIn="true" displayCurrency="USD">
  <Statistic id="Count">2198</Statistic>
  <Statistic id="AvProfit">7.78</Statistic>
  <Statistic id="AvStake">28.67</Statistic>
  <Statistic id="AvROI">25.43</Statistic>
  <Statistic id="TotalProfit">17091.70</Statistic>
  <Statistic id="Form">LLLLWPLW</Statistic>
  <Statistic id="TotalStake">63015.00</Statistic>
  <StatisticalDataSet id="byDate">
    <Data x="1122336000">
      <Y id="totalProfit">-118.00</Y>
      <Y id="averageROI">-76.62</Y>
      <Y id="averageStake">20.00</Y>
      <Y id="gamesPlayed">7</Y>
    </Data>
    <Data x="1122422400">
      <Y id="totalProfit">60.00</Y>
      <Y id="averageROI">90.91</Y>
      <Y id="averageStake">20.00</Y>
      <Y id="gamesPlayed">3</Y>
    </Data>
    <Data x="1122508800">
      <Y id="totalProfit">152.00</Y>
      <Y id="averageROI">276.36</Y>
      <Y id="averageStake">25.00</Y>
      <Y id="gamesPlayed">2</Y>
    </Data>
    <Data x="1123200000">
      <Y id="totalProfit">-33.00</Y>
      <Y id="averageROI">-100.00</Y>
      <Y id="averageStake">30.00</Y>
      <Y id="gamesPlayed">1</Y>
    </Data>
  </StatisticalDataSet>
</Statistics>

Statistic

The Statistic object represents a single statistical value. It contains an id attribute that refers to the StatisticDefinition from the metadata. The value depends on the type.

Example

<Statistic id="Count">2198</Statistic>
<Statistic id="AvProfit">7.78</Statistic>
<Statistic id="AvStake">28.67</Statistic>
<Statistic id="AvROI">25.43</Statistic>

StatisticalDataSet

The StatisticalDataSet object represents a set of values that can be represented as a graph. It contains an id attribute that refers to the StatisticalDataSetDefinition from the metadata. It also contains Data elements which define data points in the graph. The Y values map directly to the metadata definition.

Example

<StatisticalDataSet id="byDate">
  <Data x="1122336000">
    <Y id="totalProfit">-118.00</Y>
    <Y id="averageROI">-76.62</Y>
    <Y id="averageStake">20.00</Y>
    <Y id="gamesPlayed">7</Y>
  </Data>
  <Data x="1122422400">
    <Y id="totalProfit">60.00</Y>
    <Y id="averageROI">90.91</Y>
    <Y id="averageStake">20.00</Y>
    <Y id="gamesPlayed">3</Y>
  </Data>
  <Data x="1122508800">
    <Y id="totalProfit">152.00</Y>
    <Y id="averageROI">276.36</Y>
    <Y id="averageStake">25.00</Y>
    <Y id="gamesPlayed">2</Y>
  </Data>
  <Data x="1123200000">
    <Y id="totalProfit">-33.00</Y>
    <Y id="averageROI">-100.00</Y>
    <Y id="averageStake">30.00</Y>
    <Y id="gamesPlayed">1</Y>
  </Data>
</StatisticalDataSet>

PlayerSuggestions

The PlayerSuggestions object is a container for player suggestions. It is returned in the SearchSuggestionsResponse for the suggestions resource. The player suggestions object contains Player objects with only the name, network and Icon objects populated.

Example

<PlayerSuggestions>
  <Player network="PokerStars" name="Alkazar99">
    <Icon type="video" tip="Instructional videos are available. " image="images/icons/video.gif" url="http://www.sharkscopers.com/video/20" />
    <Icon type="blog" tip="Visit my Blog" image="images/icons/blog.gif" url="http://www.sharkscopers.com/blog/20" />
  </Player>
  <Player network="PokerStars" name="Alkazar1972" />
  <Player network="PokerStars" name="alkazarus" />
  <Player network="PokerStars" name="alkazara" />
  <Player network="PokerStars" name="alkazar13" />
  <Player network="PokerStars" name="alkazar78" />
</PlayerSuggestions>

PlayerInsightsResponse

The PlayerInsightsResponse object contains predictions of a player's future performance and recommendations on how to increase profitability. This response is returned by the insights resource.

The PlayerInsightsResponse contains insights and recommendations that may include:
- Performance predictions based on historical data
- Recommendations for increasing profitability
- Currency-specific recommendations (when currency parameter is provided)
- Day-of-week specific recommendations (when timezoneOffset parameter is provided)

The PlayerInsightsResponse is wrapped inside a standard Response object, which contains UserInfo and the insights payload.

Tournament Statistics

Tournaments have their own statistics and statistical datasets. The definitions of these statistics are included in the metadata under "TournamentStatisticsDefinitions".

TournamentEntry

Tournament entry objects contain information about the participants of the tournament as Player objects. The player objects contained in tournament entries only contain basic player information like username, icons without statistics.

For completed tournaments, the position of the player in the tournament and profit are also included.

Leaderboard Hierarchy

The metadata response object contains leaderboard definitions as a hierarchy or individual leaderboards with their players depending on the request.

Example

<LeaderboardDisplayResponse>
  <Leaderboards year="2010" subcategory="$101-$300" category="Any Game">
    <LeaderboardDisplay year="2010" valueType="average" subcategory="$101-$300" category="Any Game"/>
    <LeaderboardDisplay year="2010" valueType="total" subcategory="$101-$300" category="Any Game"/>
  </Leaderboards>
</LeaderboardDisplayResponse>

Leaderboard

The metadata response object contains leaderboard definitions as a hierarchy or individual leaderboards with their players depending on the request.

Example

<LeaderboardDisplayResponse>
  <LeaderboardDisplay year="2010" valueType="total" subcategory="$101-$300" category="Any Game">
    <Details/>
    <Rank value="132708.0" position="1" count="12216">
      <Player network="FullTilt" name="rams85">
        <Icon type="leaderboard" tip="..." image="images/icons/diamondstar.gif"/>
      </Player>
    </Rank>
    <Rank value="125355.0" position="2" count="5656">
      <Player network="PokerStars" name="la_gâchette">
        <Icon type="leaderboard" tip="..." image="images/icons/diamondstar.gif"/>
      </Player>
    </Rank>
    ...
  </LeaderboardDisplay>
</LeaderboardDisplayResponse>

MessagesResponse

A response containing success or failure messages. Used by message-related endpoints.
The MessagesResponse is wrapped inside a standard Response object.

PlayerGroupResponse

The PlayerGroupResponse object contains player group data. It may be sparsely populated depending on the request (e.g. list of groups, or a single group with members).
The PlayerGroupResponse is wrapped inside a standard Response object.

TournamentResponse

A generic tournament response object containing tournament data. The structure varies by endpoint.
The TournamentResponse is wrapped inside a standard Response object.

RegisteringTournamentResponse

A response containing data for tournaments that are currently registering.
The RegisteringTournamentResponse is wrapped inside a standard Response object.

CompletedTournamentResponse

A response containing completed tournament data.
The CompletedTournamentResponse is wrapped inside a standard Response object.

BareTournamentResponse

A response containing minimal (bare) tournament information, typically when requesting multiple tournaments by ID.
The BareTournamentResponse is wrapped inside a standard Response object.

RunningChipsResponse

A response containing running chip counts for tournament players. Contains RunningChipsTournament elements with state (SUBMITTED, ERROR, or COMPLETED).
The RunningChipsResponse is wrapped inside a standard Response object.

LeaderboardDisplayResponse

A response containing leaderboard display data—either a hierarchy of leaderboards or individual leaderboards with their players.
The LeaderboardDisplayResponse is wrapped inside a standard Response object.

NetworkCoverageResponse

A response containing network coverage information.
The NetworkCoverageResponse is wrapped inside a standard Response object.

UserPreferencesResponse

A response containing the authenticated user's preferences.
The UserPreferencesResponse is wrapped inside a standard Response object.

BlogUrlResponse

A response containing the user's blog URL or the result of setting/deleting it.
The BlogUrlResponse is wrapped inside a standard Response object.

UserMetadataResponse

A response containing user-specific metadata.
The UserMetadataResponse is wrapped inside a standard Response object.

UserPaymentsResponse

A response containing the user's payment information.
The UserPaymentsResponse is wrapped inside a standard Response object.

UserFiltersResponse

A response containing the user's saved filters (UserFilters container with SavedFilter objects).
The UserFiltersResponse is wrapped inside a standard Response object.

UserPlayerClassesResponse

A response containing the user's player class definitions.
The UserPlayerClassesResponse is wrapped inside a standard Response object.

ResellerInfoResponse

A response containing reseller information for the user.
The ResellerInfoResponse is wrapped inside a standard Response object.

UserNotesResponse

A response containing the user's notes on players (bulk or per-player).
The UserNotesResponse is wrapped inside a standard Response object.

ManagerResponse

A response containing manager-related data for the authenticated user.
The ManagerResponse is wrapped inside a standard Response object.

UserUsageHistoryResponse

A response containing the user's search usage history, broken down by date, network and action.
The UserUsageHistoryResponse is wrapped inside a standard Response object.

MarketShareResponse

A response containing market share report data for networks or regions.
The MarketShareResponse is wrapped inside a standard Response object.

HourlyMarketShareResponse

A response containing hourly market share data (HourlyMarketShare elements with structure, stake, region, rake, network, hour, game, etc.).
The HourlyMarketShareResponse is wrapped inside a standard Response object.

DailyScheduledTournamentResponse

A response containing daily scheduled tournament report data for a network or region.
The DailyScheduledTournamentResponse is wrapped inside a standard Response object.

UserPrivateLeaderboardResponse

A response containing the user's private leaderboard data.
The UserPrivateLeaderboardResponse is wrapped inside a standard Response object.

StableResponse

A response containing stable (player group) related data.
The StableResponse is wrapped inside a standard Response object.

OutageNotificationResponse

A response containing tracking outage notification data.
The OutageNotificationResponse is wrapped inside a standard Response object.