List Badge Requirements
From KickApps Documentation
Contents |
Overview
This is an admin method, that when given a badgeId will return a list of all Badge Requirements for the provided badgeId. This method will require a webmaster / moderator token.
Request URL
http://api.kickapps.com/rest/badgerequirement/list/{as}
Request Parameters
Required
- t - the user token generated via the "Create Token" API call. Must be a webmaster / moderator token.
- as - The site Id to search. as is unique for each of the affiliate's sites.
- badgeId - The badge ID of an existing badge in the system.
Optional
- callback. String. Optional. The name of your JavaScript callback function.
Response
Note: if callback is provided as an optional argument, the results illustrated below will be returned within the callback string provided for execution of a JavaScript function; e.g. callback=”MyCallbackFunc” will return something similar to:
MyCallbackFunc({…the success or failure response contained in curly braces you see below…});
Success:
{
"status":1,
"badgeId":"1234",
"requirements":[
{
"requirementId":"1",
"actionId":"1",
"location":"XXXX",
"published":"true",
"quantity":"5"
},
{
"requirementId":"2",
"actionId":"2",
"location":"YYYY",
"published":"false",
"quantity":"3"
}
]
}
Failure: {"status": -1, "errorId": "123", "error": "Error Message"}
Response Parameters
- status – 1 on success and -1 on error.
- error – A message indicating the error condition
- errorId – A numeric reference to the error condition
- requirements – A set of all requirements associated with the given badgeId:
- requirementId - The badge requirement ID of an existing badge requirement in the system.
- actionId – The action associated with this requirement
- published – Is this requirement active
- location – A location identifier that corresponds to a page / area within the community.
- quantity – The number of times the action needs to take place.
Error codes:
- 1 = invalid token
- 9 = Invalid badgeId
- 18 = Insufficient user permissions for this operation
- 44 = token required
List of KickApps API Calls
Note: Occasionally (and without advanced warning) we modify our API calls by adding new parameters in the response payload. Please keep this in mind when designing your strategy for parsing our responses.
Favorites






