|
Version: 1
HCnix Build: 3.00 and later
API Build: 1.00 and later
Plan Manager - SwitchPlan changes the user current plan to the new selected one. This web service call can be made as http://your-domain.com/HCnixAPI/PlanManager.asmx?op= SwitchPlan.
Input Parameters
HostUserName
HostPassword
OwnerName - user name whose sold addons you want to retrieve
SoldPlanID - unique identification number of sold plan instance whose addon you want to retrieve
OwnerName - Host Name for getting all details.
NewPlanName
SoldPlanID
OptionalParam
PlanDuration
SwitchType
Language
Output Parameters
N/A
Sample Optional Parameters
<Parameters>
<Parameter Name = " PlanDuration ">3 month</Parameter>
<Parameter Name = "Language">French</Parameter>
</Parameters>
Sample SOAP Request
POST /HCnixAPI/UserManager.asmx HTTP/1.1
Host: your-domain.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/SwitchPlan"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
< SwitchPlan xmlns="http://tempuri.org/">
<HostUserName>host</HostUserName>
<HostPassword>host123</HostPassword>
<OwnerName>reseller</ OwnerName >
<NewPlanName >Gold Plan</ NewPlanName >
<SoldPlanID>host10</ SoldPlanID >
<OptionalParam>xml</OptionalParam>
</ SwitchPlan >
</soap:Body>
</soap:Envelope>
Sample HTTP Request
POST /HCnixAPI/UserManager.asmx/SwitchPlan HTTP/1.1
Host: your-domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
HostUserName=host&HostPassword=host123&OwnerName=david&newPlanName=GoldPlan&SoldPlanID=10&OptionalParam=xml
Sample Response
<Response>
<Method>SwitchPlan</ Method>
<Status>true</Status>
<ErrorCode>70100011</ErrorCode>
<ErrorDescription>Plan switch successfully.</ErrorDescription>
<Result/>
</Response>