reseller

is added when reseller has a customer specific business

PHP API Kit and Integration Guide

Follow the instructions below to begin integration with the API using PHP:

Make sure you have read the General API Integration Instructions first.
If you have already integrated the PHP API Kit at your end, read the Change Log
first to know what has changed since.

Step 1. Download the API Kit

Note

The SOAP API Kits have been deprecated. We recommend using the HTTP API instead. See details

Step 2. Download the API Documentation

The complete documentation of all classes and methods available in the API can
be found in the Docs below. The Docs below are javadocs, but the function names
and explanations remain the same for all the platforms and the documentation is
self explanatory. We recommend you download the docs and read through them
completely once before you integrate your application (updated on 6th September, 2009).



Core_Docs_v3_16.zip

Domains_Docs_v3_16.zip (updated on
5th October, 2009)


Hosting_Docs_v3_16.zip

OtherProducts_Docs_v3_16.zip

Note

Since "list" is a keyword in the PHP language, the "list()"
methods in the various classes (in the PHP Kit) has been renamed to "listOrder()."
However, the documentation still mentions the method name as "list" since the
documentation is JAVA specific.

Instructions to pass parameters to functions using the PHP Kit

Since PHP uses typeless variables you will have to ignore the datatypes
presented in the docs. But for assigning values to variable of types other than
strings and integers special care will have to be taken. Below is the list of
datatypes presented in the API Doc and their usage in PHP.

Java Data

Types Assigning values in PHP

String "firstname\@secondname.com"
int 123
HashMap (Datatype for storing
name-value pair)
array("domain.com"=>"1")
Array and Vector (Datatype for
storing more than one value)
array("ns1.domain.com","ns2.domain.com")
boolean (Datatype for storing
true or false)
true / false

Examples:

  • For Calling a Function which takes a String datatype and an integer datatype
    as its paramters

    public int function1(java.lang.String userName, int parentid)

    $result = $obj->function1("firstname\@secondname.com",1);

  • For Calling a Function which takes a HashMap, a String Array and an integer
    Array as its parameters

    public java.util.HashMap function2(java.util.HashMap domainHash,
    java.lang.String[] orderby, int[] resellerId)

    and domainHash is accepting the domainname and the number of years as name value pair

    $result = $obj->function2(array("domain1.com"=>1,"domain2.com"=>2),array("column1","column2"),array(22,33))

  • For Calling a Function which takes a Vector and a boolean as its parameters

    public java.lang.String function3(java.util.Vector nameServers, boolean add)

    $result = $obj->function3(array("ns1.domain.com","ns2.domain.com"),true)

Step 3. Extract the files from the API Kit archive

You should get the following directory & files structure:

  • examples/ - Pre-written examples. You can directly run these examples to test
    API functionality

  • lib/ - The PHP class files, library files and wsdl files that you need to run
    your application

Step 4. Run the examples

You can run the pre-written examples provided in the examples folder. Note the
following steps to do so:

  1. Upload the examples and lib folders to your web server where you run your PHP scripts.
    Make sure that both these folders are uploaded to the same parent folder.

  2. You must have PHP 4 installed on the server.

  3. You must have a Demo account ready the first time. Read the General instructions if you have not yet setup
    your demo account.

    Note

    The Demo server duplicates all functionality of the live server, however all Domain
    Names will appear as available on the Demo Server. It does not query the live
    registry and therefore names which are not available on the live registry will
    still appear as available on the Demo Server. At times connectivity to the DEMO
    Registry may be down resulting in errors.

  4. Make the appropriate changes to constants.php in the examples folder, by putting in the values for your SERVICE_USERNAME,
    SERVICE_PASSWORD, SERVICE_PARENTID. The remaining settings have already been made for you in this file. You may only need to change the path for the lib
    folder if you have uploaded the lib folder elsewhere.

  5. The URL to which the call is made is maintained in the config.php file inside the "lib" folder. By default all calls are made to the demo server URL using HTTP. You can make changes to
    this file and redirect your calls to the appropriate server.

    Note

    If you are using HTTPS calls you MUST have the extension for CURL installed and enabled
    in your PHP installation.

  6. Another important parameter maintained in the config.php file is the variable $DEBUG. If this variable is set to true, then for each call you will see the entire XML Request and
    Response in the output. You should keep it to true during testing, but set it to false on the live environment.

  7. Every Example file has a set of functions which you can run.

  8. Once you have modified the appropriate example file, access it over your webserver by
    putting in your URL such as
    https://yourserver/examples/html and choose the required function from the links given in the left frame.

Note

In registering/managing any domain name on the demo server always use
ns1.onlyfordemo.net and ns2.onlyfordemo.net as your nameservers. ANY OTHER Nameserver will result in an
INVALID NAMESERVER error.

Step 5. Understanding Errors

Make sure you have read the General API Integration Instructions to obtain links to the error format and possible error documents.

Step 6. Writing your own code

After running each example above, if you simply refer to the corresponding .php
file in the examples folder you will easily be able to figure out the code
snippet you need to write in order to make a similar call.

Making an API call to perform any action is a matter of three steps:

  1. Include the appropriate PHP Class file as below -

    include($LIB_DIR."Order.class.php");

  2. Obtain a pointer to the required Class. This is done by using the code
    below -

    $serviceObj = new Order($LIB_DIR . "wsdl/Order.wsdl");

  3. Call the required method on this object. A complete reference of all
    methods is available in the Docs folder. This can be achieved by using the code
    below -

    $AssociativeArray = $serviceObj->setCustomerLock($SERVICE_USERNAME,
    $SERVICE_PASSWORD, $SERVICE_ROLE, $SERVICE_LANGPREF, $SERVICE_PARENTID, $orderId);

Note

You will notice above that EVERY method in the docs takes the same first 5 parameters as below -

String SERVICE_USERNAME, String SERVICE_PASSWORD, String SERVICE_ROLE, String SERVICE_LANGPREF, int SERVICE_PARENTID

In the examples these parameters have been put into a single constants file from which they are accessed by including
the constants file. These parameters are common no matter which method you call. These parameters mean the following:

String SERVICE_USERNAME: Your Username

String SERVICE_PASSWORD: Your Password

