API Actions

RegisterDomain:

This command is used to send a Register command to the registrar.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
regperiodNumberYesRegistration period
nameserver1StringNoFirst nameserver
nameserver2StringNoSecond nameserver
nameserver3StringNoThird nameserver
nameserver4StringNoFourth nameserver
nameserver5StringNoFifth nameserver
dnsmanagementNumberNoEnables dns management for this domain
emailforwardingNumberNoEnables email forwarding for this domain
idprotectionNumberNoEnables id protection for this domain
firstnameStringYesFirst name of the user
lastnameStringYesLast name of the user
address1StringYesFirst part of user address
address2StringNoSecond part of user address
cityStringYesCity of the user
stateStringYesState/Province of the user
postcodeStringYesPostal/ZIP Code of the user
countryStringYesCountry of the user
phonenumberStringYesPhone number in the format +NNN.NNNNNNNNNN
emailStringYesEmail address of the user
adminfirstnameStringNoFirst name of the admin user
adminlastnameStringNoLast name of the admin user
adminaddress1StringNoFirst part of admin user address
adminaddress2StringNoSecond part of admin user address
admincityStringNoCity of the admin user
adminstateStringNoState/Province of the admin user
adminpostcodeStringNoPostal/ZIP Code of the admin user
admincountryStringNoCountry of the admin user
adminphonenumberStringNoPhone number in the format +NNN.NNNNNNNNNN
adminemailStringNoEmail address of the admin user
domainfieldsStringNoA base64 encoded serialized array of the TLD specific field values
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=RegisterDomain&sld=exampledomain&tld=com&regperiod=1&nameserver1=ns1.yourdomain.com&nameserver2=ns2.yourdomain.com&firstname=test&lastname=test&companyname=company&address1=addresss&city=city&state=region&country=US&postcode=12345&phonenumber=1234567890&email=admin@exampledomain.com' --compressed
Example Response:
{"result":"success","msg":"Domain has been registered"}

TransferDomain

This command is used to send a Transfer command to the registrar.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
transfersecretStringNoDomain authorization code
regperiodNumberYesRegistration period
nameserver1StringNoFirst nameserver
nameserver2StringNoSecond nameserver
nameserver3StringNoThird nameserver
nameserver4StringNoFourth nameserver
nameserver5StringNoFifth nameserver
dnsmanagementNumberNoEnables dns management for this domain
emailforwardingNumberNoEnables email forwarding for this domain
idprotectionNumberNoEnables id protection for this domain
firstnameStringYesFirst name of the user
lastnameStringYesLast name of the user
address1StringYesFirst part of user address
address2StringNoSecond part of user address
cityStringYesCity of the user
stateStringYesState/Province of the user
postcodeStringYesPostal/ZIP Code of the user
countryStringYesCountry of the user
phonenumberStringYesPhone number in the format +NNN.NNNNNNNNNN
emailStringYesEmail address of the user
adminfirstnameStringNoFirst name of the admin user
adminlastnameStringNoLast name of the admin user
adminaddress1StringNoFirst part of admin user address
adminaddress2StringNoSecond part of admin user address
admincityStringNoCity of the admin user
adminstateStringNoState/Province of the admin user
adminpostcodeStringNoPostal/ZIP Code of the admin user
admincountryStringNoCountry of the admin user
adminphonenumberStringNoPhone number in the format +NNN.NNNNNNNNNN
adminemailStringNoEmail address of the admin user
domainfieldsStringNoA base64 encoded serialized array of the TLD specific field values
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=TransferDomain&sld=exampledomain&tld=com&transfersecret=gd23h231s21&regperiod=1&nameserver1=ns1.yourdomain.com&nameserver2=ns2.yourdomain.com&firstname=test&lastname=test&companyname=company&address1=addresss&city=city&state=region&country=US&postcode=12345&phonenumber=1234567890&email=admin@exampledomain.com' --compressed
Example Response:
{"result":"success","msg":"Domain transfer initiated successfully."}

RenewDomain

This command is used to send a Renew command to the registrar.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
regperiodNumberYesRegistration period
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=RenewDomain&sld=exampledomain&tld=com&regperiod=1' --compressed
Example Response:
{"result":"success","msg":"The domain has been successfully."}

GetNameservers

This command is used to obtain the nameservers of a domain.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=GetNameservers&sld=exampledomain&tld=com' --compressed
Example Response:
{"result":"success","ns1":"ns1.exampledomain.com","ns2":"ns2.exampledomain.com"}

SaveNameservers

This command is used to update the nameservers of a domain.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
nameserver1StringNoFirst nameserver
nameserver2StringNoSecond nameserver
nameserver3StringNoThird nameserver
nameserver4StringNoFourth nameserver
nameserver5StringNoFifth nameserver
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=SaveNameservers&sld=exampledomain&tld=com&ns1=ns1.exampledomain.com&ns2=ns2.exampledomain.com' --compressed
Example Response:
{"result":"success"}

ReleaseDomain

This command is used to send a Release command to the registrar.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
newtagStringYesThe new tag for the domain
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=ReleaseDomain&sld=exampledomain&tld=com&newtag=1AND1-TEST' --compressed
Example Response:
{"result":"success"}

RequestDelete

This function is called when a domain is requested to be deleted

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=RequestDelete&sld=exampledomain&tld=com' --compressed
Example Response:
{"result":"success"}

GetEPPCode

