NATS4 API Search Member Info

From TMMwiki
Jump to: navigation, search
NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers
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
    Adtool
GET /adtool/admin
GET /adtool/adtools
GET /adtool/adtool
GET /adtool/adtool-rules
GET /adtool/adtool-rule
GET /adtool/categories
GET /adtool/field-options
GET /adtool/field-types
GET /adtool/groups
GET /adtool/search
GET /adtool/templates
GET /adtool/types
GET /adtool/type
POST /adtool/adtool
POST /adtool/adtool-rule
POST /adtool/category
POST /adtool/field
POST /adtool/field-option
POST /adtool/group
POST /adtool/import
POST /adtool/type
PATCH /adtool/adtool
PATCH /adtool/adtool-group
PATCH /adtool/adtool-rule
PATCH /adtool/category
PATCH /adtool/field
PATCH /adtool/field-option
PATCH /adtool/group
PATCH /adtool/move
PATCH /adtool/restore-adtool
PATCH /adtool/restore-category
PATCH /adtool/restore-field
PATCH /adtool/restore-field-option
PATCH /adtool/restore-type
PATCH /adtool/type
DELETE /adtool/adtool
DELETE /adtool/adtool-rule
DELETE /adtool/category
DELETE /adtool/field
DELETE /adtool/field-option
DELETE /adtool/group
DELETE /adtool/type
    Affiliate
DELETE /affiliate/account-rep
DELETE /affiliate/account-type
DELETE /affiliate/affiliate
DELETE /affiliate/doc
DELETE /affiliate/group
DELETE /affiliate/permissions
GET /affiliate/account-changes
GET /affiliate/account-types
GET /affiliate/admin-settings
GET /affiliate/campaigns
GET /affiliate/current
GET /affiliate/current-permissions
GET /affiliate/docs
GET /affiliate/doc
GET /affiliate/groups
GET /affiliate/group
GET /affiliate/hits
GET /affiliate/link-styles
GET /affiliate/loginids
GET /affiliate/loginlog
GET /affiliate/manual-payout
GET /affiliate/news-sections
GET /affiliate/notes
GET /affiliate/notices
GET /affiliate/override
GET /affiliate/payout
GET /affiliate/payment-periods
GET /affiliate/payvia-types
GET /affiliate/payvia-type
GET /affiliate/permissions
GET /affiliate/programcampaigns
GET /affiliate/referrer
GET /affiliate/referring-urls
GET /affiliate/reps
GET /affiliate/rest-methods
GET /affiliate/search
GET /affiliate/search-limited
GET /affiliate/settings
GET /affiliate/skins
GET /affiliate/soap-functions
GET /affiliate/status
PATCH /affiliate/adminsettings
PATCH /affiliate/account-change
PATCH /affiliate/account-type
PATCH /affiliate/account-type-permissions
PATCH /affiliate/admin-setting
PATCH /affiliate/affiliate-account-type
PATCH /affiliate/affiliate-group
PATCH /affiliate/allsettings
PATCH /affiliate/account-rep
PATCH /affiliate/avatar
PATCH /affiliate/customs
PATCH /affiliate/defaults
PATCH /affiliate/details
PATCH /affiliate/override
PATCH /affiliate/password
PATCH /affiliate/payment-period
PATCH /affiliate/payvia
PATCH /affiliate/payvia-info
PATCH /affiliate/permissions
PATCH /affiliate/referrer
PATCH /affiliate/reset-api
PATCH /affiliate/reset-rss
PATCH /affiliate/reset-tos
PATCH /affiliate/rest-permissions
PATCH /affiliate/restore
PATCH /affiliate/restore-account-type
PATCH /affiliate/settings
PATCH /affiliate/soap-permissions
PATCH /affiliate/status
POST /affiliate/account-type
POST /affiliate/add
POST /affiliate/doc
POST /affiliate/group
POST /affiliate/invoice
POST /affiliate/manual-sale
POST /affiliate/note
    Biller