String SERVICE_ROLE: This will always be a string reseller

String SERVICE_LANGPREF: The 2 letter code of the language in which you wish to receive errors and descriptions - en for English

int SERVICE_PARENTID: The ID of your parent which you can get from your profile section

Note

Remember, when passing numerical data in hashtables, please ensure that the number is passed as a String.

Step 7. Change the information to Live information when you are ready

Once you have followed the steps above and got the test examples to work
successfully, you can duplicate the same code in your live application and
replace the Demo Server and Reseller account information with your live username
and password. The URL that you make your calls to also needs to change to the
LIVE Server URL. You will make this change in the config.php file in the lib folder.

Note

If you are using HTTPS calls you MUST have the extension for CURL installed and enabled
in your PHP installation.

Change Log

Changes in version 3.16

  1. Java Docs updated

  2. Changes related to methods:

    New Methods

    activateMailForwardService() method introduced under the MailFwdOrder class of Domains Kit

    Deprecated Methods

    Methods deprecated under the MailFwdOrder class of Domains Kit:

    • list()

    • add()

    • renew()

    • mod()

    • del()

    • addForward()

    • modForward()

    • delForward()

    • getDetails()

    • getDetailsByDomain()

    • getOrderIdByDomain()

 

Changes in version 3.15

  1. Java Docs updated

  2. Changes related to methods:

    New Methods

    • Domains Kit

      • Methods introduced under the DomOrder class:

        • cancelTransfer()

        • resendTransferAuthorizationMail() (renamed from resendTransferAuthorzationMail())

      • Methods introduced under the DomFwdOrder class:

        • setupDomainFwdService()

        • manageDomainForwardService()

    • Hosting Kit

      enableSSL() method introduced under LinuxHostingOrder and WindowsHostingOrder classes

    Deprecated Methods

    Methods deprecated under the DomFwdOrder class of Domains Kit:

    • getDetails()

    • getDetailsByDomain()

    • renew()

    • manage()

    • deleteService()

    • add()

    • list()

    • mod()

 

Changes in version 3.14

  1. Java Docs updated

  2. Deprecated methods:

    • Core Kit

      • Methods deprecated under the Fund class:

        • getDeletedRefundDetails()

        • listBalancedTransactions()

    • Hosting Kit

      • Methods deprecated under LinuxHostingOrder and WindowsHostingOrder classes:

        • getModPricing()

        • mod()

      • Method deprecated under LinuxHostingSetup and WindowsHostingSetup classes:

        • getHostingParamsDisplayName()

 

Changes in version 3.13

  1. Java Docs updated

  2. Changes related to classes & methods:

    New Classes and Methods

    Methods introduced under a new class, DotTel of Domains Kit:

    • modifyWhoisPreference()

    • getCTHLoginDetails()

    Deprecated Methods

    Methods deprecated under the MailHostingOrder class of Hosting Kit:

    • mod()

    • getModPricing()

 

Changes in version 3.12

  1. Java Docs updated

  2. Changes related to methods:

    New Methods

    • Domains Kit

      • setupDNSService() method introduced under the ZoneOrder class

      • Methods introduced under the DomOrder class:

        • restore()

        • resendTransferAuthorzationMail()

    • Other Products Kit

      • renewCertificate() method introduced under the DigitalCertificateOrder class

    Deprecated Methods

    • Domains Kit

      • Methods deprecated under the ZoneOrder class:

        • add()

        • mod()

        • renew()

        • del()

        • list()

        • getDetails()

        • getDetailsByDomain()

        • getOrderIdByDomain()

    • Other Products Kit

      • renew() method deprecated under the DigitalCertificateOrder class

 

PHP5 compatible API Kits

Following changes made in all the four Kits:

  • All references to soapclient class renamed as soapclient_nusoap class in nusoap.php and all class files under the lib directory.

  • The PrintCustomerData() method in response.class.php file has been removed.

 


.TEL specific changes

If the Registrant of a .TEL domain name is an Individual, he/she has an option not to have his/her personal information displayed in the Whois. The Registrant can choose to have this option enabled/disabled at the time of Registration.

In order to accomplish this, you need to pass the following information in the extraInfo parameter under the registerDomain method of the DomOrder class. The DomOrder class is included in the Domains Kit:

Key Value
WhoisType Legal (default value; applicable if the Registrant is an Organization) Natural (applicable if the Registrant is an Individual)
Publish Not Applicable N (hides the Contact details in the Whois)



Y (displays the Contact details in the Whois)

However, if the Registrant of a .TEL domain name is an Organization, then the complete Contact details are displayed in the Whois. In this case, you need not make any changes to the registerDomain call.

 


Changes in version 3.11

  1. Java Docs updated

  2. Changes related to methods:

    New Methods

    • Other Products Kit

      • modOrderFTPDetails() methos under the SiteBuilder class

      • addCertificate() method under the DigitalCertificate class

    • Core Kit

      • delete() method under the Customer class

      • listCurrentActions() and listArchivedActions() methods under the Order class

    Changed Methods

    • DigitalCertificate class of Other Products Kit

      • renew() method (added new parameter approverEmail)

      • reissue() (added new parameters additionalLicenses,
        orgName, orgStreet, orgCity, orgRegion, orgZip, orgCountry, orgPhone)

    • Customer & Reseller class of Core Kit

      • Changed parameter names of username and passwd to
        emailAddress and password respectively.

    Removed Methods

    • Hosting Kit

      • fetchAlternateLocationDetailsAndMonthlyCosts() method
        of MailHostingOrder class

      • fetchAlternateLocationDetailsAndMonthlyCosts() method
        of LinuxHostingOrder class

      • fetchAlternateLocationDetailsAndMonthlyCosts() method
        of WindowsHostingOrder class

    Deprecated Methods

    • EntityAction class of Core Kit

      • list()

      • listArchive()

    • DigitalCertificate class of Other Products Kit

      • add()

      • changeDigicertPassword()

      • addAdditionalLicenses()

 

