Difference between revisions of "NATS4 API Search Affiliate Info"
From TMM Wiki
Jump to navigationJump to search(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
All parameters are optional so if none are entered, all affiliate information will be displayed. | All parameters are optional so if none are entered, all affiliate information will be displayed. | ||
− | *return_payvia_info - | + | *'''return_payvia_info''' - this parameter is an option to make the function return the affiliate's payvia information in an array called "payvia_details". |
− | ** NOTE: | + | *'''return_referred_info''' - this parameter is an option to make the function return the referring affiliate chain for this account (parent accounts) within a sub array called "referred_details" |
− | + | *'''return_referring_info''' - this parameter is an option to make the function return all affiliate accounts referred by this affiliate (child accounts) within a sub array called "referring_details" | |
− | Here is the full list of parameters that you can search for affiliates | + | ** NOTE: these parameter are 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 | + | <br> |
− | *aim | + | Here is the full list of parameters that you can use to search for affiliates: |
− | *city | + | *'''address''' |
− | *company | + | *'''aim''' |
− | *country | + | *'''city''' |
− | *deleted | + | *'''company''' |
− | *email | + | *'''country''' |
− | *end | + | *'''deleted''' |
− | *firstname | + | *'''email''' |
− | *icq | + | *'''end''' |
− | *inhouse | + | *'''firstname''' |
− | *join_count | + | *'''icq''' |
− | *join_date | + | *'''inhouse''' |
− | *join_hits | + | *'''join_count''' |
− | *join_ip | + | *'''join_date''' |
− | *join_range | + | *'''join_hits''' |
− | *join_submits | + | *'''join_ip''' |
− | *lastname | + | *'''join_range''' |
− | *login_date | + | *'''join_submits''' |
− | *loginid | + | *'''lastname''' |
− | *login_ip | + | *'''login_date''' |
− | *login_range | + | *'''loginid''' |
− | *min_pay | + | *'''login_ip''' |
− | *name | + | *'''login_range''' |
− | *natscode | + | *'''min_pay''' |
− | *orderby | + | *'''name''' |
− | *pay_range | + | *'''natscode''' |
− | *payvia_type_id | + | *'''orderby''' |
− | *ratio | + | *'''pay_range''' |
− | *raw_hits | + | *'''payvia_type_id''' |
− | *rebill_count | + | *'''ratio''' |
− | *refid | + | *'''raw_hits''' |
− | *ref | + | *'''rebill_count''' |
− | *refund_count | + | *'''refid''' |
− | *sales_rep | + | *'''ref''' |
− | *search_ref | + | *'''refund_count''' |
− | *start | + | *'''sales_rep''' |
− | *state | + | *'''search_ref''' |
− | *stats_end | + | *'''start''' |
− | *stats_period | + | *'''state''' |
− | *stats_start | + | *'''stats_end''' |
− | *status | + | *'''stats_period''' |
− | *total_earned | + | *'''stats_start''' |
− | *total | + | *'''status''' |
− | *type | + | *'''total_earned''' |
− | *unq_hits | + | *'''total''' |
− | *url | + | *'''type''' |
− | *username | + | *'''unq_hits''' |
− | *zip_code | + | *'''url''' |
+ | *'''username''' | ||
+ | *'''zip_code''' | ||
== NuSOAP Example == | == NuSOAP Example == |
Latest revision as of 20:46, 1 February 2016
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.
- return_payvia_info - this parameter is an option to make the function return the affiliate's payvia information in an array called "payvia_details".
- return_referred_info - this parameter is an option to make the function return the referring affiliate chain for this account (parent accounts) within a sub array called "referred_details"
- return_referring_info - this parameter is an option to make the function return all affiliate accounts referred by this affiliate (child accounts) within a sub array called "referring_details"
- NOTE: these parameter are 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.
Here is the full list of parameters that you can use to search for affiliates:
- 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 ) ) ) )