Retrieve All Contests

From KickApps Documentation

Jump to: navigation, search

This is a Premium feature - Please contact your Account Manager or Sales Representative to best utilize this feature.

This method returns all contest with all of their associated administration information. This method should only be used for administering the contest (should not be used to display contest information on the member facing site). The list is sorted by date created descending.

Contents

Authentication

Requires an Admin or Webmaster API Token.

Call Structure

http://api.kickapps.com/rest/contests/list/{asid}

URL Arguments

{asid} required The site Id to search. as is unique for each of the affiliate's sites.

HTTP Headers

HTTP Method must be POST

Post Arguments

t required the user token generated via the "Create Token" API call. (Webmaster/Admin/Editor token only.)
maxResults required The total number of contests that should be returned.
callback String,optional The name of your JavaScript callback function.
pgNum int The current page number in the search results. For your first call, set pgNum to "1". For subsequent calls, set pgNum to the page you want to display. If not provided, this value is defaulted to 1.
pageSize The number of results to display on each page. Max pageSize is "1000". If not provided, this value is defaulted to 10.

Response

Success

{
   "status":1,
   "totSize":2,
   "pgNum":1,
   "pageSize":10,
   "contests":[
      {
         "contestId":"1234",
         "name":"A cool contest",
         "description":"The description of my cool contest.",
         "rules":"This is what you can and can't do in this contest.",
         "contestMediaType":"photo",
         "votingEnabled":True,
         "votingType":"thumbs",
         "announceDate":"##########",
         "submissionStartDate":"##########",
         "submissionEndDate":"##########",
         "votingStartDate":"##########",
         "votingEndDate":"##########",
         "timeZone":"EST5EDT",
         "locale":"en_US",
         "winnerAnnounceDate":"##########",
         "submissionPhaseUpdate":"We're now in the submission phase",
         "votingPhaseUpdate":"We're now in the voting phase.",
         "overPhaseUpdate":"The contest is now over.",
         "published":True,
         "completed":False,
         "winnerId":"4567",
         "communityWinnerId":"27654",
         "contestType":"automatic",
         "tags":[
            "cool",
            "awesome",
            "fun"
         ],
         "admintags":[
            "super",
            "terrific",
            "fabulous"
         ],
         "contestGraphic":"http://www.kickapps.com/image.jpg",
         "restriction1":"",
         "restriction2":"",
         "restriction3":"",
         "entries":"12322",
         "numOfTimesRated1":"130",
         "numOfTimesRated2":"40",
         "numOfTimesRated3":"60",
         "numOfTimesRated4":""100,
         "numOfTimesRated5":"12001",
         "votes":"12321"
      },
      {
         "contestId":"1234",
         "name":"A cool contest",
         "description":"The description of my cool contest.",
         "rules":"This is what you can and can't do in this contest.",
         "contestMediaType":"photo",
         "votingEnabled":True,
         "votingType":"thumbs",
         "announceDate":"##########",
         "submissionStartDate":"##########",
         "submissionEndDate":"##########",
         "votingStartDate":"##########",
         "votingEndDate":"##########",
         "timeZone":"EST5EDT",
         "locale":"en_US",
         "winnerAnnounceDate":"##########",
         "submissionPhaseUpdate":"We're now in the submission phase",
         "votingPhaseUpdate":"We're now in the voting phase.",
         "overPhaseUpdate":"The contest is now over.",
         "published":True,
         "completed":False,
         "winnerId":"4567",
         "communityWinnerId":"27654",
         "contestType":"automatic",
         "tags":[
            "cool",
            "awesome",
            "fun"
         ],
         "admintags":[
            "super",
            "terrific",
            "fabulous"
         ],
         "contestGraphic":"http://www.kickapps.com/image.jpg",
         "restriction1":"",
         "restriction2":"",
         "restriction3":"",
         "entries":"12322",
         "numOfTimesRated1":"130",
         "numOfTimesRated2":"40",
         "numOfTimesRated3":"60",
         "numOfTimesRated4":""100,
         "numOfTimesRated5":"12001",
         "votes":"12345"
      }
   ]
}

Failure

{"status": -1, "errorId": "123", "error": "Error Message"}

Error Codes

1 Invalid Token
16 Invalid pgNum (or not an int)
17 Invalid pageSize (or not an int)
25 pageSize cannot exceed 1000
44 token required