reseller

is added when reseller has a customer specific business

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.

Deleting a Hosting Package

Additional Information

Deleting a Web Hosting package

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

Renewing a Hosting Package

Additional Information

Renewing a Web Hosting package

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

Note

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.

Additional Information

Customers and Sub-Resellers

Sample Domain Names API Flow and some Notes

Buying Process for a single Domain Name

  1. Checking Domain Availability: First call the DomOrder.checkAvailabilityMultiple() method to discover if the domain name in question is available for registration.

  2. Customer Selection/Addition: If the domain name is available, you will have to retrieve the Customer Id of the Customer who wishes to buy the it. If the Customer already exists, you can use Customer.getCustomerId() to get it or use Customer.signUp() to create a new one. The Customer Id will be in the return value in both cases.

  3. Get Registration Info: You'll need the Name Servers and the Contact Ids to register a domain name at the Registry. Get the list of existing Contacts using DomContact.listByType().

  4. Validate the parameters: Now pass all the information required to DomOrder.validateDomainRegistrationsParams() to validate them and ensure correctness.

  5. Register the Domain: Call DomOrder.addWithoutValidation() with all the parameters you've just validated and you're basically done.

Note
  • Using DomOrder.add(): The use of DomOrder.add() to register a domain is now deprecated. This method is single-threaded and inefficient and so is much slower than using steps 4 and 5 in the Buying process flow. Use the DomOrder.validateDomainRegistrationsParams(), DomOrder.addWithoutValidation() method pair instead.

  • Adding Contacts for .US and .COOP domains: The Contacts for .US and .COOP need to have addition information to be correctly added. .US requires a Nexus Category while .COOP requires a Sponsor (Co-operative Reference). When attempting to register these domains, DomOrder.validateDomainRegistrationsParams() will return "InsufficientContactDataException in DomValidation while adding order" in the status has under the error key. When you see this error, you should use DomContactExt.setContactDetails() to set the relevant additional information and try again. If you attempt to call DomOrder.addWithoutValidation() with these incomplete Contacts for .US or .COOP, you will get "Error during adding Contact" in the status hash under the error key.

Modifying Domain Name Details

There is no single DomOrder.mod() method. Rather, you must call the relevant method to modify the appropriate property of a domain name. For example, to modify the Domain Secret, call DomOrder.modifyDomainSecret() and so on.

Modifying Domain Contact Details

There is a bit of a niggle when modifying the Contacts to be used by a domain name. One can first get the Contact Ids for a particular domain name by calling DomOrder.getDetails() with the orderid and ContactIds in the options Vector. We can then use DomContact.listNames() to get a list of all Contacts belonging to a particular Customer and show this in a list on the screen. We can then use DomOrder.modifyContact() to modify the Contacts being used.

If the Customer chooses to modify the Registrant Contact, then we should check if it is fit to be used in such a manner by calling DomContactExt.isValidRegistrantContact(). Some Registries like .US and .COOP require additional information and this can be supplied to the Contact with a call to DomContactExt.setContactDetails() if DomContactExt.isValidRegistrantContact() returns false.

If an attempt is made to use an incorrect Contact Id (one which would fail the DomContactExt.isValidRegistrantContact() test), then a InsufficientContactDataException is thrown. You can catch it and then set the details using DomContactExt.setContactDetails().

Note

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.