Profiles API

Overview
version: 1.0

The William Hill Profiles API is a collection of methods used to retrieve and modify data for within a customer’s profile, this being the public face of their private account. Anyone with a William Hill account can have a profile with a public name (an alternative to the customer private name as used in the Accounts API) and biography. Like similar social sites customers have the ability to follow or unfollow other customer profiles, this can be useful to track their public betting interactions, for example when combined with the Communities API it is possible to follow the tips other are making on bets that they have placed. It also provides functionality allowing you to implement different administrative tasks like flagging a profile for review by a moderator. To get your profile you must obtain a valid session using the Sessions API, this will provide you with an authentication ticket (who-ticket). Having an authentication ticket allows you to make a request to the Profiles API using the endpoint v1/profiles/me.
Summary
MethodNameDescriptionResource
getProfileReads data about the currently logged on profile, so that the data can be used in other applications.https://sandbox.whapi.com/v1/profiles/{id}
flagProfileFlags a customer profile so that a moderator will review it afterwards. You cannot flag your own profile. https://sandbox.whapi.com/v1/profiles/{id}/flag
getFollowersGets a list of the followers of a specific profile by providing the profile id.https://sandbox.whapi.com/v1/profiles/{id}/followers
getFollowingsGets a list of the followings of a specific profile by providing the profile id.https://sandbox.whapi.com/v1/profiles/{id}/followings
getMyProfileReads data about the currently logged on profile, so that the data can be used in other applications. Note that, if a profile for the currently logged on customer does not exist then one is created with default values and its data is returned in the response.https://sandbox.whapi.com/v1/profiles/me
updateMyProfileUpdates the currently logged on profile - that is to update the biography or the username.https://sandbox.whapi.com/v1/profiles/me
getMyFollowersGets a list of followers of the currently logged on profile. Note that, if a profile for the currently logged on customer does not exist then one is created with default values and its data is returned in the response.https://sandbox.whapi.com/v1/profiles/me/followers
followProfileFollows a profile by providing the profile id.https://sandbox.whapi.com/v1/profiles/me/followers/{id}
unfollowProfileStops following the profile with the given id.https://sandbox.whapi.com/v1/profiles/me/followers/{id}
getMyFollowingsGets a list of the followings (profiles that the currently logged on profile is following) by providing the profile id. Note that, if a profile for the currently logged on user does not exist then one is created with default values and its data is returned in the response.https://sandbox.whapi.com/v1/profiles/me/followings
getLatestFollowersReads the most recent followers on all profiles, so that you can display them in your application as a live follow feed.https://sandbox.whapi.com/v1/profiles/followers/latestFollowers
getMostFollowedProfilesReads the most followed profiles for a defined period of days, so that you can display them in your application. https://sandbox.whapi.com/v1/profiles/followers/mostFollowed
ResourcesExpand AllCollapse All
getProfile()
Reads data about the currently logged on profile, so that the data can be used in other applications.
Request Example
GET /v1/profiles/{id} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
idstring
(required)
The id of the profile you want to get data for.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstringThe authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
query parameters
NameTypeDescription
communitiesstring
default:
N
options:
Y, N
Select Y or N depending on whether you want additional information related to Communities to be returned or not. The additional information is the customer's active comments (tips) and the number of winning comments (tips) a profile currently has.
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
element isFlagged Boolean true|false Yes Is this profile flagged by the requester.
element isFollowed Boolean true|false Yes Is this profile being followed by the requester.
node communities Node - Yes Communities node
communities
Object Name Type Constraints Optional Description
node comments Node - No Comments node
comments
Object Name Type Constraints Optional Description
element numLive Integer [0-9]+ No Number of active comments.
element numWinning Integer [0-9]+ No Number of winning comments.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Details obtained
Representations
application/xml
<whoProfiles>
   <profile id="3">
      <name>Dean A G (Cardiff)</name>
      <biography>I'm a top tipster, check out my hot tips</biography>
      <picture>http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG</picture>
      <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
      <numFollowings>25</numFollowings>
      <numFollowers>3</numFollowers>
      <isFlagged>Y</isFlagged>
      <isFollowed>N</isFollowed>
      <communities>
         <comments type="tip">
            <numLive>234</numLive>
            <numWinning>23</numWinning>
         </comments>
      </communities>
   </profile>
