Deskripsi
Update data user. API ini tidak bisa digunakan untuk mengganti password user.
Query
user/update
List Variabel
Nama | Tipe Data | Required/Optional | Deksripsi |
---|---|---|---|
userid | string(255) | Required | Username |
user_username | string(255) | Optional | Username |
String(63) | optional | Email contact | |
fname | String(32) | Optional | Nama depan |
company | String(32) | Optional | Nama Perusahaan |
address | String(255) | Optional | Alamat |
address2 | String(255) | Optional (must include address) | Alamat 2 |
address3 | String(255) | Optional (must include address2) | Alamat 3 |
city | String(32) | Optional | Nama Kota |
province | String(32) | Optional | Nama Propinsi / Negara bagian |
postal_code | String(8) | Optional | Kodepos |
country | String(3) | Optional | Kode negara contoh : ID, MY, SG, AU |
p_kdnegara | String(14) | Optional | Kode negara, tanpa "+" |
p_kdarea | String(14) | Optional | Kode area |
phone | String(14) | Optional | 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 |
Contoh
$url = "http://srb657.srs-x.com/api/user/update"; $params['username'] = 'apiusername'; $params['password'] = hash('sha256','apipassword'); $params['userid'] = '45'; $params['user_username'] = 'email@email.id'; $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> </epp>
Gagal
<pre> <!--?xml version="1.0" encoding="UTF-8"?--> 1001Respon Failed </pre>