Get Surveys

Market Research API Parameters

API parameters pubID, profileID, and api_key can be found on the Integration page. The link is located next to your profile at Your Market Research Profiles.

If you would like us to notify you whenever an offer is completed (lead generated), set up a server postback.

Get Surveys

Retrieves a list of all surveys available for a user profile. You must create a Survey User Profile before you will get a valid response from this API call.

Client vs. Server-side Usage

When the Get Surveys call is made by the end-user's client, such as with javascript, the values for the ip, platform_type, and browser_family parameters will be determined automatically by our server which detects the user's IP address and determines the other values from the end-user's user-agent string. If instead you make this call from your server on behalf of a user then you must pass in the user's IP, platform_type, and browser family. Otherwise, your users' profiles will appear to have the same IP address & user-agent (your server's) which would result in them getting flagged for fraud.

Response Codes

Response 204 when no surveys are available for the given parameters.

Response 400 when required parameter not provided.

Response 404 when profileId doesn't exist for the specified pubId.

GET:

http://adscendmedia.com/market-research/api/publisher/{pubId}/profile/{profileId}/user/{subid1}/surveys.json?subid2={subid2}&subid3={subid3}&subid4={subid4}&ip={ip}&limit={limit}&offset={offset}

Parameters   Description Type
pubId Required Your publisher ID Number
profileId Required Your Market Research profile ID Number
subid1 Required Your user's primary unique identifier. Maximum length of 60. String
subid2 Optional Used for click and lead tracking. Maximum length of 60. String
subid3 Optional Used for click and lead tracking. Maximum length of 60. String
subid4 Optional Used for click and lead tracking. Maximum length of 60. String
ip Optional The IP address of the user.   Required when making the call server-side String
platform_type Optional You can also filter the items by sending the parameter platform_type. This parameter can have one value out of - 'android_phone', 'android_tablet', 'android_kindle', 'ios_phone', 'ios_ipod', 'ios_tablet' and 'desktop'.   Required when making the call server-side String
browser_family Optional This parameter filters the items by allowed browsers. It can have one value out of - 'safari', 'chrome', 'firefox', 'ie', 'opera'.   Required when making the call server-side String
limit Optional Used for pagination. All are shown by default. Example: 10 Number
offset Optional Used for pagination. Example: 40 Default: 0 Number

Response 200

Content-Type: application/json

{
  "surveys": [
    {
      "name": "High Paying Survey", //Not all surveys have a unique name, the default value is 'High Paying Survey'
      "click_url": "click_url_here",
      "payout": 11.2,
      "currency_count": 5600,  // calculated currency based on the exchange_rate found in the Get Profile Details API call.
    }
]}