</whoProfiles>
application/json
{
   "whoProfiles":[
      {
         "profile":{
            "id":"3",
            "name":"Dean A G (Cardiff)",
            "biography":"I'm a top tipster, check out my hot tips",
            "picture":"http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG",
            "createdDateTimeZoned":"2011-06-09T15:44:23+01:00",
            "numFollowings":"25",
            "numFollowers":"3",
            "isFlagged":"Y",
            "isFollowed":"N",
            "communities":[
               {
                  "comments":{
                     "type":"tip",
                     "numLive":"234",
                     "numWinning":"23"
                  }
               }
            ]
         }
      }
   ]
}
Status: 400 (Bad Request) - Fault 10070 - No id in template
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10070</faultCode>
      <faultString>Missing request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10070",
         "faultString":"Missing request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - id in template is not a valid number
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - communities parameter in query is not Y, N or {blank}
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>communities</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"communities"
      }
   ]
}
Status: 404 (Not Found) - Fault 30410 - No profile found for id
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30410</faultCode>
      <faultString>No profile found for id.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30410",
         "faultString":"No profile found for id.",
         "faultName":"id"
      }
   ]
}
flagProfile()
Flags a customer profile so that a moderator will review it afterwards. You cannot flag your own profile.
Request Example
PUT /v1/profiles/{id}/flag HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-ticket: TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx
Request Parameters
template parameters
NameTypeDescription
idstring
(required)
The id for the profile requested.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstring
(required)
The authentication ticket associated with user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
ResponsesExpand AllCollapse All
Status: 204 (No Content) - Success - Profile flagged by me
Status: 400 (Bad Request) - Fault 10070 - No id in template
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10070</faultCode>
      <faultString>Missing request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10070",
         "faultString":"Missing request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - id in template is not a valid number
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 404 (Not Found) - Fault 30410 - No profile found for id
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30410</faultCode>
      <faultString>No profile found for id.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30410",
         "faultString":"No profile found for id.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 30460 - You cannot flag yourself
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30460</faultCode>
      <faultString>You cannot flag your own profile.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30460",
         "faultString":"You cannot flag your own profile.",
         "faultName":"id"
      }
   ]
}
getFollowers()
Gets a list of the followers of a specific profile by providing the profile id.
Request Example
GET /v1/profiles/{id}/followers HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
idstring
(required)
The id for the profile requested.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstringThe authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
query parameters
NameTypeDescription
communitiesstring
default:
N
options:
Y, N
Select Y or N depending on whether you want additional information related to Communities to be returned or not. The additional information is the customer's active comments (tips) and the number of winning comments (tips) a profile currently has.
blockSizeinteger
default:
20
The block size controls the number of items in your response. Value should be between 1 and 100.
blockNuminteger
default:
0
The block number (page) you want to retrieve in the response and later display in your application.
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
element isFlagged Boolean true|false Yes Is this profile flagged by the requester.
element isFollowed Boolean true|false Yes Is this profile being followed by the requester.
node communities Node - Yes Communities node
communities
Object Name Type Constraints Optional Description
node comments Node - No Comments node
comments
Object Name Type Constraints Optional Description
element numLive Integer [0-9]+ No Number of active comments.
element numWinning Integer [0-9]+ No Number of winning comments.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Followers obtained (can be 1 to many)
Representations
application/xml
<whoProfiles>
   <profile id="3">
      <name>Dean A G (Cardiff)</name>
      <biography>I'm a top tipster, check out my hot tips</biography>
      <picture>http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG</picture>
      <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
      <numFollowings>25</numFollowings>
      <numFollowers>3</numFollowers>
      <isFlagged>Y</isFlagged>
      <isFollowed>N</isFollowed>
      <communities>
         <comments type="tip">
            <numLive>234</numLive>
            <numWinning>23</numWinning>
         </comments>
      </communities>
   </profile>
