NATS4 API Get Affiliate Program Campaign List
From TMM Wiki
Revision as of 15:53, 21 December 2012 by TMMMikeSopko (talk | contribs) (Created page with "{{NATS4 Manual | show_api_admin_section = true }} NATS4 supports an API function to get the affiliate's username, list of the programs the affiliate is enabled for and ca...")
NATS4 supports an API function to get the affiliate's username, list of the programs the affiliate is enabled for and campaign list for the affiliate.
get_affiliate_program_campaign_list accepts the following parameters:
- loginid - The affiliate ID. This parameter is required.
NuSOAP Example
This example continues from the main article NuSOAP Example):
$params = Array( 'loginid' => '2', ); $result = $client->call('get_affiliate_program_campaign_list', $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 program and campaign list for the affiliate.
Array ( [result] => SUCCESS [return] => Array ( [loginid] => 2 [username] => TMMMikeS [programlist] => Array ( [0] => Array ( [programid] => 1 [program_name] => TempProgram [siteid] => 1 [site_name] => Token Test [tourid] => 1 [tour_name] => Default Tour ) [1] => Array ( [programid] => 18 [program_name] => Cross Sale [siteid] => 1 [site_name] => Token Test [tourid] => 1 [tour_name] => Default Tour ) ) [campaignlist] => Array ( [0] => Array ( [campaignid] => 0 [name] => Default ) [1] => Array ( [campaignid] => 4 [name] => testings001 ) [2] => Array ( [campaignid] => 1 [name] => TEMP ) [3] => Array ( [campaignid] => 2 [name] => New ) ) ) )