Deskripsi
Membuat data kontak baru.
Query
contact/create
List Variabel
Nama | Tipe Data | Required/Optional | Deksripsi |
---|---|---|---|
userid | String(32) | Required | ID User |
fname | String(32) | Required | Nama depan |
lname | String(32) | Optional | Nama belakang |
String(63) | Required | Email contact | |
company | String(32) | Required | Nama Perusahaan, jika untuk pribadi masukkan "personal" |
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 |
phone-cc | String(14) | Optional | Kode negara tanpa tanda "+" |
phone | String(14) | Required | Nomor Telepon tanpa tanda |
fax-cc | String(14) | Optional | Kode negara tanpa tanda "+" |
fax | String(14) | Optional | Nomor Fax sertakan kode negara tanpa tanda "+" |
country | String(3) | Required | Kode negara contoh : ID, MY, SG, AU |
postal_code | String(8) | Required | Kodepos |
Return
Name | Type |
---|---|
domainid | String[0-9]{4-16} |
Contoh
$post["username"] = 'apiusername' $post["password"] = hash('sha256','apipassword'); $post["userid"] = '34' $post["fname"] = 'Nemo' $post["lname"] = 'Nemo' $post["email"] = 'nemo@bermuda.co.id' $post["company"] = 'personal' $post["address"] = 'Jalan. langkung no. 33' $post["city"] = 'Sleman' $post["province"] = 'DIY' $post["phone"] = '6243434' $post["fax"] = '6243434' $post["country"] = 'ID' $post["postal_code"] = '54321' $url = 'http://[reseller url]/api/contact/create'; $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> <nickhandle>01206gp3</nickhandle> <contactid>20</contactid> </resultData> </epp>
Gagal
<?xml version="1.0" encoding="UTF-8"?> <epp> <result> <resultCode>1001</resultCode> <resultMsg>Respon Failed</resultMsg> </result> </epp>