Deskripsi
Api yang berfungsi untuk mendaftarkan domain ke SRS-X dan Registrar. API ini juga sekaligus akan membuat user di SRS-X jika email yang digunakan belum pernah didaftarkan di SRS-X
Query
domain/register
List Variabel
Nama | Tipe Data | Required/Optional | Deksripsi |
---|---|---|---|
domain | String(63) | Required | Nama domain |
api_id | Integer(11) | Required | Nilai bebas untuk membuat relasi domain dengan sistem di luar |
periode | Integer(2) | Required | periode untuk registrasi |
ns1 | String(63) | Required | Nameserver 1 |
ns2 | String(63) | Required | Nameserver 2 |
ns3 | String(63) | Optional | Nameserver 3 |
ns4 | String(63) | Optional | Nameserver 4 |
fname | String(32) | Required | Nama depan |
lname | String(32) | Optional | Nama belakang |
company | String(32) | Optional | Nama Perusahaan |
address1 | String(255) | Required | Alamat |
address2 | String(255) | Optional | Alamat 2 |
city | String(32) | Required | Nama Kota |
state | String(32) | Required | Nama Propinsi / Negara bagian |
country | String(3) | Required | Kode negara contoh : ID, MY, SG, AU |
postcode | String(8) | Required | Kodepos |
phonenumber | String(14) | Required | Nomor Telepon sertakan kode negara tanpa tanda "+" |
String(63) | Required | Email contact | |
user_username | String(63) | Required | username (email) untuk login ke SRS-X |
user_fname | String(32) | Required | Nama depan |
user_lname | String(32) | Optional | Nama belakang |
user_company | String(32) | Required | Nama Perusahaan, jika untuk pribadi masukkan "personal" |
user_address | String(255) | Required | Alamat |
user_address2 | String(255) | Optional | Alamat 2 |
user_city | String(32) | Required | Nama Kota |
user_province | String(32) | Required | Nama Propinsi / Negara bagian |
user_country | String(3) | Required | Kode negara contoh : ID, MY, SG, AU |
user_postal_code | String(8) | Required | Kodepos |
autoactive | enum("on") | Optional | beri nilai “on” jika ingin menggunakan fitur auto provisioning |
category | String(63) | Required for .ID | Wajib hanya untuk domain anything.id option = personal, company, school, university, organization |
Contoh
$post["username"] = 'apiusername'; $post["password"] = hash('sha256','apipassword'); $post["domain"] = 'domainid.com'; $post["periode"] = 1; $post["ns1"] = 'ns1.mydomain.com'; $post["ns2"] = 'ns2.mydomain.com'; $post["fname"] = 'Adi'; $post["lname"] = 'Waluyo; $post["address1"] = 'Jl. Arjuna 33'; $post["city"] = 'Jakarta'; $post["state"] = 'DKI Jakarta'; $post["postcode"] = '10000'; $post["country"] = 'ID'; $post["phonenumber"] = 622145345; $post["email"] = 'client@email.com'; $post['user_username'] = 'client@email.com'; $post['user_fname'] = 'Budi'; $post['user_lname'] = 'Santosa'; $post['user_email'] = 'budix@mmail.com'; $post['user_company'] = 'personal'; $post['user_address'] = 'Jl. Nangka 65'; $post['user_city'] = 'Jakarta'; $post['user_province'] = 'DKI Jakarta'; $post['user_phone'] = 6221878787; $post['user_country'] = 'ID'; $post['user_postal_code'] = '100000'; $post["autoactive"] = 'on'; $post["api_id"] = 74; $post["randomhash"] = IUYKHJKJHJHKJHIUYJ7686; $url = 'http://[reseller url]/api/domain/register'; $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 dengan 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>
Berhasil tanpa 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>
Gagal
<?xml version="1.0" encoding="UTF-8"?> <epp> <result> <resultCode>1001</resultCode> <resultMsg>Create Domain Failed</resultMsg> </result> </epp>