</whoProfiles>
application/json
{
   "whoProfiles":[
      {
         "profile":{
            "id":"3",
            "name":"Dean A G (Cardiff)",
            "biography":"I'm a top tipster, check out my hot tips",
            "picture":"http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG",
            "createdDateTimeZoned":"2011-06-09T15:44:23+01:00",
            "numFollowings":"25",
            "numFollowers":"3",
            "isFlagged":"Y",
            "isFollowed":"N",
            "communities":[
               {
                  "comments":{
                     "type":"tip",
                     "numLive":"234",
                     "numWinning":"23"
                  }
               }
            ]
         }
      }
   ]
}
Status: 204 (No Content) - Success - When no followers
Status: 400 (Bad Request) - Fault 10070 - No id in template
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10070</faultCode>
      <faultString>Missing request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10070",
         "faultString":"Missing request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - id in template is not a valid number
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - blockSize or blockNum does not meet parameter contraints
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>blockSize|blockNum</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"blockSize|blockNum"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - communities parameter in query is not Y, N or {blank}
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>communities</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"communities"
      }
   ]
}
Status: 404 (Not Found) - Fault 30410 - No profile found for id
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30410</faultCode>
      <faultString>No profile found for id.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30410",
         "faultString":"No profile found for id.",
         "faultName":"id"
      }
   ]
}
getFollowings()
Gets a list of the followings of a specific profile by providing the profile id.
Request Example
GET /v1/profiles/{id}/followings HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
template parameters
NameTypeDescription
idstring
(required)
The id for the profile requested.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstringThe authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
query parameters
NameTypeDescription
communitiesstring
default:
N
options:
Y, N
Select Y or N depending on whether you want additional information related to Communities to be returned or not. The additional information is the customer's active comments (tips) and the number of winning comments (tips) a profile currently has.
blockSizeinteger
default:
20
The block size controls the number of items in your response. Value should be between 1 and 100.
blockNuminteger
default:
0
The block number (page) you want to retrieve in the response and later display in your application.
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
element isFlagged Boolean true|false Yes Is this profile flagged by the requester.
element isFollowed Boolean true|false Yes Is this profile being followed by the requester.
node communities Node - Yes Communities node
communities
Object Name Type Constraints Optional Description
node comments Node - No Comments node
comments
Object Name Type Constraints Optional Description
element numLive Integer [0-9]+ No Number of active comments.
element numWinning Integer [0-9]+ No Number of winning comments.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Followings obtained (can be 1 to many)
Representations
application/xml
<whoProfiles>
   <profile id="3">
      <name>Dean A G (Cardiff)</name>
      <biography>I'm a top tipster, check out my hot tips</biography>
      <picture>http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG</picture>
      <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
      <numFollowings>25</numFollowings>
      <numFollowers>3</numFollowers>
      <isFlagged>Y</isFlagged>
      <isFollowed>N</isFollowed>
      <communities>
         <comments type="tip">
            <numLive>234</numLive>
            <numWinning>23</numWinning>
         </comments>
      </communities>
   </profile>
</whoProfiles>
application/json
{
   "whoProfiles":[
      {
         "profile":{
            "id":"3",
            "name":"Dean A G (Cardiff)",
            "biography":"I'm a top tipster, check out my hot tips",
            "picture":"http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG",
            "createdDateTimeZoned":"2011-06-09T15:44:23+01:00",
            "numFollowings":"25",
            "numFollowers":"3",
            "isFlagged":"Y",
            "isFollowed":"N",
            "communities":[
               {
                  "comments":{
                     "type":"tip",
                     "numLive":"234",
                     "numWinning":"23"
                  }
               }
            ]
         }
      }
   ]
}
Status: 204 (No Content) - Success - When no followings
Status: 400 (Bad Request) - Fault 10070 - No id in template
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10070</faultCode>
      <faultString>Missing request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10070",
         "faultString":"Missing request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - id in template is not a valid number
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - communities parameter in query is not Y, N or {blank}
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>communities</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"communities"
      }
   ]
}
Status: 404 (Not Found) - Fault 30410 - No profile found for id
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30410</faultCode>
      <faultString>No profile found for id.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30410",
         "faultString":"No profile found for id.",
         "faultName":"id"
      }
   ]
}
getMyProfile()
Reads data about the currently logged on profile, so that the data can be used in other applications. Note that, if a profile for the currently logged on customer does not exist then one is created with default values and its data is returned in the response.
Request Example
GET /v1/profiles/me HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-ticket: TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstring
(required)
The authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
query parameters
NameTypeDescription
communitiesstring
default:
N
options:
Y, N
Select Y or N depending on whether you want additional information related to Communities to be returned or not. The additional information is the customer's active comments (tips) and the number of winning comments (tips) a profile currently has.
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
node communities Node - Yes Communities node
communities
Object Name Type Constraints Optional Description
node comments Node - No Comments node
comments
Object Name Type Constraints Optional Description
element numLive Integer [0-9]+ No Number of active comments.
element numWinning Integer [0-9]+ No Number of winning comments.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Details Obtained
Representations
application/xml
<whoProfiles>
   <profile id="3">
      <name>Dean A G (Cardiff)</name>
      <biography>I'm a top tipster, check out my hot tips</biography>
      <picture>http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG</picture>
      <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
      <numFollowings>25</numFollowings>
      <numFollowers>3</numFollowers>
      <communities>
         <comments type="tip">
            <numLive>234</numLive>
            <numWinning>23</numWinning>
         </comments>
      </communities>
   </profile>
