Module downloads (For those using WHMCS or Blesta)
Information
https://my.hostafrica.com/modules/addons/DomainsReseller/api/index.php
Username This is an email address of the reseller's client registered in your WHMCS.
Token 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", "", ":)"))
$endpoint = "https://my.hostafrica.com/modules/addons/DomainsReseller/api/index.php";
$action = "/order/domains/renew";
$params = [
"domain" => "example.com",
"regperiod" => "3",
"addons" => [
"dnsmanagement" => 0,
"emailforwarding" => 1,
"idprotection" => 0, //This triggers HOSTAFRICA Domain Protection paid service
]
];
$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
Type: text
Validators: required, textType: numeric
Validators: required, numericType: text
Validators: textType: addons Type: nameservers
Validators: requiredType: contacts
Validators: required
Type: text
Validators: required, textType: text
Validators: textType: numeric
Validators: required, numericType: text
Validators: textType: addons Type: nameservers
Validators: requiredType: contacts
Validators: required
Type: text
Validators: required, textType: numeric
Validators: required, numericType: addons Type: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: contactdetails
Validators: required
Type: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: dnsrecords
Validators: requiredType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: array Type: array Type: text
Validators: required, textType: int
Validators: required, numericType: text
Validators: textType: text
Validators: textType: array
Validators: isArray
Type: boolean
Type: boolean
Type: text
Validators: textType: text
Validators: textType: array
Validators: isArray
Type: boolean
Type: boolean
Type: array
Validators: isArray
Validators: required, text
Validators: required, text
Validators: required, text
Validators: required, text
Validators: textValidators: textValidators: textValidators: required, text
Validators: required, text
Validators: required, text
Validators: required, text
Validators: required, text
Validators: required, text
Validators: required, text
Type: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textModels
Type: text
Validators: required, textType: text
Validators: required, textType: text Validators: textType: text Validators: textType: text Validators: textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: numeric
Validators: required
Type: text
Validators: requires, textType: contact Type: contact Type: contact Type: contact Type: contact
Validators: required
Type: contact
Validators: required
Type: contact
Validators: required
Type: contact
Validators: required
Type: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text Validators: text
Type: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: text
Validators: required, textType: numeric
Validators: numeric
Type: numeric
Validators: numeric
Type: numeric
Validators: numeric