{"id":10,"date":"2012-09-15T03:05:00","date_gmt":"2012-09-15T03:05:00","guid":{"rendered":"http:\/\/localhost\/rumahweb\/kb-dri\/id\/?page_id=10"},"modified":"2023-07-14T09:05:30","modified_gmt":"2023-07-14T09:05:30","slug":"register-domain","status":"publish","type":"page","link":"https:\/\/kb.srs-x.com\/en\/api\/domain\/register-domain","title":{"rendered":"Register Domain"},"content":{"rendered":"<p><a href=\"http:\/\/kb.srs-x.com\/id\/api\/domain\/register-domain\/\"><strong>Versi Bahasa Indonesia<\/strong><\/a><\/p>\n<h2>Description<\/h2>\n<p>This function will register a domain name to SRS-X and Registrar, and create new account at SRS-X if provided email address is not yet registered.<\/p>\n<h2>Query<\/h2>\n<p>domain\/register<\/p>\n<h2>List Variable<\/h2>\n<div class=\"table-responsive\"><table  style=\"width:100%; \"  class=\"easy-table easy-table-cuscosky \" >\n<thead>\r\n<tr><th >Name<\/th>\n<th >Data Type<\/th>\n<th > Required\/Optional<\/th>\n<th >Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\r\n<tr><td >domain<\/td>\n<td >String(63)<\/td>\n<td >Required<\/td>\n<td >Domain name<\/td>\n<\/tr>\n\r\n<tr><td >api_id<\/td>\n<td >Integer(11)<\/td>\n<td >Required<\/td>\n<td >Any unique ID to link this domain with your billing system<\/td>\n<\/tr>\n\r\n<tr><td >periode<\/td>\n<td >Integer(2)<\/td>\n<td >Required<\/td>\n<td >Registration period<\/td>\n<\/tr>\n\r\n<tr><td >ns1<\/td>\n<td >String(63)<\/td>\n<td >Required<\/td>\n<td >Nameserver 1<\/td>\n<\/tr>\n\r\n<tr><td >ns2<\/td>\n<td >String(63)<\/td>\n<td >Required<\/td>\n<td >Nameserver 2<\/td>\n<\/tr>\n\r\n<tr><td >ns3<\/td>\n<td >String(63)<\/td>\n<td >Optional<\/td>\n<td >Nameserver 3<\/td>\n<\/tr>\n\r\n<tr><td >ns4<\/td>\n<td >String(63)<\/td>\n<td >Optional<\/td>\n<td >Nameserver 4<\/td>\n<\/tr>\n\r\n<tr><td >fname<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >First name<\/td>\n<\/tr>\n\r\n<tr><td >lname<\/td>\n<td >String(32)<\/td>\n<td >Optional<\/td>\n<td >Last name<\/td>\n<\/tr>\n\r\n<tr><td >company<\/td>\n<td >String(32)<\/td>\n<td >Optional<\/td>\n<td >Company name<\/td>\n<\/tr>\n\r\n<tr><td >address1<\/td>\n<td >String(255)<\/td>\n<td >Required<\/td>\n<td >Address<\/td>\n<\/tr>\n\r\n<tr><td >address2<\/td>\n<td >String(255)<\/td>\n<td >Optional<\/td>\n<td >Address 2<\/td>\n<\/tr>\n\r\n<tr><td >city<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >City<\/td>\n<\/tr>\n\r\n<tr><td >state<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >Province\/State<\/td>\n<\/tr>\n\r\n<tr><td >country<\/td>\n<td >String(3)<\/td>\n<td >Required<\/td>\n<td >Country code, ie: ID, MY, SG, AU<\/td>\n<\/tr>\n\r\n<tr><td >postcode<\/td>\n<td >String(8)<\/td>\n<td >Required<\/td>\n<td >Zip code<\/td>\n<\/tr>\n\r\n<tr><td >phonenumber<\/td>\n<td >String(14)<\/td>\n<td >Required<\/td>\n<td >Phone number, including country code but without \"+\"<\/td>\n<\/tr>\n\r\n<tr><td >email<\/td>\n<td >String(63)<\/td>\n<td >Required<\/td>\n<td >Contact email address<\/td>\n<\/tr>\n\r\n<tr><td >user_username<\/td>\n<td >String(63)<\/td>\n<td >Required<\/td>\n<td >Username (email) as SRS-X username<\/td>\n<\/tr>\n\r\n<tr><td >user_fname<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >First name<\/td>\n<\/tr>\n\r\n<tr><td >user_lname<\/td>\n<td >String(32)<\/td>\n<td >Optional<\/td>\n<td >Last name<\/td>\n<\/tr>\n\r\n<tr><td >user_company<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >Company name, or use \"personal\"<\/td>\n<\/tr>\n\r\n<tr><td >user_address<\/td>\n<td >String(255)<\/td>\n<td >Required<\/td>\n<td >Address<\/td>\n<\/tr>\n\r\n<tr><td >user_address2<\/td>\n<td >String(255)<\/td>\n<td >Optional<\/td>\n<td >Address 2<\/td>\n<\/tr>\n\r\n<tr><td >user_city<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >City name<\/td>\n<\/tr>\n\r\n<tr><td >user_province<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >Province\/State<\/td>\n<\/tr>\n\r\n<tr><td >user_country<\/td>\n<td >String(3)<\/td>\n<td >Required<\/td>\n<td >Country code, ie: ID, MY, SG, AU<\/td>\n<\/tr>\n\r\n<tr><td >user_postal_code<\/td>\n<td >String(8)<\/td>\n<td >Required<\/td>\n<td >Zip code<\/td>\n<\/tr>\n\r\n<tr><td >autoactive<\/td>\n<td >enum(\"on\")<\/td>\n<td >Optional<\/td>\n<td >Use \u201con\u201d to enable auto provisioning, otherwise leave empty<\/td>\n<\/tr>\n\r\n<tr><td >localpresence<\/td>\n<td >enum(1)<\/td>\n<td >Optional<\/td>\n<td >Use 1 to use our local presence\/proxy service, otherwise leave empty<\/td>\n<\/tr>\n<\/tbody><\/table><\/div>\n<h2>Example<\/h2>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$post[&quot;username&quot;] = 'apiusername';\r\n$post[&quot;password&quot;] = hash('sha256','apipassword');\r\n$post[&quot;domain&quot;] = 'domainid.com'\r\n$post[&quot;periode&quot;] = 1;\r\n$post[&quot;ns1&quot;] = 'ns1.mydomain.com';\r\n$post[&quot;ns2&quot;] = 'ns2.mydomain.com';\r\n\r\n$post[&quot;fname&quot;] = 'Adi';\r\n$post[&quot;lname&quot;] = 'Waluyo;\r\n$post[&quot;address1&quot;] = 'Jl. Arjuna 33';\r\n$post[&quot;city&quot;] = 'Jakarta';\r\n$post[&quot;state&quot;] = 'DKI Jakarta';\r\n$post[&quot;postcode&quot;] = '10000';\r\n$post[&quot;country&quot;] = 'ID';\r\n$post[&quot;phonenumber&quot;] = 622145345;\r\n$post[&quot;email&quot;] = 'client@email.com';\r\n\r\n$post['user_username'] = 'client@email.com';\r\n$post['user_fname'] = 'Budi';\r\n$post['user_lname'] = 'Santosa';\r\n$post['user_email'] = 'budix@mmail.com';\r\n$post['user_company'] = 'personal';\r\n$post['user_address'] = 'Jl. Nangka 65';\r\n\r\n$post['user_city'] = 'Jakarta';\r\n$post['user_province'] = 'DKI Jakarta';\r\n$post['user_phone'] = 6221878787;\r\n$post['user_country'] = 'ID';\r\n$post['user_postal_code'] = '100000';\r\n$post[&quot;autoactive&quot;] = 'on';\r\n$post[&quot;api_id&quot;] = 74;\r\n$post[&quot;randomhash&quot;] = IUYKHJKJHJHKJHIUYJ7686;\r\n\r\n$url = 'http:\/\/[reseller url]\/api\/domain\/register';\r\n\r\n$ch = curl_init();\r\ncurl_setopt($ch, CURLOPT_URL, $apiurl);\r\ncurl_setopt($ch, CURLOPT_POST, 1);\r\ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\r\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));\r\n$response = curl_exec($ch);\r\ncurl_close($ch);\r\n<\/pre>\n<h2>Example Response<\/h2>\n<p>Succeed with auto provisioning:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;epp&gt;\r\n&lt;result&gt;\r\n&lt;resultCode&gt;1000&lt;\/resultCode&gt;\r\n&lt;resultMsg&gt;Command completed successfully&lt;\/resultMsg&gt;\r\n&lt;\/result&gt;\r\n&lt;resultData&gt;\r\n&lt;status&gt;1&lt;\/status&gt;\r\n&lt;crDate&gt;2012-09-13&lt;\/crDate&gt;\r\n&lt;exDate&gt;2013-09-13&lt;\/exDate&gt;\r\n&lt;\/resultData&gt;\r\n&lt;\/epp&gt;\r\n\r\n<\/pre>\n<p>Succeed without auto provisioning:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;epp&gt;\r\n&lt;result&gt;\r\n&lt;resultCode&gt;1001&lt;\/resultCode&gt;\r\n&lt;resultMsg&gt;Domain is still waiting for the complete document&lt;\/resultMsg&gt;\r\n&lt;\/result&gt;\r\n&lt;\/epp&gt;\r\n\r\n<\/pre>\n<p>Failed:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;epp&gt;\r\n&lt;result&gt;\r\n&lt;resultCode&gt;1001&lt;\/resultCode&gt;\r\n&lt;resultMsg&gt;Create Domain Failed&lt;\/resultMsg&gt;\r\n&lt;\/result&gt;\r\n&lt;\/epp&gt;\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Versi Bahasa Indonesia Description This function will register a domain name to SRS-X and Registrar, and create new account at SRS-X if provided email address is not yet registered. Query domain\/register List Variable Example Example Response Succeed with auto provisioning: &hellip; <a href=\"https:\/\/kb.srs-x.com\/en\/api\/domain\/register-domain\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":8,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/pages\/10"}],"collection":[{"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":42,"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/pages\/10\/revisions"}],"predecessor-version":[{"id":1858,"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/pages\/10\/revisions\/1858"}],"up":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/pages\/8"}],"wp:attachment":[{"href":"https:\/\/kb.srs-x.com\/en\/wp-json\/wp\/v2\/media?parent=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}