Affordable Domains
Welcome to Affordable Domains API reference.
Our sandbox environment is located at: https://sandbox.affordabledomains.co.nz
. Please send all test requests to this url.
Our production environment is locted at: https://reseller.affordabledomains.co.nz
. Please send all live requests to this url.
In order to use our sandbox environment you will need to register an account at https://sandbox.affordabledomains.co.nz/sign-up
After logging in, you will need to add funds to your account. This can be done by clicking the "Add funds" icon. You will then need to enter an amount and click "Add Funds". This will create a receipt which you will need to pay via a dummy credit card listed below.
In order to use a credit card, we required it to verified. This has been disabled in the sandbox environment so you can simply click the verify button with no input and the card will be verified automatically.
After this step you can begin your development using the documentation provided below.
Dummy Credit Cards
Number | Brand |
---|---|
4242 4242 4242 4242 | Visa |
4000 0566 5566 5556 | Visa (debit) |
5555 5555 5555 4444 | Mastercard |
2223 0031 2200 3222 | Mastercard (2-series) |
5200 8282 8282 8210 | Mastercard (debit) |
5105 1051 0510 5100 | Mastercard (prepaid) |
3782 822463 10005 | American Express |
3714 496353 98431 | American Express |
Please note: This API has been optimised for WHMCS and therefore does not offer all the functionality our client portal does. We will be writing a full API in the near future which will allow you to use all the same functionalities as our client portal.
Client Actions
Get Credit Balance
Get Credit Balance
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetCreditBalance" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetCreditBalance",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetCreditBalance");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"creditBalance": "1000.00"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetCreditBalance
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetCreditBalance
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Domain Actions
Get Nameservers
Gets the nameservers for a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetNameservers" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetNameservers",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetNameservers");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"nameservers": [
"ns1": "ns1.yourdomain.co.nz",
"ns2": "ns1.yourdomain.co.nz",
"ns3": "ns1.yourdomain.co.nz",
"ns4": "ns1.yourdomain.co.nz"
]
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetNameservers
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetNameservers
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional |
Set Nameservers
Updates the nameservers for a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SetNameservers" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"nameservers":["dolores","dolores","dolores","dolores"]}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SetNameservers",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"nameservers": [
"dolores",
"dolores",
"dolores",
"dolores"
]
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'nameservers' =>
array (
0 => 'dolores',
1 => 'dolores',
2 => 'dolores',
3 => 'dolores',
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SetNameservers");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully updated nameservers for yourdomain.co.nz.",
"nameservers": [
"ns1": "ns1.yourdomain.co.nz",
"ns2": "ns1.yourdomain.co.nz",
"ns3": "ns1.yourdomain.co.nz",
"ns4": "ns1.yourdomain.co.nz"
]
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SetNameservers
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SetNameservers
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
nameservers.0 | string | required | |
nameservers.1 | string | required | |
nameservers.2 | string | optional | |
nameservers.3 | string | optional |
Register a Child Nameserver
Set a child nameserver for a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/RegisterNameserver" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"nameserver":"id","ipaddress":"id"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/RegisterNameserver",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"nameserver": "id",
"ipaddress": "id"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'nameserver' => 'id',
'ipaddress' => 'id',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/RegisterNameserver");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg" : "Successfully set a nameserver for yourdomain.co.nz.",
"nameserver": "ns.yourdomain.co.nz",
"ip": "",
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/RegisterNameserver
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/RegisterNameserver
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
nameserver | string | required | |
ipaddress | string | required |
Modify a Child Nameserver
Modifies the IP of a child nameserver.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/ModifyNameserver" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"nameserver":"illo","newip":"illo"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/ModifyNameserver",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"nameserver": "illo",
"newip": "illo"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'nameserver' => 'illo',
'newip' => 'illo',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/ModifyNameserver");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully updated ip address of a nameserver for yourdomain.co.nz",
"nameserver": "ns.yourdomain.co.nz",
"newip": "",
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/ModifyNameserver
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/ModifyNameserver
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
nameserver | string | required | |
newip | string | required |
Delete a Child Nameserver
Delete a child nameserver for a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/DeleteNameserver" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"nameserver":"numquam"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/DeleteNameserver",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"nameserver": "numquam"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'nameserver' => 'numquam',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/DeleteNameserver");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully deleted a nameserver for yourdomain.co.nz",
"nameserver": "ns.yourdomain.co.nz",
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/DeleteNameserver
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/DeleteNameserver
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
nameserver | string | required |
Get Contact Details
Get the registrant, admin, technical and billing contact details for a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetContactDetails" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetContactDetails",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetContactDetails");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"registrant": [
"firstname": "Joe",
"lastname": "Soap",
"name": "Joe Soap",
"email": "joe@soap.co.nz",
"phone": "+64 91231235",
"fax": "+64 91231235",
"address1": "123 Queen Street",
"address2": "Auckland CBD",
"city": "Auckland",
"country": "NZ",
"state": "Auckland",
"postcode": "1010",
"privacy": 1
],
"admin": [
"firstname": "Joe",
"lastname": "Soap",
"name": "Joe Soap",
"email": "joe@soap.co.nz",
"phone": "+64 91231235",
"fax": "+64 91231235",
"address1": "123 Queen Street",
"address2": "Auckland CBD",
"city": "Auckland",
"country": "NZ",
"state": "Auckland",
"postcode": "1010",
"privacy": 0
],
"billing": [
"firstname": "Joe",
"lastname": "Soap",
"name": "Joe Soap",
"email": "joe@soap.co.nz",
"phone": "+64 91231235",
"fax": "+64 91231235",
"address1": "123 Queen Street",
"address2": "Auckland CBD",
"city": "Auckland",
"country": "NZ",
"state": "Auckland",
"postcode": "1010",
"privacy": 1
],
"tech": [
"firstname": "Joe",
"lastname": "Soap",
"name": "Joe Soap",
"email": "joe@soap.co.nz",
"phone": "+64 91231235",
"fax": "+64 91231235",
"address1": "123 Queen Street",
"address2": "Auckland CBD",
"city": "Auckland",
"country": "NZ",
"state": "Auckland",
"postcode": "1010",
"privacy": 0
]
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetContactDetails
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetContactDetails
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional |
Set Contact Details
Update the registrant, admin, technical and billing contact details for a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SetContactDetails" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"contacts":{"registrant":{"name":"unde","firstname":"unde","lastname":"unde","email":"harley48@example.com","phone":"unde","fax":"unde","address1":"unde","address2":"unde","city":"unde","state":"unde","postcode":"unde","country":"unde"},"admin":{"name":"unde","firstname":"unde","lastname":"unde","email":"harley48@example.com","phone":"unde","fax":"unde","address1":"unde","address2":"unde","city":"unde","state":"unde","postcode":"unde","country":"unde"},"tech":{"name":"unde","firstname":"unde","lastname":"unde","email":"harley48@example.com","phone":"unde","fax":"unde","address1":"unde","address2":"unde","city":"unde","state":"unde","postcode":"unde","country":"unde"}}}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SetContactDetails",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"contacts": {
"registrant": {
"name": "unde",
"firstname": "unde",
"lastname": "unde",
"email": "harley48@example.com",
"phone": "unde",
"fax": "unde",
"address1": "unde",
"address2": "unde",
"city": "unde",
"state": "unde",
"postcode": "unde",
"country": "unde"
},
"admin": {
"name": "unde",
"firstname": "unde",
"lastname": "unde",
"email": "harley48@example.com",
"phone": "unde",
"fax": "unde",
"address1": "unde",
"address2": "unde",
"city": "unde",
"state": "unde",
"postcode": "unde",
"country": "unde"
},
"tech": {
"name": "unde",
"firstname": "unde",
"lastname": "unde",
"email": "harley48@example.com",
"phone": "unde",
"fax": "unde",
"address1": "unde",
"address2": "unde",
"city": "unde",
"state": "unde",
"postcode": "unde",
"country": "unde"
}
}
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'contacts' =>
array (
'registrant' =>
array (
'name' => 'unde',
'firstname' => 'unde',
'lastname' => 'unde',
'email' => 'harley48@example.com',
'phone' => 'unde',
'fax' => 'unde',
'address1' => 'unde',
'address2' => 'unde',
'city' => 'unde',
'state' => 'unde',
'postcode' => 'unde',
'country' => 'unde',
),
'admin' =>
array (
'name' => 'unde',
'firstname' => 'unde',
'lastname' => 'unde',
'email' => 'harley48@example.com',
'phone' => 'unde',
'fax' => 'unde',
'address1' => 'unde',
'address2' => 'unde',
'city' => 'unde',
'state' => 'unde',
'postcode' => 'unde',
'country' => 'unde',
),
'tech' =>
array (
'name' => 'unde',
'firstname' => 'unde',
'lastname' => 'unde',
'email' => 'harley48@example.com',
'phone' => 'unde',
'fax' => 'unde',
'address1' => 'unde',
'address2' => 'unde',
'city' => 'unde',
'state' => 'unde',
'postcode' => 'unde',
'country' => 'unde',
),
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SetContactDetails");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully updated contact details for yourdomain.co.nz",
"contacts": [
"registrant": [
"name": "Joe Soap",
"email": "joe@soap.co.nz",
"phone": "+64 91231235",
"fax": "+64 91231235",
"address1": "123 Queen Street",
"address2": "Auckland CBD",
"city": "Auckland",
"country": "NZ",
"state": "Auckland",
"postcode": "1010",
"privacy": 1
],
"admin": [
"name": "Joe Soap",
"email": "joe@soap.co.nz",
"phone": "+64 91231235",
"fax": "+64 91231235",
"address1": "123 Queen Street",
"address2": "Auckland CBD",
"city": "Auckland",
"country": "NZ",
"state": "Auckland",
"postcode": "1010",
"privacy": 0
],
"billing": [
"name": "Joe Soap",
"email": "joe@soap.co.nz",
"phone": "+64 91231235",
"fax": "+64 91231235",
"address1": "123 Queen Street",
"address2": "Auckland CBD",
"city": "Auckland",
"country": "NZ",
"state": "Auckland",
"postcode": "1010",
"privacy": 1
],
"tech": [
"name": "Joe Soap",
"email": "joe@soap.co.nz",
"phone": "+64 91231235",
"fax": "+64 91231235",
"address1": "123 Queen Street",
"address2": "Auckland CBD",
"city": "Auckland",
"country": "NZ",
"state": "Auckland",
"postcode": "1010",
"privacy": 0
]
]
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SetContactDetails
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SetContactDetails
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
contacts.registrant.name | string | optional | Required if the parameters contacts.registrant.firstname or contacts.registrant.lastname are not present. |
contacts.registrant.firstname | string | optional | Required if the parameters contacts.registrant.name are not present. |
contacts.registrant.lastname | string | optional | |
contacts.registrant.email | required | ||
contacts.registrant.phone | string | required | Minimum: 7 |
contacts.registrant.fax | string | optional | |
contacts.registrant.address1 | string | required | |
contacts.registrant.address2 | string | optional | |
contacts.registrant.city | string | required | |
contacts.registrant.state | string | required | |
contacts.registrant.postcode | string | required | |
contacts.registrant.country | string | required | |
contacts.admin.name | string | optional | Required if the parameters contacts.admin.firstname or contacts.admin.lastname are not present. |
contacts.admin.firstname | string | optional | Required if the parameters contacts.admin.name are not present. |
contacts.admin.lastname | string | optional | |
contacts.admin.email | required | ||
contacts.admin.phone | string | required | Minimum: 7 |
contacts.admin.fax | string | optional | |
contacts.admin.address1 | string | required | |
contacts.admin.address2 | string | optional | |
contacts.admin.city | string | required | |
contacts.admin.state | string | required | |
contacts.admin.postcode | string | required | |
contacts.admin.country | string | required | |
contacts.tech.name | string | optional | Required if the parameters contacts.tech.firstname or contacts.tech.lastname are not present. |
contacts.tech.firstname | string | optional | Required if the parameters contacts.tech.name are not present. |
contacts.tech.lastname | string | optional | |
contacts.tech.email | required | ||
contacts.tech.phone | string | required | Minimum: 7 |
contacts.tech.fax | string | optional | |
contacts.tech.address1 | string | required | |
contacts.tech.address2 | string | optional | |
contacts.tech.city | string | required | |
contacts.tech.state | string | required | |
contacts.tech.postcode | string | required | |
contacts.tech.country | string | required |
Get Lock Status
Gets the transfer lock status on a domain
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetLockStatus" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetLockStatus",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetLockStatus");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully queried lock status for yourdomain.co.nz.",
"lockstatus": "locked"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetLockStatus
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetLockStatus
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional |
Set Lock Status
Sets the transfer lock status on a domain
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SetLockStatus" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"registrarlock":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SetLockStatus",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"registrarlock": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'registrarlock' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SetLockStatus");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"lockstatus": "unlocked",
"statusMsg": "Successfully updated lock status for yourdomain.co.nz to unlocked"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SetLockStatus
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SetLockStatus
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
registrarlock | boolean | required |
Get EPP/UDAI Code
Get the EPP/UDAI transfer code for a domain name
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/RequestEPPCode" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/RequestEPPCode",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/RequestEPPCode");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"eppcode": "qSweS2D4"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/RequestEPPCode
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/RequestEPPCode
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional |
Validate EPP/UDAI Code
Validate the EPP/UDAI transfer code for a domain name Works for all nz domains and any other tld's in your account
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/ValidateEPPCode" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true,"authCodes":{"domainname.co.nz":"authcode","domainname.nz":"authcode","domainname.com":"authcode"}}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/ValidateEPPCode",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"authCodes": {
"domainname.co.nz": "authcode",
"domainname.nz": "authcode",
"domainname.com": "authcode"
}
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'authCodes' =>
array (
'domainname.co.nz' => 'authcode',
'domainname.nz' => 'authcode',
'domainname.com' => 'authcode',
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/ValidateEPPCode");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"domainname.co.nz": true,
"domainname.nz": false,
"domainname.com": "validateAuthCode is not supported for this domain"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/ValidateEPPCode
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/ValidateEPPCode
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional | |
authCodes | array | required |
Renew
Renew a domain for the given term
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/Renew" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"years":2,"idProtection":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/Renew",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"years": 2,
"idProtection": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'years' => 2,
'idProtection' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/Renew");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully renewed yourdomain.co.nz for 1 year(s).",
"expiryDate": "2026-11-16 00:45:22"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/Renew
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/Renew
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
years | integer | required | Minimum: 1 Maximum: 10 |
idProtection | boolean | optional |
Register Domain
Register a domain with Affordable Domains
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/Register" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"domainDetails":{"years":7,"nameservers":{"ns1":"quidem","ns2":"quidem","ns3":"quidem","ns4":"quidem","ns5":"quidem"},"contacts":{"registrant":{"name":"quidem","firstname":"quidem","lastname":"quidem","email":"isobel45@example.net","phone":"quidem","fax":"quidem","address1":"quidem","address2":"quidem","city":"quidem","state":"quidem","postcode":"quidem","country":"quidem"},"admin":{"name":"quidem","firstname":"quidem","lastname":"quidem","email":"isobel45@example.net","phone":"quidem","fax":"quidem","address1":"quidem","address2":"quidem","city":"quidem","state":"quidem","postcode":"quidem","country":"quidem"},"tech":{"name":"quidem","firstname":"quidem","lastname":"quidem","email":"isobel45@example.net","phone":"quidem","fax":"quidem","address1":"quidem","address2":"quidem","city":"quidem","state":"quidem","postcode":"quidem","country":"quidem"},"billing":{"name":"quidem","firstname":"quidem","lastname":"quidem","email":"isobel45@example.net","phone":"quidem","fax":"quidem","address1":"quidem","address2":"quidem","city":"quidem","state":"quidem","postcode":"quidem","country":"quidem"}},"idProtection":"quidem","additionalFields":{"dns":[{"name":"quidem","type":"quidem","content":"quidem"}]}}}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/Register",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"domainDetails": {
"years": 7,
"nameservers": {
"ns1": "quidem",
"ns2": "quidem",
"ns3": "quidem",
"ns4": "quidem",
"ns5": "quidem"
},
"contacts": {
"registrant": {
"name": "quidem",
"firstname": "quidem",
"lastname": "quidem",
"email": "isobel45@example.net",
"phone": "quidem",
"fax": "quidem",
"address1": "quidem",
"address2": "quidem",
"city": "quidem",
"state": "quidem",
"postcode": "quidem",
"country": "quidem"
},
"admin": {
"name": "quidem",
"firstname": "quidem",
"lastname": "quidem",
"email": "isobel45@example.net",
"phone": "quidem",
"fax": "quidem",
"address1": "quidem",
"address2": "quidem",
"city": "quidem",
"state": "quidem",
"postcode": "quidem",
"country": "quidem"
},
"tech": {
"name": "quidem",
"firstname": "quidem",
"lastname": "quidem",
"email": "isobel45@example.net",
"phone": "quidem",
"fax": "quidem",
"address1": "quidem",
"address2": "quidem",
"city": "quidem",
"state": "quidem",
"postcode": "quidem",
"country": "quidem"
},
"billing": {
"name": "quidem",
"firstname": "quidem",
"lastname": "quidem",
"email": "isobel45@example.net",
"phone": "quidem",
"fax": "quidem",
"address1": "quidem",
"address2": "quidem",
"city": "quidem",
"state": "quidem",
"postcode": "quidem",
"country": "quidem"
}
},
"idProtection": "quidem",
"additionalFields": {
"dns": [
{
"name": "quidem",
"type": "quidem",
"content": "quidem"
}
]
}
}
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'domainDetails' =>
array (
'years' => 7,
'nameservers' =>
array (
'ns1' => 'quidem',
'ns2' => 'quidem',
'ns3' => 'quidem',
'ns4' => 'quidem',
'ns5' => 'quidem',
),
'contacts' =>
array (
'registrant' =>
array (
'name' => 'quidem',
'firstname' => 'quidem',
'lastname' => 'quidem',
'email' => 'isobel45@example.net',
'phone' => 'quidem',
'fax' => 'quidem',
'address1' => 'quidem',
'address2' => 'quidem',
'city' => 'quidem',
'state' => 'quidem',
'postcode' => 'quidem',
'country' => 'quidem',
),
'admin' =>
array (
'name' => 'quidem',
'firstname' => 'quidem',
'lastname' => 'quidem',
'email' => 'isobel45@example.net',
'phone' => 'quidem',
'fax' => 'quidem',
'address1' => 'quidem',
'address2' => 'quidem',
'city' => 'quidem',
'state' => 'quidem',
'postcode' => 'quidem',
'country' => 'quidem',
),
'tech' =>
array (
'name' => 'quidem',
'firstname' => 'quidem',
'lastname' => 'quidem',
'email' => 'isobel45@example.net',
'phone' => 'quidem',
'fax' => 'quidem',
'address1' => 'quidem',
'address2' => 'quidem',
'city' => 'quidem',
'state' => 'quidem',
'postcode' => 'quidem',
'country' => 'quidem',
),
'billing' =>
array (
'name' => 'quidem',
'firstname' => 'quidem',
'lastname' => 'quidem',
'email' => 'isobel45@example.net',
'phone' => 'quidem',
'fax' => 'quidem',
'address1' => 'quidem',
'address2' => 'quidem',
'city' => 'quidem',
'state' => 'quidem',
'postcode' => 'quidem',
'country' => 'quidem',
),
),
'idProtection' => 'quidem',
'additionalFields' =>
array (
'dns' =>
array (
0 =>
array (
'name' => 'quidem',
'type' => 'quidem',
'content' => 'quidem',
),
),
),
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/Register");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully registered yourdomain.co.nz for 12 month(s).",
"whois": {
"domain":"yourdomain.co.nz",
"status":"Active",
"registerDate":"2016-09-16 00:45:22",
"expiryDate": "2026-11-16 00:45:22",
"cancelDate":"",
"renewDate":"",
"contacts":{
"registrant":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"tech":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"admin":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"billing":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
}
},
"nameservers":{
{
"ns":"ns0.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns1.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns2.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns3.dns.com",
"ip4":"",
"ip6":""
}
}
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/Register
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/Register
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional | |
domainDetails.years | integer | required | Minimum: 1 Maximum: 10 |
domainDetails.nameservers.ns1 | string | required | |
domainDetails.nameservers.ns2 | string | required | |
domainDetails.nameservers.ns3 | string | optional | |
domainDetails.nameservers.ns4 | string | optional | |
domainDetails.nameservers.ns5 | string | optional | |
domainDetails.contacts.registrant.name | string | optional | Required if the parameters domainDetails.contacts.registrant.firstname or domainDetails.contacts.registrant.lastname are not present. |
domainDetails.contacts.registrant.firstname | string | optional | Required if the parameters domainDetails.contacts.registrant.name are not present. |
domainDetails.contacts.registrant.lastname | string | optional | |
domainDetails.contacts.registrant.email | required | ||
domainDetails.contacts.registrant.phone | string | required | Minimum: 7 |
domainDetails.contacts.registrant.fax | string | optional | Minimum: 7 |
domainDetails.contacts.registrant.address1 | string | required | |
domainDetails.contacts.registrant.address2 | string | optional | |
domainDetails.contacts.registrant.city | string | required | |
domainDetails.contacts.registrant.state | string | required | |
domainDetails.contacts.registrant.postcode | string | required | |
domainDetails.contacts.registrant.country | string | required | |
domainDetails.contacts.admin.name | string | optional | Required if the parameters domainDetails.contacts.admin.firstname or domainDetails.contacts.admin.lastname are not present. |
domainDetails.contacts.admin.firstname | string | optional | Required if the parameters domainDetails.contacts.admin.name are not present. |
domainDetails.contacts.admin.lastname | string | optional | |
domainDetails.contacts.admin.email | required | ||
domainDetails.contacts.admin.phone | string | required | Minimum: 7 |
domainDetails.contacts.admin.fax | string | optional | Minimum: 7 |
domainDetails.contacts.admin.address1 | string | required | |
domainDetails.contacts.admin.address2 | string | optional | |
domainDetails.contacts.admin.city | string | required | |
domainDetails.contacts.admin.state | string | required | |
domainDetails.contacts.admin.postcode | string | required | |
domainDetails.contacts.admin.country | string | required | |
domainDetails.contacts.tech.name | string | optional | Required if the parameters domainDetails.contacts.tech.firstname or domainDetails.contacts.tech.lastname are not present. |
domainDetails.contacts.tech.firstname | string | optional | Required if the parameters domainDetails.contacts.tech.name are not present. |
domainDetails.contacts.tech.lastname | string | optional | |
domainDetails.contacts.tech.email | required | ||
domainDetails.contacts.tech.phone | string | required | Minimum: 7 |
domainDetails.contacts.tech.fax | string | optional | Minimum: 7 |
domainDetails.contacts.tech.address1 | string | required | |
domainDetails.contacts.tech.address2 | string | optional | |
domainDetails.contacts.tech.city | string | required | |
domainDetails.contacts.tech.state | string | required | |
domainDetails.contacts.tech.postcode | string | required | |
domainDetails.contacts.tech.country | string | required | |
domainDetails.contacts.billing.name | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.firstname | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.lastname | string | optional | |
domainDetails.contacts.billing.email | optional | Required if the parameters domainDetails.contacts.billing are present. |
|
domainDetails.contacts.billing.phone | string | optional | Required if the parameters domainDetails.contacts.billing are present. Minimum: 7 |
domainDetails.contacts.billing.fax | string | optional | Minimum: 7 |
domainDetails.contacts.billing.address1 | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.address2 | string | optional | |
domainDetails.contacts.billing.city | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.state | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.postcode | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.country | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.idProtection | string | optional | |
domainDetails.additionalFields.dns | array | optional | |
domainDetails.additionalFields.dns.0.name | string | optional | Required if the parameters domainDetails.dns are present. |
domainDetails.additionalFields.dns.0.type | string | optional | Required if the parameters domainDetails.dns are present. |
domainDetails.additionalFields.dns.0.content | string | optional | Required if the parameters domainDetails.dns are present. |
Transfer Domain
Transfer a domain from another registrar to Affordable Domains
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/Transfer" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"domainDetails":{"eppcode":"cum","years":7,"nameservers":{"ns1":"cum","ns2":"cum","ns3":"cum","ns4":"cum","ns5":"cum"},"contacts":{"registrant":{"name":"cum","firstname":"cum","lastname":"cum","email":"brett12@example.net","phone":"cum","fax":"cum","address1":"cum","address2":"cum","city":"cum","state":"cum","postcode":"cum","country":"cum"},"admin":{"name":"cum","firstname":"cum","lastname":"cum","email":"brett12@example.net","phone":"cum","fax":"cum","address1":"cum","address2":"cum","city":"cum","state":"cum","postcode":"cum","country":"cum"},"tech":{"name":"cum","firstname":"cum","lastname":"cum","email":"brett12@example.net","phone":"cum","fax":"cum","address1":"cum","address2":"cum","city":"cum","state":"cum","postcode":"cum","country":"cum"},"billing":{"name":"cum","firstname":"cum","lastname":"cum","email":"brett12@example.net","phone":"cum","fax":"cum","address1":"cum","address2":"cum","city":"cum","state":"cum","postcode":"cum","country":"cum"}},"additionalFields":{"dns":[{"name":"cum","type":"cum","content":"cum"}]}}}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/Transfer",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"domainDetails": {
"eppcode": "cum",
"years": 7,
"nameservers": {
"ns1": "cum",
"ns2": "cum",
"ns3": "cum",
"ns4": "cum",
"ns5": "cum"
},
"contacts": {
"registrant": {
"name": "cum",
"firstname": "cum",
"lastname": "cum",
"email": "brett12@example.net",
"phone": "cum",
"fax": "cum",
"address1": "cum",
"address2": "cum",
"city": "cum",
"state": "cum",
"postcode": "cum",
"country": "cum"
},
"admin": {
"name": "cum",
"firstname": "cum",
"lastname": "cum",
"email": "brett12@example.net",
"phone": "cum",
"fax": "cum",
"address1": "cum",
"address2": "cum",
"city": "cum",
"state": "cum",
"postcode": "cum",
"country": "cum"
},
"tech": {
"name": "cum",
"firstname": "cum",
"lastname": "cum",
"email": "brett12@example.net",
"phone": "cum",
"fax": "cum",
"address1": "cum",
"address2": "cum",
"city": "cum",
"state": "cum",
"postcode": "cum",
"country": "cum"
},
"billing": {
"name": "cum",
"firstname": "cum",
"lastname": "cum",
"email": "brett12@example.net",
"phone": "cum",
"fax": "cum",
"address1": "cum",
"address2": "cum",
"city": "cum",
"state": "cum",
"postcode": "cum",
"country": "cum"
}
},
"additionalFields": {
"dns": [
{
"name": "cum",
"type": "cum",
"content": "cum"
}
]
}
}
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'domainDetails' =>
array (
'eppcode' => 'cum',
'years' => 7,
'nameservers' =>
array (
'ns1' => 'cum',
'ns2' => 'cum',
'ns3' => 'cum',
'ns4' => 'cum',
'ns5' => 'cum',
),
'contacts' =>
array (
'registrant' =>
array (
'name' => 'cum',
'firstname' => 'cum',
'lastname' => 'cum',
'email' => 'brett12@example.net',
'phone' => 'cum',
'fax' => 'cum',
'address1' => 'cum',
'address2' => 'cum',
'city' => 'cum',
'state' => 'cum',
'postcode' => 'cum',
'country' => 'cum',
),
'admin' =>
array (
'name' => 'cum',
'firstname' => 'cum',
'lastname' => 'cum',
'email' => 'brett12@example.net',
'phone' => 'cum',
'fax' => 'cum',
'address1' => 'cum',
'address2' => 'cum',
'city' => 'cum',
'state' => 'cum',
'postcode' => 'cum',
'country' => 'cum',
),
'tech' =>
array (
'name' => 'cum',
'firstname' => 'cum',
'lastname' => 'cum',
'email' => 'brett12@example.net',
'phone' => 'cum',
'fax' => 'cum',
'address1' => 'cum',
'address2' => 'cum',
'city' => 'cum',
'state' => 'cum',
'postcode' => 'cum',
'country' => 'cum',
),
'billing' =>
array (
'name' => 'cum',
'firstname' => 'cum',
'lastname' => 'cum',
'email' => 'brett12@example.net',
'phone' => 'cum',
'fax' => 'cum',
'address1' => 'cum',
'address2' => 'cum',
'city' => 'cum',
'state' => 'cum',
'postcode' => 'cum',
'country' => 'cum',
),
),
'additionalFields' =>
array (
'dns' =>
array (
0 =>
array (
'name' => 'cum',
'type' => 'cum',
'content' => 'cum',
),
),
),
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/Transfer");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully transferred yourdomain.co.nz",
"whois": {
"domain":"yourdomain.co.nz",
"status":"Active",
"registerDate":"2016-09-16 00:45:22",
"expiryDate": "2026-11-16 00:45:22",
"cancelDate":"",
"renewDate":"",
"contacts":{
"registrant":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"tech":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"admin":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"billing":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
}
},
"nameservers":{
{
"ns":"ns0.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns1.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns2.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns3.dns.com",
"ip4":"",
"ip6":""
}
}
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/Transfer
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/Transfer
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional | |
domainDetails.eppcode | string | required | |
domainDetails.years | integer | required | Minimum: 1 Maximum: 10 |
domainDetails.nameservers.ns1 | string | required | |
domainDetails.nameservers.ns2 | string | required | |
domainDetails.nameservers.ns3 | string | optional | |
domainDetails.nameservers.ns4 | string | optional | |
domainDetails.nameservers.ns5 | string | optional | |
domainDetails.contacts.registrant.name | string | optional | Required if the parameters domainDetails.contacts.registrant.firstname or domainDetails.contacts.registrant.lastname are not present. |
domainDetails.contacts.registrant.firstname | string | optional | Required if the parameters domainDetails.contacts.registrant.name are not present. |
domainDetails.contacts.registrant.lastname | string | optional | |
domainDetails.contacts.registrant.email | required | ||
domainDetails.contacts.registrant.phone | string | required | Minimum: 7 |
domainDetails.contacts.registrant.fax | string | optional | Minimum: 7 |
domainDetails.contacts.registrant.address1 | string | required | |
domainDetails.contacts.registrant.address2 | string | optional | |
domainDetails.contacts.registrant.city | string | required | |
domainDetails.contacts.registrant.state | string | required | |
domainDetails.contacts.registrant.postcode | string | required | |
domainDetails.contacts.registrant.country | string | required | |
domainDetails.contacts.admin.name | string | optional | Required if the parameters domainDetails.contacts.admin.firstname or domainDetails.contacts.admin.lastname are not present. |
domainDetails.contacts.admin.firstname | string | optional | Required if the parameters domainDetails.contacts.admin.name are not present. |
domainDetails.contacts.admin.lastname | string | optional | |
domainDetails.contacts.admin.email | required | ||
domainDetails.contacts.admin.phone | string | required | Minimum: 7 |
domainDetails.contacts.admin.fax | string | optional | Minimum: 7 |
domainDetails.contacts.admin.address1 | string | required | |
domainDetails.contacts.admin.address2 | string | optional | |
domainDetails.contacts.admin.city | string | required | |
domainDetails.contacts.admin.state | string | required | |
domainDetails.contacts.admin.postcode | string | required | |
domainDetails.contacts.admin.country | string | required | |
domainDetails.contacts.tech.name | string | optional | Required if the parameters domainDetails.contacts.tech.firstname or domainDetails.contacts.tech.lastname are not present. |
domainDetails.contacts.tech.firstname | string | optional | Required if the parameters domainDetails.contacts.tech.name are not present. |
domainDetails.contacts.tech.lastname | string | optional | |
domainDetails.contacts.tech.email | required | ||
domainDetails.contacts.tech.phone | string | required | Minimum: 7 |
domainDetails.contacts.tech.fax | string | optional | Minimum: 7 |
domainDetails.contacts.tech.address1 | string | required | |
domainDetails.contacts.tech.address2 | string | optional | |
domainDetails.contacts.tech.city | string | required | |
domainDetails.contacts.tech.state | string | required | |
domainDetails.contacts.tech.postcode | string | required | |
domainDetails.contacts.tech.country | string | required | |
domainDetails.contacts.billing.name | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.firstname | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.lastname | string | optional | |
domainDetails.contacts.billing.email | optional | Required if the parameters domainDetails.contacts.billing are present. |
|
domainDetails.contacts.billing.phone | string | optional | Required if the parameters domainDetails.contacts.billing are present. Minimum: 7 |
domainDetails.contacts.billing.fax | string | optional | Minimum: 7 |
domainDetails.contacts.billing.address1 | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.address2 | string | optional | |
domainDetails.contacts.billing.city | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.state | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.postcode | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.contacts.billing.country | string | optional | Required if the parameters domainDetails.contacts.billing are present. |
domainDetails.additionalFields.dns | array | optional | |
domainDetails.additionalFields.dns.0.name | string | optional | Required if the parameters domainDetails.dns are present. |
domainDetails.additionalFields.dns.0.type | string | optional | Required if the parameters domainDetails.dns are present. |
domainDetails.additionalFields.dns.0.content | string | optional | Required if the parameters domainDetails.dns are present. |
Cancel
Cancel a domain name
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/Delete" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/Delete",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/Delete");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully deleted yourdomain.co.nz",
"domainStatus": "Pending Release",
"cancelDate": "2018-05-22 00:45:22",
"expiryDate": "2026-11-16 00:45:22"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/Delete
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/Delete
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional |
WHOIS
Get the WHOIS details for a domain name.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/Whois" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/Whois",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/Whois");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"statusMsg":"",
"whois":{
"domainName":"yourdomain.co.nz",
"status":"Active",
"registerDate":"2016-09-16 00:45:22",
"expiryDate":"2026-11-16 00:45:22",
"nameservers":{
"ns0":{
"FQDN":"ns0.dns.com",
"IPv4":"",
"IPv6":""
},
"ns1":{
"FQDN":"ns1.dns.com",
"IPv4":"",
"IPv6":""
},
"ns2":{
"FQDN":"ns2.dns.com",
"IPv4":"",
"IPv6":""
},
"ns3":{
"FQDN":"ns3.dns.com",
"IPv4":"",
"IPv6":""
}
},
"registrant":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"tech":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"admin":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"tld":".co.nz"
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/Whois
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/Whois
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional |
PublicWHOIS
Get the WHOIS details for a domain name.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/PublicWhois" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true,"domain":"yourdomain.co.nz"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/PublicWhois",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"domain": "yourdomain.co.nz"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'domain' => 'yourdomain.co.nz',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/PublicWhois");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"statusMsg":"",
"whois":{
"tos":"Terms of Service Text",
"domain":"yourdomain.co.nz",
"status":"200 Active",
"registerDate":"2016-09-16 00:45:22",
"expiryDate":"2026-11-16 00:45:22",
"updateDate":"2026-11-16 00:45:22",
"delegaterequested":"yes",
"dnssec":"no",
"nameservers":[
{
"name":"ns0.dns.com",
"ip4":"",
"ip6":""
},
{
"name":"ns1.dns.com",
"ip4":"",
"ip6":""
},
{
"name":"ns2.dns.com",
"ip4":"",
"ip6":""
},
{
"name":"ns3.dns.com",
"ip4":"",
"ip6":""
},
},
"registrar":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
},
"registrant":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
},
"tech":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
},
"admin":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
},
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/PublicWhois
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/PublicWhois
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional | |
domain | string | required |
Set DNS Record
Add DNS Records to a domain
Popular types include, A, TXT, MX, SOA, CNAME
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SetDNSRecord" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"dnsrecords":[{"name":"consequatur","type":"consequatur","content":"consequatur","ttl":"consequatur"}]}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SetDNSRecord",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"dnsrecords": [
{
"name": "consequatur",
"type": "consequatur",
"content": "consequatur",
"ttl": "consequatur"
}
]
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'dnsrecords' =>
array (
0 =>
array (
'name' => 'consequatur',
'type' => 'consequatur',
'content' => 'consequatur',
'ttl' => 'consequatur',
),
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SetDNSRecord");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"statusMsg":"Successfully added zone A record recordname.yourdomain.co.nz for domain yourdomain.co.nz"
}
{
"status":"success",
"statusMsg":"Successfully added zone MX record mail.yourdomain.co.nz for domain yourdomain.co.nz"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SetDNSRecord
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SetDNSRecord
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional | |
dnsrecords | array | optional | |
dnsrecords.0.name | string | optional | Required if the parameters dnsrecords.type are present. |
dnsrecords.0.type | string | optional | Required if the parameters dnsrecords.name are present. |
dnsrecords.0.content | string | optional | Required if the parameters dnsrecords.type are present. |
dnsrecords.0.ttl | string | optional |
Save DNS Record
Multi Functional API Call to Add/Edit/Delete DNS Records on a domain
Call with id = null & content set -> Create Record
Call with id set & content null -> Delete Record
Call with id set & content set -> Update Record
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SaveDNSRecord" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"dnsrecords":[{"name":"eveniet","type":"eveniet","content":"eveniet","ttl":"eveniet","id":"eveniet"}]}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SaveDNSRecord",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"dnsrecords": [
{
"name": "eveniet",
"type": "eveniet",
"content": "eveniet",
"ttl": "eveniet",
"id": "eveniet"
}
]
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'dnsrecords' =>
array (
0 =>
array (
'name' => 'eveniet',
'type' => 'eveniet',
'content' => 'eveniet',
'ttl' => 'eveniet',
'id' => 'eveniet',
),
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SaveDNSRecord");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success"
}
{
"status":"success",
"statusMsg":"Successfully updated zone A record recordname.yourdomain.co.nz for domain yourdomain.co.nz"
}
{
"status":"success",
"statusMsg":"Successfully deleted zone record id 111111 for domain yourdomain.co.nz"
}*"
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SaveDNSRecord
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SaveDNSRecord
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional | |
dnsrecords | array | optional | |
dnsrecords.0.name | string | optional | Required if the parameters dnsrecords.type are present. |
dnsrecords.0.type | string | optional | Required if the parameters dnsrecords.name are present. |
dnsrecords.0.content | string | optional | Required if the parameters dnsrecords.type are present. |
dnsrecords.0.ttl | string | optional | |
dnsrecords.0.id | string | optional |
Get DNS Records
List DNS records for a particular domain
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetDNSRecords" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetDNSRecords",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetDNSRecords");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"dnsRecords":[
{
"name":"yourdomain.co.nz",
"type":"SOA",
"content":"SOA Record Content",
"ttl":86400,
"prio":0,
"id":123456
},
{
"name":"recordname.yourdomain.co.nz",
"type":"NS",
"content":"10.0.0.1",
"ttl":86400,
"prio":0,
"id":123456
},
{
"name":"mxrecordname.yourdomain.co.nz",
"type":"MX",
"content":"mail.somemailserver.com",
"ttl":3600,
"prio":0,
"id":123456
}
]
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetDNSRecords
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetDNSRecords
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional |
Delete DNS Record
Delete DNS Records from a domain
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/DeleteDNSRecords" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"dnsrecords":[{"id":"dolores"}]}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/DeleteDNSRecords",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"dnsrecords": [
{
"id": "dolores"
}
]
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'dnsrecords' =>
array (
0 =>
array (
'id' => 'dolores',
),
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/DeleteDNSRecords");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"statusMsg":"Successfully deleted zone record id 12345 for domain yourdomain.co.nz"
}
{
"status":"success",
"statusMsg":"Successfully deleted zone record id 54321 for domain yourdomain.co.nz"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/DeleteDNSRecords
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/DeleteDNSRecords
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional | |
dnsrecords | array | optional | |
dnsrecords.0.id | string | required |
Update DNS Record
Update DNS Record for a domain
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/UpdateDNSRecord" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"dnsrecord":[{"old":{"name":"eos","type":"eos","content":"eos","prio":"eos"},"new":{"name":"eos","type":"eos","content":"eos","ttl":"eos","prio":"eos"}}]}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/UpdateDNSRecord",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"dnsrecord": [
{
"old": {
"name": "eos",
"type": "eos",
"content": "eos",
"prio": "eos"
},
"new": {
"name": "eos",
"type": "eos",
"content": "eos",
"ttl": "eos",
"prio": "eos"
}
}
]
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'dnsrecord' =>
array (
0 =>
array (
'old' =>
array (
'name' => 'eos',
'type' => 'eos',
'content' => 'eos',
'prio' => 'eos',
),
'new' =>
array (
'name' => 'eos',
'type' => 'eos',
'content' => 'eos',
'ttl' => 'eos',
'prio' => 'eos',
),
),
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/UpdateDNSRecord");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"statusMsg":"Successfully updated zone record recordname.yourdomain.co.nz for domain yourdomain.co.nz"
}
{
"status":"success",
"statusMsg":"Successfully updated zone record recordname.yourdomain.co.nz for domain yourdomain.co.nz"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/UpdateDNSRecord
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/UpdateDNSRecord
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional | |
dnsrecord | array | optional | |
dnsrecord.0.old.name | string | optional | Required if the parameters dnsrecord are present. |
dnsrecord.0.old.type | string | optional | Required if the parameters dnsrecord are present. |
dnsrecord.0.old.content | string | optional | Required if the parameters dnsrecord are present. |
dnsrecord.0.old.prio | string | optional | |
dnsrecord.0.new.name | string | optional | Required if the parameters dnsrecord are present. |
dnsrecord.0.new.type | string | optional | Required if the parameters dnsrecord are present. |
dnsrecord.0.new.content | string | optional | Required if the parameters dnsrecord are present. |
dnsrecord.0.new.ttl | string | optional | |
dnsrecord.0.new.prio | string | optional |
Get Redirects
Get redirects for a particular domain
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetRedirects" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetRedirects",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetRedirects");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"redirects":[
{
"from":"redirect.yourdomain.co.nz",
"to":"home.otherdomain.net",
"uri":"index.html",
"permanent":0,
"id":123456
},
{
"from":"www.yourdomain.co.nz",
"to":"yourdomain.co.nz",
"uri":"",
"permanent":1,
"id":123456
}
]
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetRedirects
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetRedirects
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional |
Save Redirects
Multi Functional API Call to Add/Edit/Delete Redirects on a domain
Call with id = null & from set & to set -> Create Redirect
Call with id set & from null or to null -> Delete Redirect
Call with id set & from set & to set -> Update Redirect
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SaveRedirects" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"redirects":[{"from":"possimus","to":"possimus","uri":"possimus","permanent":"possimus","id":"possimus"}]}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SaveRedirects",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"redirects": [
{
"from": "possimus",
"to": "possimus",
"uri": "possimus",
"permanent": "possimus",
"id": "possimus"
}
]
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'redirects' =>
array (
0 =>
array (
'from' => 'possimus',
'to' => 'possimus',
'uri' => 'possimus',
'permanent' => 'possimus',
'id' => 'possimus',
),
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SaveRedirects");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"statusMsg":"Successfully created redirect from redirect.yourdomain.co.nz to home.otherdomain.com for domain yourdomain.co.nz"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SaveRedirects
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SaveRedirects
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional | |
redirects | array | optional | |
redirects.0.from | string | optional | Required if the parameters redirects.to are present. |
redirects.0.to | string | optional | Required if the parameters redirects.from are present. |
redirects.0.uri | string | optional | |
redirects.0.permanent | string | optional | |
redirects.0.id | string | optional |
Check Availability
Check to see if a domain is available to register
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/CheckAvaliability" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/CheckAvaliability",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/CheckAvaliability");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "",
"query_status": "available"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/CheckAvaliability
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/CheckAvaliability
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | |
username | string | required | |
password | string | required | |
testmode | string | optional |
Domain List
Get a list of domains with their contact details, nameservers, registration dates, expiry dates, cancel dates, and last renew dates in your account
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/DomainList" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/DomainList",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/DomainList");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"statusMsg":"Successfully queried domain list",
"domainList":[{
"domain":"yourdomain.co.nz",
"status":"Active",
"registerDate":"2016-09-16 00:45:22",
"expiryDate": "2026-11-16 00:45:22",
"cancelDate":"",
"renewDate":"",
"contacts":{
"registrant":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"tech":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"admin":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
},
"billing":{
"name":"Joe Soap",
"email":"joe@soap.co,nz",
"phone":"+64 212345678",
"fax":null,
"address1":"123 Queen Street",
"address2":"Auckland CBD",
"city":"Auckland",
"country":"NZ",
"state":"Auckland",
"postcode":"1010",
"privacy":false
}
},
"nameservers":[
{
"ns":"ns0.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns1.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns2.dns.com",
"ip4":"",
"ip6":""
},
{
"ns":"ns3.dns.com",
"ip4":"",
"ip6":""
}
]
}]
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/DomainList
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/DomainList
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Privacy
Enable or disable privacy for a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/Privacy" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"idProtection":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/Privacy",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"idProtection": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'idProtection' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/Privacy");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status":"success",
"statusMsg":"Successfully enabled privacy.",
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/Privacy
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/Privacy
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
idProtection | boolean | required |
Get Domain Pricing
Get Domain Pricing for a client.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainPricing" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true,"tld":"repellat"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainPricing",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"tld": "repellat"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'tld' => 'repellat',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainPricing");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully queried domain pricing for '.co.nz'.",
"currency": {
"prefix": "$",
"suffix": "NZD"
},
"pricing": [
{
"period": 1,
"register": "1.75",
"register_discount": "0.00",
"renew": "1.75",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 12,
"register": "21.00",
"register_discount": "0.00",
"renew": "21.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 24,
"register": "42.00",
"register_discount": "0.00",
"renew": "42.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 36,
"register": "63.00",
"register_discount": "0.00",
"renew": "63.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 48,
"register": "84.00",
"register_discount": "0.00",
"renew": "84.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 60,
"register": "105.00",
"register_discount": "0.00",
"renew": "105.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 72,
"register": "126.00",
"register_discount": "0.00",
"renew": "126.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00",
},
{
"period": 84,
"register": "147.00",
"register_discount": "0.00",
"renew": "147.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 96,
"register": "168.00",
"register_discount": "0.00",
"renew": "168.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 108,
"register": "189.00",
"register_discount": "0.00",
"renew": "189.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
},
{
"period": 120,
"register": "210.00",
"register_discount": "0.00",
"renew": "210.00",
"renew_discount": "0.00",
"transfer": "0.00",
"trnasfer_discount": null,
"restore": "0.00",
"restore_discount": "0.00",
"tldName": ".co.nz",
"privacyPrice": "4.00"
}
]"
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetDomainPricing
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetDomainPricing
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional | |
tld | string | optional |
Get Domain Information
Get Domain Information
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainInformation" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainInformation",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainInformation");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"domainInformation" : {
"domain": "yourdomain.co.nz",
"nameservers": {
"ns1": "ns0.dns.com",
"ns2": "ns1.dns.com"
},
"status": "Active",
"transferlock": 1,
"expirydate": "2020-06-01",
"addons": {
"hasidprotect": 0,
"hasdnsmanagement": 1,
"hasemailforwarding": 1
},
"tld": ".co.nz",
"irtp": {
"enabled": 1,
"endDate": "2020-06-01",
"optoutstatus": "",
"lockstatus": ""
},
"status": {
"contactpending": 0,
"pendingsuspend": 1
},
"registrant": {
"name": "Affordable Domains",
"company": "Affordable Domains",
"email": "affordable@domains.co.nz"
}
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetDomainInformation
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetDomainInformation
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional |
Get TLD Pricing
Get TLD Pricing
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetTldPricing" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetTldPricing",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetTldPricing");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
{
"tld" => ".com",
"minPeriod" => 1,
"maxPeriod" => 10,
"registrationPrice" => 25.00,
"renewalPrice" => 25.00,
"transferPrice" => 25.00,
"redemptionDays" => 40,
"redemptionFee" => 50.00,
"currencyCode" => "NZD",
"transferSecretRequired" => 0
},
{
"tld" => ".co.nz",
"minPeriod" => 1,
"maxPeriod" => 10,
"registrationPrice" => 21.00,
"renewalPrice" => 21.00,
"transferPrice" => 21.00,
"redemptionDays" => 90,
"redemptionFee" => 60.00,
"currencyCode" => "NZD",
"transferSecretRequired" => 1
},
{
"tld" => ".com.au",
"minPeriod" => 1,
"maxPeriod" => 10,
"registrationPrice" => 29.00,
"renewalPrice" => 29.00,
"transferPrice" => 29.00,
"redemptionDays" => 30,
"redemptionFee" => 80.00,
"currencyCode" => "NZD",
"transferSecretRequired" => 0
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetTldPricing
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetTldPricing
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Check Multiple Availability
Check availability for multiple domains
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/CheckMultipleAvailability" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true,"searchTerm":"et","tldsToSearch":[],"includePremiumDomains":"et"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/CheckMultipleAvailability",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"searchTerm": "et",
"tldsToSearch": [],
"includePremiumDomains": "et"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'searchTerm' => 'et',
'tldsToSearch' =>
array (
),
'includePremiumDomains' => 'et',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/CheckMultipleAvailability");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"domains": {
"test.com": {
"sld": "test",
"tld": ".com",
"status": "Active",
"isPremiumName": 1,
"premiumRegistrationPrice": 89.00,
"premiumRenewPrice": 89.00
},
"test.co.nz": {
"sld": "test",
"tld": ".co.nz",
"status": "Active",
"isPremiumName": 0,
"premiumRegistrationPrice": 0,
"premiumRenewPrice": 0
}
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/CheckMultipleAvailability
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/CheckMultipleAvailability
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional | |
searchTerm | string | required | |
tldsToSearch | array | required | |
includePremiumDomains | string | optional |
Resend IRTP Verification Email
Resend IRTP Verification Email
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/ResendIRTPVerificationEmail" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/ResendIRTPVerificationEmail",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/ResendIRTPVerificationEmail");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully sent verification email"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/ResendIRTPVerificationEmail
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/ResendIRTPVerificationEmail
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional |
Get Domain Suggestions
Get Domain Suggestions
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainSuggestions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true,"searchTerm":"atque","tldsToSearch":[],"includePremiumDomains":"atque"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainSuggestions",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"searchTerm": "atque",
"tldsToSearch": [],
"includePremiumDomains": "atque"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'searchTerm' => 'atque',
'tldsToSearch' =>
array (
),
'includePremiumDomains' => 'atque',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetDomainSuggestions");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"suggestions": {
"alldomainsuggestion.com": {
"status": "available",
"in_ga": "true",
"score": "1.0",
"spin": "no"
},
"publicdomainsuggestions.com": {
"status": "available",
"in_ga": "true",
"score": "0.8",
"spin": "no"
},
"topdomainsuggestions.com": {
"status": "available",
"in_ga": "true",
"score": "0.7",
"spin": "no"
},
"domainservingsuggestions.com": {
"status": "available",
"in_ga": "true",
"score": "0.64",
"spin": "no"
}
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetDomainSuggestions
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetDomainSuggestions
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional | |
searchTerm | string | required | |
tldsToSearch | array | required | |
includePremiumDomains | string | optional |
api/new/whmcs/MultipleDomainWhois
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/MultipleDomainWhois" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true,"domains":[]}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/MultipleDomainWhois",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"domains": []
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'domains' =>
array (
),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/MultipleDomainWhois");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/MultipleDomainWhois
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/MultipleDomainWhois
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional | |
domains | array | required |
Hosting Actions
Get Hosting
Get Hosting details for a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetHosting" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetHosting",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetHosting");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"hosting": {
"id": 1,
"period": 1,
"ip": "100.0.100.100",
"username": "username",
"disk": 1234567890,
"bandwidth": -1,
"email": 1,
"ftp": 1,
"sql": 1,
"sub_domains": -1,
"parked_domains": 0,
"addon_domains": 0,
"reseller": 0,
"cgi": 0,
"shell": 0,
"auto_ssl": 0,
"dedicated_ip": 0,
"enabled": 1,
"status": "Active",
"next_due_date": "2019-05-01",
"disable_date": null,
"first_payment": "10.00",
"recurring": 0,
"discount": 0,
"suspended_by": null,
"suspend_reason": null,
"domain": "yourdomain.co.nz",
"package": "Package Name",
"module": "cPanel",
"server": "SV",
"host_server": "host.server.co.nz"
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetHosting
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetHosting
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Get Hosting Packages
Get available hosting packages.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GetHostingPackages" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GetHostingPackages",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GetHostingPackages");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"packages": [
{
"id": 1,
"name": "Starter",
"disk": 1073741824,
"bandwidth": -1,
"email": 1,
"ftp": 1,
"sql": 1,
"sub_domains": -1,
"parked_domains": 0,
"addon_domains": 0,
"reseller": 0,
"cgi": 0,
"shell": 0,
"dedicated_ip": 0,
"auto_ssl": 0,
"enabled": 1,
"dedicated_ip_price": "5.00",
"auto_ssl_price": "0.50",
"reseller_price": "0.00",
"features": {
"SSD Disk Space": "1.00 GB",
"Bandwidth": "Unlimited",
"Websites": "1 Website",
"cPanel": "Yes",
"Email Accounts": "1",
"Databases": "1",
"FTP Accounts": "1",
"Sub Domains": "Unlimited",
"Dedicated IP": "$5.00",
"Auto SSL": "$0.50",
"Server Location": "NZ",
"PHP7 Support": "Yes",
"Webmail": "Yes",
"SMTP, POP3, IMAP": "Yes",
"JetBackup": "30 Days Retention",
"Softaculous - 1 Click Installer": "Yes",
"Statistics": "Yes",
"Uptime": "99.9%",
"CPU": "1 CPU",
"Virtual Memory": "1 GB",
"I\/O Allowance": "1 MB\/s",
"Entry Processes": "20",
"24\/7 Support": "Yes",
"Instant Setup": "Yes"
},
"billing": {
"1": {
"id": 1,
"package_id": 1,
"count_id": 1,
"period": 1,
"setup": "0.00",
"setup_discount": "0.00",
"recurring": "5.50",
"recurring_discount": "0",
"enabled": 1
},
"12": {
"id": 2,
"package_id": 1,
"count_id": 1,
"period": 12,
"setup": "0.00",
"setup_discount": "0.00",
"recurring": "60.00",
"recurring_discount": "0",
"enabled": 1
}
}
}
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GetHostingPackages
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GetHostingPackages
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Set Hosting
Set a hosting package on a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SetHosting" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"package_id":"modi","enabled":"modi","period":"modi","ssl":"modi","ip":"modi","hosting_username":"modi","hosting_password":"modi"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SetHosting",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"package_id": "modi",
"enabled": "modi",
"period": "modi",
"ssl": "modi",
"ip": "modi",
"hosting_username": "modi",
"hosting_password": "modi"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'package_id' => 'modi',
'enabled' => 'modi',
'period' => 'modi',
'ssl' => 'modi',
'ip' => 'modi',
'hosting_username' => 'modi',
'hosting_password' => 'modi',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SetHosting");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully added hosting for yourdomain.co.nz"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SetHosting
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SetHosting
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
package_id | string | required | |
enabled | string | required | |
period | string | required | |
ssl | string | optional | |
ip | string | optional | |
hosting_username | string | optional | |
hosting_password | string | optional |
Set Hosting Auto SSL
Enable Auto SSL on a domain's hosting.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SetHostingAutoSSL" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"enabled":"amet"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SetHostingAutoSSL",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"enabled": "amet"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'enabled' => 'amet',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SetHostingAutoSSL");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully enabled Auto SSL"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SetHostingAutoSSL
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SetHostingAutoSSL
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
enabled | string | required |
Set Hosting CGI
Enable CGI for a domain's hosting.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SetHostingCGI" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain":"yourdomain.co.nz","username":"name@example.com","password":"yourpassword","testmode":true,"enabled":"nihil"}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SetHostingCGI",
"method": "POST",
"data": {
"domain": "yourdomain.co.nz",
"username": "name@example.com",
"password": "yourpassword",
"testmode": true,
"enabled": "nihil"
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'domain' => 'yourdomain.co.nz',
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
'enabled' => 'nihil',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SetHostingCGI");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully enabled CGI"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SetHostingCGI
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SetHostingCGI
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain | string | required | Valid domain |
username | string | required | |
password | string | required | |
testmode | string | optional | |
enabled | string | required |
Terminate Hosting
Terminate hosting on a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/TerminateHosting" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/TerminateHosting",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/TerminateHosting");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully terminated hosting for yourdomain.co.nz"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/TerminateHosting
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/TerminateHosting
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Suspend Hosting
Suspend hosting on a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/SuspendHosting" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/SuspendHosting",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/SuspendHosting");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully suspended hosting for yourdomain.co.nz"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/SuspendHosting
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/SuspendHosting
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Unsuspend Hosting
Unsuspend hosting on a domain.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/UnsuspendHosting" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/UnsuspendHosting",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/UnsuspendHosting");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully unsuspended hosting for yourdomain.co.nz"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/UnsuspendHosting
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/UnsuspendHosting
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Login to CPanel
Generate CPanel Login URL.
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/LoginToCPanel" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/LoginToCPanel",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/LoginToCPanel");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
Example response:
{
"status": "success",
"statusMsg": "Successfully be able to log in to CPanel with url",
"url": "https:\/\/servername\/cpsess0000000000\/login\/?session=username%3aencrypted_password%3acreate_user_session%2cencrypted_session_value"
}
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/LoginToCPanel
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/LoginToCPanel
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |
Generate Hosting Username
Generate a username for a hosting account
Example request:
curl -X POST "https://www.affordabledomains.co.nz/api/new/whmcs/GenerateHostingUsername" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"username":"name@example.com","password":"yourpassword","testmode":true}' \
var settings = {
"async": true,
"crossDomain": true,
"url": "https://www.affordabledomains.co.nz/api/new/whmcs/GenerateHostingUsername",
"method": "POST",
"data": {
"username": "name@example.com",
"password": "yourpassword",
"testmode": true
},
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
$postfields = array (
'username' => 'name@example.com',
'password' => 'yourpassword',
'testmode' => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.affordabledomains.co.nz/api/new/whmcs/GenerateHostingUsername");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$response = curl_exec($ch);
curl_close($ch);
HTTP Request
Sandbox - POST https://sandbox.affordabledomains.co.nz/api/new/whmcs/GenerateHostingUsername
Production - POST https://reseller.affordabledomains.co.nz/api/new/whmcs/GenerateHostingUsername
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | required | |
password | string | required | |
testmode | string | optional |