GET /biller/available
GET /biller/partner-available
GET /biller/billerdata
GET /biller/cascades
GET /biller/cascades-available
GET /biller/cascade-count
GET /biller/cascade-history
GET /biller/cascade-rules
GET /biller/cascade-rule
GET /biller/cascade-step-count
GET /biller/cascade-steps
GET /biller/cascade-detail
GET /biller/cascade-list
GET /biller/count
GET /biller/detail
GET /biller/fees
GET /biller/partner-fees
GET /biller/last_poll
GET /biller/partner-last-poll
GET /biller/list
GET /biller/partner-detail
GET /biller/partner-list
GET /biller/partner-shortnames
GET /biller/process_types
GET /biller/partner-process-types
GET /biller/shortnames
GET /biller/transaction_types
GET /biller/partner-transaction-types
POST /biller/add
POST /biller/cascade
POST /biller/cascade-rule
POST /biller/cascade-step
POST /biller/partner
PATCH /biller/cascade
PATCH /biller/cascade-rule
PATCH /biller/cascade-step
PATCH /biller/cascade-steps-reorder
PATCH /biller/fee
PATCH /biller/partner-fee
PATCH /biller/restore
PATCH /biller/restore-cascade
PATCH /biller/restore-partner
PATCH /biller/setting
PATCH /biller/partner-setting
DELETE /biller/biller
DELETE /biller/cascade
DELETE /biller/cascade-rule
DELETE /biller/cascade-step
DELETE /biller/fee
DELETE /biller/partner-fee
DELETE /biller/partner
    Codes
GET /codes/affiliate-codes
GET /codes/decode
GET /codes/linkcodes
GET /codes/strack
    Config
DELETE /config/setting
GET /config/section
GET /config/sections
PATCH /config/affiliate_default
PATCH /config/section
    Include
DELETE /include/include
DELETE /include/step
GET /include/include
GET /include/includes
GET /include/templates
PATCH /include/include
PATCH /include/restore
PATCH /include/step
POST /include/include
POST /include/step
    Mailing
DELETE /mailing/mailing
DELETE /mailing/mailing-rule
DELETE /mailing/queue
GET /mailing/mailing
GET /mailing/mailings
GET /mailing/mailing-rules
GET /mailing/mailing-rule
GET /mailing/queue
GET /mailing/removelist
PATCH /mailing/mailing
PATCH /mailing/mailing-rule
PATCH /mailing/removelist
PATCH /mailing/removelist-queue
PATCH /mailing/resend-queue
PATCH /mailing/restore-queue
PATCH /mailing/send-mailing
PATCH /mailing/send-test-mailing
POST /mailing/mailing
POST /mailing/mailing-rule
POST /mailing/removelist
    Maintenance
DELETE /maintenance/log
DELETE /maintenance/cache
GET /maintenance/admin-actions
GET /maintenance/log
GET /maintenance/logs
GET /maintenance/nats
GET /maintenance/report
GET /maintenance/report-progress
GET /maintenance/reports
GET /maintenance/server
GET /maintenance/table
GET /maintenance/tables
GET /maintenance/table-clean-count
GET /maintenance/table-clean-progress
PATCH /maintenance/log
PATCH /maintenance/report
PATCH /maintenance/table
    Member
GET /member/available_flags
GET /member/encryptusername
GET /member/authstring
GET /member/billerdetails
GET /member/details
GET /member/flags
GET /member/loginlog
GET /member/matching
GET /member/notes
GET /member/restricted-values
GET /member/search
GET /member/suggestedcanceloffers
GET /member/surfer-actions
PATCH /member/details
PATCH /member/expiration
PATCH /member/expiremanual
PATCH /member/rebilldate
PATCH /member/resend-transaction-email
PATCH /member/resend-transaction-postback
PATCH /member/restricted-value
PATCH /member/forget
PATCH /member/status
PATCH /member/lock
PATCH /member/unlock
POST /member/flag
POST /member/login
POST /member/manual
POST /member/note
POST /member/restricted-value
DELETE /member/flag
DELETE /member/restricted-value
    Message
DELETE /message/message
DELETE /message/permanent
GET /message/count
GET /message/messages
GET /message/view
PATCH /message/read
PATCH /message/unread
PATCH /message/undelete
POST /message/message
    News
DELETE /news/entry
DELETE /news/section
GET /news/entry
GET /news/news
GET /news/sections
PATCH /news/entry
POST /news/entry
POST /news/section
    Notification
DELETE /notification/notification
DELETE /notification/permanent
GET /notification/count
GET /notification/notifications
GET /notification/view
PATCH /notification/read
PATCH /notification/unread
PATCH /notification/undelete
    Option
GET /option/options
GET /option/rule
PATCH /option/rule
PATCH /option/text
POST /option/rule
    Payment
