{"id":237,"date":"2013-04-27T17:26:56","date_gmt":"2013-04-27T17:26:56","guid":{"rendered":"http:\/\/kb.digitalregistra.co.id\/?page_id=237"},"modified":"2018-01-25T03:36:58","modified_gmt":"2018-01-25T03:36:58","slug":"create-user","status":"publish","type":"page","link":"https:\/\/kb.srs-x.com\/id\/api\/user\/create-user\/","title":{"rendered":"Create User"},"content":{"rendered":"<p><a href=\"http:\/\/kb.srs-x.com\/en\/api\/user\/create-user\"><strong>English version<\/strong><\/a><\/p>\n<h2>Deskripsi<\/h2>\n<p>Membuat user baru.<\/p>\n<h2>Query<\/h2>\n<p>user\/create<\/p>\n<h2>List Variabel<\/h2>\n<div class=\"table-responsive\"><table  style=\"width:100%; \"  class=\"easy-table easy-table-cuscosky \" >\n<thead>\r\n<tr><th >Nama<\/th>\n<th >Tipe Data<\/th>\n<th > Required\/Optional<\/th>\n<th >Deksripsi<\/th>\n<\/tr>\n<\/thead>\n<tbody>\r\n<tr><td >user_username<\/td>\n<td >string(255)<\/td>\n<td >Required<\/td>\n<td >Username<\/td>\n<\/tr>\n\r\n<tr><td >user_password<\/td>\n<td >string(255)<\/td>\n<td >Required<\/td>\n<td >Password User<\/td>\n<\/tr>\n\r\n<tr><td >email<\/td>\n<td >String(63)<\/td>\n<td >optional<\/td>\n<td >Email contact<\/td>\n<\/tr>\n\r\n<tr><td >fname<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >Nama depan<\/td>\n<\/tr>\n\r\n<tr><\/tr>\n\r\n<tr><td >company<\/td>\n<td >String(32)<\/td>\n<td >Optional<\/td>\n<td >Nama Perusahaan<\/td>\n<\/tr>\n\r\n<tr><td >address<\/td>\n<td >String(255)<\/td>\n<td >Required<\/td>\n<td >Alamat<\/td>\n<\/tr>\n\r\n<tr><td >address2<\/td>\n<td >String(255)<\/td>\n<td >Optional<\/td>\n<td >Alamat 2<\/td>\n<\/tr>\n\r\n<tr><td >address3<\/td>\n<td >String(255)<\/td>\n<td >Optional<\/td>\n<td >Alamat 3<\/td>\n<\/tr>\n\r\n<tr><td >city<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >Nama Kota<\/td>\n<\/tr>\n\r\n<tr><td >province<\/td>\n<td >String(32)<\/td>\n<td >Required<\/td>\n<td >Nama Propinsi \/ Negara bagian<\/td>\n<\/tr>\n\r\n<tr><td >postal_code<\/td>\n<td >String(8)<\/td>\n<td >Required<\/td>\n<td >Kodepos<\/td>\n<\/tr>\n\r\n<tr><td >country<\/td>\n<td >String(3)<\/td>\n<td >Required<\/td>\n<td >Kode negara contoh : ID, MY, SG, AU<\/td>\n<\/tr>\n\r\n<tr><td >p_kdnegara<\/td>\n<td >String(14)<\/td>\n<td >Required<\/td>\n<td >Kode negara, tanpa \"+\"<\/td>\n<\/tr>\n\r\n<tr><td >p_kdarea<\/td>\n<td >String(14)<\/td>\n<td >Required<\/td>\n<td >Kode area<\/td>\n<\/tr>\n\r\n<tr><td >phone<\/td>\n<td >String(14)<\/td>\n<td >Required<\/td>\n<td >Nomor Telepon <\/td>\n<\/tr>\n\r\n<tr><td >f_kdnegara<\/td>\n<td >String(14)<\/td>\n<td >Optional<\/td>\n<td >Kode negara untuk fax<\/td>\n<\/tr>\n\r\n<tr><td >f_kdarea<\/td>\n<td >String(14)<\/td>\n<td >Optional<\/td>\n<td >Kode area fax<\/td>\n<\/tr>\n\r\n<tr><td >fax<\/td>\n<td >String(14)<\/td>\n<td >Optional<\/td>\n<td >Nomor Fax<\/td>\n<\/tr>\n<\/tbody><\/table><\/div>\n<h2><strong>Return<\/strong><\/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 >Type<\/th>\n<\/tr>\n<\/thead>\n<tbody>\r\n<tr><td >domainid<\/td>\n<td >String[0-9]{4-16}<\/td>\n<\/tr>\n<\/tbody><\/table><\/div>\n<p>Contoh<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\r\n$url = &amp;amp;quot;http:\/\/srb657.srs-x.com\/api\/user\/create&amp;amp;quot;;\r\n$params['username'] = 'apiusername';\r\n$params['password'] = hash('sha256',apipassword);\r\n$params['user_username'] = 'email@email.id';\r\n$params['user_password'] = '87asdfasdf';\r\n$params['fname'] = 'fname';\r\n$params['address'] = 'lname';\r\n$params['city'] = 'jakarta';\r\n$params['province'] = 'jakarta';\r\n$params['postal_code'] = '32424';\r\n$params['p_kdnegara'] = '62';\r\n$params['p_kdarea'] = '274';\r\n$params['phone'] = '446657';\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>Respon Contoh<\/h2>\n<p>Berhasil<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot;?&amp;amp;gt;\r\n&amp;amp;lt;epp&amp;amp;gt;\r\n  &amp;amp;lt;result&amp;amp;gt;\r\n    &amp;amp;lt;resultCode&amp;amp;gt;1000&amp;amp;lt;\/resultCode&amp;amp;gt;\r\n    &amp;amp;lt;resultMsg&amp;amp;gt;Command Complete Successfully&amp;amp;lt;\/resultMsg&amp;amp;gt;\r\n  &amp;amp;lt;\/result&amp;amp;gt;\r\n  &amp;amp;lt;resultData&amp;amp;gt;\r\n    &amp;amp;lt;userid&amp;amp;gt;11&amp;amp;lt;\/userid&amp;amp;gt;\r\n  &amp;amp;lt;\/resultData&amp;amp;gt;\r\n&amp;amp;lt;\/epp&amp;amp;gt;\r\n<\/pre>\n<p>Gagal<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&amp;amp;lt;\/pre&amp;amp;gt;\r\n&amp;amp;amp;nbsp;\r\n\r\n&amp;amp;lt;!--?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;UTF-8&amp;amp;quot;?--&amp;amp;gt;\r\n1001Respon Failed\r\n&amp;amp;lt;pre&amp;amp;gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>English version Deskripsi Membuat user baru. Query user\/create List Variabel Return Contoh Respon Contoh Berhasil Gagal<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":236,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/237"}],"collection":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":8,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/237\/revisions"}],"predecessor-version":[{"id":1992,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/237\/revisions\/1992"}],"up":[{"embeddable":true,"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/pages\/236"}],"wp:attachment":[{"href":"https:\/\/kb.srs-x.com\/id\/wp-json\/wp\/v2\/media?parent=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}