NATS4 API Affiliate Get Campaigns
From TMM Wiki
Revision as of 16:16, 17 June 2014 by TMMMikeSopko (talk | contribs)
This API function allows you to get a list of affiliate campaigns by using the aff_getcampaigns function. The following parameters are accepted for this function:
- start - (optional) The number of campaigns to skip from the beginning. Useful when returning a lot of campaigns. Default: 0 meaning start at the beginning of the campaign list.
- count - (optional) The number of campaigns to return. Default: 0 meaning all campaigns are returned.
- orderby - (optional) How to order the return of campaigns. Default: name. Available options are campaignid or name. You can sort ascending or descending by adding ASC or DESC to the orderby parameter.
NuSOAP Example
This example continues from the main article NuSOAP Example:
$values = Array( 'start' => 1, 'count' => 3, 'orderby' => 'campaignid DESC', ); $result = $client->call('aff_getcampaigns', $values, 'natsapiadmin_wsdl');
Sample Output
Array ( [0] => Array ( [campaignid] => 1 [name] => top,header,banner ) [1] => Array ( [campaignid] => 2 [name] => banner,side,ad ) )