Register Domain

Description

This function will register a domain name to SRS-X and Registrar, and create new account at SRS-X if provided email address is not yet registered.

Query

domain/register

List Variable

Name Data Type Required/Optional Description
domain String(63) Required Domain name
api_id Integer(11) Required Any unique ID to link this domain with your billing system
periode Integer(2) Required Registration period
ns1 String(63) Required Nameserver 1
ns2 String(63) Required Nameserver 2
ns3 String(63) Optional Nameserver 3
ns4 String(63) Optional Nameserver 4
fname String(32) Required First name
lname String(32) Optional Last name
company String(32) Optional Company name
address1 String(255) Required Address
address2 String(255) Optional Address 2
city String(32) Required City
state String(32) Required Province/State
country String(3) Required Country code, ie: ID, MY, SG, AU
postcode String(8) Required Zip code
phonenumber String(14) Required Phone number, including country code but without "+"
email String(63) Required Contact email address
user_username String(63) Required Username (email) as SRS-X username
user_fname String(32) Required First name
user_lname String(32) Optional Last name
user_company String(32) Required Company name, or use "personal"
user_address String(255) Required Address
user_address2 String(255) Optional Address 2
user_city String(32) Required City name
user_province String(32) Required Province/State
user_country String(3) Required Country code, ie: ID, MY, SG, AU
user_postal_code String(8) Required Zip code
autoactive enum("on") Optional Use “on” to enable auto provisioning, otherwise leave empty
category String(63) Required for .ID Required for Anything.ID, options: personal, company, school, university, organization

Example

$post["username"] = 'apiusername';
$post["password"] = hash('sha256','apipassword');
$post["domain"] = 'domainid.com'
$post["periode"] = 1;
$post["ns1"] = 'ns1.mydomain.com';
$post["ns2"] = 'ns2.mydomain.com';

$post["fname"] = 'Adi';
$post["lname"] = 'Waluyo;
$post["address1"] = 'Jl. Arjuna 33';
$post["city"] = 'Jakarta';
$post["state"] = 'DKI Jakarta';
$post["postcode"] = '10000';
$post["country"] = 'ID';
$post["phonenumber"] = 622145345;
$post["email"] = 'client@email.com';

$post['user_username'] = 'client@email.com';
$post['user_fname'] = 'Budi';
$post['user_lname'] = 'Santosa';
$post['user_email'] = 'budix@mmail.com';
$post['user_company'] = 'personal';
$post['user_address'] = 'Jl. Nangka 65';

$post['user_city'] = 'Jakarta';
$post['user_province'] = 'DKI Jakarta';
$post['user_phone'] = 6221878787;
$post['user_country'] = 'ID';
$post['user_postal_code'] = '100000';
$post["autoactive"] = 'on';
$post["api_id"] = 74;
$post["randomhash"] = IUYKHJKJHJHKJHIUYJ7686;

$url = 'http://[reseller url]/api/domain/register';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
curl_close($ch);

Example Response

Succeed with auto provisioning:


<?xml version="1.0" encoding="UTF-8"?>
<epp>
<result>
<resultCode>1000</resultCode>
<resultMsg>Command completed successfully</resultMsg>
</result>
<resultData>
<status>1</status>
<crDate>2012-09-13</crDate>
<exDate>2013-09-13</exDate>
</resultData>
</epp>

Succeed without auto provisioning:


<?xml version="1.0" encoding="UTF-8"?>
<epp>
<result>
<resultCode>1001</resultCode>
<resultMsg>Domain is still waiting for the complete document</resultMsg>
</result>
</epp>

Failed:


<?xml version="1.0" encoding="UTF-8"?>
<epp>
<result>
<resultCode>1001</resultCode>
<resultMsg>Create Domain Failed</resultMsg>
</result>
</epp>