Changes in version 3.10

  1. Java Docs updated

  2. Changes related to classes and methods:

    New Classes and Methods

    Domains Kit
    New Class Name New Method
    ThirdLevelDotUk String invoiceOption
    ThirdLevelDotUk String existingEndTime

    New Parameters introduced in Existing Methods

    Other Products Kit
    Class Name Method Name New Parameters
    EngageOrder renew String invoiceOption
    EngageOrder renew String existingEndTime

    Deprecated Parameters in Methods

    Domains Kit
    Class Name Method Name Deprecated Parameters
    ZoneOrder add "No Of Records" in DomainHash

    Deprecated Methods


    Domains Kit
    Class Name Deprecated Method Suggested Class Suggested Method
    DomContact addDefaultContact DomContact addDefaultContacts
    DomContact add DomContact addContact
    DomContact list DomContact listByType
    DomContactExt isValidRegistrantContact DomContactExt isValidContact
    DomOrder transferDomain DomOrder addTransferDomain
    DomOrder add DomOrder registerDomain
    ZoneOrder mod ZoneOrder Functionality not
    required anymore
    DotEu tradeDomain DotEu trade
    DotEu transferDomain DotEu transfer
    DotEu add DomOrder registerDomain
    Core Kit
    Class Name Deprecated Method Suggested Class Suggested Method
    Customer addCustomer Customer signUp
    Customer modDetails Customer mod
    Reseller addReseller Reseller signUp
    Reseller modDetails Reseller mod
    Reseller  addResellerWithStateId Reseller Functionality not required anymore
    OrderSetup getResellerSlabPercentageForProducts OrderSetup Functionality not required anymore
    OrderSetup getCustomerSlabPercentage OrderSetup Functionality not required anymore

 

Changes in version 3.9

  1. Java Docs updated

  2. Changes related to classes and methods:

    The following method in the Domains Kit is deprecated and its use should be discontinued -

    Deprecated method Class New method to be used
         
    isValidRegistrantContact DomContactExt isValidContact

 

Changes in version 3.8

  1. Java Docs updated

  2. Changes related to classes and methods:

    • The following changes have been introduced under the DotEu class within the Domains Kit -

      • New methods

        • trade

        • transfer

      • Deprecated methods

        • tradeDomain

        • transferDomain

    • The following new methods have been introduced under DigitalCertificateOrder class within the Other Products Kit -

      • enrollForThawteCertificate

      • reissue

      • renew

      • checkDigitalCertificateStatus

      • del

      • cancelDigicertOrder

      • changeDigicertPassword

      • addAdditionalLicenses

      • getDetails

      • getDetailsByDomain

      • getOrderIdByDomain

 

Changes in version 3.7

  1. Java Docs updated

  2. Changes related to classes and methods:

    Some old parameters have been removed and new parameters introduced in their place under the following methods -


    LinuxHostingOrder Class
    Method Old Parameter New Parameters
    add Hashtable orderParams String packageKey*,
    boolean ssl#
    mod Hashtable orderParams String packagekey*,
    boolean ssl#,
    int excessBandwidth##
    getMonthlyCostAndValidate Hashtable orderParams String packageKey*,
    boolean ssl#,
    int execessBandwidth##
    getModPricing Hashtable orderParams String
    packageKey*, boolean ssl#,
    int execessBandwidth##

    WindowsHostingOrder Class
    Method
    Old Parameter
    New Parameters
    add Hashtable orderParams String packageKey*,
    boolean ssl#
    mod Hashtable orderParams String packagekey*,
    boolean ssl#,
    int excessBandwidth##
    getMonthlyCostAndValidate Hashtable orderParams String packageKey*,
    boolean ssl#,
    int execessBandwidth##
    getModPricing Hashtable orderParams String packageKey*, boolean ssl#,
    int execessBandwidth##


    MailHostingOrder Class
    Method
    Old Parameter
    New Parameters
    add Hashtable orderParams String packageKey*
    mod Hashtable orderHash String packagekey*,
    int additionalMailBoxes**
    getMonthlyCostAndValidate Hashtable orderParams String packageKey*,
    int additionalMailBoxes**
    getModPricing Hashtable orderParams String packageKey*, int
    additionalMailBoxes**


    SiteBuilder Class
    Method Old Parameter New Parameters
    mod Hashtable orderParams String packageKey*
    getMonthlyCostAndValidate Hashtable orderParams String packageKey*

    Note
    • *packageKey will be the Identifier Key of the Plan (plan1, plan2, plan3, plan4) for which the Order needs to be added/modified.

    • # ssl will be true or false depending whether the user wants Dedicated IP / SSL for the Order placed.

    • ## excessBandwidth is the Bandwidth which the user wants over and above the Bandwidth of the Order's current plan.

    • ** additionalMailBoxes is the number of additional mail boxes over and above the existing ones in blocks of 100 accounts.

  3. The following classes and their methods are removed:

    • LinuxHostingPlanOnlyOrder

    • WindowsHostingPlanOnlyOrder

    • MailHostingPlanOnlyOrder

    • SiteBuilderPro

  4. The SiteBuilderLite class has been renamed to SiteBuilder.

  5. Two new methods, mod and signUp, have been introduced under the Reseller and Customer classes.

  6. The return type of the ListByType method of DomContact class in the Domains Kit has been changed to Hashtable from Vector.

 

Changes in version 3.6

  1. Java Docs updated

  2. Changes related to classes and methods:

    • New methods have been added in the Core Kit under the following class:

      • getProductMetadata - Product class

    • New methods have been added in the Domains Kit under the following classes:

      • getDefaultContactId - DomContactExt class

      • listByType - DomContact class

      • addTransferDomain - DomOrder class

      • changePrivacyProtectionStatus - DomOrder class

      • registerDomain - DomOrder class

    • Changes to the DomOrder class in Domains Kit:

      • Privacy Protection Handling is added in the bulkAdd and bulkAddTransferDomain methods.

      • The ns parameter has been removed from the validateDomainTransferParams method.

    • The following methods in the Domains Kit are deprecated and their use
      should be discontinued:

      Deprecated method Class New method to be used
           
      add DomContact addContact
      addDefaultContact DomContact addDefaultContacts
      list DomContact listByType
      add DomOrder registerDomain
      transferDomain DomOrder addTransferDomain
      transferDomainWithoutValidation DomOrder addTransferDomain
      addTransferDomainWithoutvalidation DomOrder addTransferDomain
      add DotEu registerDomain in DomOrder class
      Note

      While these methods are currently available, they are no longer supported and may be discontinued in the near future.

    • New methods have been added in the Hosting Kit under the following class:

      • getHostingMetaData - WebHostingOrderData class

    • Changes to classes in the Hosting Kit:

      The invoiceOption parameter has been added to the add method of MailHostingPlanOnlyOrder, WindowsHostingPlanOnlyOrder and LinuxHostingPlanOnlyOrder classes

