Description
This function will register a domain name to SRS-X and Registrar, almost identical with register domain. This function doesn’t require contact data nor user, only nickhandle and userid is required.
Query
domain/expressregister
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 |
| userid | Integer(2) | Required | userid of registrant |
| contact_registrant | String(63) | Required | nickhandle of registrant |
| contact_admin | String(63) | Required | nickhandle of admin |
| contact_billing | String(63) | Required | nickhandle of billing |
| contact_tech | String(63) | Required | nickhandle of tech |
| ns1 | String(63) | Required | Nameserver 1 |
| ns2 | String(63) | Required | Nameserver 2 |
| ns3 | String(63) | Optional | Nameserver 3 |
| ns4 | String(63) | Optional | Nameserver 4 |
| autoactive | enum("on") | Optional | set value to “on” to activate auto provisioning |
| domaindescription | text | Optional | Domain description, to label domain and required documents |
| randomhash | String(63) | Optional | random value, will be used as URL for uploading documents |
| category | String(63) | Required for .ID | Only required for anything.id, options are personal, company, school, university, organization |
| localpresence | enum(1) | Optional | Use 1 to use our local presence/proxy service, otherwise leave empty |
Example
$post["username"] = 'apiusername';
$post["password"] = hash('sha256','apipassword');
$post['domain'] = 'domainid.com'
$params['api_id'] = 12;
$params['periode'] = 1;
$params['userid'] = 4;
$params['contact_registrant'] = '0127g8';
$params['contact_admin'] = '0147emkh';
$params['contact_billing'] = '0155cgrx';
$params['contact_tech'] = '0156ele2';
$params['autoactive'] = 'on';
$params['domaindescription'] = 'bla bla bla'
$params['randomhash'] = 'sembarang';
$params['ns1'] = 'ns2.rumahweb.com';
$params['ns2'] = 'ns1.rumahweb.com';
$url = 'http://[reseller url]/api/domain/expressregister';
$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>