{"info":{"_postman_id":"a367049f-b5a1-982a-ba1c-13aab0d813b6","name":"KeepIT Pupa","description":"<html><head></head><body><p>KeepIT's documentation for specific Pupa services.</p>\n<p>All web services are based on <code>REST</code> and <code>JSON</code> technology.</p>\n<p>To use the services you have to login in keepIT and then use the returned token for future communications.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"3719404","collectionId":"a367049f-b5a1-982a-ba1c-13aab0d813b6","publishedId":"RVfvCWQa","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"335477","highlight":"335477"},"publishDate":"2018-02-14T13:00:58.000Z"},"item":[{"name":"Login","item":[{"name":"Login","id":"f67e9ea6-5e3f-16e7-254a-ca313a1f3b05","request":{"method":"POST","header":[{"key":"Cache-Control","value":"no-cache"},{"key":"Content-Type","value":"application/json"},{"key":"languageId","value":"EN","description":"<p>Your language: IT | EN</p>\n"},{"key":"companyId","value":"{{COMPANY_ID}}","description":"<p>Your company Id</p>\n"},{"key":"siteId","value":"{{SITE_ID}}","description":"<p>Your site Id</p>\n"},{"key":"username","value":"{{USERNAME}}","description":"<p>Your username</p>\n"},{"key":"password","value":"{{PASSWORD}}","description":"<p>Your password</p>\n"}],"url":"{{BASE_URL}}/login/loginPostHeader?appId=KEEPIT_MICYS&applicationId=KEEPIT_MICYS&username={{USERNAME}}&needTempToken=1","description":"<p>This is the standard KeepIT Login for KEEPIT application.</p>\n<p>If the authentication task completes successfully, the response expressed in <code>JSON</code> format would contain the token to include in any Restful request sent from this time, as for the one reported above.</p>\n<p>Successful response is like the one reported as follow:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"message\":\"\",\n    \"siteId\":XXX,\n    \"companyId\":\"YYYY\",\n    \"success\":true,\n    \"token\":\"ZZZZZZ\"\n}\n</code></pre><p>In case of error you respone has a success property equals to false.</p>\n<p>IMPORTANT: The session is maintained active typically for 10 minutes, without receiving other requests. Additional requests will extend the timeout.</p>\n<p>In case of expired session the response is like the one reported as follow:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"message\": \"Invalid credentials\",\n    \"success\": false,\n    \"errorCode\": \"INVALID_CREDENTIALS\"\n}\n</code></pre>","urlObject":{"path":["login","loginPostHeader"],"host":["{{BASE_URL}}"],"query":[{"key":"appId","value":"KEEPIT_MICYS"},{"key":"applicationId","value":"KEEPIT_MICYS"},{"description":{"content":"<p>Your username</p>\n","type":"text/plain"},"key":"username","value":"{{USERNAME}}"},{"key":"needTempToken","value":"1"}],"variable":[]}},"response":[{"id":"1fc26435-20e5-75a8-4a6a-23c8b20c73be","name":"Login - Success","originalRequest":{"method":"POST","header":[{"key":"Cache-Control","value":"no-cache"},{"key":"Content-Type","value":"application/json"},{"key":"companyId","value":"DEMO1"},{"key":"languageId","value":"EN"},{"key":"password","value":"bialuc"},{"key":"siteId","value":"500"},{"key":"username","value":"BIALUC"}],"url":{"raw":"{{BASE_URL}}/login/loginPostHeader?appId=KEEPIT_MICYS&applicationId=KEEPIT_MICYS&username=BIALUC&needTempToken=1","host":["{{BASE_URL}}"],"path":["login","loginPostHeader"],"query":[{"key":"appId","value":"KEEPIT_MICYS"},{"key":"applicationId","value":"KEEPIT_MICYS"},{"key":"username","value":"BIALUC"},{"key":"needTempToken","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Length","value":"110","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Wed, 07 Feb 2018 10:12:19 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"restfulToken","value":"BIALUC1517998339394008505832742794144","name":"restfulToken","description":""}],"cookie":[{"expires":"Invalid Date","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":false,"value":"989AD365E44DB04E7049A6DE4D11E97C","key":"JSESSIONID"}],"responseTime":"1548","body":"{\"message\":\"\",\"siteId\":500,\"companyId\":\"DEMO1\",\"success\":true,\"token\":\"BIALUC1517998339394008505832742794144\"}"},{"id":"716e6ba7-4813-4bfa-ff5f-2eb407ffcdfb","name":"Login - Failed","originalRequest":{"method":"POST","header":[{"key":"Cache-Control","value":"no-cache"},{"key":"Content-Type","value":"application/json"},{"key":"companyId","value":"DEMO1"},{"key":"languageId","value":"EN"},{"key":"password","value":"bialuc"},{"key":"siteId","value":"500"},{"key":"username","value":"BIALUC"}],"url":{"raw":"{{BASE_URL}}/login/loginPostHeader?appId=KEEPIT_MICYS&applicationId=KEEPIT_MICYS&username=BIALUC&needTempToken=1","host":["{{BASE_URL}}"],"path":["login","loginPostHeader"],"query":[{"key":"appId","value":"KEEPIT_MICYS"},{"key":"applicationId","value":"KEEPIT_MICYS"},{"key":"username","value":"BIALUC"},{"key":"needTempToken","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Length","value":"83","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Thu, 08 Feb 2018 10:13:42 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"restfulToken","value":"BIALUC1518084822932006562603846718108","name":"restfulToken","description":""}],"cookie":[{"expires":"Invalid Date","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":true,"value":"F78ACF3C726006469D55C476A0771B90","key":"JSESSIONID"}],"responseTime":"211","body":"{\"message\":\"Invalid credentials\",\"success\":false,\"errorCode\":\"INVALID_CREDENTIALS\"}"}],"_postman_id":"f67e9ea6-5e3f-16e7-254a-ca313a1f3b05"}],"id":"f31d0048-5238-601b-bb90-51a6a1485392","_postman_id":"f31d0048-5238-601b-bb90-51a6a1485392","description":""},{"name":"Unique code","item":[{"name":"Get unique codes","id":"10e66053-95bc-27ab-05b1-6d9453430668","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"uniqueCode\" : \"0123456789\",\n  \"codeStatus\" : \"P\"\n}"},"url":"{{BASE_URL}}/api?cmd=getUniqueCodes_v2&username={{USERNAME}}&start=0&productCode=YOUR_CODE&codeStatus=G&capoconto=YOUR_CAPOCONTO&promoCode=PROMO_CODE&barcode=YOUR_BARCODE&uniqueCode=CODE&restfulToken=PUPA_WS1518613184196006053722929504679","description":"<p>Returns a list of existing codes, according to the filters set in the request url.</p>\n<p>The <code>JSON</code> response is paginated and having always this content:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"valueObjectList\": [{...},{...},...], \n    \"moreRows\": true|false \n}\n</code></pre><p>If \"moreRows\" is true you can get the next record by specifying the index to start from in the request url.</p>\n<p>Note that a page contains at most 100 records.\nIf \"moreRows\" is true and you want the second page you have to set start to 100.</p>\n<p>Note: the available codeStatus are:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>- G: generated\n- P: printed\n- U: used\n</code></pre>","urlObject":{"path":["api"],"host":["{{BASE_URL}}"],"query":[{"description":{"content":"<p>API name</p>\n","type":"text/plain"},"key":"cmd","value":"getUniqueCodes_v2"},{"description":{"content":"<p>Username</p>\n","type":"text/plain"},"key":"username","value":"{{USERNAME}}"},{"description":{"content":"<p>[OPTIONAL] The index to start from, default is 0</p>\n","type":"text/plain"},"key":"start","value":"0"},{"description":{"content":"<p>[OPTIONAL] Filter by product code</p>\n","type":"text/plain"},"key":"productCode","value":"YOUR_CODE"},{"description":{"content":"<p>[OPTIONAL] Filter by code status: G | P | U</p>\n","type":"text/plain"},"key":"codeStatus","value":"G"},{"description":{"content":"<p>[OPTIONAL] Filter by capoconto</p>\n","type":"text/plain"},"key":"capoconto","value":"YOUR_CAPOCONTO"},{"description":{"content":"<p>[OPTIONAL] Filter by promo code</p>\n","type":"text/plain"},"key":"promoCode","value":"PROMO_CODE"},{"description":{"content":"<p>[OPTIONAL] Filter by barcode</p>\n","type":"text/plain"},"key":"barcode","value":"YOUR_BARCODE"},{"description":{"content":"<p>[OPTIONAL] Filter by unique code</p>\n","type":"text/plain"},"key":"uniqueCode","value":"CODE"},{"description":{"content":"<p>Your token</p>\n","type":"text/plain"},"key":"restfulToken","value":"PUPA_WS1518613184196006053722929504679"}],"variable":[]}},"response":[{"id":"93e56a05-4d1b-5346-c845-35e89021bd8a","name":"Get unique codes - Second page request","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"restfulToken","value":"BIALUC1518084111160005447809650797194","description":"Your token"}],"body":{"mode":"raw","raw":"{\n  \"uniqueCode\" : \"0123456789\",\n  \"codeStatus\" : \"P\"\n}"},"url":{"raw":"{{BASE_URL}}/api?cmd=getUniqueCodes_v2&username={{USERNAME}}&start=100","host":["{{BASE_URL}}"],"path":["api"],"query":[{"key":"cmd","value":"getUniqueCodes_v2","description":"API name"},{"key":"username","value":"{{USERNAME}}","description":"Username"},{"key":"start","value":"100","description":"[OPTIONAL] The index to start from, default is 0"},{"key":"productCode","value":null,"description":"[OPTIONAL] Filter by product code","disabled":true},{"key":"codeStatus","value":"","description":"[OPTIONAL] Filter by code status: G / P / U","disabled":true},{"key":"capoconto","value":null,"description":"[OPTIONAL] Filter by capoconto","disabled":true},{"key":"promoCode","value":null,"description":"[OPTIONAL] Filter by promo code","disabled":true},{"key":"barcode","value":null,"description":"[OPTIONAL] Filter by barcode","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"327","name":"Content-Length","description":""},{"key":"Content-Type","value":"text/html;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Thu, 08 Feb 2018 11:07:15 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"Vary","value":"Accept-Encoding","name":"Vary","description":""}],"cookie":[{"expires":"Invalid Date","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":true,"value":"689BB0A1259157406CE6C2AEA77EA922","key":"JSESSIONID"}],"responseTime":"1497","body":"{ \"valueObjectList\": [\n{\n  \"uniqueCode\": \"9782682673596\",  \"productCode\": \"PC123\",  \"codeStatus\": \"G\",  \"capoconto\": \"CAP123\",  \"barcode\": \"0075678164125\",  \"promoCode\": \"PROMO_MASCARA\",  \"generationDate\": \"2018-01-01 00:00:00\",  \"printDate\": null,  \"useDate\": null,  \"shopCode\": null,  \"documentDate\": null,  \"iniziativeName\": \"Mascara Promo\"}\n,\n{\n  \"uniqueCode\": \"6302892520891\",  \"productCode\": \"PC123\",  \"codeStatus\": \"G\",  \"capoconto\": \"CAP123\",  \"barcode\": \"0075678164125\",  \"promoCode\": \"PROMO_MASCARA\",  \"generationDate\": \"2018-01-01 00:00:00\",  \"printDate\": null,  \"useDate\": null,  \"shopCode\": null,  \"documentDate\": null,  \"iniziativeName\": \"Mascara Promo\"}\n,\n{\n  \"uniqueCode\": \"8379933418645\",  \"productCode\": \"PC123\",  \"codeStatus\": \"G\",  \"capoconto\": \"CAP123\",  \"barcode\": \"0075678164125\",  \"promoCode\": \"PROMO_MASCARA\",  \"generationDate\": \"2018-01-01 00:00:00\",  \"printDate\": null,  \"useDate\": null,  \"shopCode\": null,  \"documentDate\": null,  \"iniziativeName\": \"Mascara Promo\"}\n,\n{\n  \"uniqueCode\": \"8696512967789\",  \"productCode\": \"PC123\",  \"codeStatus\": \"G\",  \"capoconto\": \"CAP123\",  \"barcode\": \"0075678164125\",  \"promoCode\": \"PROMO_MASCARA\",  \"generationDate\": \"2018-01-01 00:00:00\",  \"printDate\": null,  \"useDate\": null,  \"shopCode\": null,  \"documentDate\": null,  \"iniziativeName\": \"Mascara Promo\"}\n,\n{\n  \"uniqueCode\": \"3231342296124\",  \"productCode\": \"PC123\",  \"codeStatus\": \"G\",  \"capoconto\": \"CAP123\",  \"barcode\": \"0075678164125\",  \"promoCode\": \"PROMO_MASCARA\",  \"generationDate\": \"2018-01-01 00:00:00\",  \"printDate\": null,  \"useDate\": null,  \"shopCode\": null,  \"documentDate\": null,  \"iniziativeName\": \"Mascara Promo\"}\n], \"resultSetLength\": 112, \"moreRows\": true }"},{"id":"f342739b-e8c4-4f4b-f0d2-597788d3bc1e","name":"Get unique codes - Success response with code status filter","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"restfulToken","value":"BIALUC1518084111160005447809650797194","description":"Your token"}],"body":{"mode":"raw","raw":"{\n\t\"uniqueCode\" : \"0123456789\",\n\t\"codeStatus\" : \"P\"\n}"},"url":{"raw":"{{BASE_URL}}/api?cmd=getUniqueCodes_v2&username={{USERNAME}}&codeStatus=P","host":["{{BASE_URL}}"],"path":["api"],"query":[{"key":"cmd","value":"getUniqueCodes_v2","description":"API name"},{"key":"username","value":"{{USERNAME}}","description":"Username"},{"key":"start","value":"101","description":"[OPTIONAL] The index to start from, default is 0","disabled":true},{"key":"productCode","value":null,"description":"[OPTIONAL] Filter by product code","disabled":true},{"key":"codeStatus","value":"P","description":"[OPTIONAL] Filter by code status: G / P / U"},{"key":"capoconto","value":null,"description":"[OPTIONAL] Filter by capoconto","disabled":true},{"key":"promoCode","value":null,"description":"[OPTIONAL] Filter by promo code","disabled":true},{"key":"barcode","value":null,"description":"[OPTIONAL] Filter by barcode","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"259","name":"Content-Length","description":""},{"key":"Content-Type","value":"text/html;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Thu, 08 Feb 2018 11:04:43 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"Vary","value":"Accept-Encoding","name":"Vary","description":""}],"cookie":[{"expires":"Invalid Date","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":true,"value":"689BB0A1259157406CE6C2AEA77EA922","key":"JSESSIONID"}],"responseTime":"1586","body":"{ \"valueObjectList\": [\n{\n  \"uniqueCode\": \"1123456789\",  \"productCode\": \"PC123\",  \"codeStatus\": \"P\",  \"capoconto\": \"CAP123\",  \"barcode\": \"0075678164125\",  \"promoCode\": \"PROMO_MASCARA\",  \"generationDate\": \"2018-01-01 00:00:00\",  \"printDate\": null,  \"useDate\": null,  \"shopCode\": null,  \"documentDate\": null,  \"iniziativeName\": \"Mascara Promo\"}\n], \"resultSetLength\": 1, \"moreRows\": false }"}],"_postman_id":"10e66053-95bc-27ab-05b1-6d9453430668"},{"name":"Update unique code","id":"2325cf9d-e569-038b-3e2d-245945b456eb","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"uniqueCode\" : \"2123456789\",\n  \"codeStatus\" : \"P\"\n}"},"url":"{{BASE_URL}}/api?cmd=updateUniqueCode_v2&username={{USERNAME}}&restfulToken=BIALUC151844251680800989132240663389","description":"<p>Update a unique code status, passing the following <code>json</code> into the body.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"uniqueCode\" : \"0123456789\",\n    \"codeStatus\" : \"U\",\n    \"printDate\" : \"2018-01-31 15:00:00\"\n    \"useDate\" : \"2018-01-31 15:00:00\"\n    \"productCode\" : \"\"\n    \"barcode\" : \"\"\n    \"promoCode\" : \"\"\n    \"iniziativeName\" : \"\"\n    \"shopCode\" : \"\"\n    \"documentDate\" : \"2018-01-01 12:00:00\"\n}\n</code></pre><ul>\n<li><code>uniqueCode</code>: the code that you want to update <code>mandatory</code>.</li>\n<li><code>codeStatus</code>: the status that you want to set, the available status are:<ul>\n<li>G: generated</li>\n<li>P: printed<ul>\n<li>you can also specify the field <code>printDate</code>, default is the current server date</li>\n</ul>\n</li>\n<li>U: used<ul>\n<li>you can also specify the field <code>useDate</code>, default is the current server date</li>\n<li>obviously a code in status U can not be updated to the status P.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><code>productCode</code>: the product code to be associated with the unique code <code>optional - varchar(250)</code>.</li>\n<li><code>barcode</code>: the barcode to be associated with the unique code <code>optional - varchar(50)</code>.</li>\n<li><code>promoCode</code>: the barcode to be associated with the unique code <code>optional - varchar(250)</code>.</li>\n<li><code>iniziativeName</code>: the iniziative to be associated with the unique code <code>optional - varchar(45)</code>.</li>\n<li><code>shopCode</code>: the shop where the code is spend <code>optional - varchar(20)</code>.</li>\n<li><code>documentDate</code>: the date <code>yyyy-MM-dd hh:mm:ss</code> when the code is spend <code>optional</code>.</li>\n</ul>\n","urlObject":{"path":["api"],"host":["{{BASE_URL}}"],"query":[{"description":{"content":"<p>API name</p>\n","type":"text/plain"},"key":"cmd","value":"updateUniqueCode_v2"},{"description":{"content":"<p>Your username</p>\n","type":"text/plain"},"key":"username","value":"{{USERNAME}}"},{"description":{"content":"<p>Your token</p>\n","type":"text/plain"},"key":"restfulToken","value":"BIALUC151844251680800989132240663389"}],"variable":[]}},"response":[{"id":"8d1000bf-d7f2-384f-2115-c996f644339a","name":"Update Code - Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"restfulToken","value":"BIALUC151844251680800989132240663389","description":"Your token"}],"body":{"mode":"raw","raw":"{\n  \"uniqueCode\" : \"2123456789\",\n  \"codeStatus\" : \"P\"\n}"},"url":{"raw":"{{BASE_URL}}/api?cmd=updateUniqueCode_v2&username={{USERNAME}}","host":["{{BASE_URL}}"],"path":["api"],"query":[{"key":"cmd","value":"updateUniqueCode_v2","description":"API name"},{"key":"username","value":"{{USERNAME}}","description":"Your username"}]},"description":"Update a unique code status, passing the following `json` into the body.\n\n\t{\n\t\t\"uniqueCode\" : \"0123456789\",\n\t\t\"codeStatus\" : \"U\",\n\t\t\"printDate\" : \"2018-01-01 12:00:00\"\n\t\t\"useDate\" : \"2018-01-01 12:00:00\"\n\t\t\"productCode\" : \"\"\n\t\t\"barcode\" : \"\"\n\t\t\"promoCode\" : \"\"\n\t\t\"iniziativeName\" : \"\"\n\t\t\"shopCode\" : \"\"\n\t\t\"documentDate\" : \"2018-01-01 12:00:00\"\n\t}\n\nThe available status are:<br>\n- G: generated\n- P: printed\n\t* you can also specify the field `printDate`, default is the current server date\n- U: used\n\t* you can also specify the field `useDate`, default is the current server date\n \n\nObviously a code in status U can not be updated to the status P."},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"74","name":"Content-Length","description":""},{"key":"Content-Type","value":"text/html;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Wed, 07 Feb 2018 13:33:22 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"Vary","value":"Accept-Encoding","name":"Vary","description":""}],"cookie":[{"expires":"Invalid Date","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":false,"value":"8BDD34912E7F0EE01BBC5C2728E83699","key":"JSESSIONID"}],"responseTime":"1396","body":"{\"success\":true,\"code\":200,\"message\":\"Insert / Update success\"}"},{"id":"998a3b9e-4594-8193-baf9-24b67c0fc791","name":"Update Code - Fail","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"restfulToken","value":"BIALUC151844251680800989132240663389","description":"Your token"}],"body":{"mode":"raw","raw":"{\n  \"uniqueCode\" : \"2123456789\",\n  \"codeStatus\" : \"P\"\n}"},"url":{"raw":"{{BASE_URL}}/api?cmd=updateUniqueCode_v2&username={{USERNAME}}","host":["{{BASE_URL}}"],"path":["api"],"query":[{"key":"cmd","value":"updateUniqueCode_v2","description":"API name"},{"key":"username","value":"{{USERNAME}}","description":"Your username"}]},"description":"Update a unique code status, passing the following `json` into the body.\n\n\t{\n\t\t\"uniqueCode\" : \"0123456789\",\n\t\t\"codeStatus\" : \"U\",\n\t\t\"printDate\" : \"2018-01-01 12:00:00\"\n\t\t\"useDate\" : \"2018-01-01 12:00:00\"\n\t\t\"productCode\" : \"\"\n\t\t\"barcode\" : \"\"\n\t\t\"promoCode\" : \"\"\n\t\t\"iniziativeName\" : \"\"\n\t\t\"shopCode\" : \"\"\n\t\t\"documentDate\" : \"2018-01-01 12:00:00\"\n\t}\n\nThe available status are:<br>\n- G: generated\n- P: printed\n\t* you can also specify the field `printDate`, default is the current server date\n- U: used\n\t* you can also specify the field `useDate`, default is the current server date\n \n\nObviously a code in status U can not be updated to the status P."},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"90","name":"Content-Length","description":""},{"key":"Content-Type","value":"text/html;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Wed, 07 Feb 2018 13:35:09 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"Vary","value":"Accept-Encoding","name":"Vary","description":""}],"cookie":[{"expires":"Invalid Date","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":false,"value":"8BDD34912E7F0EE01BBC5C2728E83699","key":"JSESSIONID"}],"responseTime":"1468","body":"{\"success\":false,\"code\":400,\"message\":\"The code has already been printed.\"}"}],"_postman_id":"2325cf9d-e569-038b-3e2d-245945b456eb"},{"name":"Create unique code","id":"c6b3d2c1-ef0a-97c4-1a9b-40b5b30fe3de","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"capoconto\" : \"CAP00001\",\n  \"quantity\" : 10000\n}"},"url":"{{BASE_URL}}/api?cmd=createUniqueCode_v2&username={{USERNAME}}&restfulToken=BIALUC151878749117800777775323448201","description":"<p>Create unique codes for a specific capoconto, passing the following <code>JSON</code> into the body.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"capoconto\" : \"CAP00001\",\n    \"quantity\" : 10000\n}\n</code></pre><p>Code generation can take several seconds, for this reason the request is asynchronous.</p>\n<p>The response <code>JSON</code> contains an operation id that allows you to check the generation status by calling the web service <code>getOperationStatus_v2</code>.</p>\n<p>There are three possible states:</p>\n<ul>\n<li>L = in proggress</li>\n<li>T = successfully concluded</li>\n<li>E = error</li>\n</ul>\n","urlObject":{"path":["api"],"host":["{{BASE_URL}}"],"query":[{"description":{"content":"<p>API name</p>\n","type":"text/plain"},"key":"cmd","value":"createUniqueCode_v2"},{"description":{"content":"<p>Your username</p>\n","type":"text/plain"},"key":"username","value":"{{USERNAME}}"},{"description":{"content":"<p>Your token</p>\n","type":"text/plain"},"key":"restfulToken","value":"BIALUC151878749117800777775323448201"}],"variable":[]}},"response":[{"id":"7dab6ff8-ff69-ac69-bf0f-e463d71c5587","name":"Create unique code - Enqueued","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","disabled":false},{"key":"restfulToken","value":"BIALUC151878749117800777775323448201","description":"Your token","disabled":false}],"body":{"mode":"raw","raw":"{\n  \"capoconto\" : \"CAP00001\",\n  \"quantity\" : 10000\n}"},"url":{"raw":"{{BASE_URL}}/api?cmd=createUniqueCode_v2&username={{USERNAME}}","host":["{{BASE_URL}}"],"path":["api"],"query":[{"key":"cmd","value":"createUniqueCode_v2","description":"API name"},{"key":"username","value":"{{USERNAME}}","description":"Your username"}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"91","name":"Content-Length","description":""},{"key":"Content-Type","value":"text/html;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Fri, 16 Feb 2018 13:28:06 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"Vary","value":"Accept-Encoding","name":"Vary","description":""}],"cookie":[{"expires":"Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":true,"value":"93698E155086CD49BAF49336A82053C4","key":"JSESSIONID"}],"responseTime":"1670","body":"{\"success\":true,\"operationId\":33202,\"code\":200,\"message\":\"Creation enqueued\"}"}],"_postman_id":"c6b3d2c1-ef0a-97c4-1a9b-40b5b30fe3de"}],"id":"189d87bd-9a4b-1031-052b-1a2bf1add4c7","_postman_id":"189d87bd-9a4b-1031-052b-1a2bf1add4c7","description":""},{"name":"Asyn request","item":[{"name":"Get operation status","id":"17549a21-89e2-5f3f-f43e-15e0b440f517","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"","value":""}],"body":{"mode":"raw","raw":"{\n  \"uniqueCode\" : \"0123456789\",\n  \"codeStatus\" : \"P\"\n}"},"url":"{{BASE_URL}}/api?cmd=getOperationStatus_v2&username={{USERNAME}}&operationId=33202&restfulToken=BIALUC151878749117800777775323448201","description":"<p>Returns the execution status of an asynchronous request by passing the <code>operationId</code> in the request params.</p>\n<p>Successful response is like the one reported as follow:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"success\":true,\n    \"code\":200,\n    \"operationSatus\":\"L\"\n}\n</code></pre><p>There are three possible states:</p>\n<ul>\n<li>L = in proggress</li>\n<li>T = successfully concluded</li>\n<li>E = error</li>\n</ul>\n","urlObject":{"path":["api"],"host":["{{BASE_URL}}"],"query":[{"description":{"content":"<p>API name</p>\n","type":"text/plain"},"key":"cmd","value":"getOperationStatus_v2"},{"description":{"content":"<p>Username</p>\n","type":"text/plain"},"key":"username","value":"{{USERNAME}}"},{"key":"operationId","value":"33202"},{"description":{"content":"<p>Your token</p>\n","type":"text/plain"},"key":"restfulToken","value":"BIALUC151878749117800777775323448201"}],"variable":[]}},"response":[{"id":"1f158561-5781-d58a-e317-8426a52fe229","name":"Operation status - Not found","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","disabled":false},{"key":"restfulToken","value":"BIALUC151878749117800777775323448201","description":"Your token","disabled":false}],"body":{"mode":"raw","raw":"{\n  \"uniqueCode\" : \"0123456789\",\n  \"codeStatus\" : \"P\"\n}"},"url":{"raw":"{{BASE_URL}}/api?cmd=getOperationStatus_v2&username={{USERNAME}}&operationId=33202","host":["{{BASE_URL}}"],"path":["api"],"query":[{"key":"cmd","value":"getOperationStatus_v2","description":"API name"},{"key":"username","value":"{{USERNAME}}","description":"Username"},{"key":"operationId","value":"33202"}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"89","name":"Content-Length","description":""},{"key":"Content-Type","value":"text/html;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Fri, 16 Feb 2018 13:25:34 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"Vary","value":"Accept-Encoding","name":"Vary","description":""}],"cookie":[{"expires":"Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":true,"value":"93698E155086CD49BAF49336A82053C4","key":"JSESSIONID"}],"responseTime":"2041","body":"{\"success\":false,\"code\":400,\"message\":\"No operation found for id: 33202\"}"},{"id":"98f2dc3a-22e0-0cef-ed85-ecb0a6dd8890","name":"Operation status - completed","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","disabled":false},{"key":"restfulToken","value":"BIALUC151878749117800777775323448201","description":"Your token","disabled":false}],"body":{"mode":"raw","raw":"{\n  \"uniqueCode\" : \"0123456789\",\n  \"codeStatus\" : \"P\"\n}"},"url":{"raw":"{{BASE_URL}}/api?cmd=getOperationStatus_v2&username={{USERNAME}}&operationId=33201","host":["{{BASE_URL}}"],"path":["api"],"query":[{"key":"cmd","value":"getOperationStatus_v2","description":"API name"},{"key":"username","value":"{{USERNAME}}","description":"Username"},{"key":"operationId","value":"33201"}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"67","name":"Content-Length","description":""},{"key":"Content-Type","value":"text/html;charset=UTF-8","name":"Content-Type","description":""},{"key":"Date","value":"Fri, 16 Feb 2018 13:25:02 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":""},{"key":"Vary","value":"Accept-Encoding","name":"Vary","description":""}],"cookie":[{"expires":"Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"enterprisedemo.4wsplatform.org","path":"/icrm_svil/","secure":true,"value":"93698E155086CD49BAF49336A82053C4","key":"JSESSIONID"}],"responseTime":"644","body":"{\"success\":true,\"code\":200,\"operationSatus\":\"T\"}"}],"_postman_id":"17549a21-89e2-5f3f-f43e-15e0b440f517"}],"id":"de939850-e5d8-6546-49ec-acf8cdd698db","description":"<p>Some services provided by KeepIT are asynchronous, in this case you can check the execution status of your request through a special web service <code>getOperationStatus_v2</code>.</p>\n","event":[{"listen":"prerequest","script":{"id":"2968a67c-c5f3-4c12-8a03-07a8886d6b4f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"39cbcd47-21c5-4644-b4f3-3e240a07c125","type":"text/javascript","exec":[""]}}],"_postman_id":"de939850-e5d8-6546-49ec-acf8cdd698db"}],"event":[{"listen":"prerequest","script":{"exec":[""],"id":"fc56dc2e-ec96-49a8-9b5a-7f3cafa078c4","type":"text/javascript"}},{"listen":"test","script":{"exec":[""],"id":"3f3ed487-17a4-4757-bf23-71eb75556e45","type":"text/javascript"}}]}