Changes in version 3.5

  1. Java Docs updated

  2. Changes related to classes and functions:

    • New functions have been added in the Core Kit under the following classes:

      • getList - Country class
        getStateListForCountry - Country class

      • getDetails - Order class

      • addResellerWithStateId - Reseller class

    • An extra option called Supersite is added in the getDetails function of the Reseller class in the Core Kit.

    • A new class LegalAgreement is added with the following methods under the Core Kit:

      • getRegistrantAgreement

      • getProductCategory

      • getAgreement

      • getAllAgreements

    • A new function has been added in the Domains Kit under the following class:

      • addCoopContact - DotCoopContact class

    • The following functions in the DomOrder class in the Domains Kit are changed to show the Invoice options also:

      • validateDomainRegistrationParams

      • validateDomainTransferParams

      • addWithoutValidation

Changes in version 3.4

  1. Java Docs Updated

  2. New Classes introduced in all Kits:

    • Core Kit

      • TaxService

        • getApplicableTaxes

        • getHashedTaxRules

    • Domains Kit

      • DotEu

        • getEUCountryList

        • tradeDomain

        • transferDomain

        • add

        • isEUCountry

      • DotEuContact

        • mod

        • add

        • addEuDefaultContact

      • DomOrder

        • validateDomainRegistrationParams

        • validateDomainTransferParams

        • addTransferDomainWithoutvalidation

        • addWithoutValidation

    • Hosting Kit

      • WindowsHostingPlanOnlyOrder

        • getDetails

        • getDetailsByDomain

        • getOrderIdByDomain

        • add

        • mod

        • renew

        • del

        • getMonthlyCostAndValidate

        • getModPricing

        • getDeletionRefundAmount

      • LinuxHostingPlanOnlyOrder

        • getDetails

        • getDetailsByDomain

        • getOrderIdByDomain

        • add

        • mod

        • renew

        • del

        • getMonthlyCostAndValidate

        • getModPricing

        • getDeletionRefundAmount

      • MailHostingPlanOnlyOrder

        • getDetails

        • getDetailsByDomain

        • getOrderIdByDomain

        • add

        • mod

        • renew

        • del

        • getMonthlyCostAndValidate

        • getModPricing

        • getDeletionRefundAmount

        • list

      • MailHostingSetup

        • getHostingKeyDisplayName

        • getHostingParamsDisplayName

        • getPricingKeyPricingParamMap

      • WindowsHostingSetup

        • getHostingKeyDisplayName

        • getHostingParamsDisplayName

        • getPricingKeyPricingParamMap

      • LinuxHostingSetup

        • getHostingKeyDisplayName

        • getHostingParamsDisplayName

        • getPricingKeyPricingParamMap

    • Other Products Kit

      • DigitalCertificateOrder

        • add

        • getCertPrice

      • SiteBuilderSetup

        • getPricingKeyPricingParamMap

        • EngageSetup

          • getPricingKeyPricingParamMap

Changes in version 3.3

  • Short tags have been removed from the response.php file.

  • 3 new functions have been added in the Core Kit under the following classes:

    • authenticateCustomerId - Customer class

    • login - Customer class

    • getOrderIdByDomainAndProductCategory - Order class

    • Bug Fix - A minor Java Script problem was causing the frame links in the examples to not work in some browsers like Mozilla and Opera.

Changes in version 3.2.1

  • WSDL Endpoint changed

Changes in version 3.2

  • New methods added viz. Order.removeCustomerLock, Order.getLockList

  • The testing form provided now has a third frame which accepts the standard parameters passed in every call. If you set these parameters from the form, you can make test calls independent of the settings in the properties/constants file.

Changes in version 3.1

  • Minor bugs in WSDL files fixed.

Changes in version 3.0

  • Extensive changes made. Please download the kit and read the appropriate Javadocs for details.

Changes in version 2.6

  • Added the method Customer.delete() which allows you to delete a Customer

  • Added the method DomOrder.cancelTransferRequest() which allows you to cancel the transfer-in request for a domain name

  • Added the method Order.sendRfa() which allows you to re/send the email asking for transfer-in approval for domain names.

Changes in version 2.5.1

  • Bug fix in Domain.BulkLockOrder().

Changes in version 2.5

  • Bug fix in Modify Customer Details and Modify Contact Details forms

  • More details in the Javadocs for DomOrder.getDetails()

  • Link to new Demo Server added.

Changes in version 2.4

  • Removed Function Overloading

Changes in version 2.3

  • Move Service functionality added in API

  • Add Funds functionality for both Sub-Resellers and Customers also added.

  • Domain Forwarding, Mail Forwarding, Managed DNS Products now available through the API.

Changes in version 2.2

  • In customer.class.php, a new function is added to authenticate the Customer.

Changes in version 2.1

  • In nusoap.php changes are made to handle boolean data.

Changes in version 2.0

DomUsContact class

  • API for DomUsContact class is provided.

  • The characteristics of DomUsContact class includes the function setContactDetails() that needs to be called for any contact used as the Registrant contact for .US domain names for providing applicationPurpose and nexusCategory facility.

New utility class Response class is introduced, which can be used for formatted output. The characteristics of the Response class are listed below:

  • Member variables stores the error status if error occurred.

  • isError() can be invoked to check whether error occurred or not.

  • getResult() can be invoked to obtain Data if there is no error.

  • Two print methods are provided to print error(printError()) or result(printData($dataToPrint)), which can be used to print the output.

listContact() function

  • listContact() function of DomContact class can now be available to Reseller role also.

  • The function signature of listContact() is also changed.

  • One has to pass Customer Id after Parent Id besides other parameters.

