Description
Create new SRS-X user.
Query
user/create
List Variable
| Name | Data Type | Required/Optional | Description |
|---|---|---|---|
| user_username | string(255) | Required | Username |
| user_password | string(255) | Required | Password User |
| String(63) | optional | Contact email | |
| fname | String(32) | Required | First name |
| lname | String(32) | Optional | Last name |
| company | String(32) | Optional | Company Name |
| address | String(255) | Required | Address |
| address2 | String(255) | Optional | Address 2 |
| address3 | String(255) | Optional | Address 3 |
| city | String(32) | Required | City Name |
| province | String(32) | Required | Province/State |
| postal_code | String(8) | Required | Zip COde |
| country | String(3) | Required | Country code, ie: ID, MY, SG, AU |
| p_kdnegara | String(14) | Required | Telephone country code, withour "+" |
| p_kdarea | String(14) | Required | Region code |
| phone | String(14) | Required | Phone number |
| f_kdnegara | String(14) | Optional | Fax country code, withour "+" |
| f_kdarea | String(14) | Optional | Fax region code |
| fax | String(14) | Optional | Fax number |
Return
| Name | Type |
|---|---|
| domainid | String[0-9]{4-16} |
Example
$url = "http://srb657.srs-x.com/api/user/create";
$params['username'] = 'apiusername';
$params['password'] = hash('sha256','apipassword');
$params['user_username'] = 'email@email.id';
$params['user_password'] = '87asdfasdf';
$params['fname'] = 'fname';
$params['address'] = 'lname';
$params['city'] = 'jakarta';
$params['province'] = 'jakarta';
$params['postal_code'] = '32424';
$params['p_kdnegara'] = '62';
$params['p_kdarea'] = '274';
$params['phone'] = '446657';
$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:
<?xml version="1.0" encoding="UTF-8"?>
<epp>
<result>
<resultCode>1000</resultCode>
<resultMsg>Command Complete Successfully</resultMsg>
</result>
<resultData>
<userid>11</userid>
</resultData>
</epp>
Failed:
<?xml version="1.0" encoding="UTF-8"?>
<epp>
<result>
<resultCode>1001</resultCode>
<resultMsg>Command Failed</resultMsg>
</result>
</epp>