DSites Logo
v2.0

API Documentation

Complete documentation for the DSites Domain Reseller Module API. All requests should be sent to the base URL with the specific action path appended.

Base Endpoint
https://my.dsites.pk/modules/addons/DomainsReseller/api/index.php

Authentication

username

The email address of the reseller's client registered in WHMCS.

token

Base64 encoded SHA256 HMAC hash using API Key, Email, and GMT Date.

Token Logic

base64_encode(
  hash_hmac(
    "sha256", 
    "<api-key>", 
    "<email>:<gmdate('y-m-d H')>"
  )
)

Implementation Example

Example Implementation (PHP) CURL POST
$endpoint   = "https://my.dsites.pk/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", "YOUR_API_KEY", "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);

Domain Registration & Transfer

POST

Register Domain

/order/domains/register
FieldTypeValidators
domaintextrequired, text
regperiodnumericrequired, numeric
domainfieldstexttext
nameserversnameserversrequired
contactscontactsrequired
addonsaddons-
POST

Transfer Domain

/order/domains/transfer
FieldTypeValidators
domaintextrequired, text
eppcodetexttext
regperiodnumericrequired, numeric
domainfieldstexttext
nameserversnameserversrequired
contactscontactsrequired

Renew, Sync & Maintenance

POST /order/domains/renew

Renew Domain

  • domain required
  • regperiod required
  • addons optional
POST /domains/{domain}/sync

Domain Sync

Synchronizes domain status and expiry from registrar.

Parameters: domain (required)

POST /domains/{domain}/transfersync

Transfer Sync

Synchronizes incoming domain transfer status.

POST /domains/{domain}/delete

Request Deletion

Submit a request to delete a domain registration.

Nameserver Management

GET

Get Nameservers

/domains/{domain}/nameservers
POST

Save Nameservers

Required fields: ns1, ns2. Optional: ns3, ns4, ns5.

Child Nameserver Operations (Glue Records)

Register

Fields

  • nameserver *
  • ipaddress *

Modify

Fields

  • nameserver *
  • currentipaddress *
  • newipaddress *

Delete

Fields

  • nameserver *
Endpoint: /domains/{domain}/nameservers/register

Contacts & Registrar Lock

Contact Management

GET POST

/domains/{domain}/contact

Save Parameters

contactdetails Required

Registrar Lock

GET POST

/domains/{domain}/contact

Lock Status Field

lockstatus Required

DNS & Email Forwarding

DNS Management

/domains/{domain}/dns

GET DNS
POST Save DNS

Parameter

dnsrecords (required)

Email Forwarding

/domains/{domain}/email

Save POST Fields

prefix Type: Array
forwardto Type: Array

EPP Code & Release

Get EPP Code

/domains/{domain}/eppcode

GET

Release Domain

GET

/domains/{domain}/release

transfertag (required)

Full Data Models

Contact Object
firstnamerequired lastnamerequired fullnamerequired companynamerequired emailrequired address1required address2optional cityrequired staterequired postcoderequired countryrequired phonenumberrequired
DNS Record Object
hostnamerequired typerequired addressrequired priorityrequired recidRequired (Save Only)

Utility & Information

Domain Lookup (Availability)

POST

/domains/lookup

searchTerm
tldsToInclude
isIdnDomain
premiumEnabled
Billing

Get Credits

GET /billing/credits
System

Get Version

GET /version
Extensions

Available TLDs

GET /tlds
Copied to clipboard!