PerkZilla Developer API

Unleash the power of PerkZilla for your custom applications and integrations!

Perkzilla API

1.How you can use the API #

Our API was created so you can integrate your app directly with PerkZilla to help virally grow your userbase and save upwards of thousands of dollars in lead generation as well as costs of customer acquisition.

The API allows you to interconnect the signups from the PerkZilla signup widget to your application in a two directional form of communication, allowing for continuity in user management, and the ability to utilize PerkZilla’s viral sharing aspects anywhere within your app or website.

We’ve have users that use the API to show the number of referrals directly in their app’s settings panel or admin dashboard and AUTOMATICALLY unlock rewards when they hit a referral tier. 

Referral links can be placed anywhere across the site and quotas or limits can be removed just by referring friends. Perkzilla helps you place your App’s marketing efforts on AUTOPILOT.

2.Getting an API Key #

To access your API Key:

  1. Login to PerkZilla
  2. Click on your name in the top right.
  3. A drop down will open. Select “Profile Settings“.
  4. Click PROFILE in the sub-menu and you’ll be able to show and copy your “API Key”.

3.Sending Requests to PerkZilla #

GLOBAL METHOD
All requests submitted to PerkZilla accept parameters to be posted as POST.

POST

GLOBAL URL
Use cURL to post parameters at the following URL.

https://app.perkzilla.com/apiauth.php

GLOBAL RESPONSE
A JSON response is returned for successful request.

JSON

4.Getting Campaign IDs #

In order to get “Campaign ID” you need to use the “GLOBAL URL” and “GLOBAL METHOD” in cURL request.

PARAMETERS

api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
action = 'get_campaigns'

CODE SAMPLE

    
$ch = curl_init();
curl_setopt($ch,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);    
curl_setopt($ch,CURLOPT_URL, "https://app.perkzilla.com/apiauth.php");    
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query([   
        'api_key'       => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',   
        'action'        => 'get_campaigns'    
]));    
curl_setopt($ch,CURLOPT_RETURNTRANSFER , 1);    
$result = curl_exec($ch);    
curl_close($ch);    
echo $result;

SAMPLE RESPONSE


   
      "id":"k2zZ9PhIrbm3bumoQfgS8huNzi9azISM93UwQ4SztA8ou25jr5SclqK5boyqomOdZY%2F24W7V0cV3MSbLSPKj%2FgnnePRmHNvrER4TXc9jPlFBoiZjOvsohSEzUufN03hi",
      "campaign_name":"Campaign1"
   },
   
      "id":"Ex14oNYRdZvjLArIuz4TdVmuR%2BviIaSvB%2BDJw4MSog14kRQbs3OjMufDq3OKyxVt0vyzvWw%2FdCEaFl%2FTYhKF130O3hkDOcRq9xeR%2BdgSFE9b0Pbbm6Dnk6o1l9QZHDJG",
      "campaign_name":"Campaign2"
   },
]

5.Getting Campaign Subscribers #

In order to get “Campaign Subscribers” you need to use the “GLOBAL URL” and “GLOBAL METHOD” in cURL request.

PARAMETERS

api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
action = 'get_subscribers'
campaign_id = 123

CODE SAMPLE

    
$ch = curl_init();
curl_setopt($ch,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);    
curl_setopt($ch,CURLOPT_URL, "https://app.perkzilla.com/apiauth.php");    
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query([   
        'api_key'       => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',   
        'action'        => 'get_subscribers',
        'campaign_id'   => '123'    
]));    
curl_setopt($ch,CURLOPT_RETURNTRANSFER , 1);    
$result = curl_exec($ch);    
curl_close($ch);    
echo $result;

SAMPLE RESPONSE

[{
"id": "11",
"name": "John Doe",
"custom_1": "Sample Custom Tag",
"custom_2": "Sample Custom Tag",
"custom_3": "Sample Custom Tag",
"email": "johndoe@gmail.com",
"total_referrals": "0",
"referred_by": "0",
"user_ip": "115.111.111.222",
"referral_code": "4d",
"referral_link": "https://perk3.com?ref=4d",
"first_name": "John",
"middle_name":"",
"last_name": "Doe"
},{ 
"id": "12", 
"name": "Jack Daniel Doe", 
"custom_1": "Sample Custom Tag",
"custom_2": "Sample Custom Tag",
"custom_3": "",
"email": "jackdoe@gmail.com", 
"total_referrals": "0", 
"referred_by": "0", 
"user_ip": "115.111.111.333", 
"referral_code": "82e", 
"referral_link": "https://perk3.com?ref=82e" ,
"first_name": "Jack",
"middle_name":"Daniel",
"last_name": "Doe"
}]

6.Get Campaign Subscriber Details #

In order to get “Campaign Subscriber Details” by “refID” or “email” you need to use the “GLOBAL URL” and “GLOBAL METHOD” in cURL request.

PARAMETERS(BY refID)

api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
action = 'get_subscriber_details'
refID = 12

CODE SAMPLE(BY refID)

    
$ch = curl_init();
curl_setopt($ch,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);    
curl_setopt($ch,CURLOPT_URL, "https://app.perkzilla.com/apiauth.php");    
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query([   
        'api_key'       => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',   
        'action'        => 'get_subscriber_details', 
        'refID'         => '4d'   
]));    
curl_setopt($ch,CURLOPT_RETURNTRANSFER , 1);    
$result = curl_exec($ch);    
curl_close($ch);    
echo $result;

