Deskripsi
Membuat user baru.
Query
user/create
List Variabel
Nama | Tipe Data | Required/Optional | Deksripsi |
---|---|---|---|
user_username | string(255) | Required | Username |
user_password | string(255) | Required | Password User |
String(63) | optional | Email contact | |
fname | String(32) | Required | Nama depan |
company | String(32) | Optional | Nama Perusahaan |
address | String(255) | Required | Alamat |
address2 | String(255) | Optional | Alamat 2 |
address3 | String(255) | Optional | Alamat 3 |
city | String(32) | Required | Nama Kota |
province | String(32) | Required | Nama Propinsi / Negara bagian |
postal_code | String(8) | Required | Kodepos |
country | String(3) | Required | Kode negara contoh : ID, MY, SG, AU |
p_kdnegara | String(14) | Required | Kode negara, tanpa "+" |
p_kdarea | String(14) | Required | Kode area |
phone | String(14) | Required | Nomor Telepon |
f_kdnegara | String(14) | Optional | Kode negara untuk fax |
f_kdarea | String(14) | Optional | Kode area fax |
fax | String(14) | Optional | Nomor Fax |
Return
Name | Type |
---|---|
domainid | String[0-9]{4-16} |
Contoh
$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);
Respon Contoh
Berhasil
<?xml version="1.0" encoding="UTF-8"?> <epp> <result> <resultCode>1000</resultCode> <resultMsg>Command Complete Successfully</resultMsg> </result> <resultData> <userid>11</userid> </resultData> </epp>
Gagal
</pre>   <!--?xml version="1.0" encoding="UTF-8"?--> 1001Respon Failed <pre>