NATS4 API Get Profit Loss Report
From TMM Wiki
Revision as of 16:42, 21 December 2012 by TMMMikeSopko (talk | contribs) (Created page with "{{NATS4 Manual | show_api_admin_section = true }} NATS4 supports an API function to get an affiliate's NATS code for the passed in data. get_affiliate_nats_codes accept...")
NATS4 supports an API function to get an affiliate's NATS code for the passed in data.
get_affiliate_nats_codes accepts the following parameters:
- 'view' - The breakdown of the report to display. Possible options are:
- actual_affiliate_payments
- period
- month
- year
- site_group
- option
- tour
- site
- subid1
- subid2
- program
- login
- adtool
- promotional
- biller
- demographic
- refurl
- params - Parameters for the report. An array that may contain:
- periods
# | Name | Argument Description |
---|---|---|
0 | current | Current Period |
1 | last | Last Period |
2 | today | Today |
3 | yesterday | Yesterday |
4 | week | This Week |
5 | month | This Month |
6 | year | This Year |
7 | all | All Time |
8 | free | Freeform (See also the start and end parameters above) |
NuSOAP Example
This example continues from the main article NuSOAP Example):
$params = Array( 'loginid' => '2', 'programid' => '1', 'siteid' => '3', 'tourid' => '0', 'campaignid' => '1', 'adtoolid' => '2', 'subid1' => '0', 'subid2' => '0', 'promotionalid' => '0', 'link_style' => 'shortname', ); $result = $client->call('get_affiliate_nats_codes', $params, 'natsapiadmin_wsdl'); print_r($result);
Affiliate Campaign Data Output
The output will be an array. The array's index of 'result' will be either SUCCESS or ERROR with an error message. If successful then the array's 'return' index will be populated. This will contain the site/tour information with the affiliate's NATS code.