</whoProfiles>
application/json
{
   "whoProfiles":[
      {
         "profile":{
            "id":"3",
            "name":"Dean A G (Cardiff)",
            "biography":"I'm a top tipster, check out my hot tips",
            "picture":"http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG",
            "createdDateTimeZoned":"2011-06-09T15:44:23+01:00",
            "numFollowings":"25",
            "numFollowers":"3",
            "communities":[
               {
                  "comments":{
                     "type":"tip",
                     "numLive":"234",
                     "numWinning":"23"
                  }
               }
            ]
         }
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - communities parameter in query is not Y, N or {blank}
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>communities</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"communities"
      }
   ]
}
updateMyProfile()
Updates the currently logged on profile - that is to update the biography or the username.
Request Example
PUT /v1/profiles/me HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-ticket: TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx
name: Dean A G
biography: I'm a top tipster, check out my hot tips
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstring
(required)
The authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
query parameters
NameTypeDescription
namestringThe new name for the profile (max 30 characters).
biographystringThe new biography for the profile (max 140 characters).
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Profile updated
Representations
application/xml
<whoProfiles>
   <profile id="3">
      <name>Dean A G</name>
      <biography>I'm a top tipster, check out my hot tips</biography>
      <picture>http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG</picture>
      <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
      <numFollowings>25</numFollowings>
      <numFollowers>3</numFollowers>
   </profile>
</whoProfiles>
application/json
{
   "whoProfiles":[
      {
         "profile":{
            "id":"3",
            "name":"Dean A G",
            "biography":"I'm a top tipster, check out my hot tips",
            "picture":"http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG",
            "createdDateTimeZoned":"2011-06-09T15:44:23+01:00",
            "numFollowings":"25",
            "numFollowers":"3",
         }
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - Invalid request parameter (on name or Bio)
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>name|biography</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"name|biography"
      }
   ]
}
Status: 409 (Conflict) - Fault 30430 - Profile name already taken
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30430</faultCode>
      <faultString>Profile name already taken.</faultString>
      <faultName>name</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30430",
         "faultString":"Profile name already taken.",
         "faultName":"name"
      }
   ]
}
Status: 400 (Bad Request) - Fault 30431 - Only ancillary characters
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30431</faultCode>
      <faultString>Only ancillary characters.</faultString>
      <faultName>name|biography</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30431",
         "faultString":"Only ancillary characters.",
         "faultName":"name|biography"
      }
   ]
}
Status: 400 (Bad Request) - Fault 30432 - Inappropriate content
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30432</faultCode>
      <faultString>Inappropriate content.</faultString>
      <faultName>name|biography</faultName>
      <solution>
         This is my ******* comment
      </solution>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30432",
         "faultString":"Inappropriate content.",
         "faultName":"name|biography",
         "solution":"This is my ******* comment"
      }
   ]
}
getMyFollowers()
Gets a list of followers of the currently logged on profile. Note that, if a profile for the currently logged on customer does not exist then one is created with default values and its data is returned in the response.
Request Example
GET /v1/profiles/me/followers HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-ticket: TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstring
(required)
The authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
query parameters
NameTypeDescription
communitiesstring
default:
N
options:
Y, N
Select Y or N depending on whether you want additional information related to Communities to be returned or not. The additional information is the customer's active comments (tips) and the number of winning comments (tips) a profile currently has.
blockSizeinteger
default:
20
The block size controls the number of items in your response. Value should be between 1 and 100.
blockNuminteger
default:
0
The block number (page) you want to retrieve in the response and later display in your application.
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
element isFlagged Boolean true|false Yes Is this profile flagged by the requester.
element isFollowed Boolean true|false Yes Is this profile being followed by the requester.
node communities Node - Yes Communities node
communities
Object Name Type Constraints Optional Description
node comments Node - No Comments node
comments
Object Name Type Constraints Optional Description
element numLive Integer [0-9]+ No Number of active comments.
element numWinning Integer [0-9]+ No Number of winning comments.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Followings obtained (can be 1 to many)
Representations
application/xml
<whoProfiles>
   <profile id="3">
      <name>Dean A G (Cardiff)</name>
      <biography>I'm a top tipster, check out my hot tips</biography>
      <picture>http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG</picture>
      <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
      <numFollowings>25</numFollowings>
      <numFollowers>3</numFollowers>
      <isFlagged>Y</isFlagged>
      <isFollowed>N</isFollowed>
      <communities>
         <comments type="tip">
            <numLive>234</numLive>
            <numWinning>23</numWinning>
         </comments>
      </communities>
   </profile>