This command is used to obtain the EPP Code of a domain.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=GetEPPCode&sld=exampledomain&tld=com' --compressed
Example Response:
{"result":"success","eppcode":"23svxce123fds"}

GetContactDetails

This command is used to perform a whois lookup on a specified domain.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=GetContactDetails&sld=exampledomain&tld=com' --compressed
Example Response:
{"result":"success","Registrant":{"Name":"John Doe","Company":"Company name","Address":"P.O.","City":"Amsterdam","Country":"NL","Zip_Code":"1001 GT","Email":"[email protected]","Telephone":"N\/A"}}

SaveContactDetails

his command is used to update the contact information on a domain.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
contactdetailsArrayYes
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=SaveContactDetails&sld=exampledomain&tld=com&contactdetails[Registrant][Name]=John%20Doe&contactdetails[Registrant][Company]=Company%20name&contactdetails[Registrant][Address]=Address&contactdetails[Registrant][City]=Amsterdam&contactdetails[Registrant][Country]=NL&contactdetails[Registrant][Zip_Code]=1001 GT&contactdetails[Registrant][Email][email protected]&contactdetails[Registrant][Telephone]=N/A' --compressed
Example Response:
{"result":"success","Registrant":{"Name":"John Doe","Company":"Company name","Address":"P.O.","City":"Amsterdam","Country":"NL","Zip_Code":"1001 GT","Email":"[email protected]","Telephone":"N\/A"}}

DomainGetLockingStatus

This command is used to obtain the lock state of a domain.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=domaingetlockingstatus&sld=exampledomain&tld=com' --compressed
Example Response:
{"result":"success","lockstatus":"unlocked"}

DomainUpdateLockingStatus

This command is used to update the lock state of a domain.

Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
lockstatusNull/NumberNoTo lock the domain, set it to '1'
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=domainupdatelockingstatus&sld=exampledomain&tld=com&lockstatus=' --compressed
Example Response:
{"result":"success"}

GetDNS

This function is called when the DNS Host Records are requested to be viewed within WHMCS Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=GetDNS&sld=exampledomain&tld=com' --compressed
Example Response:
{"0":{"hostname":"*","type":"A","address":"0.0.0.0","priority":null},"1":{"hostname":"mail","type":"MXE","address":"0.0.0.0","priority":"10"},"result":"success"}

SaveDNS

This function is called when any changes to DNS Host Records information is submitted Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
dnsrecordsStringYesA base64 encoded serialized array of the dns records.
base64_encode(serialize(array(0=>array("hostname"=>"*","type"=>"A","address"=>"0.0.0.0","priority"=>"N/A","recid"=>""))));;
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=SaveDNS&sld=exampledomain&tld=com&dnsrecords=czowOiIiOw==' --compressed
Example Response:
{"result":"success"}

RegisterNameserver

This function is called when a child nameserver is requested to be registered Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
nameserverStringYes
ipaddressStringYes
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=RegisterNameserver&sld=exampledomain&tld=com&nameserver=test.exampledomain.com&ipaddress=1.1.1.1' --compressed
Example Response:
{"result":"success"}

ModifyNameserver

This function is called when a child nameserver is requested to be edited Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
nameserverStringYes
currentipaddressStringYes
newipaddressStringYes
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=ModifyNameserver&sld=exampledomain&tld=com&nameserver=test.exampledomain.com¤tipaddress=1.1.1.1&newipaddress=2.2.2.2' --compressed
Example Response:
{"result":"success"}

DeleteNameserver

This function is called when a child nameserver is requested to be deleted Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
nameserverStringYes
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=DeleteNameserver&sld=exampledomain&tld=com&nameserver=test.exampledomain.com' --compressed
Example Response:
{"result":"success"}

GetEmailForwarding

This function is called when the Email Forwarding are requested to be viewed within WHMCS Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=GetEmailForwarding&sld=exampledomain&tld=com' --compressed
Example Response:
{"1":{"prefix":"test","forwardto":"[email protected]"},"result":"success"}

SaveEmailForwarding

This function is called when the Email Forwarding are requested to be viewed within WHMCS Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
prefixStringYesA base64 encoded serialized array of the prefixes.
base64_encode(serialize(array(0=>"test"))));
forwardtoStringYesA base64 encoded serialized array of the forwards.
base64_encode(serialize(array(0=>"[email protected]")));
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=SaveEmailForwarding&sld=exampledomain&tld=com&prefix=czowOiIiOw==&forwardto=czowOiIiOw==' --compressed
Example Response:
{"result":"success"}

Sync

This function can include syncing status changes, renewals, and expiry dates. Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=Sync&sld=exampledomain&tld=com' --compressed
Example Response:
{"result":"success"}

TransferSync

Tthis function is called for every domain in the Pending Transfer status each time your domain sync cron runs. Request Parameters
NameTypeRequired?Description
sldStringYesDomain name
tldStringYesSuffix attached to domain name
domainStringYesFull domain name
regperiodIntYesRegistration period
Example Request:
curl 'https://www.hapihhost.in/billing/domainsResellerAPI/api.php' --data '[email protected]&action=TransferSync&sld=exampledomain&tld=com&domain=exampledomain.com®period=1' --compressed
Example Response:
{"result":"success"}

  • 0 användare blev hjälpta av detta svar
Hjälpte svaret dig?

Relaterade artiklar

API Introduction

API Introduction The Domains Reseller API allows you to interact with our system...

Example Code (PHP)

<?php $data = array( "action" => "RegisterDomain", "token" =>...