Sign Up For An Account


Forgot Passwod?
Login

Subscribe

 
Knowledgebase
General (6)
Supplier (13)
Buyers (1)
FAQs (2)
Knowledgebase: Advertisers
CPA Leaderboard API For Showing Affiliate Sales
Posted by John D on 16 July 2015 11:19 AM

Want to show CPA sales for affiliates in real time on your website as leaderboard for contests? With ClickBetter you can do that easily using our CPA leaderboard API.

 

API URL:

 

https://clickbetter.com/cpalookup.php?userid=CBUSERID&apikey=APIKEY

 

where


CBUSERID is the username of your ClickBetter account

 

APIKEY is the API key of your ClickBetter account which you can get from sell -> settings -> api key tab insider your account

 

So once you have the API URL for your account, it will return XML data for your account CPA sales in descending order of sales numbers:

 

<response>
<details>
<affiliate_username>AFFID1</affiliate_username>
<affiliate_name>AFF NAME</affiliate_name>
<salesnos>123</salesnos>
</details>
<details>
<affiliate_username>AFFID2</affiliate_username>
<affiliate_name>AFF NAME</affiliate_name>
<salesnos>100</salesnos>
</details>
.
.
.
.
.
and so on.
</response>

 

where the tags are self explanatory. Once you get this data from your API URL, you can parse it using any of your favorite programming language and use it show leaderboard on your website.

 

TIP: Want to get data for only top 10 CPA sales affiliates? Simply add "limit=10" in the API URL as:

 

https://clickbetter.com/cpalookup.php?userid=CBUSERID&apikey=APIKEY&limit=10

 

Have any questions related to this API? Send us an email at devsupport@clickbetter.com (only technical questions please) or for general account help like getting API key, etc. send an email to support@clickbetter.com