</whoProfiles>
application/json
{
   "whoProfiles":[
      {
         "profile":{
            "id":"3",
            "name":"Dean A G (Cardiff)",
            "biography":"I'm a top tipster, check out my hot tips",
            "picture":"http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG",
            "createdDateTimeZoned":"2011-06-09T15:44:23+01:00",
            "numFollowings":"25",
            "numFollowers":"3",
            "isFlagged":"Y",
            "isFollowed":"N",
            "communities":[
               {
                  "comments":{
                     "type":"tip",
                     "numLive":"234",
                     "numWinning":"23"
                  }
               }
            ]
         }
      }
   ]
}
Status: 204 (No Content) - Success - When no followers
Status: 400 (Bad Request) - Fault 10071 - blockSize or blockNum does not meet parameter contraints
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>blockSize|blockNum</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"blockSize|blockNum"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - communities parameter in query is not Y, N or {blank}
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>communities</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"communities"
      }
   ]
}
followProfile()
Follows a profile by providing the profile id.
Request Example
POST /v1/profiles/me/followings/{id} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-ticket: TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx
Request Parameters
template parameters
NameTypeDescription
idstring
(required)
The id for the profile to follow.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstring
(required)
The authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
ResponsesExpand AllCollapse All
Status: 204 (No Content) - Success - Following created
Status: 400 (Bad Request) - Fault 10070 - No id in query
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10070</faultCode>
      <faultString>Missing request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10070",
         "faultString":"Missing request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - id in query is not a valid number
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"id"
      }
   ]
}
Status: 404 (Not Found) - Fault 30410 - No profile found for id
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30410</faultCode>
      <faultString>No profile found for id.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30410",
         "faultString":"No profile found for id.",
         "faultName":"id"
      }
   ]
}
Status: 400 (Bad Request) - Fault 30440 - You cannot create a follow relationship with yourself
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>30440</faultCode>
      <faultString>You cannot create a follow relationship with yourself.</faultString>
      <faultName>id</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"30440",
         "faultString":"You cannot create a follow relationship with yourself.",
         "faultName":"id"
      }
   ]
}
unfollowProfile()
Stops following the profile with the given id.
Request Example
DELETE /v1/profiles/me/followings/{id} HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-ticket: TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx
Request Parameters
template parameters
NameTypeDescription
idstring
(required)
The id for the profile to stop following.
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstring
(required)
The authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element status Character - No Status of this profile.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Profile deleted
Representations
application/xml
<whoProfiles>
   <profile id="272141">
      <status>I</status>
   </profile>
