Topics
Support
Get Affiliate Report
Get Affiliate Report
Description
This function is intended to provides you ability to get affiliate report.
API function Information
| Info |
|---|
| API Function Name: get_affiliate_report |
| API Function Call: http://[your_system_domain_name]/api/get_affiliate_report/ |
POST Parameters
| Parameter | Option | Value Type | Example | Description |
|---|---|---|---|---|
| User_ID | required | string | 1 | User ID. |
| API_Key | required | string | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | API key. |
| date_from |
required | string | 01/01/01 | Date from. |
| date_to |
required | string | 01/01/01 | Date to. |
| amanager |
optional | numeric | 1 | New password. |
| vmanager | optional | numeric | 1 | Password confirm. |
| breakdown | required | numeric | 1 | Possible values |
| affiliates | optional | string | 1, 2, 3 | Affiliates list. |
Request example
<?php
// API Function URL
$api_function_call = 'http://[your_system_domain_name]/api/get_affiliate_report/';
// API Parameters
$post_params = array(
'User_ID' => '0000000000',
'API_Key' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'date_from' => '01/01/2011',
'date_to' => '08/11/2011',
'breakdown' => 0
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_function_call);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);
$aResult = curl_exec($ch);
curl_close($ch);
print_r( $aResult );
?>
Response example (breakdown 10)
<?xml version="1.0" encoding="UTF-8"?>
69
67
0
0
<p>0</p>
1
<payout>0</payout>
0
0
215
1
3
01/01/2011
08/11/2011
0
0
RevenueStreet
Response example (breakdown 11)
<?xml version="1.0" encoding="UTF-8"?>
22
22
7
0
<p>0</p>
0
<payout>0</payout>
35.71
12.7
215
3792
3
1
1
1
0
<p>0</p>
0
<payout>0</payout>
0.71
0.2
209
3792
2
01/01/2011
08/11/2011
100
0.51
UK Prizes - Win a pair of UGG Boots
3791
Advertiser
01/01/2011
08/11/2011
32
1.0459090909091
Affiliate
Response example (breakdown 12)
<?xml version="1.0" encoding="UTF-8"?>
69
67
0
0
<p>0</p>
1
<payout>0</payout>
0
0
215
1
3
54
54
0
0
<p>0</p>
1
<payout>0</payout>
0
0
215
1
3
01/01/2011
08/11/2011
0
0
3791
Advertiser
01/01/2011
08/11/2011
0
0
RevenueStreet
Response example (breakdown 13)
<?xml version="1.0" encoding="UTF-8"?>
2011-04-15
2
2
0
0
<p>0</p>
0
<payout>0</payout>
0
0
224
3801
3
2011-04-15
2
2
0
0
<p>0</p>
0
<payout>0</payout>
0
0
224
3801
3
2011-04-15
2011-04-15
0
0
01/01/2011
08/11/2011
0
0
asurveyslead
Response example (breakdown 14)
<?xml version="1.0" encoding="UTF-8"?>
2
72
0
0
<p>0</p>
1
<payout>0</payout>
0
0
212
1
2
2
64
0
0
<p>0</p>
1
<payout>0</payout>
0
0
212
1
2
01/01/2011
08/11/2011
0
0
01/01/2011
08/11/2011
0
0
RevenueStreet