DELETE /payment/invoice
DELETE /payment/payout-period
DELETE /payment/payvia-field
DELETE /payment/payvia-field-mc
DELETE /payment/payvia-rule
GET /payment/dump-format
GET /payment/dump-formats
GET /payment/invoices
GET /payment/payments
GET /payment/payment-dumps
GET /payment/payment-dump
GET /payment/payment-search
GET /payment/payvia
GET /payment/payvias
GET /payment/payvia-fields
GET /payment/payvia-field-mcs
GET /payment/payout-period
GET /payment/payout-periods
GET /payment/payvia-rules
GET /payment/payvia-rule
GET /payment/payviarule
PATCH /payment/copy-dump-format
PATCH /payment/default-payout-period
PATCH /payment/dump-format
PATCH /payment/duplicate-payvia
PATCH /payment/invoice
PATCH /payment/payment
PATCH /payment/payment-paid
PATCH /payment/payment-store
PATCH /payment/payment-unstore
PATCH /payment/payments
PATCH /payment/payments-unstore
PATCH /payment/payout-period
PATCH /payment/payout-period-affiliates
PATCH /payment/payvia
PATCH /payment/payvia-field
PATCH /payment/payvia-fields-reorder
PATCH /payment/payvia-field-mc
PATCH /payment/payvia-field-mcs-reorder
PATCH /payment/payvia-rule
PATCH /payment/payviarule
PATCH /payment/restore-payout-period
PATCH /payment/restore-payvia-field
PATCH /payment/restore-payvia-field-mc
POST /payment/check-dump
POST /payment/dump-format
POST /payment/import-dump
POST /payment/invoice
POST /payment/payout-period
POST /payment/payvia
POST /payment/payvia-field
POST /payment/payvia-field-mc
POST /payment/payvia-rule
    Program
DELETE /program/program
DELETE /program/payout-change
DELETE /program/payout-change-tier
GET /program/affiliate-available
GET /program/detail
GET /program/list
GET /program/options
GET /program/payout-changes
GET /program/redirect-available
GET /program/sites
GET /program/tours
GET /program/types
PATCH /program/default_payout
PATCH /program/details
PATCH /program/disable_affiliate
PATCH /program/disable_tour
PATCH /program/enable_affiliate
PATCH /program/enable_site
PATCH /program/enable_tour
PATCH /program/move-payout-change
PATCH /program/payout-change
PATCH /program/payout-change-tier
POST /program/new
POST /program/payout-change
POST /program/payout-change-tier
    Report
GET /report/hits
GET /report/hit-totals
GET /report/profitloss
GET /report/profit-loss
GET /report/fields
GET /report/focus
GET /report/focuses
GET /report/groups
GET /report/perspective
GET /report/perspectives
GET /report/report
GET /report/subscription
GET /report/surfer
GET /report/surferaction
GET /report/transactionpayouts
GET /report/transactions
GET /report/transaction
GET /report/report-widget
GET /report/widgets
GET /report/widget
GET /report/widget-info
GET /report/views
POST /report/focus
POST /report/group
POST /report/perspective
PATCH /report/focus
PATCH /report/focus-enabled
PATCH /report/focus-default
PATCH /report/focuses-reorder
PATCH /report/perspective
PATCH /report/perspective-group
PATCH /report/report-widget
PATCH /report/widget
DELETE /report/focus
    Reward
DELETE /reward/category
DELETE /reward/purchase
DELETE /reward/point
DELETE /reward/reward
GET /reward/categories
GET /reward/points
GET /reward/purchases
GET /reward/rewards
PATCH /reward/move-point
PATCH /reward/point
PATCH /reward/reward
PATCH /reward/ship-purchase
PATCH /reward/unship-purchase
POST /reward/category
POST /reward/point
POST /reward/reward
    Service
GET /service/check-functions
GET /service/condition
GET /service/countries
GET /service/country
GET /service/datetime
GET /service/languages
GET /service/periods
GET /service/ping
GET /service/project
GET /service/rule-condition-data
GET /service/rule-info
GET /service/stats-breakdowns
GET /service/timezone
GET /service/timestamp
POST /service/sendemail
    Site
GET /site/base-templates
GET /site/billers
GET /site/cookies
GET /site/coupon
GET /site/coupons
GET /site/coupon-revisions
GET /site/email-settings
GET /site/groups
GET /site/option
GET /site/options
GET /site/options-available
GET /site/option-fields
GET /site/option-rules
GET /site/option-rule
GET /site/option-type
GET /site/option-types
GET /site/programs
GET /site/site-list
GET /site/site
GET /site/site-notices
GET /site/site-partner
GET /site/site-partners
GET /site/site-type
GET /site/sites
GET /site/template
GET /site/templates
GET /site/template-sections
GET /site/template-sites
GET /site/tour
GET /site/tours
GET /site/tour-emails
GET /site/tour-notices
POST /site/coupon
POST /site/group
POST /site/option
POST /site/option-rule
POST /site/site-partner
POST /site/site-tour
POST /site/copy-template
POST /site/tour
PATCH /site/cookie
PATCH /site/coupon
PATCH /site/duplicate-option
PATCH /site/email-settings
PATCH /site/group
PATCH /site/move
PATCH /site/option
PATCH /site/option-rule
PATCH /site/reset-coupon
PATCH /site/restore-group
PATCH /site/restore-option
PATCH /site/restore-site
PATCH /site/restore-site-partner
PATCH /site/restore-tour
PATCH /site/site
PATCH /site/site-partner
PATCH /site/template
PATCH /site/tour
DELETE /site/cookie
DELETE /site/group
DELETE /site/option
DELETE /site/option-rule
DELETE /site/site
DELETE /site/site-partner
DELETE /site/template
DELETE /site/tour
DELETE /site/tour-field
    Skin
