PerkZilla API

Use the documentation below to connect your app with PerkZilla

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. Scroll down to bottom of the page to find your “API Key”.

3.Sending Requests to PerkZilla #

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

POST/GET

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

https://perkzilla.com/app/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://perkzilla.com/app/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":"1",
      "campaign_name":"Campaign1"
   },
   
      "id":"2",
      "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://perkzilla.com/app/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",
"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"
},{ 
"id": "12", 
"name": "Jack Doe", 
"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" 
}]

6.Get Campaign User 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'
campaign_id = 123,
subscriber_id = 12

CODE SAMPLE

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

SAMPLE RESPONSE

[{
"id": "11",
"name": "John Doe",
"email": "johndoe@gmail.com",
"total_referrals": "0",
"referred_by": "12",
"user_ip": "115.111.111.222",
"referral_code": "4d",
"referral_link": "https://perk3.com?ref=4d"
},{ 
"id": "12", 
"name": "Jane Doe", 
"email": "janedoe@gmail.com", 
"total_referrals": "0", 
"referred_by": "12", 
"user_ip": "115.111.111.333", 
"referral_code": "4d", 
"referral_link": "https://perk3.com?ref=5d" 
}]

7.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"
]

CODE SAMPLE

    
$ch = curl_init();
curl_setopt($ch,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);    
curl_setopt($ch,CURLOPT_URL, "https://perkzilla.com/app/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'
]    
]));    
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