Upgrade Product

upgradeproduct

Purpose

This command allows you to calculate the cost for an upgrade or downgrade of a product/service, and create an order for it.

Attributes

  • serviceid - the service ID to be upgraded
  • type - either "product" or "configoptions"
  • newproductid - if upgrade type = product, the new product ID to upgrade to
  • newproductbillingcycle - monthly, quarterly, etc...
  • configoptions - if upgrade type = configoptions, an array of config options

Optional Attributes

  • promocode - associate a promotion code with the upgrade
  • calconly - set true to just validate upgrade and get price, false to actually create order
  • ordernotes - any notes to add to the order

Example Command

$postfields = array();
$postfields["responsetype"] = "json";

$postfields["action"] = "upgradeproduct";
$postfields["serviceid"] = "1";
$postfields["type"] = "product";
$postfields["newproductid"] = "2";

$result = mikrovps_SendCommand( $postfields );

Successful Response

oldproductid = the existing product ID
oldproductname = the existing product name
newproductid = the product ID being upgraded to
newproductname = the name of the product being upgraded to
daysuntilrenewal = days until next due date of the product
totaldays = totals days in the current cycle
newproductbillingcycle = the new billing cycle being upgraded to
price = the amount due to upgrade
orderid = the order ID
order_number = the order number
invoiceid = the invoice ID for the order

Error Response

result=error
message=Service ID not found
Given service ID is not found in the database.
  • 0 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

Add Cancel Request

addcancelrequest Purpose This command is used to Add Cancellation Request for a specific...

Add Contact

addcontact Purpose This command is used to create a new contact under an account. Attributes...

Delete Contact

deletecontact Purpose This command is used to delete a contact in the system. Attributes...

Get Clients Details

getclientsdetails Purpose This command is used to retrieve all the data held about your...

Get Clients Addons

getclientsaddons Purpose This command is used to obtain the addons associated with a client...