Sample Hosting API Flow and some Notes

Buying Process for a Hosting Plan or Custom Package

  1. Retrieve all Product Keys: First get the list of Product Keys from your local store. These Product keys are currently:
     
    • lhbbudgetusa
    • lhbbudgetplanus
    • w2kbudgetusa
    • w2kbudgetplanus
    • lhbpremiumusa
    • w2kpremiumusa
    • mailboxbudgetusa
    • mailboxbudgetplanus
    • mailboxpremiumusa
       
  2. Retrieve Hosting Plans for a Product Key: Now use WebHostingOrderData.getHostingPlans() to get the 3 hosting plans (premium, budget and custom) available per product key except for lhbbudgetplanus, w2kbudgetplanus and mailboxpremiumusa. Each of these three product keys have the custom build feature disabled and are associated with only 2 hosting plans, premium and standard. The return value is a hash of hashes with a serial number as the key. Per plan, the most important information is the planid, the planname and the totalprice. Use OrderSetup.getPricingKeyDisplayName() and OrderSetup.getPricingParamsDisplayName() to get the standard names for these values to build you display. You can also use getMonthlyCostAndValidate() under the appropriate HostingOrder class to get the pro-rata pricing for the plan.
     
  3. Buy a Hosting Plan: Use add() under the appropriate HostingOrder class to add an order. Be sure to pass in 'planid' as the key and the actual plan id as the value. You can specify the invoice options as well.
     
  4. Buy a Custom Package: Use OrderSetup.getPricingKeyPricingParamMap() to get a list of all pricing keys and their related pricing params. Once more, you can use OrderSetup.getPricingParamsDisplayName() and OrderSetup.getPricingKeyDisplayName() to get the standard names for these values to build you display. You can also use getMonthlyCostAndValidate() under the appropriate HostingOrder class to get the pro-rata pricing for the package. Calling fetchAlternateLocationDetailsAndMonthlyCosts() under the appropriate HostingOrder class will give you the cost for a similiar order configuration at an alternate location. Once everything is set, you call add() under the appropriate HostingOrder class and passing it all the key:value pairs required.

 

Modifying a Hosting Plan or Custom Package

Reference: Renewing/Upgrading/Downgrading/Deleting a Web Hosting package >>

  1. Retrieve the price of the new modification: First call getModPricing() under the appropriate HostingOrder class to get the pricing for the modifications you wish to make, passing in all the key:value pairs, not just the ones which have changed.
     
  2. Modify the order: Now call mod() under the appropriate HostingOrder class and pass it a complete hash once more, with all the keys and their related values, not just the ones which have changed.

 

Deleting a Hosting Plan or Custom Package

Reference: Renewing/Upgrading/Downgrading/Deleting a Web Hosting package >>

Simply call del() under the appropriate HostingOrder class with the appropriate orderid.

 

Renewing a Hosting Plan or Custom Package

Reference: Renewing/Upgrading/Downgrading/Deleting a Web Hosting package >>

Simply call renew() under the appropriate HostingOrder class with the appropriate orderid and the months to renew for.
 

IMPORTANT

The system allows you to create an infinite number of Resellers and Sub-Resellers, each with customers under them. Orders can be placed only on behalf of the Customers and cannot be owned by Resellers or their Sub-Resellers directly. You can create as many Customers as you wish.
Click here to read about Customers and Sub-Resellers >>

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Reseller Account Startup Guide

As a Reseller, you need to make the following settings within your Reseller Control Panel...

Video Tutorials

Below, you will find a list of video tutorials that will familiarize you with our system....

Creating a Demo Reseller Account

To understand and evaluate the interfaces and API we provide, you can use the Demo interface....

What is SuperSite?

SuperSite is a complete private-labeled Website for you and your Resellers. Here, your Customers...

What is PartnerSite?

PartnerSite is a complete private-labeled website to jumpstart your wholesale Business. In...

Powered by WHMCompleteSolution