DELETE /skin/skin
DELETE /skin/template
GET /skin/export
GET /skin/skins
GET /skin/sections
GET /skin/templates
GET /skin/template
PATCH /skin/flush
PATCH /skin/skin
PATCH /skin/template
POST /skin/copy-template
POST /skin/import
POST /skin/skin
POST /skin/template


NATS4 supports an API function to search on various parameters to obtain a list of matching members.


search_member_info accepts any combination of the following 41 possible input parameters:

• username (the member's username)
• memberid (the member's ID in NATS)
• email (the member's email)
• password (the member's password)
• status (the member's status)
• firstname (the member's firstname)
• loginip (the member's login IP address)
• marked (TRUE or FALSE, the member's "flagged" setting)
• lastname (the member's lastname)
• address1 (the member's street address, first line)
• address2 (the member's street address, second line)
• zip (the member's zipcode)
• city (the member's city)
• state (the member's state)
• country (the member's 2-character country code)
• mailok (TRUE or FALSE, the member's setting if it is ok to send email)
• custom1 (the member's custom1 field)
• custom2 (the member's custom2 field)
• custom3 (the member's custom3 field)
• custom4 (the member's custom4 field)
• custom5 (the member's custom5 field)
• subscription (the member's subscription ID)
• billerid (the biller's ID in NATS)
• cascadeid (the cascade ID in NATS)
• biller_transid (the biller's transaction ID)
• ip (the member's IP address that they joined with)
• trans_type_id (the transaction type ID in NATS)
• nats_transaction_id (the NATS transaction ID)
• siteid (the site ID in NATS)
• tourid (the tour ID in NATS)
• optionid (the join option ID in NATS)
• affiliate (the affiliate's username associated with the member)
• loginid (the affiliate's loginid associated with the member)
• natscode (the NATS code associated with the member)
• programid (the program ID associated with the member)
• period (Possible values: 0 => This Period, 1 => Last Period, 2 => Today, 3 => Yesterday, 4 => This Week, 5 => This Month, 6 => This Year, 7 => All Time, 8 => Free Form *) //?? BOOLEAN, pertains only to female members ??
• start_time (member's stamp field greater than specified date)
• end_time (member's stamp field less than specified date)
• count (the maximum number of matches to return, i.e. SQL LIMIT clause) //BOOLEAN, if the member is a Count or not, e.g. Dracula
• orderby (if set, the SQL clause to order the results by. This would ordinarily be the name of a field in either the member, member_info, member_subscription, or identifier tables, and perhaps followed by DESC if the order is to be descending. If this is left empty, the results will be sorted first by member.stamp descending, then by member ID ascending.)
//• statid // reserved for future use
//• subid1 //reserved for future use, subid1 is obtained only from natscode field
//• subid2 //reserved for future use, subid2 is obtained only from natscode field


*Additional possible values for "period"
9 => N/A
10 => last_week
11 => last_month
12 => past 60 days
13 => past 90 days
14 => last year
15 => past 7 days
16 => past 180 days
17 => past 30 days
18 => 2 periods ago
19 => two_days ago
20 => two_weeks ago
21 => two_months ago
22 => period 60 to 120 days ago
23 => period 90 to 180 days ago
24 => past 2 years
25 => period 7 to 14 days ago
26 => period 180 to 360 days ago
27 => period 30 to 60 days ago
28 => past 15 days
29 => period 15 to 30 days ago
30 => same date range as current period, but 1 year ago
31 => same date range as last period, but 1 year ago
32 => same date range is current period, but 1 month ago
33 => same date range is last period, but 1 month ago
34 => N/A ??


The more input parameters that are specified, the more refined your search results will be. See the examples below:


NuSOAP Example 1

This example continues from the main article NuSOAP Example:

To give a complete example of this, this is how to call it:

<?php
require_once('nusoap/lib/nusoap.php');

$url = 'http://nats.site.com/admin_api.php'; // change to be the domain of your NATS install
$username = 'NATSADMIN'; // your admin username
$apikey = '3385e1b470b0864e27a9b648da6c0692'; // your api key

$client = new nusoap_client($url.'?wsdl', true);
$client->setCredentials($username,$apikey);
// Check for an error
$err = $client->getError();
if ($err) {
    // Display the error
    echo 'Constructor error' . $err . "\n";
    exit; // At this point, you know the call that follows will fail
    
}


$values = array(
'state' => 'NJ',   //matching all members who have a state = NJ
'orderby' => 'username ASC' //sort the matching results by username in ascending order
 );


$result = $client->call('search_member_info', $values, 'natsapiadmin_wsdl');

//for purposes of displaying the output 
echo '<PRE>';

print_r($result);

echo '</PRE>';
?>

NuSOAP Example 1 output

The output will be a dump of members matching state = NJ, sorted by username in ascending order, and will contain all of the corresponding fields (which could be input into a spreadsheet program):

"memberid","identid","loginid","networkid","refurl_lookup_id","status","trial","joined","expired","last_login","stamp","siteid","username","password","cryptpass","ip","email","session","mailok","flat_price","first_login","third_party_partner_id","cascadeid","cascade_item_id","token","original_username","renamed","marked","token_hash","max_password_display_time","firstname","lastname","address1","address2","zip","city","country","state","shipping_firstname","shipping_lastname","shipping_address1","shipping_address2","shipping_zip","shipping_city","shipping_country","shipping_state","phone","xsell_success","xsell_message","custom1","custom2","custom3","custom4","custom5","last_modified","member_subscription_id","memberidx","billerid","statid","cost","cost_charge","spent","refunded","charges","next_rebill","optionid","rebills","active","upgradeid","expires","nats_expires","biller_expires","original_optionid","created_date","loginid_faceigned","identid_faceigned","gateway_token","passthrough1","passthrough2","passthrough3","passthrough4","passthrough5","forced_optionid","defaulted_optionid","campaignid","programid","tourid","adtoolid","subid1","subid2","countryid","promotionalid","loginid_nice"
"71","29","8","0","1","1","1","1437600472","0","0","1437600472","2","AnotherTest","friendly","b5/bQiYLz71Mg","168430114","lov@off.com","99d012a07e4ed780bbe73478b845edb1","1","0","0","0","2","3","0","AnotherTest","0","0","c1a7159241d86828971680a6c3c183e3","0","pully","Rizzo","456 Nile Dr.","","08723","Brick","US","NJ","","","","","","","","","","0","","","","","","","0","102","NETBILLING:112468846446","3","855b00a8fcc789","0","0","400","0","1","1437859672","1","0","1","","1437859672","1437859672","0","1","1437600399","0","0","112468830063","","","","","","0","0","0","2","4","0","0","0","0","0","TestVerify"
"70","29","8","0","1","1","1","1437599981","0","0","1437599981","2","BrotherTest","5555555","0bU0rln36N/yY","168430114","fri@day.com","99d012a07e4ed780bbe73478b845edb1","1","0","0","0","2","3","0","BrotherTest","0","0","d47ac11ce88e7cf0baebe7dd5f1c0381","0","Joe","Smoe","123 Anywhere Rd","","07764","Deal","US","NJ","","","","","","","","","","0","","","","","","","0","101","NETBILLING:112385275771","3","855b008ca29b26","0","0","400","0","1","1437859181","1","0","1","","1437859181","1437859181","0","1","1437599946","0","0","112385275770","","","","","","0","0","0","2","4","0","0","0","0","0","TestVerify"
"69","26","0","0","1","1","1","1437520286","0","0","1437520286","2","faceblock","lover","52.TcUF7LU36k","168430114","ee2e@wwere.com","f43a69e5d12af5af257a5cdfe664858d","0","0","0","0","2","3","0","faceblock","0","0","d804c9c6669f6eaaf9fd53b892dde6d3","0","Hans","Franz","123 Oak St.","","07746","Freehold","US","NJ","","","","","","","","","","0","","","","","","","0","100","NETBILLING:112468506130","3","855aed171c4f8c","0","0","400","0","1","1437779486","1","0","1","","1437779486","1437779486","0","1","1437520241","0","0","112468456983","","","","","","0","0","0","0","1","0","0","0","0","0","Type-In"
"65","26","0","0","1","1","1","1437447042","0","0","1437447042","2","JerryAgain","22323232","78vav3mMEkuwI","168430114","rerefr@sede.com","a92915c14152920268ecc1667b97824e","1","0","0","0","2","3","0","JerryAgain","0","0","5c5509b4c2176fb48ccbff844ad02fe6","0","Goose","Cooked","232 Lincoln St","","07723","Holmy","US","NJ","","","","","","","","","","0","","","","","","","0","96","NETBILLING:112386847437","3","855adb3455a3ee","0","0","400","0","1","1437706242","1","0","1","","1437706242","1437706242","0","1","1437446981","0","0","112386847436","","","","","","0","0","0","0","1","0","0","0","0","0","Type-In"
"64","29","8","0","1","1","1","1437445867","0","0","1437445867","2","LotsOfFun","andmetoo","628Ea/L1HBQbs","168430114","fear@this.com","99d012a07e4ed780bbe73478b845edb1","1","0","0","0","2","3","0","LotsOfFun","0","0","2985264a5db88ca8ccca31f2b4bc402f","0","live","Whiskers","356 bigbear Dr.","","08005","Barnegat","US","NJ","","","","","","","","","","0","","","","","","","0","95","NETBILLING:112656279447","3","855adae945b9ed","0","0","400","0","1","1437705067","1","0","1","","1437705067","1437705067","0","1","1437445780","0","0","112656279446","","","","","","0","0","0","2","4","0","0","0","0","0","TestVerify"
"63","29","8","0","1","1","1","1437428601","0","0","1437428601","2","Pullman","445566","91x1h8oqQlRE6","168430114","smart@face.com","99d012a07e4ed780bbe73478b845edb1","1","0","0","0","2","3","0","Pullman","0","0","dd8de79a75d3d6221b4860863b7f99ff","0","Larry","Laugher","123 Dock St.","","07746","FreeLoad","US","NJ","","","","","","","","","","0","","","","","","","0","94","NETBILLING:112388175678","3","755ad6b421eb4a","0","0","400","0","1","1437687801","1","0","1","","1437687801","1437687801","0","1","1437428546","0","0","112388159295","","","","","","0","0","0","2","4","0","0","0","0","0","TestVerify"
"62","26","0","0","1","1","1","1437427945","0","0","1437427945","2","RogerWilcox","thetime","e0DyzkCgfvOR2","168430114","busty@likes.com","99d012a07e4ed780bbe73478b845edb1","0","0","0","0","2","3","0","RogerWilcox","0","0","e00d6abf15894beea286d19ea6184985","0","smart","face","123 Elm St.","","19456","Freehold","US","NJ","","","","","","","","","","0","","","","","","","0","93","NETBILLING:112449975913","3","155ad681a8b386","0","0","400","0","1","1437687145","1","0","1","","1437687145","1437687145","0","1","1437427738","0","0","112449975912","","","","","","0","0","0","0","1","0","0","0","0","0","Type-In"
"37","15","3","0","1","1","1","1433466637","0","0","1433466637","5","TedBear","nobody","12NkxG1ieKapk","2610666395","raise5@live.com","f43a69e5d12af5af257a5cdfe664858d","0","0","0","0","0","0","0","TedBea","0","0","ab65bbdf546435a3483d6f1e119a37a4","0","","","325 Oak St","","","Freehold","","NJ","","","","","","","","","","0","","","","","","","0","48","NETBILLING:112452783533","3","95570f70cbac2d","0","0","1000","0","1","1435281037","5","0","1","","1435281037","1435281037","0","5","1433466636","0","0","112452783532","","","","","","0","0","0","3","8","0","0","0","0","0","NewAdministrator"
"36","15","3","0","1","0","0","0","0","0","1433466570","5","UnderToes","nobody","761qTNNV1LKHo","2610666395","raise4@live.com","f43a69e5d12af5af257a5cdfe664858d","0","0","0","0","0","0","0","UnderToes","0","0","ce4ea98bed24b37339bfcab67afe8119","0","","","325 Oak St","","","Freehold","","NJ","","","","","","","","","","0","","","","","","","0","0","3","8","5","0","0","0","3","0","0","NewAdministrator"
"30","13","0","0","1","1","0","1432333221","0","0","1432333221","5","WhatsUpDoc","howdy","41vsEAXYngDkE","168430114","eat@food.de","99d012a07e4ed780bbe73478b845edb1","0","0","0","0","2","3","0","WhatsUpDoc","0","0","3be8aaa9f3fb13e825712a7302c32eb9","0","Right","Thru","123 Oak St.","","07746","Freehold","US","NJ","","","","","","","","","","0","","","","","","","0","41","NETBILLING:112672326360","3","8555fab64edea7","0","0","1500","0","1","1435011621","4","0","1","","1435011621","1435011621","0","4","1432333156","0","0","112672309977","","","","","","0","0","0","0","8","0","0","0","0","0","Type-In"
"15","11","0","0","1","1","0","1432143123","0","0","1432143123","5","Zelda","waytogo","9ce4TZ5ttTmlY","168430114","raise@live.com","f43a69e5d12af5af257a5cdfe664858d","1","0","0","0","2","3","0","Zelda","0","0","69b66b12016903eaa94a83a2c2c46af5","0","","NetBillin","345 Oak St.","","07746","Manalapan","US","NJ","","","","","","","","","","0","","","","","","","0","18","NETBILLING:112385676459:A|15","3","5555cc5126315a","0","0","0","0","1","0","3","0","1","112385676459","1432402323","1432402323","0","3","1432143122","0","0","112385676459:A","","","","","","0","0","0","0","8","0","0","0","0","0","Type-In"

NuSOAP Example 2

This example continues from above, and is a complete example of how to call it:

<?php
require_once('nusoap/lib/nusoap.php');

$url = 'http://nats.site.com/admin_api.php'; // change to be the domain of your NATS install
$username = 'NATSADMIN'; // your admin username
$apikey = '3385e1b470b0864e27a9b648da6c0692'; // your api key

$client = new nusoap_client($url.'?wsdl', true);
$client->setCredentials($username,$apikey);
// Check for an error
$err = $client->getError();
if ($err) {
    // Display the error
    echo 'Constructor error' . $err . "\n";
    exit; // At this point, you know the call that follows will fail
    
}


$values = array(
'state' => 'NJ', //matching all members who have a state = NJ
'orderby' => 'username DESC', //sort the matching results by username, but this time in descending order
'loginid' => 8   //and further refining the results only to those NJ members who joined via affiliate with loginid = 8
 );


$result = $client->call('search_member_info', $values, 'natsapiadmin_wsdl');

//for purposes of displaying the output 
echo '<PRE>';

print_r($result);

echo '</PRE>';
?>

NuSOAP Example 2 output

The output will be a dump of members matching both state = NJ and loginid = 8, sorted by username in descending order, and will contain the corresponding fields (which could be input into a spreadsheet program):

"memberid","identid","loginid","networkid","refurl_lookup_id","status","trial","joined","expired","last_login","stamp","siteid","username","password","cryptpass","ip","email","session","mailok","flat_price","first_login","third_party_partner_id","cascadeid","cascade_item_id","token","original_username","renamed","marked","token_hash","max_password_display_time","firstname","lastname","address1","address2","zip","city","country","state","shipping_firstname","shipping_lastname","shipping_address1","shipping_address2","shipping_zip","shipping_city","shipping_country","shipping_state","phone","xsell_success","xsell_message","custom1","custom2","custom3","custom4","custom5","last_modified","member_subscription_id","memberidx","billerid","statid","cost","cost_charge","spent","refunded","charges","next_rebill","optionid","rebills","active","upgradeid","expires","nats_expires","biller_expires","original_optionid","created_date","loginid_faceigned","identid_faceigned","gateway_token","passthrough1","passthrough2","passthrough3","passthrough4","passthrough5","forced_optionid","defaulted_optionid","campaignid","programid","tourid","adtoolid","subid1","subid2","countryid","promotionalid","loginid_nice"
"63","29","8","0","1","1","1","1437428601","0","0","1437428601","2","Pullman","445566","91x1h8oqQlRE6","168430114","smart@face.com","99d012a07e4ed780bbe73478b845edb1","1","0","0","0","2","3","0","Pullman","0","0","dd8de79a75d3d6221b4860863b7f99ff","0","Larry","Laugher","123 Dock St.","","07746","FreeLoad","US","NJ","","","","","","","","","","0","","","","","","","0","94","NETBILLING:112388175678","3","755ad6b421eb4a","0","0","400","0","1","1437687801","1","0","1","","1437687801","1437687801","0","1","1437428546","0","0","112388159295","","","","","","0","0","0","2","4","0","0","0","0","0","TestVerify"
"64","29","8","0","1","1","1","1437445867","0","0","1437445867","2","LotsOfFun","andmetoo","628Ea/L1HBQbs","168430114","fear@this.com","99d012a07e4ed780bbe73478b845edb1","1","0","0","0","2","3","0","LotsOfFun","0","0","2985264a5db88ca8ccca31f2b4bc402f","0","live","Whiskers","356 bigbear Dr.","","08005","Barnegat","US","NJ","","","","","","","","","","0","","","","","","","0","95","NETBILLING:112656279447","3","855adae945b9ed","0","0","400","0","1","1437705067","1","0","1","","1437705067","1437705067","0","1","1437445780","0","0","112656279446","","","","","","0","0","0","2","4","0","0","0","0","0","TestVerify"
"70","29","8","0","1","1","1","1437599981","0","0","1437599981","2","BrotherTest","5555555","0bU0rln36N/yY","168430114","fri@day.com","99d012a07e4ed780bbe73478b845edb1","1","0","0","0","2","3","0","BrotherTest","0","0","d47ac11ce88e7cf0baebe7dd5f1c0381","0","Joe","Smoe","123 Anywhere Rd","","07764","Deal","US","NJ","","","","","","","","","","0","","","","","","","0","101","NETBILLING:112385275771","3","855b008ca29b26","0","0","400","0","1","1437859181","1","0","1","","1437859181","1437859181","0","1","1437599946","0","0","112385275770","","","","","","0","0","0","2","4","0","0","0","0","0","TestVerify"
"71","29","8","0","1","1","1","1437600472","0","0","1437600472","2","AnotherTest","friendly","b5/bQiYLz71Mg","168430114","lov@off.com","99d012a07e4ed780bbe73478b845edb1","1","0","0","0","2","3","0","AnotherTest","0","0","c1a7159241d86828971680a6c3c183e3","0","pully","Rizzo","456 Nile Dr.","","08723","Brick","US","NJ","","","","","","","","","","0","","","","","","","0","102","NETBILLING:112468846446","3","855b00a8fcc789","0","0","400","0","1","1437859672","1","0","1","","1437859672","1437859672","0","1","1437600399","0","0","112468830063","","","","","","0","0","0","2","4","0","0","0","0","0","TestVerify"



Complete list of output parameters
search_member_info will output the following parameters:

memberid - the member's ID in NATS

identid - the identifier ID in NATS

loginid - the affiliate's loginid in NATS associated with the member

networkid - reserved for future use

refurl_lookup_id - the referring url ID in NATS member used when signing up

status - the member's status (0 = never joined, 1 = active and 2= inactive)

trial - TRUE or FALSE, the member's setting if trial membership

joined - date member joined

expired - date member expired

last_login - date member last logged in

stamp - date member record was created

siteid - the site's ID in NATS that member signed up for

username - the member's username

password - the member's password

cryptpass - the member's encrypted password

ip - the member's IP address that they joined with

email - the member's email

session - PHP session recorded for member

mailok - TRUE or FALSE, the member's setting if it is ok to send email

flat_price - set as initial amount

first_login - date of first login

third_party_partner_id - id if member processed transaction with third party

cascadeid - the cascade ID in NATS

cascade_item_id - cascade step ID in NATS

token - token stored for processing with certain billers

original_username - previous username for member before change

renamed - TRUE or FALSE, the member's setting if username was changed

marked - TRUE or FALSE, the member's "flagged" setting

token_hash - token hash stored for processing with certain billers

firstname - the member's firstname

lastname - the member's lastname

address1 - the member's street address, first line

address2 - the member's street address, second line

zip - the member's zipcode

city - the member's city

country - the member's 2-character country code

state - the member's state

shipping_firstname - the member's shipping firstname

shipping_lastname - the member's shipping lastname

shipping_address1 - the member's shipping address, first line

shipping_address2 - the member's shipping address, second line

shipping_zip - the member's shipping zipcode

shipping_city - the member's shipping city

shipping_country - the member's shipping country

shipping_state - the member's shipping state

phone - the member's phone number

xsell_success - TRUE or FALSE, if successfull xsell associated with member, used by certain billers

xsell_message - response for xsell, used by certain billers

custom1 - the member's custom1 field

custom2 - the member's custom2 field

custom3 - the member's custom3 field

custom4 - the member's custom4 field

custom5 - the member's custom5 field

last_modified - date row was last updated for table

member_subscription_id - the member's subscription ID in NATS

memberidx - the member's subscription id provided by biller

billerid - the biller ID in NATS the member used when signing up

statid - reserved for future use

cost - total payouts to affiliates and site partners

cost_charge - total amount of payouts and biller fees

spent - total amount member spent on subscription

refunded - total amount refunded to member on subscription

charges - total amount of biller fees

next_rebill - date of next rebill

optionid - id of join option in NATS

rebills - number of sucessful rebills on subscription

active - TRUE or FALSE, whether member is active

upgradeid - upgrade id sent to us by certain billers

expires - when the subscription will expire

nats_expires - expiration date set in NATS

biller_expires - expiration date set by biller

original_optionid - previous join option

created_date - date subscription created

loginid_assigned - affiliate id associated with member

identid_assigned - identifier id associated with member signup

gateway_token - token provided by gateway biller

passthrough1 - extra data/info passed by biller

passthrough2 - extra data/info passed by biller

passthrough3 - extra data/info passed by biller

passthrough4 - extra data/info passed by biller

passthrough5 - extra data/info passed by biller

campaignid - id of campaign in NATS

programid - id of program in NATS

tourid - id of tour in NATS

adtoolid - id of adtool in NATS

subid1 - reserved for future use

subid2 - reserved for future use

countryid - id of country where signup originated

promotionalid - id of promotional in NATS

loginid_nice - affiliate username