Constructor
new Domains(config)
Parameters:
Name |
Type |
Description |
config |
Object
|
Object containing your API credentials.
Properties
Name |
Type |
Attributes |
Description |
serverUrl |
string
|
|
URL to your installation. Remember to point to /includes/api.php |
username |
string
|
<optional>
|
|
password |
string
|
<optional>
|
|
identifier |
string
|
<optional>
|
|
secret |
string
|
<optional>
|
|
|
- Source:
Extends
Methods
domainGetLockingStatus(opts)
Connects to the registrar and obtains the current lock status of the domain - https://developers.whmcs.com/api-reference/domaingetlockingstatus/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
domainid |
Number
|
The id of the domain to obtain the lock status for |
|
- Source:
domainGetNameservers(opts)
Connects to the registrar and obtains the nameservers for the domain - https://developers.whmcs.com/api-reference/domaingetnameservers/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
domainid |
Number
|
The id of the domain to obtain the nameservers for |
|
- Source:
domainGetWhoisInfo(opts)
Connects to the registrar and obtains the whois information for the domain - https://developers.whmcs.com/api-reference/domaingetwhoisinfo/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
domainid |
Number
|
The id of the domain to obtain the whois information for |
|
- Source:
domainRegister(opts)
Connects to the registrar and attempts to register the domain. - https://developers.whmcs.com/api-reference/domainregister/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
domainid |
Number
|
<optional>
|
The id of the domain to register recommended |
domain |
String
|
<optional>
|
The domain name to be registered. This or $domainid is required |
|
- Source:
domainRelease(opts)
Connects to the registrar and attempts to release the domain. - https://developers.whmcs.com/api-reference/domainrelease/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
domainid |
Number
|
<optional>
|
The id of the domain to be released recommended |
domain |
String
|
<optional>
|
The domain name to be released. This or $domainid is required |
newtag |
String
|
|
The receiving tag for the domain |
|
- Source:
domainRenew(opts)
Connects to the registrar and attempts to renew the domain. - https://developers.whmcs.com/api-reference/domainrenew/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
domainid |
Number
|
<optional>
|
The id of the domain to be renewed recommended |
domain |
String
|
<optional>
|
The domain name to be renewed. This or $domainid is required |
regperiod |
Number
|
<optional>
|
How long to renew the domain for. Defaults to the current stored value. |
|
- Source:
domainRequestEPP(opts)
Connects to the registrar and attempts to obtain the EPP Code for the domain.
Not all registrars return the EPP code but send them directly to the client. - https://developers.whmcs.com/api-reference/domainrequestepp/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
domainid |
Number
|
The id of the domain to obtain the EPP for |
|
- Source:
domainToggleIdProtect(opts)
Connects to the registrar and attempts to toggle the ID Protect state - https://developers.whmcs.com/api-reference/domaintoggleidprotect/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
domainid |
Number
|
|
The id of the domain to toggle ID Protection for |
idprotect |
Boolean
|
<optional>
|
Should ID Protection be turned on |
|
- Source:
domainTransfer(opts)
Connects to the registrar and attempts to start the transfer process. - https://developers.whmcs.com/api-reference/domaintransfer/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
domainid |
Number
|
<optional>
|
The id of the domain to be transferred recommended |
domain |
String
|
<optional>
|
The domain name to be transferred. This or $domainid is required |
eppcode |
Number
|
<optional>
|
Provide a new EPP Code for the Transfer Request |
|
- Source:
domainUpdateLockingStatus(opts)
Connects to the registrar and attempts to update the lock - https://developers.whmcs.com/api-reference/domainupdatelockingstatus/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
domainid |
Number
|
|
The id of the domain to update the locking status for |
lockstatus |
Boolean
|
<optional>
|
Should the domain lock be turned on |
|
- Source:
domainUpdateNameservers(opts)
Connects to the registrar and attempts to update the nameservers with those provided. - https://developers.whmcs.com/api-reference/domainupdatenameservers/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
domainid |
Number
|
<optional>
|
The id of the domain to update the nameservers for recommended |
domain |
String
|
<optional>
|
The domain name to be update the nameservers for. This or $domainid is required |
ns1 |
String
|
|
The first nameserver |
ns2 |
String
|
|
The second nameserver |
ns3 |
String
|
<optional>
|
The third nameserver |
ns4 |
String
|
<optional>
|
The fourth nameserver |
ns5 |
String
|
<optional>
|
The fifth nameserver |
|
- Source:
domainUpdateWhoisInfo(opts)
Connects to the registrar and attempts to update the WHOIS Information - https://developers.whmcs.com/api-reference/domainupdatewhoisinfo/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
domainid |
Number
|
The id of the domain to update the whois information for |
xml |
String
|
The xml of the details to update. See DomainGetWhoisInfo |
|
- Source:
domainWhois(opts)
Retrieve domain whois information. - https://developers.whmcs.com/api-reference/domainwhois/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
domain |
String
|
The domain name to lookup |
|
- Source:
getTLDPricing(opts)
Retrieve TLD pricing - https://developers.whmcs.com/api-reference/gettldpricing/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
currencyid |
Number
|
<optional>
|
The currency ID to fetch pricing for |
clientid |
Number
|
<optional>
|
The id of the client to fetch pricing for. Pass one or the other. clientid being passed will override currencyid |
|
- Source:
updateClientDomain(opts)
Updates a Client Domain - https://developers.whmcs.com/api-reference/updateclientdomain/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
domainid |
Number
|
|
The id of the client domain to update |
dnsmanagement |
Boolean
|
<optional>
|
Enable/Disable DNS Management |
emailforwarding |
Boolean
|
<optional>
|
Enable/Disable Email Forwarding |
idprotection |
Boolean
|
<optional>
|
Enable/Disable ID Protection |
donotrenew |
Boolean
|
<optional>
|
Enable/Disable Do Not Renew |
type |
String
|
<optional>
|
The type of domain order. (‘Register’, ‘Transfer’) |
regdate |
String
|
<optional>
|
The registration date of the domain (Y-m-d) |
nextduedate |
String
|
<optional>
|
The next due date of the domain (Y-m-d) |
expirydate |
String
|
<optional>
|
The expiry date of the domain (Y-m-d) |
domain |
String
|
<optional>
|
The domain name to be changed to |
firstpaymentamount |
Number
|
<optional>
|
The first payment amount on the domain |
recurringamount |
Number
|
<optional>
|
The recurring amount for automatic renewal invoices |
registrar |
String
|
<optional>
|
The registrar to associate with the domain |
regperiod |
Number
|
<optional>
|
The registration period of the domain |
paymentmethod |
String
|
<optional>
|
The payment method to associate in system format (eg paypal) |
subscriptionid |
String
|
<optional>
|
The subscription ID to associate with the domain |
status |
String
|
<optional>
|
The status to change the domain to |
notes |
String
|
<optional>
|
The admin notes for the domain |
promoid |
Number
|
<optional>
|
The promotion Id to associate |
autorecalc |
Boolean
|
<optional>
|
Should the recurring amount of the domain be automatically recalculated (this will ignore any passed $recurringamount) |
updatens |
Boolean
|
<optional>
|
Should the nameservers be updated at the registrar |
ns1 |
String
|
<optional>
|
The first nameserver to save |
ns2 |
String
|
<optional>
|
The second nameserver to save |
ns3 |
String
|
<optional>
|
The third nameserver to save |
ns4 |
String
|
<optional>
|
The fourth nameserver to save |
ns5 |
String
|
<optional>
|
The fifth nameserver to save |
|
- Source: