{"id":424,"date":"2020-04-30T09:00:42","date_gmt":"2020-04-30T09:00:42","guid":{"rendered":"https:\/\/senitron.net\/developers\/?page_id=424"},"modified":"2020-05-01T18:04:47","modified_gmt":"2020-05-01T18:04:47","slug":"restapi-encode","status":"publish","type":"page","link":"https:\/\/senitron.net\/developers\/restapi-encode\/","title":{"rendered":"RESTAPI-Encode"},"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> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 <span class=\"textindentlevel1\">Encode<\/span><br \/>\n<span class=\"redtextcolor\">Service Method<\/span> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"textindentlevel1\">POST<\/span><br \/>\n<span class=\"redtextcolor\">Service URL<\/span> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"textindentlevel1\">\/epcs\/encode<\/span><\/p>\n<p><span class=\"redtextcolor\">Request Header Fields<\/span><br \/>\n<span class=\"greentextcolor\">Content-Type<\/span> = <span class=\"cyantextcolor\">application\/json<\/span><br \/>\n<span class=\"greentextcolor\">Authorization<\/span> = &lt;<span class=\"cyantextcolor\">token<\/span>&gt;<\/p>\n<p><span class=\"darkbluetextcolor\">Request Body Data (JSON)<\/span><br \/>\n{<br \/>\n<span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">item_number<\/span>\": \"&lt;<span class=\"cyantextcolor\">item number<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">location<\/span>\": \"&lt;<span class=\"cyantextcolor\">location code<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">epcs\" <\/span>: [<\/span><br \/>\n<span class=\"textindentlevel2\">{<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">epc<\/span>\": \"&lt;<span class=\"cyantextcolor\">epc<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">tid<\/span>\": \"&lt;<span class=\"cyantextcolor\">unique tag id<\/span>&gt;\"<\/span><br \/>\n<span class=\"textindentlevel2\">},<br \/>\n{<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">epc<\/span>\": \"&lt;<span class=\"cyantextcolor\">epc<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">tid<\/span>\": \"&lt;<span class=\"cyantextcolor\">unique tag id<\/span>&gt;\"<\/span><br \/>\n<span class=\"textindentlevel2\">}<\/span><br \/>\n<span class=\"textindentlevel1\">]<\/span><br \/>\n}<\/p>\n<p><span class=\"darkbluetextcolor\">Response Data (JSON) <\/span><br \/>\n{<br \/>\n<span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">epcs<\/span>\": [<\/span><br \/>\n<span class=\"textindentlevel2\">{<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">old_epc<\/span>\": \"&lt;<span class=\"cyantextcolor\">old epc<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">new_epc<\/span>\": \"&lt;<span class=\"cyantextcolor\">new encoded epc<\/span>&gt;\",<br \/>\n\"<span class=\"greentextcolor\">tid<\/span>\": \"<span class=\"cyantextcolor\">epc unique id<\/span>\"<\/span><br \/>\n<span class=\"textindentlevel2\">},<br \/>\n...<\/span><br \/>\n<span class=\"textindentlevel1\">]<\/span><br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p><span class=\"graytextcolor\">Example<\/span><br \/>\n<span class=\"blacktextcolor\">POST: http:\/\/app.senitron.net\/api\/v1\/epcs\/encode<\/span><br \/>\n{<br \/>\n<span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">item_number<\/span>\": \"<span class=\"cyantextcolor\">140195001<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">location<\/span>\": \"<span class=\"cyantextcolor\">001<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">epcs<\/span>\" : [<\/span><br \/>\n<span class=\"textindentlevel2\">{<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">epc<\/span>\": \"<span class=\"cyantextcolor\">321AB45009E66F002367ABCD<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">tid<\/span>\": \"<span class=\"cyantextcolor\">0000031<\/span>\"<\/span><br \/>\n<span class=\"textindentlevel2\">},<br \/>\n{<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">epc<\/span>\": \"<span class=\"cyantextcolor\">421AB45009ECCA002367ABC7<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">tid<\/span>\": \"<span class=\"cyantextcolor\">0000032<\/span>\"<\/span><br \/>\n<span class=\"textindentlevel2\">}<\/span><br \/>\n<span class=\"textindentlevel1\">]<\/span><br \/>\n}<\/span><\/p>\n<p><span class=\"darkbluetextcolor\">Response Data (JSON) <\/span><br \/>\n{<br \/>\n<span class=\"textindentlevel1\">\"<span class=\"greentextcolor\">epcs<\/span>\": [<\/span><br \/>\n<span class=\"textindentlevel2\">{<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">old_epc<\/span>\": \"<span class=\"cyantextcolor\">321AB45009E66F002367ABCD<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">new_epc<\/span>\": \"<span class=\"cyantextcolor\">CF00000216CD2E400000000C<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">tid<\/span>\": \"<span class=\"cyantextcolor\">0000031<\/span>\"<\/span><br \/>\n<span class=\"textindentlevel2\">},<br \/>\n{<\/span><br \/>\n<span class=\"textindentlevel3\">\"<span class=\"greentextcolor\">old_epc<\/span>\": \"<span class=\"cyantextcolor\">421AB45009ECCA002367ABC7<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">new_epc<\/span>\": \"<span class=\"cyantextcolor\">CF00000216CD2E400000000D<\/span>\",<br \/>\n\"<span class=\"greentextcolor\">tid<\/span>\": \"<span class=\"cyantextcolor\">0000032<\/span>\"<\/span><br \/>\n<span class=\"textindentlevel2\">}<\/span><br \/>\n<span class=\"textindentlevel1\">]<\/span><br \/>\n}<\/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-424","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages\/424","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=424"}],"version-history":[{"count":0,"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/pages\/424\/revisions"}],"wp:attachment":[{"href":"https:\/\/senitron.net\/developers\/wp-json\/wp\/v2\/media?parent=424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}