{"info":{"_postman_id":"e51d2a23-f541-4778-8b2c-438933ded57d","name":"iikoWeb Public API","description":"<html><head></head><body><p>iikoWeb API is a collection of public methods to be used for data exchange with iiko cloud. The methods are used by iiko and 3-rd party applications. </p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"2896430","collectionId":"e51d2a23-f541-4778-8b2c-438933ded57d","publishedId":"TVemBpmn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF3333"},"publishDate":"2020-11-11T15:39:30.000Z"},"item":[{"name":"Authorization and Authentication","item":[{"name":"Login and session details","item":[{"name":"Session details","id":"7f6ccdff-806b-426b-bb86-d420ab10275c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"{{server}}/api/auth","description":"<p>Gets details of the current session</p>\n","urlObject":{"path":["api","auth"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7f6ccdff-806b-426b-bb86-d420ab10275c"},{"name":"End Session (logout)","id":"8fe983e9-dc83-4738-8ce0-f6b1797ea1e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{server}}/api/auth/logout","description":"<p>Logs the user out and destroys the session</p>\n","urlObject":{"path":["api","auth","logout"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8fe983e9-dc83-4738-8ce0-f6b1797ea1e2"},{"name":"Select Store","id":"3f15ba32-17a9-4979-91ba-fbcd4812c962","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"{{server}}/api/stores/select/{{store_id_1}}","description":"<p>Selects a store to work with, given a Store ID. \nTo obtain the list of stores available for the user run <em>/api/stores/list</em>.</p>\n","urlObject":{"path":["api","stores","select","{{store_id_1}}"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3f15ba32-17a9-4979-91ba-fbcd4812c962"},{"name":"Auth","id":"a1dcaa9b-b74f-4357-97a2-667231f7f331","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"login\": \"{{username}}\",\n    \"password\": \"{{password}}\"\n}"},"url":"{{server}}/api/auth/login","description":"<p>Authorises the user</p>\n","urlObject":{"path":["api","auth","login"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a1dcaa9b-b74f-4357-97a2-667231f7f331"}],"id":"eb071082-58d4-4cd1-8d6b-b8b6fdaefae7","_postman_id":"eb071082-58d4-4cd1-8d6b-b8b6fdaefae7","description":""}],"id":"90abc9a3-a895-4d51-a965-72278ea0c9c8","event":[{"listen":"prerequest","script":{"id":"45c38f33-754c-4919-9e38-cb4939ffac76","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"1b47b9ea-a210-4115-a066-87fb6ec2dc3d","type":"text/javascript","exec":[""]}}],"_postman_id":"90abc9a3-a895-4d51-a965-72278ea0c9c8","description":""},{"name":"Organization structure","item":[{"name":"Stores","item":[{"name":"List Stores","id":"41ada350-f25b-4dad-8ca4-ab99984921d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"{{server}}/api/stores/list","description":"<p>Returns a list of all active stores</p>\n","urlObject":{"path":["api","stores","list"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"41ada350-f25b-4dad-8ca4-ab99984921d1"},{"name":"Get Store Properties","id":"fbd2cd47-238f-40db-a652-75cd39e7e90a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"{{server}}/api/store/get/{{store_id_1}}","description":"<p>Returns an object, representing a store in the system.</p>\n<p><em><strong>Response format</strong></em></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-Javascript\">{\n    \"id\": 11,\n    \"name\": \"542 Borehamwood\",\n    // store template\n    \"template\": {\n        \"id\": 2,\n        \"name\": \"Delco\",\n        \"isExpress\": false,\n        \"isDelco\": true,\n        \"isDineIn\": false\n    },\n    // open hours\n    \"workingHours\": {\n        \"Monday\": {\n            \"open\": \"10:00\",\n            \"close\": \"23:00\"\n        },\n        \"Tuesday\": {\n            \"open\": \"10:00\",\n            \"close\": \"23:00\"\n        },\n        \"Wednesday\": {\n            \"open\": \"10:00\",\n            \"close\": \"23:00\"\n        },\n        \"Thursday\": {\n            \"open\": \"10:00\",\n            \"close\": \"23:00\"\n        },\n        \"Friday\": {\n            \"open\": \"10:00\",\n            \"close\": \"23:00\"\n        },\n        \"Saturday\": {\n            \"open\": \"10:00\",\n            \"close\": \"23:00\"\n        },\n        \"Sunday\": {\n            \"open\": \"10:00\",\n            \"close\": \"23:00\"\n        }\n    },\n    // list of all templates\n    \"templates\": [\n        {\n            \"id\": 1,\n            \"name\": \"Express\",\n            \"isExpress\": true,\n            \"isDelco\": false,\n            \"isDineIn\": false\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Delco\",\n            \"isExpress\": false,\n            \"isDelco\": true,\n            \"isDineIn\": false\n        },\n        {\n            \"id\": 3,\n            \"name\": \"Dine In\",\n            \"isExpress\": false,\n            \"isDelco\": false,\n            \"isDineIn\": true\n        },\n        {\n            \"id\": 4,\n            \"name\": \"Not used\",\n            \"isExpress\": false,\n            \"isDelco\": false,\n            \"isDineIn\": false\n        }\n    ],\n    \n    // list of iikoBiz terminals \n    \"delcoTerminals\": [\n        {\n            \"id\": \"ebbb0b86-a3c6-6dce-015f-c02741c5a37e\",\n            \"name\": \"Walsall Wood\"\n        },\n        {\n            \"id\": \"6939a7ea-cbce-50a2-015f-ddacad25522e\",\n            \"name\": \"1004 Croxley Green\"\n        },\n        {\n            \"id\": \"4fb6bf0b-2c67-1873-0160-36845fb98525\",\n            \"name\": \"8177 Swinton\"\n        },\n        {\n            \"id\": \"286f373d-8d45-8a22-0160-738ef9bd00e3\",\n            \"name\": \"8225 Yateley\"\n        },\n        {\n            \"id\": \"4fb6bf0b-2c67-1873-0160-2c94c9b5f75a\",\n            \"name\": \"893 Southampton Shirley 2\"\n        },\n        {\n            \"id\": \"12d1c5d9-d8e8-da69-015a-de972886bb4a\",\n            \"name\": \"Kingsbury (501) Til3\"\n        },\n        {\n            \"id\": \"70b55a12-ee58-85f7-0160-02164f933f28\",\n            \"name\": \"8199 Welwyn Garden City N\"\n        },\n        {\n            \"id\": \"a46a1433-7e1d-e05a-0160-1276e74cb8c2\",\n            \"name\": \"8223 Nuneaton\"\n        },\n        {\n            \"id\": \"be3aaed2-4cf0-1924-015f-9fdd561f2d37\",\n            \"name\": \"513 Ruslip Manor\"\n        },\n        {\n            \"id\": \"4fb6bf0b-2c67-1873-0160-314dc1c0565e\",\n            \"name\": \"645 Bournemouth North\"\n        },\n        {\n            \"id\": \"5be4a323-ef41-5e2f-015f-c3cb84eb2f1e\",\n            \"name\": \"722 Hatfield\"\n        },\n        {\n            \"id\": \"c02619ad-2f81-39f2-015a-3bb303b13a6f\",\n            \"name\": \"542 Borehamwood New\"\n        },\n        {\n            \"id\": \"b0da1c09-8689-5c34-015f-906be9374333\",\n            \"name\": \"720 Dagenham South\"\n        },\n        {\n            \"id\": \"1b4a8dd2-87e7-10ca-015f-952d63a3ab61\",\n            \"name\": \"562 Harrow Weald\"\n        },\n        {\n            \"id\": \"e9960acd-71bb-1457-015f-9a5af869a120\",\n            \"name\": \"505 Rayners Lane\"\n        },\n        {\n            \"id\": \"9d7e6acf-06d1-06bf-015f-d8857006142f\",\n            \"name\": \"591 East Ham\"\n        },\n        {\n            \"id\": \"0ce4ab71-dce8-387d-015c-3929c3229392\",\n            \"name\": \"1006 Surrey Quays\"\n        },\n        {\n            \"id\": \"4fb6bf0b-2c67-1873-0160-25845e51e0e8\",\n            \"name\": \"8226 Christchurch: Christchurch (8226)\"\n        },\n        {\n            \"id\": \"c02619ad-2f81-39f2-015a-3bb303b11527\",\n            \"name\": \"502 Mill Hill New\"\n        },\n        {\n            \"id\": \"c02619ad-2f81-39f2-015a-1c6931b5cbec\",\n            \"name\": \"Rainham (509) New\"\n        },\n        {\n            \"id\": \"c02619ad-2f81-39f2-015a-270d910626ca\",\n            \"name\": \"579 Wembley New\"\n        },\n        {\n            \"id\": \"c02619ad-2f81-39f2-015a-2170fc2cd518\",\n            \"name\": \"570 Leyton New\"\n        },\n        {\n            \"id\": \"d0ada7e2-91be-27bb-015b-14e0ba3bee0f\",\n            \"name\": \"Debden T5 (8206)\"\n        },\n        {\n            \"id\": \"9c937f9a-3a93-5a1b-015f-b44760114a08\",\n            \"name\": \"Canning Town (721)\"\n        },\n        {\n            \"id\": \"12d1c5d9-d8e8-da69-015a-c2c8d8ce2a08\",\n            \"name\": \"TILL01\"\n        },\n        {\n            \"id\": \"c4c073e1-030e-c72b-015f-be9415817c30\",\n            \"name\": \"551 Greenford\"\n        },\n        {\n            \"id\": \"ccbd309f-5d21-692f-015e-755bcd6c03fc\",\n            \"name\": \"517 Collier Row\"\n        },\n        {\n            \"id\": \"8beb35e9-dd00-5ce1-015b-8952eafee06c\",\n            \"name\": \"557 Sudbury\"\n        },\n        {\n            \"id\": \"75d2a52a-cd9b-1493-015e-9a001e343604\",\n            \"name\": \"Littlehampton (8228) New\"\n        },\n        {\n            \"id\": \"75d2a52a-cd9b-1493-015e-aa48013bf234\",\n            \"name\": \"St Helens (8216)\"\n        },\n        {\n            \"id\": \"c02619ad-2f81-39f2-015a-227cdea2aca5\",\n            \"name\": \"620 New Barkingside\"\n        }\n    ],\n    // store's location coordinates\n    \"lat\": \"51.6543900\",\n    \"lng\": \"-0.2783300\",\n    // iikoBiz / iikoTransport organization id\n    \"terminalId\": \"c02619ad-2f81-39f2-015a-3bb303b13a6f\",\n    // store configuration properties\n    \"properties\": {\n        \"generalProperties\": {\n            // id in iiko crm system\n            \"crmId\": -1,\n            // address as a text field\n            \"addressString\": \"\",\n            // list of departments\n            \"departments\": [\n                {\n                    \"id\": \"e53075fa-0d11-435b-8ae7-9f0c2d0be1c0\",\n                    \"name\": \"PH UK Delco Borehamwood (542)\",\n                    // whether department is connected to iikoTransport\n                    \"useTransport\": true,\n                    \"pos\": [\n                        {\n                            \"id\": \"483dc252-82c5-4e30-8d4c-9bd1f023c154\",\n                            \"name\": \"Dispatch\",\n                            \"main\": \"false\"\n                        },\n                        {\n                            \"id\": \"c3823df8-48f1-476d-903a-8dcf80969d48\",\n                            \"name\": \"TILL02\",\n                            \"main\": \"false\"\n                        },\n                        {\n                            \"id\": \"648d1eb8-2274-4ebf-8193-b659b6ab0be2\",\n                            \"name\": \"TILL03\",\n                            \"main\": \"false\"\n                        },\n                        {\n                            \"id\": \"9031b0dd-7458-44eb-a222-6eef74ee0ea5\",\n                            \"name\": \"TILL04\",\n                            \"main\": \"false\"\n                        },\n                        {\n                            \"id\": \"247e651a-1247-472c-bd31-8331c0082408\",\n                            \"name\": \"TILL05\",\n                            \"main\": \"true\"\n                        },\n                        {\n                            \"id\": \"a328dc06-735f-47b9-910c-cc8c0d3e7c81\",\n                            \"name\": \"TILL06\",\n                            \"main\": \"false\"\n                        }\n                    ]\n                }\n            ]\n        },\n        // Delco-specific properties \n        \"delcoProperties\": {\n            // whether store is connected iikoTransport (or iikoBiz contrariwise)\n            \"useTransport\": false,\n            \"activeTerminalGroupIds\": []\n        },\n        // Express-specific properties\n        \"expressProperties\": [],\n        // Dine-in-specific properties\n        \"dineInProperties\": [],\n        // Inventory-related properties \n        \"inventoryProperties\": {\n            // storages \n            \"storages\": [],\n            // default storage for purchase orders / incoming invoices \n            \"defaultStorageId\": null\n        }\n    }\n}\n</code></pre>\n","urlObject":{"path":["api","store","get","{{store_id_1}}"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fbd2cd47-238f-40db-a652-75cd39e7e90a"}],"id":"5997ac46-5ae5-4dc6-8691-27bc60239812","description":"<p>A Store is an individual restaurant (one store = one iikoRMS server)</p>\n","event":[{"listen":"prerequest","script":{"id":"932fa3e3-2f63-4953-8b98-28efa11dfbc8","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"773cff0b-b650-44b8-94ad-2ebc8cf87252","type":"text/javascript","exec":[""]}}],"_postman_id":"5997ac46-5ae5-4dc6-8691-27bc60239812"}],"id":"4f274322-b21e-4863-9286-9f3be40207b8","event":[{"listen":"prerequest","script":{"id":"399fb928-b243-47cd-8c77-e17a2bf522fc","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f7ed27cf-f511-4be3-83e1-2e3c68b079ee","type":"text/javascript","exec":[""]}}],"_postman_id":"4f274322-b21e-4863-9286-9f3be40207b8","description":""},{"name":"Reports and metrics","item":[{"name":"Reports","item":[{"name":"OLAP reports (pivot-table)","item":[{"name":"Init olap fetching","event":[{"listen":"test","script":{"id":"bbc77925-1019-4fbb-88db-2fb94b038e9f","exec":["var result = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"fetchId\", result.data);","postman.setEnvironmentVariable(\"fetchBody\", pm.request.body);",""],"type":"text/javascript","packages":{}}}],"id":"194ded1b-7b33-4f06-a74b-eb21fed49ce0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n              \"storeIds\": [{{\"storeID\"}}],\n              \"olapType\": \"SALES\", \n              \"categoryFields\": [], \n              \"groupFields\": [ \n                \"Department.Code\",\n                \"OrderType\",\n                \"PriceCategory\",\n                \"DishCategory.Accounting\",\n                \"DishTaxCategory.Name\",\n                \"VAT.Percent\"\n              ],\n              \"stackByDataFields\": false,\n              \"dataFields\": [ \n                \"Sales\"\n              ],\n              \"calculatedFields\": [ \n                {\n                  \"name\": \"Sales\", \n                  \"title\": \"Sales\", \n                  \"description\": \"Net sales\", \n                  \"formula\": \"[DishDiscountSumInt.withoutVAT]\", \n                  \"type\": \"MONEY\", \n                  \"canSum\": false \n                }\n              ],\n              \"filters\": [ \n                {\n                  \"field\": \"OpenDate.Typed\", \n                  \"filterType\": \"date_range\", \n                  \"dateFrom\": \"2020-01-01T00:00:00\",\n                  \"dateTo\": \"2020-01-08T00:00:00\",\n                  \"valueMin\": null,\n                  \"valueMax\": null,\n                  \"valueList\": [],\n                  \"includeLeft\": true,\n                  \"includeRight\": false,\n                  \"inclusiveList\": true\n                },\n                {\n                  \"field\": \"NonCashPaymentType\",\n                  \"filterType\": \"value_list\",\n                  \"dateFrom\": null,\n                  \"dateTo\": null,\n                  \"valueMin\": null,\n                  \"valueMax\": null,\n                  \"valueList\": [\n                    null\n                  ],\n                  \"includeLeft\": true,\n                  \"includeRight\": false,\n                  \"inclusiveList\": true\n                }\n              ],\n              \"includeVoidTransactions\": false,\n              \"includeNonBusinessPaymentTypes\": false\n            }"},"url":"{{server}}/api/olap/init","description":"<p>Initiates pivot-report creation.</p>\n<h1 id=\"request-body-structure\">Request body structure</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">{\n              \"storeIds\":[], // An optional parameter. If present must be an array of 1 element (1 store ID). If omitted the current selected store will be used.\n              \"olapType\": \"SALES\", // Type of data to fetch. Use SALES for sales results, or TRANSACTIONS to get BOH journals.\n              \"categoryFields\": [], // Column grouping fields. Must be empty or contain just one grouping field\n              \"groupFields\": [ // Row grouping fields, unlimited number. \n                \"Department.Code\",\n                \"OrderType\",\n                \"PriceCategory\",\n                \"DishCategory.Accounting\",\n                \"DishTaxCategory.Name\",\n                \"VAT.Percent\"\n              ],\n              \"stackByDataFields\": false,\n              \"dataFields\": [ // Aggregation fields. Only one if CategoryField is set, unlimited number otherwise.\n                \"Sales\"\n              ],\n              \"calculatedFields\": [ \n                  // Only basic math operations are supported. Variables should be contained in square brackets. \n                  // You can use names of all Aggregation fields and a few built-in variables: \n                  // _BusinessDays - number of days with non-zero sales\n                  // _SalesNet - total amount of sales over the period\n                {\n                  \"name\": \"Sales\", // Name to reference in DataFields section\n                  \"title\": \"Sales\", // A title to output in the UI\n                  \"description\": \"Net sales\", \n                  \"formula\": \"[DishDiscountSumInt.withoutVAT]\", // a formula for the calculation\n                  \"type\": \"MONEY\", // The type of value: MONEY, PERCENT, AMOUNT\n                  \"canSum\": false // Deprecated\n                }\n              ],\n              \"filters\": [ \n                {\n                  \"field\": \"OpenDate.Typed\", // Any Field that can be filtered by. \n                  \"filterType\": \"date_range\", // Type of filter: \"value_list\" or \"date_range\" or \"value_range\"\n                  // parameters for date_range\n                  \"dateFrom\": \"2020-01-01T00:00:00\", // Start of the period to fetch in TZ of the store\n                  \"dateTo\": \"2020-01-08T00:00:00\", // End of the period to fetch\n                  // parameters for date_range and value_range\n                  \"includeLeft\": true, // include left boundary of the period (&gt;= vs &gt;)\n                  \"includeRight\": false, // include right boundary of the period (&lt;= vs &lt;)\n                },\n                {\n                    \"field\": \"DishSumInt\", \n                    \"filterType\": \"value_range\", \n                  // parameters for date_range and value_range\n                    \"includeLeft\": false, // include left boundary of the period (&gt;= vs &gt;)\n                    \"includeRight\": true, // include right boundary of the period (&lt;= vs &lt;)\n                  // parameters for value_range\n                    \"valueMin\": 0,\n                    \"valueMax\": 100,\n                    \"inclusiveList\": true \n                },\n                \n                {\n                  \"field\": \"NonCashPaymentType\", \n                  \"filterType\": \"value_list\", \n                  \"valueList\": [ // list of values\n                    null\n                  ],\n                  \"inclusiveList\": true // when true will only allow values in the valueList, when false will filter out vaues in the valueList\n                }\n              ],\n              \"includeVoidTransactions\": true, // include refunds and voids in the results\n              \"includeNonBusinessPaymentTypes\": true // ingnore system-wide configuration of payment types that are not treated as revenue\n            }\n\n</code></pre>\n","urlObject":{"path":["api","olap","init"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"194ded1b-7b33-4f06-a74b-eb21fed49ce0"},{"name":"Get olap fetching status","id":"b437c462-51db-42c9-9519-3ae8779efd7f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{server}}/api/olap/fetch-status/{{fetchId}}","description":"<p>Check the status of the report creation.</p>\n","urlObject":{"path":["api","olap","fetch-status","{{fetchId}}"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b437c462-51db-42c9-9519-3ae8779efd7f"},{"name":"Fetch olap data","id":"fd74b4db-bc2c-4e05-8188-69c1c4bba7e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{{fetchBody}}"},"url":"{{server}}/api/olap/fetch/{{fetchId}}/json","description":"<p>Returns a pivot table result for the given <em>fetchId</em>. \nThe request body must contain initial request.</p>\n<h2 id=\"result-format\">Result Format</h2>\n<p>Use <code>/api/olap/fetch/{{fetchId}}/json</code> to get results in json format.\nUse <code>/api/olap/fetch/{{fetchId}}/csv</code> to get a .csv file.</p>\n","urlObject":{"path":["api","olap","fetch","{{fetchId}}","json"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fd74b4db-bc2c-4e05-8188-69c1c4bba7e9"},{"name":"List available fields","id":"d185fd49-184f-47f1-8f68-d4fd87cb11ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://demo-pro.iikoweb.co.uk/api/olap/help/fields","description":"<p>Returns the complete list of fields available for the pivot table.</p>\n","urlObject":{"protocol":"https","path":["api","olap","help","fields"],"host":["demo-pro","iikoweb","co","uk"],"query":[],"variable":[]}},"response":[],"_postman_id":"d185fd49-184f-47f1-8f68-d4fd87cb11ce"}],"id":"2d6d7acd-36ae-40dd-9c8f-37be8901a185","description":"<p><strong>Simple OLAP API</strong> is there to provide access to transactional data within iiko system.</p>\n<p>The data is fetched as a pivot table where the request should contain Grouping, Filtering, and Aggregation fields.</p>\n<h2 id=\"stores\">Stores</h2>\n<p>The data is fetched on a \"per store\" basis, i.e. you will have to make several requests to fetch data for several restaurants, even if they all belong to one chain. This is due to the specifics of how iiko is keeping and managing real-time data.</p>\n<h2 id=\"real-timeliness\">Real-timeliness</h2>\n<p>The data that is fetched is real-time, i.e. the results can differ if you run the same request several times.</p>\n<p>E.g.: you request sales for today, the same request will produce a different result after each cashing out transaction made on the till.</p>\n<h2 id=\"authorisation\">Authorisation</h2>\n<p>Authorisation and Store selection is mandatory for this request.</p>\n<p>To Authorise, use <code>/api/login</code>, then to Select a store use <code>/ape/stores/select</code>.</p>\n<h2 id=\"workflow\">Workflow</h2>\n<p>A typical workflow will look like this:</p>\n<ul>\n<li><p>Login <code>/api/login</code></p>\n</li>\n<li><p>OPTIONAL STEP - Select a store <code>/api/stores/select/{{store_id}}</code></p>\n</li>\n<li><p>Init report creation <code>/api/olap/init</code></p>\n</li>\n<li><p>Check report creation status <code>/api/olap/fetch-status</code></p>\n</li>\n<li><p>Fetch report results <code>/api/olap/fetch/{{fetch_id}}/{{data_type}}</code></p>\n</li>\n<li><p>Logout <code>/api/logout</code></p>\n</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"13d80000-48fb-4739-b32a-2de02aabe6fe","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ecf0ebaf-e8f5-4934-b6f3-a008a273cb36","type":"text/javascript","exec":[""]}}],"_postman_id":"2d6d7acd-36ae-40dd-9c8f-37be8901a185"}],"id":"2c97a615-dbf5-43eb-87b7-40975b8a1cfd","_postman_id":"2c97a615-dbf5-43eb-87b7-40975b8a1cfd","description":""},{"name":"Transactions","item":[{"name":"Get Completed Transactions","id":"1c1d531b-3aa1-42c9-bb52-f0f7baafc9a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{server}}/api/report/guestcheck?dateFrom=2019-11-01&dateTo=2019-11-01","description":"<p>Returns all cashed out orders for the day.</p>\n<p>Both <em>dateFrom</em> and <em>dateTo</em> parameters must be present and present the same day for compatibility reasons.</p>\n","urlObject":{"path":["api","report","guestcheck"],"host":["{{server}}"],"query":[{"key":"dateFrom","value":"2019-11-01"},{"key":"dateTo","value":"2019-11-01"}],"variable":[]}},"response":[],"_postman_id":"1c1d531b-3aa1-42c9-bb52-f0f7baafc9a9"},{"name":"Get Transaction details by ID","id":"9b90f410-efb1-48b1-a113-fcb08d2a3aac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"UniqOrderId.Id\" : {{UniqOrderId}},\n    \"OpenDate.Typed\" : {{OpenDate}},\n    \"Storned\": {{Storned}}\n}","options":{"raw":{"language":"json"}}},"url":"{{server}}/api/report/guest/check/detail","description":"<p>Fetches order details by the provided Order ID</p>\n","urlObject":{"path":["api","report","guest","check","detail"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9b90f410-efb1-48b1-a113-fcb08d2a3aac"}],"id":"5e181c40-4ecb-4670-a577-3cd951dddf58","description":"<p>DEPRECATED - DO NOT USE!</p>\n","_postman_id":"5e181c40-4ecb-4670-a577-3cd951dddf58"},{"name":"Data Metrics","item":[{"name":"Get Metrics Data","id":"2d7100a2-da4b-4988-9fee-4ae370cb8a31","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": {\n        \"dateFrom\":\"2021-04-01T04:57:27.585Z\",\n        \"dateTo\":\"2021-08-13T04:57:27.585Z\",\n        \"storeIds\":[317,439],\n        \"kpiCodes\":[\"REV_NET\",\"REV_FORECASTED\"]\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{server}}/api/kpi/data/getTable","urlObject":{"path":["api","kpi","data","getTable"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2d7100a2-da4b-4988-9fee-4ae370cb8a31"},{"name":"Get Data by DataType","id":"7a97d962-64de-474f-9735-a8784412729a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"dateFrom\": \"2021-06-01\",\n    \"dateTo\": \"2021-06-30\",\n    \"metricCodes\": [\n        \"BS_ASSETS_BY_ACCOUNT\",\n        \"BS_EQUITY_AND_LIABILITIES_TOTAL\",\n        \"BS_EQUITY_AND_PROFIT\",\n        \"BS_EQUITY_BY_ACCOUNT\",\n        \"BS_LIABILITIES_BY_ACCOUNT\",\n        \"BS_PROFIT_NET_BEGIN\",\n        \"PL_PROFIT_NET\",\n        \"REV_MANUAL_BYPAYMENT\",\n        \"REV_GROSS_DEVIATION_BYPAYMENT\",\n        \"REV_GROSS_DEVIATION_PERCENT_BYPAYMENT\",\n        \"REV_NET_DEVIATION_BYPAYMENT\",\n        \"REV_NET_DEVIATION_PERCENT_BYPAYMENT\"\n    ],\n    \"storeIds\": [\n        44,\n        43,\n        45\n    ],\n    \"dataType\": \"DATA_DETAILS_BY_PERIOD\"\n}","options":{"raw":{"language":"json"}}},"url":"{{server}}/api/kpi/dashboard/get-data","description":"<p>Gets KpiMetric data by dataType.</p>\n<h3 id=\"parameters\">Parameters</h3>\n<ul>\n<li><p><strong>dateFrom</strong> - start of the period to get data for (date string)</p>\n</li>\n<li><p><strong>dateTo</strong> - end of the period to get data for (date string)</p>\n</li>\n<li><p><strong>storeIds</strong> - ids of stores to fetch data (array of int)</p>\n</li>\n<li><p><strong>metricCodes</strong> - codes of metrics you want to fetch (array of string)</p>\n</li>\n<li><p><strong>dataType</strong> - codes of types of aggregation of metrics.</p>\n</li>\n</ul>\n<p><em>Notice: metrics values returned are grouped by store id in UID format, see uocOrganizationId in</em> <em><strong>/stores/list</strong></em> <em>results. This is so not to confuse you, but due to iiko internal way of storing and processing metrics, designed primarily to feed iikoWeb Dashboard Widgets.</em></p>\n","urlObject":{"path":["api","kpi","dashboard","get-data"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7a97d962-64de-474f-9735-a8784412729a"}],"id":"bafeb1f2-a666-44a2-a285-c7c936656d7b","_postman_id":"bafeb1f2-a666-44a2-a285-c7c936656d7b","description":""}],"id":"2a7cbe79-7b5e-48a2-9894-a23fea2fbf11","description":"<p>Methods used to fetch aggregated data from the system. </p>\n","_postman_id":"2a7cbe79-7b5e-48a2-9894-a23fea2fbf11"},{"name":"Order Injection","item":[{"name":"External Menu","item":[{"name":"List external menus","id":"77c997bf-c751-4672-94df-c4803873e76e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{server}}/api/external-menu","description":"<p>Returns a list of External menus configured for the <em>Account</em>.</p>\n<h2 id=\"authorisation\">Authorisation</h2>\n<p>Authorisation is required to use this method. </p>\n<p>Use <code>/api/auth/login</code> to login. </p>\n","urlObject":{"path":["api","external-menu"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"77c997bf-c751-4672-94df-c4803873e76e"},{"name":"Get configured menu by id","id":"9673ceef-d899-4a70-8bab-7c0815194d0d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{server}}/api/external-menu/{{externalMenuId}}","description":"<p>Returns an External Menu for the provided ID</p>\n<h2 id=\"authorisation\">Authorisation</h2>\n<p>Authorisation is required.</p>\n","urlObject":{"path":["api","external-menu","{{externalMenuId}}"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9673ceef-d899-4a70-8bab-7c0815194d0d"}],"id":"128eb96d-d34f-486b-a3fa-4843b495c481","description":"<p>iiko features an External menu tool, allowing to create a visual representation of a restaurant menu to be used by the web-site (or any other ordering tool). </p>\n<p>External menu is a simple 2-level structure (Folder - Item), where each item, available in the system, is presented and can have additional info associated with it: </p>\n<ul>\n<li>Name, description, price (these can vary from the POS)</li>\n<li>Modifiers (same as POS)</li>\n<li>Images</li>\n<li>Nutrition and Allergen info (POS values can be overriden)</li>\n<li>Tags and labels (these do not exist in iiko POS menu)</li>\n</ul>\n<h2 id=\"typical-workflow\">Typical workflow</h2>\n<p>Usually External menu is used like this: </p>\n<ul>\n<li>A menu must be created in iikoWeb </li>\n<li>A 3-rd party order source (your app using the API) is provided with the ID of the External Menu</li>\n<li>A 3-rd party order source should fetch and cache the menu at their side (we do not recommend fetching the menu for every order your users create). This cache should be periodically updated (e.g. once a day).</li>\n</ul>\n","_postman_id":"128eb96d-d34f-486b-a3fa-4843b495c481"}],"id":"10dea1ca-50f5-43bf-8b1c-0d50cdae9dde","description":"<p>The following methods are used to inject orders into iiko tills. </p>\n<p><strong>Please note, that the system presumes the orders are injected in real-time, and require processing on the till: preparing at the kitchen and closing on hand-out.</strong></p>\n","_postman_id":"10dea1ca-50f5-43bf-8b1c-0d50cdae9dde"}]}