getCustomerAvailableBalance() fuction

  • getCustomerAvailableBalance() function is added to the Fund.class

  • This function returns the available balance of a Customer.

getCustomerId() function

  • getCustomerId() function is added to the Customer.class.

  • This function returns the customer id of the Customer.

Java API Kit and Integration Guide

Follow the instructions below to begin integration with the API using Java:

Make sure you have read the General API Integration Instructions first. If you have already integrated the Java API Kit at your end, read the Change Log first to know what has changed since.

Step 1. Download the API Kit

Note

The SOAP API Kits have been deprecated. We recommend using the HTTP API instead. See details

Step 2. Download the API Documentation

The complete documentation of all classes and methods available in the API can be found in the Docs below. The Docs below are javadocs, but the function names and explanations remain the same for all the platforms and the documentation is self explanatory. We recommend you download the docs and read through them completely once before you integrate your application (updated on 6th September, 2009).

Core_Docs_v3_16.zip

Domains_Docs_v3_16.zip

Hosting_Docs_v3_16.zip

OtherProducts_Docs_v3_16.zip

Step 3. Extract the files from the API Kit archive

You should get the following directory & files structure:

WEB-INF/classes/ - Precompiled examples. You can directly run the examples to test API functionality

examples/src/ - The examples for using the API

WEB-INF/lib/ - The jar files that you will need in order to compile/run the classes

WEB-INF/build.xml - The API archive also contains a build.xml file. You can use this file to build the examples using Ant.

The Ant target to build the examples is build. If you do not want to use Ant, you can just compile the files in the src folder. You will need to include the jar files provided in the lib folder while compiling the classes.

Step 4. Run the examples

You can run the precompiled examples provided in the classes folder. Note the following however:

  1. Upload the classes and lib folders to your server. Make sure that both these folders are uploaded to the same parent folder.

  2. You must have a Demo account ready the first time. Read the General instructions if you have not yet setup your demo account.

    Additional Information

    General API Integration Instructions

    Note

    The Demo server duplicates all functionality of the live server, however all Domain Names will appear as available on the Demo Server. It does not query the live registry and therefore names which are not available on the live registry will
    still appear as available on the Demo Server. At times connectivity to the DEMO Registry may be down resulting in errors.

  3. Make the appropriate changes to the settings.properties file in the WEB-INF\classes\com\logicboxes\properties folder, by putting in the values for your ResellerUsername, ResellerPassword and ParentId. The remaining settings have already been made for you in this file.

  4. The URL to which the call is made is maintained in the settings.properties file inside the WEB-INF\classes\com\logicboxes\properties folder. By default, all calls are made to the demo server URL using HTTP. You can make changes to this file and redirect your calls to the appropriate server.

    Note

    If you are using HTTPS calls you MUST have JDK 1.4 or greater installed. HTTPS calls will not work with JDK 1.3 or lower.

  5. Set your class path to include the bin folder and EVERY jar file in the lib folder. You would use the following command for that -

    Windows


    set CLASSPATH=%CLASSPATH%;
    /classes;
    /aaxerces-1_4_3.jar;
    /axis.jar;

    /commons-discovery.jar;
    /commons-logging.jar;
    /jaxrpc.jar;
    /junit.jar;
    /logicboxes-sfnb-v2.jar;
    /saaj.jar;

    /servlet.jar;
    /wsdl4j.jar

    Linux


    set CLASSPATH=$CLASSPATH:
    /classes:
    /aaxerces-1_4_3.jar:

    /axis.jar:
    /commons-discovery.jar:
    /commons-logging.jar:
    /jaxrpc.jar:
    /junit.jar:
    /logicboxes-sfnb-v2.jar:

    /saaj.jar:
    /servlet.jar:
    /wsdl4j.jar

  6. Run the java program using the command line below


    java -classpath $CLASSPATH com.logicboxes.foundation.sfnb.user.CustomerServiceLocator

    To find out the parameters that the command above takes you can simply choose to not pass any parameter the first time you run it. The example will print out the parameters that it expects.

    Note

    In registering/managing any domain name on the demo server always use ns1.onlyfordemo.net and ns2.onlyfordemo.net as your nameservers. ANY OTHER Nameserver will result in an INVALID NAMESERVER error.

    Follow the same instructions above to run all the examples as below:

    • Domain Contact example:


      java -classpath $CLASSPATH com.logicboxes.foundation.sfnb.order.DomainContactServiceLocator

    • Domain example:


      java -classpath $CLASSPATH com.logicboxes.foundation.sfnb.order.DomainServiceLocator

    • Fund example:


      java -classpath $CLASSPATH com.logicboxes.foundation.sfnb.management.FundServiceLocator

Step 5. Understanding Errors

Make sure you have read the General API Integration Instructions to obtain links to the error format and possible error documents.

Additional Information

General API Integration Instructions

Step 6. Writing your own code

After running each example above, if you simply refer to the corresponding .java file in the src folder you will easily be able to figure out the code snippet you need to write in order to make a similar call.

Making an API call to perform any action is a matter of two steps:

  1. Obtain a pointer to the required service. This is done by using the code below -


    com.logicboxes.foundation.sfnb.user.Customer customerObj = new com.logicboxes.foundation.sfnb.user.CustomerServiceLocator(serviceAddress).getCustomerService();

    In the above call serviceAddress is passed as a parameter to the constructor of CustomerServiceLocator. This serviceAddress refers to the URL of the server to which you are communicating. You can obtain this URL from the "settings.properties" file in the "WEB-INF\classes\com\logicboxes\properties" folder.

  2. Call the required method on this object. A complete reference of all methods is available in the Java Docs. This can be achieved by using the code below -


    int customerId = customerObj.addCustomer(resellerUserName, resellerPassword, "reseller",resellerLangPref, parentId, customerUsername, customerPassword, name, company,address1, address2, address3, city, state, country, zip,telNoCc, telNo, altTelNoCc, altTelNo, faxNoCc, faxNo, langPref);

Note

You will notice above that EVERY method in the java docs takes the same first 5 parameters as below -


java.lang.String userName, java.lang.String password, java.lang.String role, java.lang.String langpref, int parentid