PARAMETERS(BY email)

api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
action = 'get_subscriber_details'
email = 'someone@example.com'

CODE SAMPLE(BY email)

    
$ch = curl_init();
curl_setopt($ch,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);    
curl_setopt($ch,CURLOPT_URL, "https://app.perkzilla.com/apiauth.php");    
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query([   
        'api_key'       => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',   
        'action'        => 'get_subscriber_details', 
        'email'         => 'someone@example.com'    
]));    
curl_setopt($ch,CURLOPT_RETURNTRANSFER , 1);    
$result = curl_exec($ch);    
curl_close($ch);    
echo $result;

SAMPLE RESPONSE

[{ 
"id": "12", 
"name": "Jane Doe", 
"custom_1": "Sample Custom Tag",
"custom_2": "Sample Custom Tag",
"custom_3": "Sample Custom Tag",
"email": "janedoe@gmail.com", 
"total_referrals": "0",
"total_shares": "0",
"total_views": "0",
"total_points": "0", 
"referred_by": "12", 
"user_ip": "115.111.111.333", 
"referral_code": "4d", 
"referral_link": "https://perk3.com?ref=5d",
"first_name": "Jane",
"middle_name": "",
"last_name": "Doe"
}]

7.Get Campaign Subscriber Referrals #

In order to get “Campaign Subscriber Referrals” you need to use the “GLOBAL URL” and “GLOBAL METHOD” in cURL request.

PARAMETERS

api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
action = 'get_subscriber_referrals'
refID = 4fa

CODE SAMPLE

    
$ch = curl_init();
curl_setopt($ch,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);    
curl_setopt($ch,CURLOPT_URL, "https://app.perkzilla.com/apiauth.php");    
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query([   
        'api_key'       => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',   
        'action'        => 'get_subscriber_referrals', 
        'refID'         => '4f2'    
]));    
curl_setopt($ch,CURLOPT_RETURNTRANSFER , 1);    
$result = curl_exec($ch);    
curl_close($ch);    
echo $result;

SAMPLE RESPONSE

[
{
"id": "11",
"name": "John Doe",
"custom_1": "Sample Custom Tag",
"custom_2": "Sample Custom Tag",
"custom_3": "Sample Custom Tag",
"email": "johndoe@gmail.com",
"total_referrals": "0",
"total_shares": "0",
"total_views": "0",
"total_points": "0",
"referred_by": "12",
"user_ip": "115.111.111.222",
"referral_code": "4d",
"referral_link": "https://perk3.com?ref=4d",
"first_name": "John",
"middle_name": "",
"last_name": "Doe"
},
{
"id": "12",
"name": "Jane Daniel Doe",
"custom_1": "Sample Custom Tag",
"custom_2": "Sample Custom Tag",
"custom_3": "Sample Custom Tag",
"email": "janedoe@gmail.com",
"total_referrals": "0",
"total_shares": "0",
"total_views": "0",
"total_points": "0",
"referred_by": "12",
"user_ip": "115.111.111.333",
"referral_code": "4d",
"referral_link": "https://perk3.com?ref=5d",
"first_name": "Jane",
"middle_name": "Daniel",
"last_name": "Doe"
}
]

 

8.Add Subscriber in Campaign #

In order to Add “New Subscriber to campaign” you need to use the “GLOBAL URL” and “GLOBAL METHOD” in cURL request.

PARAMETERS

api_key => "xxxxxxxxxxxxxxxxx",
action => "subscribe_user",
campaign_id => 123,
variables => [
subscriber_name => "John Doe",
subscriber_email => "johndoe@example.com",
subscriber_IP => "111.222.333.444",
referred_by_email => "janedoe@example.com",
referred_by_refID => "3d2"
]

CODE SAMPLE

    
$ch = curl_init();
curl_setopt($ch,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);    
curl_setopt($ch,CURLOPT_URL, "https://app.perkzilla.com/apiauth.php");    
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query([   
        'api_key'       => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',   
        'action'        => 'subscribe_user', 
        'campaign_id'   => '123',
        variables => [
            'subscriber_name'   => 'John Doe',
            'subscriber_email'  => 'johndoe@example.com',
            'subscriber_IP'     => '111.222.333.444',
            'referred_by_email' => 'userone@example.com',
            'referred_by_refID' => '3d2',
            'custom_1'          => 'Sample Custom Tag',
            'custom_2'          => 'Sample Custom Tag',
            'custom_3'          => 'Sample Custom Tag'
]    
]));    
curl_setopt($ch,CURLOPT_RETURNTRANSFER , 1);    
$result = curl_exec($ch);    
curl_close($ch);    
echo $result;

SAMPLE RESPONSE

If subscribe successfully

{  
  "message":"User Subscribed Successfully"
}

If subscribe already exist

{
  "message":"Subscriber Email Already Exist"
}

If user campaign not exist

{
  "message":"Invalid campaign"
}
Suggest Edit

It only takes 5 new signups for a 5x ROI 🚀