Difference between revisions of "NATS4 API Search Affiliate Info"
From TMM Wiki
Jump to navigationJump to search (Created page with "{{NATS4 Manual | show_api_admin_section = true }} NATS4 supports an API resource to get affiliate info for an affiliate or multiple affiliates based on the parameters ent...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
[[NATS4]] supports an API resource to get affiliate info for an affiliate or multiple affiliates based on the parameters entered. | [[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. | + | 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" |
− | *address | + | *'''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" |
− | *aim | + | ** 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. |
− | *city | + | <br> |
− | *company | + | Here is the full list of parameters that you can use to search for affiliates: |
− | *country | + | *'''address''' |
− | *deleted | + | *'''aim''' |
− | *email | + | *'''city''' |
− | *end | + | *'''company''' |
− | *firstname | + | *'''country''' |
− | *icq | + | *'''deleted''' |
− | *inhouse | + | *'''email''' |
− | *join_count | + | *'''end''' |
− | *join_date | + | *'''firstname''' |
− | *join_hits | + | *'''icq''' |
− | *join_ip | + | *'''inhouse''' |
− | *join_range | + | *'''join_count''' |
− | *join_submits | + | *'''join_date''' |
− | *lastname | + | *'''join_hits''' |
− | *login_date | + | *'''join_ip''' |
− | *loginid | + | *'''join_range''' |
− | *login_ip | + | *'''join_submits''' |
− | *login_range | + | *'''lastname''' |
− | *min_pay | + | *'''login_date''' |
− | *name | + | *'''loginid''' |
− | *natscode | + | *'''login_ip''' |
− | *orderby | + | *'''login_range''' |
− | *pay_range | + | *'''min_pay''' |
− | *payvia_type_id | + | *'''name''' |
− | *ratio | + | *'''natscode''' |
− | *raw_hits | + | *'''orderby''' |
− | *rebill_count | + | *'''pay_range''' |
− | *refid | + | *'''payvia_type_id''' |
− | *ref | + | *'''ratio''' |
− | *refund_count | + | *'''raw_hits''' |
− | *sales_rep | + | *'''rebill_count''' |
− | *search_ref | + | *'''refid''' |
− | *start | + | *'''ref''' |
− | *state | + | *'''refund_count''' |
− | *stats_end | + | *'''sales_rep''' |
− | *stats_period | + | *'''search_ref''' |
− | *stats_start | + | *'''start''' |
− | *status | + | *'''state''' |
− | *total_earned | + | *'''stats_end''' |
− | *total | + | *'''stats_period''' |
− | *type | + | *'''stats_start''' |
− | *unq_hits | + | *'''status''' |
− | *url | + | *'''total_earned''' |
− | *username | + | *'''total''' |
− | *zip_code | + | *'''type''' |
+ | *'''unq_hits''' | ||
+ | *'''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 ) ) ) )