NATS4 API Search Affiliate Info

From TMMwiki
Jump to: navigation, search
NATS 4
SOAP API
API
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
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 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
  • email
  • 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
                        )

                )

        )

)