These parameters are common no matter which method you call. These parameters mean the following -

java.lang.String userName: Your Username

java.lang.String password: Your Password

java.lang.String role: This will always be a string reseller

java.lang.String langpref: The 2 letter code of the language in which you wish to receive errors and descriptions - en for English

int parentid: The ID of your parent which you can get from your profile section

Step 7. Change the information to Live information when you are ready

Once you have followed the steps above and got the test examples to work successfully, you can duplicate the same code in your live application and replace the Demo Server and Reseller account information with your live username
and password. The URL that you make your calls to also needs to change to the LIVE Server URL. The list of URLs are available in the "settings.properties" file inside the "WEB-INF\classes\com\logicboxes\properties" folder.

Note

If you are using HTTPS calls you MUST have JDK 1.4 or greater installed. HTTPS calls will not work with JDK 1.3 or lower.

Change Log

Changes in version 3.16

  1. Java Docs updated

  2. Changes related to methods:

    New Methods

    activateMailForwardService() method introduced under the MailFwdOrder class of Domains Kit

    Deprecated Methods

    Methods deprecated under the MailFwdOrder class of Domains Kit:

    • list()

    • add()

    • renew()

    • mod()

    • del()

    • addForward()

    • modForward()

    • delForward()

    • getDetails()

    • getDetailsByDomain()

    • getOrderIdByDomain()

 

Changes in version 3.15

  1. Java Docs updated

  2. Changes related to methods:

    New Methods

    • Domains Kit

      • Methods introduced under the DomOrder class:

        • cancelTransfer()

        • resendTransferAuthorizationMail() (renamed from resendTransferAuthorzationMail())

      • Methods introduced under the DomFwdOrder class:

        • setupDomainFwdService()

        • manageDomainForwardService()

    • Hosting Kit

      enableSSL() method introduced under LinuxHostingOrder and WindowsHostingOrder classes

    Deprecated Methods

    Methods deprecated under the DomFwdOrder class of Domains Kit:

    • getDetails()

    • getDetailsByDomain()

    • renew()

    • manage()

    • deleteService()

    • add()

    • list()

    • mod()

 

Changes in version 3.14

  1. Java Docs updated

  2. Deprecated methods:

    • Core Kit

      • Methods deprecated under the Fund class:

        • getDeletedRefundDetails()

        • listBalancedTransactions()

    • Hosting Kit

      • Methods deprecated under LinuxHostingOrder and WindowsHostingOrder classes:

        • getModPricing()

        • mod()

      • Method deprecated under LinuxHostingSetup and WindowsHostingSetup classes:

        • getHostingParamsDisplayName()

 

Changes in version 3.13

  1. Java Docs updated

  2. Changes related to classes & methods:

    New Classes and Methods

    Methods introduced under a new class, DotTel of Domains Kit:

    • modifyWhoisPreference()

    • getCTHLoginDetails()

    Deprecated Methods

    Methods deprecated under the MailHostingOrder class of Hosting Kit:

    • mod()

    • getModPricing()

 

Changes in version 3.12

  1. Java Docs updated

  2. Changes related to methods:

    New Methods

    • Domains Kit

      • setupDNSService() method introduced under the ZoneOrder class

      • Methods introduced under the DomOrder class:

        • restore()

        • resendTransferAuthorzationMail()

    • Other Products Kit

      • renewCertificate() method introduced under the DigitalCertificateOrder class

    Deprecated Methods

    • Domains Kit

      • Methods deprecated under the ZoneOrder class:

        • add()

        • mod()

        • renew()

        • del()

        • list()v

        • getDetails()

        • getDetailsByDomain()

        • getOrderIdByDomain()

    • Other Products Kit

      • renew() method deprecated under the DigitalCertificateOrder class

 


.TEL specific changes

If the Registrant of a .TEL domain name is an Individual, he/she has an option not to have his/her personal information displayed in the Whois. The Registrant can choose to have this option enabled/disabled at the time of Registration.

In order to accomplish this, you need to pass the following information in the extraInfo parameter under the registerDomain method of the DomOrder class. The DomOrder class is included in the Domains Kit:

Key Value
WhoisType Legal (default value; applicable if the Registrant is an Organization) Natural (applicable if the Registrant is an Individual)
Publish Not Applicable N (hides the Contact details in the Whois)



Y (displays the Contact details in the Whois)

However, if the Registrant of a .TEL domain name is an Organization, then the complete Contact details are displayed in the Whois. In this case, you need not make any changes to the registerDomain call.

 


Changes in version 3.11

  1. Java Docs updated

  2. Changes related to methods:

    New Methods

    • Other Products Kit

      • modOrderFTPDetails() method under the SiteBuilder class

      • addCertificate() method under the DigitalCertificate class

    • Core Kit

      • delete() method under the Customer class

      • listCurrentActions() and listArchivedActions() methods under the Order class

    Changed Methods

    • DigitalCertificate class of Other Products Kit

      • renew() method (added new parameter approverEmail)

      • reissue() (added new parameters additionalLicenses, orgName, orgStreet, orgCity, orgRegion, orgZip, orgCountry, orgPhone)

    • Customer & Reseller class of Core Kit

      • Changed parameter names of username and passwd to emailAddress and password respectively.

    Removed Methods

    • Hosting Kit

      • fetchAlternateLocationDetailsAndMonthlyCosts() method of MailHostingOrder class

      • fetchAlternateLocationDetailsAndMonthlyCosts() method of LinuxHostingOrder class

      • fetchAlternateLocationDetailsAndMonthlyCosts() method of WindowsHostingOrder class

    Deprecated Methods

    • EntityAction class of Core Kit

      • list()

      • listArchive()

    • DigitalCertificate class of Other Products Kit

      • add()

      • changeDigicertPassword()

      • addAdditionalLicenses()

 

