NATS4 API Get Member Upsell String

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
GET /adtools/types
GET /adtools/categories
GET /adtools/admin
POST /adtools/importdump
GET /affiliate/hitdata
GET /affiliate/campaigns
GET /affiliate/payout
GET /affiliate/searchinfo
POST /affiliate/addaffiliate
POST /affiliate/invoice
PATCH /affiliate/setcustoms
PATCH /affiliate/setinformation
PATCH /affiliate/setadminsettings
PATCH /affiliate/setpayviainfo
PATCH /affiliate/setdefaults
PATCH /affiliate/setsettings
GET /decodenatscode
GET /member/upsellstring
GET /member/tokenrebuystring
GET /member/instantupgradestring
GET /member/packageupgradestring
GET /member/details
GET /member/cancelstring
GET /member/signupplusstring
GET /member/searchinfo
POST /member/addnote
POST /member/recordlogin
PUT /member/expiremanual
PATCH /member/setdetails
PATCH /member/setexpiration
GET /option/getrule
POST /option/addrule
PUT /option/edittext
PATCH /option/editrule
GET /payments/getpayments
PATCH /payments/setstatus
GET /payviarule
PATCH /payviarule
GET /ping
GET /profitlossreport
POST /sendemail
GET /suggestedcanceloffers

The Get Member Upsell String API function is a feature in NATS4 that allows you to perform upsells for members using an API call.

Filters

These are parameters used to specify which member you're looking for. This function will only return one member; use these filters to choose which one.

  • memberid
  • session
  • siteid
  • siteids
  • username

In order to get a return from this function, you must use a combination of these filters when requesting information. The possible combinations here are:

  • memberid and session
  • username and siteid
  • username and siteids

Examples

Requests

The following are examples of the requests you can make with this API function:

Note: This API function will only look up active members. Looking up an inactive or expired member will cause a blank return.

Member ID and Session

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl">
<SOAP-ENV:Body>
 <tns:get_member_upsell_string xmlns:tns="urn:natsapiadmin_wsdl">
  <memberid xsi:type="xsd:int">544</memberid>
  <session xsi:type="xsd:string">797e62f8f1dfbe20f7c6c37754e0b880</session>
 </tns:get_member_upsell_string>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Username and Site ID

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl">
<SOAP-ENV:Body>
 <tns:get_member_upsell_string xmlns:tns="urn:natsapiadmin_wsdl">
  <username xsi:type="xsd:string">testuser</username>
  <siteid xsi:type="xsd:int">1</siteid>
 </tns:get_member_upsell_string>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Username and Site IDs

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl">
<SOAP-ENV:Body>
 <tns:get_member_upsell_string xmlns:tns="urn:natsapiadmin_wsdl">
  <username xsi:type="xsd:string">testuser</username>
  <siteids xsi:type="xsd:string">1,2,3,4</siteids>
 </tns:get_member_upsell_string>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Responses

You will get a response similar to:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl">
<SOAP-ENV:Body>
 <ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl">
  <return xsi:type="tns:string">cb7a4e50fbab656832aa30b5e2d8dea9</return>
 </ns1:get_member_upsell_stringResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If you make an incorrect request, your response will be similar to:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl">
<SOAP-ENV:Body>
 <ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl">
  <return xsi:type="tns:string"></return>
 </ns1:get_member_upsell_stringResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

In the 'bad' response output, the get_member_upsell_string will be returned as blank.

NuSOAP Example

(continuing from main article NuSOAP Example):

memberid and session

$values = array(
        'memberid' => 544,
        'session' => '797e62f8f1dfbe20f7c6c37754e0b880'
);
 
$result = $client->call('get_member_upsell_string', $values, 'natsapiadmin_wsdl');

username and siteid

$values = array(
        'username' => testuser,
        'siteid' => '1'
);

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

username and siteids

$values = array(
        'username' => testuser,
        'siteids' => '1,2,3,4'
);

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