{"id":184,"date":"2020-04-27T12:05:07","date_gmt":"2020-04-27T12:05:07","guid":{"rendered":"http:\/\/localhost\/senitron\/?page_id=184"},"modified":"2020-04-29T05:59:24","modified_gmt":"2020-04-29T05:59:24","slug":"restapi-register-device","status":"publish","type":"page","link":"https:\/\/senitron.net\/developers\/restapi-register-device\/","title":{"rendered":"RESTAPI-Register Device"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last\" style=\"--awb-bg-size:cover;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-column-wrapper-legacy\"><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-separator fusion-full-width-sep\" style=\"margin-left: auto;margin-right: auto;margin-top:0px;margin-bottom:0px;width:100%;\"><div class=\"fusion-separator-border sep-single sep-solid\" style=\"--awb-height:20px;--awb-amount:20px;border-color:#e2e2e2;border-top-width:2px;\"><\/div><\/div><div class=\"fusion-sep-clear\"><\/div><div class=\"fusion-text fusion-text-1\"><p><span class=\"redtextcolor\"> Service Name <\/span><span class=\"textindentlevel1\"> \u00a0\u00a0\u00a0 Register Device<\/span><br \/><span class=\"redtextcolor\">Service Method \u00a0<\/span><span class=\"textindentlevel1\">POST<\/span><br \/><span class=\"redtextcolor\">Service URL <\/span><span class=\"textindentlevel2\">\u00a0\/handhelds\/register<\/span><\/p>\n<p><span class=\"redtextcolor\"> Request Header Fields<\/span><br \/><span class=\"greentextcolor\"> Content-Type <\/span> = <span class=\"cyantextcolor\"> application\/json <\/span><\/p>\n<p><span class=\"darkbluetextcolor\"> Request Body Data (JSON) <\/span><br \/>{<br \/><span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">name<\/span>\": \"&lt;<span class=\"cyantextcolor\">device name<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">mac_address<\/span>\": \"&lt;<span class=\"cyantextcolor\">device macaddress<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">version<\/span>\": \"&lt;<span class=\"cyantextcolor\">app version<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">build<\/span>\": \"&lt;<span class=\"cyantextcolor\">app build number<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">model_number<\/span>\": \"&lt;<span class=\"cyantextcolor\">device model number<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">public_ip<\/span>\": \"&lt;<span class=\"cyantextcolor\">device public ip address<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">local_ip<\/span>\": \"&lt;<span class=\"cyantextcolor\">device local ip address<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">serial_number<\/span>\": \"&lt;<span class=\"cyantextcolor\">device serial number<\/span>&gt;\"<\/span><br \/>}<\/p>\n<p><span class=\"darkbluetextcolor\"> Response Data (JSON)<\/span><br \/>{<br \/><span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">id<\/span>\": &lt;<span class=\"cyantextcolor\">register unique id<\/span>&gt;,<br \/>\"<span class=\"greentextcolor\">device_name<\/span>\": \"&lt;<span class=\"cyantextcolor\">device name generated by server<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">api_key<\/span>\": \"&lt;<span class=\"cyantextcolor\">your api-key need to login to server<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">expiration_date<\/span>\": \"&lt;<span class=\"cyantextcolor\">license expiration date<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">license_type<\/span>\": \"&lt;<span class=\"cyantextcolor\">license type<\/span>&gt;\",<br \/>\"<span class=\"greentextcolor\">company_name<\/span>\": \"&lt;<span class=\"cyantextcolor\">company or tenant name<\/span>&gt;\"<\/span><br \/>}<\/p>\n<p>\u00a0<\/p>\n<p><span class=\"graytextcolor\">Example <\/span><br \/><span class=\"blacktextcolor\">POST: http:\/\/app.senitron.net\/api\/v1\/handhelds\/register<\/span><br \/>{<br \/><span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">name<\/span>\": \"<span class=\"cyantextcolor\">UHF Handheld Terminal<\/span>\",<br \/>\"<span class=\"greentextcolor\">mac_address<\/span>\": \"<span class=\"cyantextcolor\">6C:EC:A1:FF:0B:8E<\/span>\",<br \/>\"<span class=\"greentextcolor\">build<\/span>\": \"<span class=\"cyantextcolor\">1003<\/span>\",<br \/>\"<span class=\"greentextcolor\">model_number<\/span>\": \"<span class=\"cyantextcolor\">CL7206D2 (SNHN01)<\/span>\",<br \/>\"<span class=\"greentextcolor\">public_ip<\/span>\": \"<span class=\"cyantextcolor\">104.51.32.179<\/span>\",<br \/>\"<span class=\"greentextcolor\">local_ip<\/span>\": \"<span class=\"cyantextcolor\">192.168.22.43<\/span>\",<br \/>\"<span class=\"greentextcolor\">version<\/span>\": \"<span class=\"cyantextcolor\">1.0.0<\/span>\",<br \/>\"<span class=\"greentextcolor\">serial_number<\/span>\": \"<span class=\"cyantextcolor\">K3A01A0819070037<\/span>\"<\/span><br \/>}<\/p>\n<p><span class=\"darkbluetextcolor\">Response Data (JSON)<\/span><br \/>{<br \/><span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">id<\/span>\": <span class=\"cyantextcolor\">51<\/span>,<br \/>\"<span class=\"greentextcolor\">device_name<\/span>\": \"<span class=\"cyantextcolor\">HH-51<\/span>\",<br \/>\"<span class=\"greentextcolor\">api_key<\/span>\": \"<span class=\"cyantextcolor\">5uXPY38jsk02+jNxNPdybwaSCgv<\/span>\",<br \/>\"<span class=\"greentextcolor\">expiration_date<\/span>\": \"<span class=\"cyantextcolor\">7-13-2020<\/span>\",<br \/>\"<span class=\"greentextcolor\">license_type<\/span>\": \"<span class=\"cyantextcolor\">Demo<\/span>\",<br \/>\"<span class=\"greentextcolor\">company_name<\/span>\": \"<span class=\"cyantextcolor\">Senitron Company<\/span>\"<\/span><br \/>}<\/p>\n<\/div><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"side-navigation.php","meta":{"footnotes":""},"class_list":["post-184","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":0,"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages\/184\/revisions"}],"wp:attachment":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/media?parent=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}