Changes in version 3.10

  1. Java Docs updated

  2. Changes related to classes and methods:

    New Classes and Methods

    Domains Kit
    New Class Name New Method
    ThirdLevelDotUk String invoiceOption
    ThirdLevelDotUk String existingEndTime



    New Parameters introduced in Existing Methods

    Other Products Kit
    Class Name Method Name New Parameters
    EngageOrder renew String invoiceOption
    EngageOrder renew String existingEndTime



    Deprecated Parameters in Methods

    Domains Kit
    Class Name Method Name Deprecated Parameters
    ZoneOrder add "No Of Records" in DomainHash



    Deprecated Methods


    Domains Kit
    Class Name Deprecated Method Suggested Class Suggested Method
    DomContact addDefaultContact DomContact addDefaultContacts
    DomContact add DomContact addContact
    DomContact list DomContact listByType
    DomContactExt isValidRegistrantContact DomContactExt isValidContact
    DomOrder transferDomain DomOrder addTransferDomain
    DomOrder add DomOrder registerDomain
    ZoneOrder mod ZoneOrder Functionality not
    required anymore
    DotEu tradeDomain DotEu trade
    DotEu transferDomain DotEu transfer
    DotEu add DomOrder registerDomain
    Core Kit
    Class Name Deprecated Method Suggested Class Suggested Method
    Customer addCustomer Customer signUp
    Customer modDetails Customer mod
    Reseller addReseller Reseller signUp
    Reseller modDetails Reseller mod
    Reseller  addResellerWithStateId Reseller Functionality not required anymore
    OrderSetup getResellerSlabPercentageForProducts OrderSetup Functionality not required anymore
    OrderSetup getCustomerSlabPercentage OrderSetup Functionality not required anymore

 

Changes in version 3.9

  1. Java Docs updated

  2. Changes related to classes and methods:

    The following method in the Domains Kit is deprecated and its use should be discontinued -

    Deprecated method Class New method to be used
         
    isValidRegistrantContact DomContactExt isValidContact

 

Changes in version 3.8

  1. Java Docs updated

  2. Changes related to classes and methods:

    • The following changes have been introduced under the DotEu class within the Domains Kit -

      • New methods

        • trade

        • transfer

      • Deprecated methods

        • tradeDomain

        • transferDomain

    • The following new methods have been introduced under DigitalCertificateOrder class within the Other Products Kit -

      • enrollForThawteCertificate

      • reissue

      • renew

      • checkDigitalCertificateStatus

      • del

      • cancelDigicertOrder

      • changeDigicertPassword

      • addAdditionalLicenses

      • getDetails

      • getDetailsByDomain

      • getOrderIdByDomain

 

Changes in version 3.7

  1. Java Docs updated

  2. Changes related to classes and methods:

    Some old parameters have been removed and new parameters introduced in their place under the following methods -



    LinuxHostingOrder Class
    Method Old Parameter New Parameters
    add Hashtable orderParams String packageKey*,
    boolean ssl#
    mod Hashtable orderParams String packagekey*,
    boolean ssl#,
    int excessBandwidth##
    getMonthlyCostAndValidate Hashtable orderParams String packageKey*,
    boolean ssl#,
    int execessBandwidth##
    getModPricing Hashtable orderParams String
    packageKey*, boolean ssl#,
    int execessBandwidth##

    WindowsHostingOrder Class
    Method
    Old Parameter
    New Parameters
    add Hashtable orderParams String packageKey*,
    boolean ssl#
    mod Hashtable orderParams String packagekey*,
    boolean ssl#,
    int excessBandwidth##
    getMonthlyCostAndValidate Hashtable orderParams String packageKey*,
    boolean ssl#,
    int execessBandwidth##
    getModPricing Hashtable orderParams String
    packageKey*, boolean ssl#,
    int execessBandwidth##


    MailHostingOrder Class
    Method
    Old Parameter
    New Parameters
    add Hashtable orderParams String packageKey*
    mod Hashtable
    orderHash
    String packagekey*,
    int additionalMailBoxes**
    getMonthlyCostAndValidate Hashtable orderParams String packageKey*,
    int additionalMailBoxes**
    getModPricing Hashtable orderParams String
    packageKey*, int
    additionalMailBoxes**


    SiteBuilder Class
    Method Old Parameter New Parameters
    mod Hashtable orderParams String packageKey*
    getMonthlyCostAndValidate Hashtable orderParams String packageKey*

    Note
    • * packageKey will be the Identifier Key of the Plan (plan1, plan2, plan3, plan4) for which the Order needs to be added/modified.

    • # ssl will be true or false depending whether the user wants Dedicated IP / SSL for the Order placed.

    • ## excessBandwidth is the Bandwidth which the user wants over and above the Bandwidth of the Order's current plan.

    • ** additionalMailBoxes is the number of additional mail boxes over and above the existing ones in blocks of 100 accounts.

  3. The following classes and their methods are removed:

    • LinuxHostingPlanOnlyOrder

    • WindowsHostingPlanOnlyOrder

    • MailHostingPlanOnlyOrder

    • SiteBuilderPro

  4. The SiteBuilderLite class has been renamed to SiteBuilder.

  5. Two new methods, mod and signUp, have been introduced under the Reseller and Customer classes.

  6. The return type of the ListByType method of DomContact class in the Domains Kit has been changed to Hashtable from Vector.

 

Changes in version 3.6

  1. Java Docs updated

  2. Changes related to classes and methods:

    • New methods have been added in the Core Kit under the following class:

      • getProductMetadata - Product class

    • New methods have been added in the Domains Kit under the following classes:

      • getDefaultContactId - DomContactExt class

      • listByType - DomContact class

      • addTransferDomain - DomOrder class

      • changePrivacyProtectionStatus - DomOrder class

      • registerDomain - DomOrder class

    • Changes to the DomOrder class in Domains Kit:

      • Privacy Protection Handling is added in the bulkAdd and
        bulkAddTransferDomain methods.

      • The ns parameter has been removed from the validateDomainTransferParams method.

    • The following methods in the Domains Kit are deprecated and their use
      should be discontinued:

      Deprecated method Class New method to be used
           
      add DomContact addContact
      addDefaultContact DomContact addDefaultContacts
      list DomContact listByType
      add DomOrder registerDomain
      transferDomain DomOrder addTransferDomain
      transferDomainWithoutValidation DomOrder addTransferDomain
      addTransferDomainWithoutvalidation DomOrder addTransferDomain
      add DotEu registerDomain in DomOrder class
      Note

      While these methods are currently available, they are no longer supported and may be discontinued in the near future.

    • New methods have been added in the Hosting Kit under the following class:

      • getHostingMetaData - WebHostingOrderData class

    • Changes to classes in the Hosting Kit:

      The invoiceOption parameter has been added to the add method of MailHostingPlanOnlyOrder, WindowsHostingPlanOnlyOrder and LinuxHostingPlanOnlyOrder classes

