Difference between revisions of "NATS4 API Affiliate Get Campaigns"
From TMM Wiki
Jump to navigationJump to search (Created page with ' This function allows you to get a list of affiliate campaigns. To use this function, you must make a SOAP call with the following parameters <pre> <?xml version="1.0" encoding=…') |
TMMMikeSopko (talk | contribs) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{NATS4 Manual | ||
+ | | show_api_admin_section = true | ||
+ | }} | ||
− | This function allows you to get a list of affiliate campaigns. | + | This [[NATS4_API|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 [[NATS4_API#Example|main article NuSOAP Example]]: | ||
+ | |||
+ | <pre> | ||
+ | $values = Array( | ||
+ | 'start' => 1, | ||
+ | 'count' => 3, | ||
+ | 'orderby' => 'campaignid DESC', | ||
+ | ); | ||
+ | $result = $client->call('aff_getcampaigns', $values, 'natsapiadmin_wsdl'); | ||
+ | </pre> | ||
+ | |||
+ | === Sample Output === | ||
<pre> | <pre> | ||
− | + | Array | |
− | + | ( | |
− | + | [0] => Array | |
− | + | ( | |
− | + | [campaignid] => 1 | |
− | + | [name] => top,header,banner | |
− | + | ) | |
− | + | ||
− | + | [1] => Array | |
− | + | ( | |
− | + | [campaignid] => 2 | |
+ | [name] => banner,side,ad | ||
+ | ) | ||
+ | |||
+ | ) | ||
</pre> | </pre> | ||
+ | |||
+ | [[Category:NATS4 API Articles]] |
Latest revision as of 16:16, 17 June 2014
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 ) )