Please note this is the very basic API, we have a complete XML based API that our reseller panel uses, however it's too much to document so we can provide you a fully functional site that will do all
the API calls for you, handle billing of your customers, allow your customers to login and manage their own domains. Our advanced API also allows for bulk transfer, renew and registration of domains,
email us for more details.
In every function you can set test mode or live mode (($params["TestMode"]==on or off):
Example:
if($params["TestMode"]=="on"){
$url = "http://dev.affordabledomains.co.nz/testlab/api/whmcs/login.php";
}else{
$url = "http://www.affordabledomains.co.nz/api/whmcs/login.php";
}
Our Functions:
- For login in affordabledomains.co.nz you can use login($params).
- For whois value of a domain you can use whoisNzDomain($params).
- For registration of a domain you can use registerNzDomain($params).
- For Update name server of a domain you can use nsSaveNzDomain($params).
- For update contact details of a domain you can use contactSaveNzDomain($myparams).
- For renew of a domain you can use renewNzDomain($params).
- For transfer of a domain you can use transNzDomain($params).
- For new UDAI domain you can use getUdaiNzDomain($params).
The whoisNzDomain($params) function returns an array . In this you can get all information of a domain. All others function return a string.
For a successful response the return string format is: - success: The message details.
For an error response the return string format is: - unsuccess: The message details.
So you can split with (:) the return string for the message details.
Our fields details:
#For username and password:
- $postfields["txtLoginUname"] = test;
- $postfields["txtLoginPwd"] = test;
#For Registrant contact:
- $postfields["txtFName"] = ; //first name
- $postfields["txtLName"] = ; //last name
- $postfields["txtAdd1"] = ; //address 1
- $postfields["txtAdd2"] = ; //address 2
- $postfields["txtCity"] = ; //city
- $postfields["txtProv"] = ; //province
- $postfields["txtPostal"] = ; //postal code
- $postfields["cboCountry"] = ; //country code
- $postfields["txtEmail"] = ; //Email address
- $postfields["txtPh1"] = ; //phone country code
- $postfields["txtPh2"] = ; //phone area code
- $postfields["txtPh3"] = ; //phone local number
- $postfields["txtfax1"] = " "; //fax country code
- $postfields["txtfax2"] = " "; //fax area code
- $postfields["txtfax3"] = " "; //fax local number
#For Admin contact:
- $postfields["billFName"] = ; //first name
- $postfields["billLName"] = ; //last name
- $postfields["billAdd1"] = ; //address 1
- $postfields["billAdd2"] = ; //address 2
- $postfields["billCity"] = ; //city
- $postfields["billProv"] = ; //province
- $postfields["billPostal"] = ; //postal code
- $postfields["cboBillCountry"] = ; //country code
- $postfields["billEmail"] = ; //Email address
- $postfields["billPh1"] = ; //phone country code
- $postfields["billPh2"] = ; //phone area code
- $postfields["billPh3"] = ; //phone local number
- $postfields["billfax1"] = " "; //fax country code
- $postfields["billfax2"] = " "; //fax area code
- $postfields["billfax3"] = " "; //fax local number
#For Technical contact:
- $postfields["techFName"] = ; //first name
- $postfields["techLName"] = ; //last name
- $postfields["techAdd1"] = ; //address 1
- $postfields["techAdd2"] = ; //address 2
- $postfields["techCity"] = ; //city
- $postfields["techProv"] = ; //province
- $postfields["techPostal"] = ; //postal code
- $postfields["cboTechCountry"] = ; //country code
- $postfields["techEmail"] = ; //Email address
- $postfields["techPh1"] = ; //phone country code
- $postfields["techPh2"] = ; //phone area code
- $postfields["techPh3"] = ; //phone local number
- $postfields["techfax1"] = " "; //fax country code
- $postfields["techfax2"] = " "; //fax area code
- $postfields["techfax3"] = " "; //fax local number
#For domain name server(FQDN) or IP4Addr or IP6Addr:
- $postfields["txthostname1"] = ;
- $postfields["txthostname2"] = ;
- $postfields["txthostname3"] = ;
- $postfields["txthostname4"] = ;
- $postfields["txtip1"] = ;
- $postfields["txtip2"] = ;
- $postfields["txtip3"] = ;
- $postfields["txtip4"] = ;
- $postfields["txtv6ip1"] = ;
- $postfields["txtv6ip2"] = ;
- $postfields["txtv6ip3"] = ;
- $postfields["txtv6ip4"] = ;
#For domain name, UDAI, Renew terms:
- $postfields["txtdomainname"] = ;
- $postfields["txtUDAI"] = ;
- $postfields["cboRenew"] = ; (in months)
Download our WHMCS module which contains the functions here
All the functions are written in PHP language. If you use other language, please make same functions.