NATS4 API Affiliate Get Campaigns
From TMM WikiJump to navigationJump to search
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.
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');
Array (  => Array ( [campaignid] => 1 [name] => top,header,banner )  => Array ( [campaignid] => 2 [name] => banner,side,ad ) )