</whoProfiles>
application/json
{
   "whoProfiles":[
      {
         "profile":{
            "id":"272141",
            "status":"I"
         }
      }
   ]
}
getMyFollowings()
Gets a list of the followings (profiles that the currently logged on profile is following) by providing the profile id. Note that, if a profile for the currently logged on user does not exist then one is created with default values and its data is returned in the response.
Request Example
GET /v1/profiles/me/followings HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-ticket: TGT-619-Ei7EcapNaeKiopvNEYke6PIlPKihKZHYb0lKjrsyDqpJRgEyw3-brsuxxxx
Request Parameters
header parameters
NameTypeDescription
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstring
(required)
The authentication ticket associated with the user session.
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
query parameters
NameTypeDescription
communitiesstring
default:
N
options:
Y, N
Select Y or N depending on whether you want additional information related to Communities to be returned or not. The additional information is the customer's active comments (tips) and the number of winning comments (tips) a profile currently has.
blockSizeinteger
default:
20
The block size controls the number of items in your response. Value should be between 1 and 100.
blockNuminteger
default:
0
The block number (page) you want to retrieve in the response and later display in your application.
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
element isFlagged Boolean true|false Yes Is this profile flagged by the requester.
element isFollowed Boolean true|false Yes Is this profile being followed by the requester.
node communities Node - Yes Communities node
communities
Object Name Type Constraints Optional Description
node comments Node - No Comments node
comments
Object Name Type Constraints Optional Description
element numLive Integer [0-9]+ No Number of active comments.
element numWinning Integer [0-9]+ No Number of winning comments.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - Followings obtained (can be 1 to many)
Representations
application/xml
<whoProfiles>
   <profile id="3">
      <name>Dean A G (Cardiff)</name>
      <biography>I'm a top tipster, check out my hot tips</biography>
      <picture>http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG</picture>
      <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
      <numFollowings>25</numFollowings>
      <numFollowers>3</numFollowers>
      <isFlagged>Y</isFlagged>
      <isFollowed>N</isFollowed>
      <communities>
         <comments type="tip">
            <numLive>234</numLive>
            <numWinning>23</numWinning>
         </comments>
      </communities>
   </profile>
</whoProfiles>
application/json
{
   "whoProfiles":[
      {
         "profile":{
            "id":"3",
            "name":"Dean A G (Cardiff)",
            "biography":"I'm a top tipster, check out my hot tips",
            "picture":"http://who-community.s3-website-eu-west-1.amazonaws.com/images/live/1468314d264522f8712637b77f42105544ef6138.PNG",
            "createdDateTimeZoned":"2011-06-09T15:44:23+01:00",
            "numFollowings":"25",
            "numFollowers":"3",
            "isFlagged":"Y",
            "isFollowed":"N",
            "communities":[
               {
                  "comments":{
                     "type":"tip",
                     "numLive":"234",
                     "numWinning":"23"
                  }
               }
            ]
         }
      }
   ]
}
Status: 204 (No Content) - Success - When no followings
Status: 400 (Bad Request) - Fault 10071 - blockSize or blockNum does not meet parameter contraints
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>blockSize|blockNum</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"blockSize|blockNum"
      }
   ]
}
Status: 400 (Bad Request) - Fault 10071 - communities parameter in query is not Y, N or {blank}
Representations
application/xml
<whoFaults>
   <fault>
      <faultCode>10071</faultCode>
      <faultString>Invalid request parameter.</faultString>
      <faultName>communities</faultName>
   </fault>
