Set Super Fan Badge Criteria

From KickApps Documentation

Jump to: navigation, search

Contents

Overview

This method defines the number of badges a user must earn for a specific location to be considered a Super Fan for that Location.


Request URL

http://api.kickapps.com/rest/mostbadged/locationcriteria/set/{as}

Request Parameters

Required

  • t - the user token generated via the "Create Token" API call. (Webmaster/Admin/Editor token only.)
  • as - The site Id to search. as is unique for each of the affiliate's sites.
  • location – A location identifier that corresponds to a page / area within the community.


Optional

  • quantity – the number of badges associated with this location a user must earn to be considered a Super Fan. (must be a positive integer)
  • 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, "location": “<locationString>”, "quantity":"5"}
Failure: {"status": -1, "errorId": "123", "error": "Error Message"}

Response Fields

  • status – 1 on success and -1 on error.
  • error – A message indicating the error condition
  • errorId – A numeric reference to the error condition
  • location – A location identifier that corresponds to a page / area within the community
  • quantity – the number of badges associated with this location a user must earn to be considered a Super Fan.


Error codes:

  • 1 = invalid token
  • 8 = location cannot be null or blank
  • 18 = Insufficient user permissions for this operation
  • 20 = location cannot exceed 64 characters
  • 44 = token required
  • 11 = quantity must be a positive integer

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.