NATS4 API Search Affiliate Info
From TMM Wiki
Jump to navigationJump to search
NATS4 supports an API resource to get affiliate info for an affiliate or multiple affiliates based on the parameters entered.
All parameters are optional so if none are entered, all affiliate information will be displayed. Here is the full list:
- return_payvia_info - makes the function return the affiliate's payvia information in an array called "payvia_details"
- NOTE: this parameter is only available in versions 4.1.9.1 and above. If you are not yet on this version and need this option, please submit a support ticket with us to either upgrade or get this feature added to your version.
- address
- aim
- city
- company
- country
- deleted
- end
- firstname
- icq
- inhouse
- join_count
- join_date
- join_hits
- join_ip
- join_range
- join_submits
- lastname
- login_date
- loginid
- login_ip
- login_range
- min_pay
- name
- natscode
- orderby
- pay_range
- payvia_type_id
- ratio
- raw_hits
- rebill_count
- refid
- ref
- refund_count
- sales_rep
- search_ref
- start
- state
- stats_end
- stats_period
- stats_start
- status
- total_earned
- total
- type
- unq_hits
- url
- username
- zip_code
NuSOAP Example
This example continues from the main article NuSOAP Example):
$params = Array( Array( 'loginid' => 6, 'return_payvia_info' => 1, ), ); $result = $client->call('search_affiliate_info', $params, 'natsapiadmin_wsdl'); print_r($result);
Affiliate Loginids Data Output
The output will be an array of affiliate usernames and affiliate IDs. loginid will be -1 if the affiliate cannot be found within NATS.
Array ( [0] => Array ( [loginid] => 6 [username] => nickadmin2 [deleted] => 0 [type] => 225 [skinid] => 102 [payvia_type_id] => 1 [status] => 0 [join_date] => 1424192426 [inhouse] => 1 [tmmid] => 0 [origin] => 0 [language] => [payout_period_id] => 0 [firstname] => nick [lastname] => test [email] => nicktestadmin@gmail.com [date_posted] => 1424192427 [join_ip] => 168430111 [last_login] => 1424200091 [last_login_ip] => 168430111 [reviewed] => 0 [minimum_payout] => 50 [bonus] => 0 [bonus_used] => 0 [verify] => [reason] => [unencoded] => 0 [startpage] => internal.php [rep_baseline] => 0 [company] => toomuchmedia.com [url] => tooomuchmedia.com [tel] => [icq] => [aim] => [msn] => [address1] => 123 asdsadsa [city] => asdfasdfa [state] => [country] => US [zip_code] => 123456 [tax_id_or_ssn] => [invoicer] => 1 [req_docs] => 0 [w9] => 0 [mailok] => 1 [trust_level] => 0 [new_notification] => 0 [latest_news] => 0 [default_campaign] => 0 [default_program] => 1 [default_site] => 0 [pv_instant] => 0 [payout_approval] => 0 [custom1] => 0 [custom2] => 0 [custom3] => 0 [custom4] => 0 [custom5] => 0 [payvia_details] => Array ( [0] => Array ( [field] => Pay To [value] => nick test ) [1] => Array ( [field] => Address [value] => 123 asdsadsa ) [2] => Array ( [field] => Address 2 [value] => ) [3] => Array ( [field] => City [value] => asdfasdfa ) [4] => Array ( [field] => State [value] => aasdfa ) [5] => Array ( [field] => Zip Code [value] => 123456 ) [6] => Array ( [field] => Country [value] => United States ) ) ) )