</whoFaults>
application/json
{
   "whoFaults":[
      {
         "faultCode":"10071",
         "faultString":"Invalid request parameter.",
         "faultName":"communities"
      }
   ]
}
getLatestFollowers()
Reads the most recent followers on all profiles, so that you can display them in your application as a live follow feed.
Request Example
GET /v1/profiles/followers/latestFollowers HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header. An api key is always required but it is possible to send it using the query string instead of the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstring
(required)
The authentication ticket associated with the user session.
query parameters
NameTypeDescription
communitiesstring
default:
N
options:
Y, N
Select Y or N depending on whether you want additional information related to Communities to be returned or not. The additional information is the customer's active comments (tips) and the number of winning comments (tips) a profile currently has.
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
element isFlagged Boolean true|false Yes Is this profile flagged by the requester.
element isFollowed Boolean true|false Yes Is this profile being followed by the requester.
node communities Node - Yes Communities node
communities
Object Name Type Constraints Optional Description
node comments Node - No Comments node
comments
Object Name Type Constraints Optional Description
element numLive Integer [0-9]+ No Number of active comments.
element numWinning Integer [0-9]+ No Number of winning comments.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - List of followers
Representations
application/xml
<whoProfiles>
    <follow>
        <profile id="3" relationship="follower">
            <name>Dean A G (Cardiff)</name>
            <biography>
                I'm a top tipster, check out my hot tips
            </biography>
            <picture>1468314d264522f8712637b77f42105544ef6138.PNG</picture>
            <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
            <numFollowings>25</numFollowings>                        
            <numFollowers>3</numFollowers>
            <isFlagged>Y|N</isFlagged>                                
            <isFollowed>Y|N</isFollowed>
            <communities>
                <comments type="tip">
                    <numLive>234</numLive>
                    <numWinning>23</numWinning>
                </comments>
           </communities>
        </profile>
        <profile id="752438" relationship="followee">
            <name>Frank J (NEWTOWNARDS)</name>
            <biography>
                I'm a top tipster, check out my hot tips
            </biography>
            <picture>1468314d264522f8712637b77f42105544ef6138.PNG</picture>
            <status>A|I</status>
            <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
            <numFollowings>25</numFollowings>                        
            <numFollowers>3</numFollowers>
            <isFlagged>Y|N</isFlagged>                                
            <isFollowed>Y|N</isFollowed>
            <communities>
                <comments type="tip">
                    <numLive>234</numLive>
                    <numWinning>23</numWinning>
                </comments>
            </communities>
        </profile>
    </follow>
</whoProfiles>
application/json
{
  "whoProfiles": {
    "follow": {
      "profile": [
        {
          "id": "3",
          "relationship": "follower",
          "name": "Dean A G (Cardiff)",
          "biography": "
                I'm a top tipster, check out my hot tips
            ",
          "picture": "1468314d264522f8712637b77f42105544ef6138.PNG",
          "createdDateTimeZoned": "2011-06-09T15:44:23+01:00",
          "numFollowings": "25",
          "numFollowers": "3",
          "isFlagged": "Y|N",
          "isFollowed": "Y|N",
          "communities": {
            "comments": {
              "type": "tip",
              "numLive": "234",
              "numWinning": "23"
            }
          }
        },
        {
          "id": "752438",
          "relationship": "followee",
          "name": "Frank J (NEWTOWNARDS)",
          "biography": "
                I'm a top tipster, check out my hot tips
            ",
          "picture": "1468314d264522f8712637b77f42105544ef6138.PNG",
          "status": "A|I",
          "createdDateTimeZoned": "2011-06-09T15:44:23+01:00",
          "numFollowings": "25",
          "numFollowers": "3",
          "isFlagged": "Y|N",
          "isFollowed": "Y|N",
          "communities": {
            "comments": {
              "type": "tip",
              "numLive": "234",
              "numWinning": "23"
            }
          }
        }
      ]
    }
  }
}
getMostFollowedProfiles()
Reads the most followed profiles for a defined period of days, so that you can display them in your application.
Request Example
GET /v1/profiles/followers/mostFollowed HTTP/1.1
Host: sandbox.whapi.com
Accept: application/xml
who-apiKey: l7xxa54460c573b5497c9b24b505xxxxxxxx
who-secret: l7xxa54460c573b5497c9b24b505xxxxxxxx
Request Parameters
header parameters
NameTypeDescription
acceptstring
(required)
default:
application/xml
options:
application/xml, application/json
The representation of the response.
who-apiKeystring
(required)
A unique identifier of your application that is generated by the API portal and presented in the header. An api key is always required but it is possible to send it using the query string instead of the header.
who-secretstring
(required)
Another unique identifier for your application. The secret must never be sent over HTTP.
who-ticketstringThe authentication ticket associated with the user session.
query parameters
NameTypeDescription
communitiesstring
default:
N
options:
Y, N
Select Y or N depending on whether you want additional information related to Communities to be returned or not. The additional information is the customer's active comments (tips) and the number of winning comments (tips) a profile currently has.
numDaysstring
options:
30, 7, 1, 0
Retrieve today's or this week's or this month's or all time most followed
Response Description
whoProfiles
Object Name Type Constraints Optional Description
node profile Node - No Profile node
profile
Object Name Type Constraints Optional Description
attribute id Integer [0-9]+ No Id of this profile.
element name String - No Name for this profile.
element biography String - No Biography for this profile.
element picture String - No Path and filename of the profile picture.
element createdDateTimeZoned DateTime ISO 8601 No The timestamp when this profile was created.
element numFollowings Integer [0-9]+ No Number of profiles this profile is following.
element numFollowers Integer [0-9]+ No Number of profiles that are following this profile.
element isFlagged Boolean true|false Yes Is this profile flagged by the requester.
element isFollowed Boolean true|false Yes Is this profile being followed by the requester.
node communities Node - Yes Communities node
communities
Object Name Type Constraints Optional Description
node comments Node - No Comments node
comments
Object Name Type Constraints Optional Description
element numLive Integer [0-9]+ No Number of active comments.
element numWinning Integer [0-9]+ No Number of winning comments.
ResponsesExpand AllCollapse All
Status: 200 (Ok) - Success - List of followers
Representations
application/xml
<whoProfiles>
    <profile id="3" rank="1">
        <name>Dean A G (Cardiff)</name>
        <biography>
            I'm a top tipster, check out my hot tips
        </biography>
        <picture>1468314d264522f8712637b77f42105544ef6138.PNG</picture>
        <createdDateTimeZoned>2011-06-09T15:44:23+01:00</createdDateTimeZoned>
        <numFollowings>25</numFollowings>                        
        <numFollowers>3</numFollowers>
        <isFlagged>Y|N</isFlagged>                                
        <isFollowed>Y|N</isFollowed>
        <communities>
            <comments type="tip">
                <numLive>234</numLive>
                <numWinning>23</numWinning>
            </comments>
        </communities>
    </profile>
