API Documentation

All of our services are also available via a REST-API for developers to automate your infrastructure administration.

Shared Hosting

Create Shared Hosting Order.

POST Parameters
Parameter Type Possible values Description Required
service string "SharedHosting" Choose one of our services Yes
action string "create", "changepassword", "getinfo" Service action Yes
package int 1-3 Service package Yes
domain string Ex: "yourdomain.com" Service domain Yes
domaintype string "register", "transfer", leave empty if your domain is registered with another registrar Tell us if you want to register, transfer or update your domain name servers. No
regperiod num 1-5 Domain registration period in years. No
billingcycle string "Monthly", "Yearly" Billing cycle for this service. No
eppcode string Ex: "1uH8d8h7Y!4" Domain Auth Code Yes if you're transfering domain
nameserver1 string Ex: "ns1.illyhosting.com" Name server 1 for registered domain. No
nameserver2 string Ex: "ns2.illyhosting.com" Name server 2 for registered domain. No
nameserver3 string Ex: "ns3.illyhosting.com" Name server 3 for registered domain. No
nameserver4 string Ex: "ns4.illyhosting.com" Name server 4 for registered domain. No
promocode string Ex: "20OFF20SALE" Apply promo code for this order. No
productid int Ex: "195" Your product id Required only for action: "changepassword"
productpassword string Ex: "9jIQD@4aij9AK" Your new service password Required only for action: "changepassword"


Example Request (PHP Curl)
<?php
//API Endpoint 
$apiurl = "https://api.illyhosting.com/"; //API ENDPOINT URL with Trailing Slash 

//Your API credentials generated in our control panel
$api_identifier = "your_api_credential_identifier";
$api_secret = "your_api_credential_secret";

//Post values
$postfields = array(
	'api_identifier' => $api_identifier,
	'api_secret' => $api_secret,
	'service' => 'WordpressHosting', //required 
	'action' => 'create', //possible values: create, changepassword, getinfo
	'package' => '1',
	'billingcycle' => 'Monthly',
	'domain' => 'domain.com',
	'domaintype' => 'register',
	'regperiod' => 1, 
	'nameserver1' => 'ns1.illyhosting.com',
	'nameserver2' => 'ns2.illyhosting.com',
	'promocode' => '',
);

//Call the API 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
$response = curl_exec($ch);
if (curl_error($ch)) {
    die('Unable to connect: ' . curl_errno($ch) . ' - ' . curl_error($ch));
}
curl_close($ch);

// Decode response
$jsonData = json_decode($response, true);

// Dump array structure
var_dump($jsonData);
?>

Example Response (JSON)
{
	"result": "success", 
	"message": "Order Created", 
	"orderdetails": [ { 
		"id": 9135, 
		"regdate": "2020-01-01", 
		"name": "Basic", 
		"groupname": "Shared Hosting", 
		"domain": "domain.com", 
		"dedicatedip": "", 
		"serverip": "194.5.235.5", 
		"serverhostname": "dc1s1.illyhosting.com", 
		"billingcycle": "Monthly", 
		"nextduedate": "2020-02-01", 
		"username": "sample_username", 
		"password": "sample_password", 
		"ns1": "ns1.illyhosting.com", 
		"ns2": "ns2.illyhosting.com" } 
	] }
}

Possible Error Responses
  • Package can not be empty
  • Domain can not be empty
  • Incorrect domain format
  • Package does not exist (Allowed values: 1-3)
  • Domain registration period can not be more than 5 years (Allowed values: 1-5)
  • Bad domain type value (Allowed values: register, transfer, leave it empty)
  • Unable to add order, your account status is closed
  • Your account do not have enough credit balance.
  • Other error message