Changes in version 3.5

  1. Java Docs updated

  2. Changes related to classes and functions:

    • New functions have been added in the Core Kit under the following classes:

      • getList - Country class

      • getStateListForCountry - Country class

      • getDetails - Order class

      • addResellerWithStateId - Reseller class

    • An extra option called Supersite is added in the getDetails function of the Reseller class in the Core Kit.

    • A new class LegalAgreement is added with the following methods under the Core Kit:

      • getRegistrantAgreement

      • getProductCategory

      • getAgreement

      • getAllAgreements

    • A new function has been added in the Domains Kit under the following class:

      • addCoopContact - DotCoopContact class

    • The following functions in the DomOrder class in the Domains Kit are changed to show the Invoice options also:

      • validateDomainRegistrationParams

      • validateDomainTransferParams

      • addWithoutValidation

     

Changes in version 3.4

  1. Java Docs Updated

  2. New Classes introduced in all Kits:

    • Core Kit

      • TaxService

        • getApplicableTaxes

        • getHashedTaxRules

    • Domains Kit

      • DotEu

        • getEUCountryList

        • tradeDomain

        • transferDomain

        • add

        • isEUCountry

      • DotEuContact

        • mod

        • add

        • addEuDefaultContact

      • DomOrder

        • validateDomainRegistrationParams

        • validateDomainTransferParams

        • addTransferDomainWithoutvalidation

        • addWithoutValidation

    • Hosting Kit

      • WindowsHostingPlanOnlyOrder

        • getDetails

        • getDetailsByDomain

        • getOrderIdByDomain

        • add

        • mod

        • renew

        • del

        • getMonthlyCostAndValidate

        • getModPricing

        • getDeletionRefundAmount

      • LinuxHostingPlanOnlyOrder

        • getDetails

        • getDetailsByDomain

        • getOrderIdByDomain

        • add

        • mod

        • renew

        • del

        • getMonthlyCostAndValidate

        • getModPricing

        • getDeletionRefundAmount

      • MailHostingPlanOnlyOrder

        • getDetails

        • getDetailsByDomain

        • getOrderIdByDomain

        • add

        • mod

        • renew

        • del

        • getMonthlyCostAndValidate

        • getModPricing

        • getDeletionRefundAmount

        • list

      • MailHostingSetup

        • getHostingKeyDisplayName

        • getHostingParamsDisplayName

        • getPricingKeyPricingParamMap

      • WindowsHostingSetup

        • getHostingKeyDisplayName

        • getHostingParamsDisplayName

        • getPricingKeyPricingParamMap

      • LinuxHostingSetup

        • getHostingKeyDisplayName

        • getHostingParamsDisplayName

        • getPricingKeyPricingParamMap

    • Other Products Kit

      • DigitalCertificateOrder

        • add

        • getCertPrice

      • SiteBuilderSetup

        • getPricingKeyPricingParamMap

        • EngageSetup

          • getPricingKeyPricingParamMap

Changes in version 3.3

  • 3 new functions have been added in the Core Kit under the following classes:

    • authenticateCustomerId - Customer class

    • login - Customer class

    • getOrderIdByDomainAndProductCategory - Order class

  • The name of the jar file in every kit is now unique.

  • Bug Fix - A minor Java Script problem was causing the frame links in the examples to not work in some browsers like Mozilla and Opera.

Changes in version 3.2

  • New methods added viz. Order.removeCustomerLock, Order.getLockList

  • The testing form provided now has a third frame which accepts the standard parameters passed in every call. If you set these parameters from the form, you can make test calls independent of the settings in the properties/constants file.

Changes in version 3.1

  • Minor bugs in WSDL files
    fixed.

Changes in version 3.0

  • Extensive changes made. Please download the kit and read the appropriate Javadocs for details

Changes in version 2.6

  • Added the method Customer.delete() which allows you to delete a Customer

  • Added the method DomOrder.cancelTransferRequest() which allows you to cancel the transfer-in request for a domain name

  • Added the method Order.sendRfa() which allows you to re/send the email asking for transfer-in approval for domain names.

Changes in version 2.5

  • Bug fix in Modify Customer Details and Modify Contact Details forms

  • More details in the Javadocs for DomOrder.getDetails()

  • Link to new Demo Server added.

Changes in version 2.3

  • Move Website functionality added in API

  • Add Funds functionality for both Sub-Resellers and Customers also added

  • Domain Forwarding, Mail Forwarding, Managed DNS Products now available through the API.

Changes in version 2.2

  • In customer class new method (authenticateCustomer) is added to authenticate the Customer.

Changes in version 2.1

DomUsContact.class

  • API for DomUsContact.class is provided.

  • The characteristics of DomUsContact.class includes the method setContactDetails()  that needs to be called for any contact used as Registrant contact for .US. for providing applicationPurpose and nexusCategory facility.

list() method

  • list() method of DomContact.class is now available to Customer as well as Reseller.

  • The function signature of listContact() is also changed - One has to pass Customer Id after Parent Id besides other parameters.

getCustomerAvailableBalance() fuction

  • getCustomerAvailableBalance() fuction is added to the Fund.class.

  • This function returns the available balance of a Customer.

getCustomerId() function

  • getCustomerId() function is added to the Customer.class.

  • This function returns the customer id of the customer.

The prefix of all user classes changed to Customer. For example, UserService to CustomerService, UserServiceTest to CustomerServiceTest

Method signature change in DomContact.class

OLD - int add(java.lang.String userName, java.lang.String password, java.lang.String role, java.lang.String langpref, int parentid, int customerId)

NEW - int addDefaultContact(java.lang.String userName, java.lang.String password, java.lang.String role, java.lang.String langpref, int parentid, int customerId)

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.