Domain Reseller API Documentation
Access API documentation details with basic information and API Calls and Models.
This API documentation has been prepared to allow you to write your own integration modules.
‘Information’ tab contains:
- Endpoint – URL to which all the API requests are directed
- Authorization – Username and token parameters to authenticate the client in the API request
- Example – exemplary request to API to renew a domain
Information
Endpoint
https://www.garanntor.ng/portal/modules/addons/DomainsReseller/api/index.php
Authorization
- UsernameThis is an email address of the reseller’s client registered in your WHMCS.
- Token is an API Key transformed into SHA256 hash using the reseller’s email address and the current time encoded with base64.
base64_encode(hash_hmac("sha256", "", ":<gmdate("y-m-d H")>)"))
Example
$endpoint = "https://www.garanntor.ng/portal/modules/addons/DomainsReseller/api/index.php"; $action = "/order/domains/renew"; $params = [ "domain" => "example.com", "regperiod" => "3", "addons" => [ "dnsmanagement" => 0, "emailforwarding" => 1, "idprotection" => 1, ] ]; $headers = [ "username: email@example.com", "token: ". base64_encode(hash_hmac("sha256", "1234567890QWERTYUIOPASDFGHJKLZXCVBNM", "email@example.com:".gmdate("y-m-d H"))) ]; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "{$endpoint}{$action}"); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params)); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($curl); curl_close($curl);
Calls
POST – /order/domains/register – Register Domain
domain
regperiod
type: text
validators: required, text
regperiod
type: numeric
validators: required, numeric
domainfields type: text
validators: text
addons type: addons
nameservers type: nameservers
validators: required
contacts type: contacts
validators: required
POST – /order/domains/transfer – Transfer Domain
domain
eppcode
regperiod
domainfields
addons
nameservers
contacts
type: text
validators: required, text
eppcode
type: text
validators: text
regperiod
type: numeric
validators: required, numeric
domainfields
type: text
validators: text
addons
type: addons
nameservers
type: nameservers
validators: required
contacts
type: contacts
validators: required
POST – /order/domains/renewre – Renew Domain
domain
regperiod
addons
type: text
validators: required, text
regperiod
type: numeric
validators: required, numeric
addons
type: addons
GET – /domains/{domain}/release – Release Domain
domain
transfertag
type: text
validators: required, text
transfertag
type: text
validators: required, text
GET – /domains/{domain}/eppcode – Get EPP Code
domain
type: text
validators: required, text
GET – /domains/{domain}/contact – Get Contact Details
domain
type: text
validators: required, text
POST – /domains/{domain}/contact – Save Contact Details
domain
contactdetails
type: text
validators: required, text
contactdetails
type: contactdetails
validators: required
GET – /domains/{domain}/contact – Get Registrar Lock
domain
type: text
validators: required, text
POST – /domains/{domain}/contact – Save Registrar Lock
domain
lockstatus
type: text
validators: required, text
lockstatus
type: text
validators: required, text
GET – /domains/{domain}/dns – Get DNS
domain
type: text
validators: required, text
POST – /domains/{domain}/dns – Save DNS
domain
dnsrecords
type: text
validators: required, text
dnsrecords
type: dnsrecords
validators: required
POST – /domains/{domain}/delete – Request Deletion
domain
type: text
validators: required, text
POST – /domains/{domain}/transfersync – Transfer Sync
domain
type: text
validators: required, text
POST – /domains/{domain}/sync – Domain Sync
domain
type: text
validators: required, text
GET – /domains/{domain}/email – Get Email Forwarding
domain
type: text
validators: required, text
POST – /domains/{domain}/email – Save Email Forwarding
domain
prefix
forwardto
type: text
validators: required, text
prefix
type: array
forwardto
type: array
POST – /domains/{domain}/protectid – ID Protect Toggle
domain
status
type: text
validators: required, text
status
type: int
validators: required, numeric
POST – /domains/lookup – Check Availability
searchTerm
punyCodeSearchTerm
tldsToInclude
isIdnDomain
premiumEnabled.
type: text
validators: text
punyCodeSearchTerm
type: text
validators: text
tldsToInclude
type: array
isIdnDomain
type: boolean
premiumEnabled.
type: boolean
GET – /domains/{domain}/nameservers – Get Nameservers
domain
validators: required, text
POST – /domains/{domain}/nameservers – Save Nameservers
domain
ns1
ns2
ns3
ns4
ns5
validators: required, text
ns1
validators: required, text
ns2
validators: required, text
ns3
validators: text
ns4
validators: text
ns5
validators: text
POST – /domains/{domain}/nameservers/register – Register Nameserver
domain
nameserver
ipaddress
validators: required, text
nameserver
validators: required, text
ipaddress
validators: required, text
POST – /domains/{domain}/nameservers/register – Modify Nameserver
nameserver
currentipaddress.
newipaddress
validators: required, text
currentipaddress.
validators: required, text
newipaddress
validators: required, text
POST – /domains/{domain}/nameservers/register – Delete Nameserver
nameserver
validators: required, text
GET – /billing/credits – Get Credits
GET – /version – Get Version
GET – /tlds – Get Available TLDs
Models
Nameservers
ns1
type: text
validators: required, text
ns2
type: text
validators: required, text
ns3
type: text
validators: text
ns4
type: text
validators: text
ns5
type: text
validators: text
DNS Records
hostname
type: text
validators: required, text
type
type: text
validators: required, text
address
type: text
validators: required, text
priority
type: numeric
validators: required
recid
type: text
validators: requires, text
Contacts
registrant
type: contact
tech
type: contact
billing
type: contact
admin
type: contact
Contact Details
Registrant
type: contact
validators: required
Technical
type: contact
validators: required
Billing
type: contact
validators: required
Admin
type: contact
validators: required
Contact
firstname
type: text
validators: required, text
lastname
type: text
validators: required, text
fullname
type: text
validators: required, text
companyname.
email
type: text
validators: required, text
type: text
validators: required, text
address1
type: text
validators: required, text
address2
type: text
validators: text
city
type: text
validators: required, text
state
type: text
validators: required, text
zipcode
type: text
validators: required, text
country
type: text
validators: required, text
phonenumber.
type: text
validators: required, text
Addons
dnsmanagement
type: numeric
validators: numeric
emailforwarding
type: numeric
validators: numeric
idprotection
type: numeric
validators: numeric