HomeAppVirality DocsAppVirality APIsGet Campaign

Get Campaign

This API call will help you gather all info regarding a Campaign


It is often required for you to have details of the campaign, so that you may use this info for some custom in app messaging or informing end users dynamically.

This API call shall give you the complete details pertaining to a Campaign – rules, social channels, messages, etc.

Base URL  https://api.appvirality.com

 POST         /v2_0/getcampaign

Content-Type application/json


Input i.e. Request

{
"apikey":"7b808b1f934448db8463a4c60091c49b",
"privatekey":"097262223465191eda4ec006d601b",
"userkey": "a8e4a180c59f42469f83c82e0cf6f051"
"EmailId": "",
"UserIdInstore": "",
"growthhack":"Word_of_Mouth",
"campaignid":478,
}
Input Params
Input Params Description
apikey API Key of the App
Get it from Dashboard >> App Details
privatekey Private key for API requests
Get it from: Dashboard >> App Details >> Click App Settings >> Scroll down to Advanced Settings
userkey
(optional)
User Key for the an App user (helps you filter campaigns which are open for the user)
EmailId
 
(optional)
Email of the User, updated to AppVirality
UserIdInstore
 
(optional)
Store Id of the App user, updated to AppVirality – a unique identifier of the user in your App
growthhack 
(optional)
Growth Hack Type (helps you filter campaigns)
values: Word_of_Mouth or Loyalty_Program
campaignid 
(optional)
Unique ID of a campaign (helps you filter campaigns)

 


Response

Response parameters have been explained in the form of code comments, where ever deemed necessary.
Get in touch with us if you have additional clarifications.

{
  "AppCampaignsDetails": [
    {
      "AppID": 289,         // Unique ID for an app on your dashboard/account 
      "CampaignID": 478,    // Unique ID for Campaign assigned by AppVirality
      "CampaignName": "REVENGE",
      "OfferTitle": "Campaign+Title+%3cbr%3e++Ex%3a-+Refer+your+friends",
      "OfferDescription": "Refer+your+friends+and+get+coins+11+when+they+Install",
      "CampaignStartDate": "Apr 11, 2016 12:00:00 AM",
      "LaunchMessage": "",  // Mini/Popup Notification Message (if configured)
      "GrowthHackName": "Word_of_Mouth", // Growth Hack Type: Referrals
      "referralCode": "2c8j",   //Referral Code of the user, for given userkey
      "userWillChoose": "false", 
      "attributionSetting": "1", // Referral Attribution type  *contd.
      // 0 = Only via Referral Link
      // 1 = via Referral Link + Referral Code
      // 2 = via referral code only
      "CustomDomain": "",   // Custom Domain for Referral Link
      "RewardType": 1,      // Wallet(1) or Coupons(2)
      "SocialActions": [
        {
          "socialActionId": 2,
          "socialActionName": "Twitter",
          "sharetitle": "Test+Title+of+Campaign",
          "ShareMessage": "Just+found+a+great+app!+I%e2%80%99m+sure+you+will+like+it+too%3a+SHARE_URL",
          "ShareImageURL": "",
          "ShareURL": "http://s.appvirality.com/2c8j-5y/2",   //Share Link of the user, for given userkey
          "displayorder": null,
          "ShareMessageType": 0
        },
        {
          "socialActionId": 14,
          "socialActionName": "CustomLink",
          "sharetitle": "Test+Title+of+Campaign",
          "ShareMessage": "Message",
          "ShareImageURL": "",
          "ShareURL": "http://s.appvirality.com/2c8j-5y/14",
          "displayorder": null,
          "ShareMessageType": 0
        }
      ],
      "RewardRules": [ //campaign rules for reward distribution
        {
          "CampaignId": 478,
          "RewardUserType": "Referrer",
          "EventName": "Install",
          "Reward": "11",
          "RewardUnit": "coins",
          "RewardFrequency": "1",
          "MinTranValue": "",
          "MaxRewardAmount": "",
          "Categories": null,
          "InclusionsAndExclusions": [] 
        }
      ],
// User Targeting parameters as set up in your Dashboard
      "campaignUserTargettingDetails": [
        {
          "targetValue": "0",
          "targetId": 4,
          "targetValueCondition": "8",
          "targetType": 1,
          "targetValueCondName": "equalto",
          "targetTypeString": "Int",
          "targetName": "Days_After_launch",  
          "targetCategory": "1"
        },
        {
          "targetValue": "0",
          "targetId": 5,
          "targetValueCondition": "8",
          "targetType": 1,
          "targetValueCondName": "equalto",
          "targetTypeString": "Int",
          "targetName": "Number_of_Launches",
          "targetCategory": "1"
        },
        {
          "targetValue": "0",
          "targetId": 6,
          "targetValueCondition": "8",
          "targetType": 1,
          "targetValueCondName": "equalto",
          "targetTypeString": "Int",
          "targetName": "For_Every_NDays",
          "targetCategory": "1"
        },
        {
          "targetValue": "0",
          "targetId": 8,
          "targetValueCondition": "8",
          "targetType": 1,
          "targetValueCondName": "equalto",
          "targetTypeString": "Int",
          "targetName": "On_RemindMeLater",
          "targetCategory": "1"
        },
        {
          "targetValue": "0",
          "targetId": 9,
          "targetValueCondition": "8",
          "targetType": 1,
          "targetValueCondName": "equalto",
          "targetTypeString": "Int",
          "targetName": "Show_Campaign_For",
          "targetCategory": "1"
        }
      ]
    }
  ],
  "success": true,
  "statuscode": 1,
  "message": "Success"
}

Status codes which you will see while using Get campaign API

Status codes and description for API responses
Status Code Description
0 No data found for the search criteria
1 Success
2 Invalid User Key
3 Invalid GrowthHack
5 Invalid StoreID or EmailID
Was this article helpful to you? Yes No