NATS4 API Get Affiliate Program Campaign List

From TMMwiki
Jump to: navigation, search
NATS 4
SOAP API
API
API Best Practices
WSDL Cache
Add Affiliate
Add Member Note
Admin Get Adtools
Adtool Categories
Adtool Types
Affiliate Get Campaigns
Bulk Import Adtools
Caching
Decode Natscode
Expire Manual Member
Get Affiliate Campaigns
Get Affiliate Hit Data
Get Affiliate Loginids
Get Affiliate Nats Codes
Get Affiliate Payout
Get Affiliate Program Campaign List
Get_Affiliate_Program_Campaign_List
Get Member Details
Get Member Instant Upgrade String
Get Member Package Upgrade String
Get Member Token Rebuy String
Get Member Upsell String
Get Payment Data
Get Payvia Rule
Get Profit Loss Report
Ping
Record Member Login
Search Affiliate Info
Search Member Info
Send Email API Function
Set Affiliate Admin Settings
Set Affiliate Customs
Set Affiliate Defaults
Set Affiliate Information
Set Affiliate Settings
Set Member Details
Set Payment Status
Set Payvia Rule
REST API
API Overview
API Best Practices
REST API PATH UPDATES
Adtools
GET /adtools/admin
GET /adtools/categories
GET /adtools/types
POST /adtools/importdump
Affiliate
GET /affiliate/campaigns
GET /affiliate/hitdata
GET /affiliate/payout
GET /affiliate/searchinfo
POST /affiliate/addaffiliate
POST /affiliate/invoice
PATCH /affiliate/setadminsettings
PATCH /affiliate/setcustoms
PATCH /affiliate/setdefaults
PATCH /affiliate/setinformation
PATCH /affiliate/setpayviainfo
PATCH /affiliate/setsettings
PATCH /affiliate/status
Member
GET /member/upsellstring
GET /member/tokenrebuystring
GET /member/instantupgradestring
GET /member/packageupgradestring
GET /member/signupplusstring
GET /member/cancelstring
GET /member/details
GET /member/searchinfo
GET /suggestedcanceloffers
PATCH /member/setdetails
PATCH /member/setexpiration
POST /member/addnote
POST /member/recordlogin
PUT /member/expiremanual
Option
GET /option/getrule
PATCH /option/editrule
POST /option/addrule
PUT /option/edittext
Payments
GET /payments/getpayments
GET /payviarule
PATCH /payments/setstatus
PATCH /payviarule
Report
GET /profitlossreport
Service
GET /service/decodenatscode
GET /service/ping
POST /service/sendemail

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
					)
                )
        )
)