Difference between revisions of "NATS4 API Get Member Package Upgrade String"

From TMM Wiki
Jump to navigationJump to search
m
 
(One intermediate revision by the same user not shown)
Line 84: Line 84:
 
<SOAP-ENV:Body>
 
<SOAP-ENV:Body>
 
  <ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl">
 
  <ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl">
   <return xsi:type="tns:string">cb7a4e50fbab656832aa30b5e2d8dea9</return>
+
   <return xsi:type="tns:string"></return>
 
  </ns1:get_member_upsell_stringResponse>
 
  </ns1:get_member_upsell_stringResponse>
 
</SOAP-ENV:Body>
 
</SOAP-ENV:Body>
Line 124: Line 124:
 
$result = $client->call('get_member_package_upgrade_string', $values, 'natsapiadmin_wsdl');
 
$result = $client->call('get_member_package_upgrade_string', $values, 'natsapiadmin_wsdl');
 
</pre>
 
</pre>
 +
 +
[[Category:NATS4 API Articles]]

Latest revision as of 11:45, 18 May 2011

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
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/authstring
GET /member/details
GET /member/searchinfo
GET /suggestedcanceloffers
PATCH /member/setdetails
PATCH /member/setexpiration
POST /member/addnote
POST /member/recordlogin
PUT /member/expiremanual
PATCH /member/forget
Option
GET /option/options
GET /option/rule
PATCH /option/rule
PATCH/option/text
POST /option/rule
Payments
GET /payments/getpayments
GET /payviarule
PATCH /payments/setstatus
PATCH /payviarule
Report
GET /profitlossreport
Get /transactionpayouts
GET /report/transaction
Service
GET /service/decodenatscode
GET /service/ping
POST /service/sendemail

The Get Member Package Upgrade String API function is a feature in NATS4 that allows you to upgrade any of your members' membership options 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_package_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl">
  <memberid xsi:type="xsd:int">544</memberid>
  <session xsi:type="xsd:string">797e62f8f1dfbe20f7c6c37754e0b880</session>
 </tns:get_member_package_upgrade_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_package_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl">
  <username xsi:type="xsd:string">testuser</username>
  <siteid xsi:type="xsd:int">1</siteid>
 </tns:get_member_package_upgrade_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_package_upgrade_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_package_upgrade_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_package_upgrade_string', $values, 'natsapiadmin_wsdl');

username and siteid

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

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

username and siteids

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

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