</whoProfiles>
application/json
{
  "whoProfiles": {
    "profile": {
      "id": "3",
      "rank": "1",
      "name": "Dean A G (Cardiff)",
      "biography": "
            I'm a top tipster, check out my hot tips
        ",
      "picture": "1468314d264522f8712637b77f42105544ef6138.PNG",
      "createdDateTimeZoned": "2011-06-09T15:44:23+01:00",
      "numFollowings": "25",
      "numFollowers": "3",
      "isFlagged": "Y|N",
      "isFollowed": "Y|N",
      "communities": {
        "comments": {
          "type": "tip",
          "numLive": "234",
          "numWinning": "23"
        }
      }
    }
  }
}
Error Handling
General Error Structure
As an application developer, you will need to see a standard error response when the system generates an error. As well as supplying a standard HTTP status code, we also supply a unique William Hill fault code, fault string and fault name (in some cases) to help you identify and resolve any issues that you may be having with our API or your requests and code.

Where the elements can be defined as the following:
  • Fault code - A unique William Hill identifier for the error
  • Fault string - A unique William Hill text string to enable you to identify the error (in English only)
  • HTTP code - the standard HTTP status code for the error
  • HTTP response - the standard HTTP response for the error

Note: A Fault name may also be generated in order to pinpoint the exact parameter where a request has failed.

Available Response Formats

The error codes are supplied in the following representations:

  • XML
  • JSON
Error Response Body

The response body will contain the unique William Hill fault code and fault string appropriate to the corresponding error.

The response will be sent according to the representation type governed by the accept parameter within the original request. The default representation is for application/xml and this representation will be returned if either the accept header is absent or if the accept header is set to application/xml.

Generic William Hill Error Codes

Click here to view the complete list of William Hill error codes for the APIs.

API Specific Error Codes

Error codeFault stringHTTP codeHTTP response
30410 No profile found for id 404 Not Found
30430 Profile name already taken 409 Conflict
30431 Only ancillary characters 400 Bad Request
30432 Inappropriate content 400 Bad Request
30440 You cannot create a follow relationship with yourself 400 Bad Request
30450 The uploaded file exceeds the maximum file size (10mb). 413 Request Entity Too Large
30451 The file you select must be an image of a specific type (jpg,gif,png). 400 Bad Request
30460 You cannot flag yourself 400 Bad Request
HTTP Status Codes

For more information about how William Hill uses HTTP status codes with their APIs, click here.