{"info":{"_postman_id":"95578f03-79bb-446e-9e8b-c87c8fe6367a","name":"Tabsquare Standard API","description":"<html><head></head><body><p>This documentation contain the standard API for POS integration to Tabsquare solutions.</p>\n<h1 id=\"introduction-to-send-order\">Introduction to Send Order</h1>\n<p>When customer confirms the Order on the Application (SmartTab/SmartKiosk), it is sent in with predefined JSON format (attached files for reference) as per the API. Information includes the following:</p>\n<ul>\n<li>Table no.</li>\n<li>Pax</li>\n<li>Order no.</li>\n<li>Item code, price, quantity</li>\n<li>Item Customization code, price, quantity</li>\n<li>Item special request text</li>\n</ul>\n<blockquote>\n<p>Note on Price: The data above sends price for each item and customization, This price is overwritten over any price set in the POS to remove confusion for the customer later.</p>\n</blockquote>\n<blockquote>\n<p>Note on Pax: The Staff sets the Table no. &amp; Pax on the Smarttab. When sending the order the API needs to include a provision to receive Pax value for the table. If a table already has a Pax value, it will be reset to the new incoming pax value.</p>\n</blockquote>\n<h3 id=\"considerations-with-regards-to-table-status-when-sending-orders\">Considerations with regards to Table status when sending orders:</h3>\n<ul>\n<li><p>If there is a need to Open/Recall table as a separate step before sending order please let us know about the additional steps. </p>\n</li>\n<li><p>Order should be sendable to the POS even if table is open on the terminal by staff. If opening the table on the POS affects the incoming order from Tabsquare then a suitable error should be returned.</p>\n</li>\n<li><p>Tabsquare maintains a list of predefined Table no. in the system which is similar to the POS tables.</p>\n</li>\n</ul>\n<h3 id=\"order-printingkitchen-display-systemkds\">Order Printing/Kitchen Display System(KDS):</h3>\n<ul>\n<li><p>The printing of order in the kitchen, master print and any other variants thereof is usually controlled by the POS. In clients where KDS is involved in place of printers, display on the KDS is controlled by the POS as well. Once the API for sending order is triggered the Order is printed in the respective printers/displayed on KDS by the POS.</p>\n</li>\n<li><p>Printing/display of Orders sent using the API should be similar to the prints from items ordered on the POS in terms of format, layouts, information displayed etc. Printing scenarios like modifiers printing with main item or separately, item printing individual slips or combined slips need to be similar between API and POS ordering.</p>\n</li>\n<li><p>API based orders should factor multilingual print in case of clients using multi different languages for kitchen print/display.</p>\n</li>\n</ul>\n<h3 id=\"exceptional-cases\">Exceptional cases</h3>\n<ul>\n<li><p>In case there are exceptional cases on how order data needs to be sent due to POS or Client requirements, It is best that they are highlighted in the API document.</p>\n</li>\n<li><p>e.g. send customizations as items without hierarchy | send specific flags or additional parameters with the order | handling order sending to split tables, etc.</p>\n</li>\n</ul>\n<h3 id=\"successerror-handling\">Success/Error handling</h3>\n<ul>\n<li><p>All successful API calls needs to return the success message and the bill/order no. for reference. The orders sent through the API from Smarttab should ideally be identifiable (using terminal id/operator id/etc.) on the POS for easy reference.</p>\n</li>\n<li><p>A list of standard error codes to be returned in case there was a problem in processing the order. The order sent should not be partially accepted in case of a problem. SmartTab will display a customer friendly message in case of an error and will requesting them to contact staff for help.</p>\n</li>\n</ul>\n<hr>\n<h2 id=\"json-request-format\">JSON Request Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"transactionId\": \"K1-0012-1563953750\",\n    \"tableNo\": \"K1\",\n    \"pax\": 1,\n    \"transactionTime\": \"2019-07-24 15:35:50\",\n    \"buzzerNo\": \"16\",\n    \"orderNo\": \"0012\",\n    \"orderType\": 1,\n    \"itemList\": [{\n        \"itemNo\": \"I00100000086\",\n        \"itemName\": \"Lemon Raspberry Muffin\",\n        \"price\": \"3.50\",\n        \"quantity\": \"1\",\n        \"remarks\": \"\",\n        \"attributes\": [{\n            \"itemNo\": \"Z00000048\",\n            \"itemName\": \"Less Sweet\",\n            \"price\": \"0.00\",\n            \"quantity\": 1,\n            \"remarks\": \"\"\n        }]\n    }],\n    \"paymentDetails\": [{\n        \"paymentType\": \"K1-NETSDB\",\n        \"paymentRefNo\": \"\",\n        \"amount\": 3.5\n    }]\n}\n</code></pre>\n<hr>\n<h2 id=\"order-success\">Order Success</h2>\n<p>The response must include <code>transactionId</code> if the order is successful.</p>\n<hr>\n<h2 id=\"order-unsuccess\">Order Unsuccess</h2>\n<p>The response must indlude error <code>code</code> and error <code>message</code>.\nBeside the error code and error message from Partner, there is a list of error we often face at the outlet as bellow.</p>\n<ol>\n<li>Order on and table does not exist. Error happen when ordering on the table is not found in the system.Expected response:</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"code\": 8001,\n    \"message\": \"Table does not exist\",\n    \"data\": {}\n}\n</code></pre>\n<ol>\n<li>Add order on a table is locked by another terminal. Error happens when the table is already opened on POS or by other terminal (Ex: Extended POS ). Expected response:</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"code\": 8002,\n    \"message\": \"Table is opened on the other terminal\",\n    \"data\": {}\n}\n</code></pre>\n<ol>\n<li>Kitchen Printing problem. Error happens when there is error from kitchen printing. Expected response:</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"code\": 8003,\n    \"message\": \"There is an error with kitchen printing\",\n    \"data\": {}\n}\n</code></pre>\n<ol>\n<li>Bar Printing problem. Error happens when there is error from bar printing.</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"code\": 8004,\n    \"message\": \"There is an error with bar printing\",\n    \"data\": {}\n}\n</code></pre>\n<ol>\n<li>The item does not exist. Error happens when we order an item with item code or the PLU does not exist in the POS.</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"code\": 8005,\n    \"message\": \"Item not found.\"\n  \"data\" : {\n      \"item_code\" : \"Y012\" // This is PLU or item_code\n  }\n}\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction to Send Order","slug":"introduction-to-send-order"}],"owner":"1039710","collectionId":"95578f03-79bb-446e-9e8b-c87c8fe6367a","publishedId":"SVtVTTQf","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-10-11T02:07:15.000Z"},"item":[{"name":"Send Order Without Payment","id":"c6d22312-afc9-4f29-8301-5e53ef38b915","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"transactionId\": \"K1-0012-1563953750\",\n    \"tableNo\": \"K1\",\n    \"pax\": 1,\n    \"transactionTime\": \"2019-07-24 15:35:50\",\n    \"buzzerNo\": \"16\",\n    \"orderNo\": \"0012\",\n    \"orderType\": 1,\n    \"itemList\": [\n        {\n            \"itemNo\": \"I00100000086\",\n            \"itemName\": \"Lemon Raspberry Muffin\",\n            \"price\": \"3.50\",\n            \"quantity\": \"1\",\n            \"remarks\": \"\",\n            \"attributes\": [\n                {\n                    \"itemNo\": \"Z00000048\",\n                    \"itemName\": \"Less Sweet\",\n                    \"price\": \"0.00\",\n                    \"quantity\": 1,\n                    \"remarks\": \"\"\n                }\n            ]\n        }\n    ],\n    \"paymentDetails\": []\n}"},"url":"http://192.168.0.10/sendorderwithoutpayment","urlObject":{"protocol":"http","path":["sendorderwithoutpayment"],"host":["192","168","0","10"],"query":[],"variable":[]}},"response":[{"id":"9a52a7f9-82d0-4003-b4d3-50dccd105306","name":"Failed - Send Order Without Payment","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"transactionId\": \"K1-0012-1563953750\",\n    \"tableNo\": \"K1\",\n    \"pax\": 1,\n    \"transactionTime\": \"2019-07-24 15:35:50\",\n    \"buzzerNo\": \"16\",\n    \"orderNo\": \"0012\",\n    \"orderType\": 1,\n    \"itemList\": [\n        {\n            \"itemNo\": \"I00100000086\",\n            \"itemName\": \"Lemon Raspberry Muffin\",\n            \"price\": \"3.50\",\n            \"quantity\": \"1\",\n            \"remarks\": \"\",\n            \"attributes\": [\n                {\n                    \"itemNo\": \"Z00000048\",\n                    \"itemName\": \"Less Sweet\",\n                    \"price\": \"0.00\",\n                    \"quantity\": 1,\n                    \"remarks\": \"\"\n                }\n            ]\n        }\n    ],\n    \"paymentDetails\": []\n}","options":{"raw":{"language":"json"}}},"url":"http://192.168.0.10/sendorderwithoutpayment"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": 6002,\n    \"message\": \"Invalid table number\",\n    \"data\": {}\n}"},{"id":"e08d4afd-3f44-4130-9822-dc4f590c1825","name":"Success - Send Order Without Payment ","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"transactionId\": \"K1-0012-1563953750\",\n    \"tableNo\": \"K1\",\n    \"pax\": 1,\n    \"transactionTime\": \"2019-07-24 15:35:50\",\n    \"buzzerNo\": \"16\",\n    \"orderNo\": \"0012\",\n    \"orderType\": 1,\n    \"itemList\": [\n        {\n            \"itemNo\": \"I00100000086\",\n            \"itemName\": \"Lemon Raspberry Muffin\",\n            \"price\": \"3.50\",\n            \"quantity\": \"1\",\n            \"remarks\": \"\",\n            \"attributes\": [\n                {\n                    \"itemNo\": \"Z00000048\",\n                    \"itemName\": \"Less Sweet\",\n                    \"price\": \"0.00\",\n                    \"quantity\": 1,\n                    \"remarks\": \"\"\n                }\n            ]\n        }\n    ],\n    \"paymentDetails\": []\n}","options":{"raw":{"language":"json"}}},"url":"http://192.168.0.10/sendorderwithoutpayment"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"message\": \"Success\",\n    \"data\": {\n        \"orderId\": \"AJH568990922\",\n        \"transactionId\": \"K1-0012-1563953750\"\n    }\n}"}],"_postman_id":"c6d22312-afc9-4f29-8301-5e53ef38b915"},{"name":"Send Order With Payment","id":"c45b89ec-d085-4d94-8026-2c2265a192cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"transactionId\": \"K1-0012-1563953750\",\n    \"tableNo\": \"K1\",\n    \"pax\": 1,\n    \"transactionTime\": \"2019-07-24 15:35:50\",\n    \"buzzerNo\": \"16\",\n    \"orderNo\": \"0012\",\n    \"orderType\": 1,\n    \"itemList\": [\n        {\n            \"itemNo\": \"I00100000086\",\n            \"itemName\": \"Lemon Raspberry Muffin\",\n            \"price\": \"3.50\",\n            \"quantity\": \"1\",\n            \"remarks\": \"\",\n            \"attributes\": [\n                {\n                    \"itemNo\": \"Z00000048\",\n                    \"itemName\": \"Less Sweet\",\n                    \"price\": \"0.00\",\n                    \"quantity\": 1,\n                    \"remarks\": \"\"\n                }\n            ]\n        }\n    ],\n    \"paymentDetails\": [\n        {\n            \"paymentType\": \"K1-NETSDB\",\n            \"paymentRefNo\": \"\",\n            \"amount\": 3.5\n        }\n    ]\n}"},"url":"http://192.168.0.10/sendorderwithpayment","urlObject":{"protocol":"http","path":["sendorderwithpayment"],"host":["192","168","0","10"],"query":[],"variable":[]}},"response":[{"id":"c1361acf-3c78-4fe0-92b3-50a597f11da4","name":"Failed - Send Order With Payment","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"transactionId\": \"K1-0012-1563953750\",\n    \"tableNo\": \"K1\",\n    \"pax\": 1,\n    \"transactionTime\": \"2019-07-24 15:35:50\",\n    \"buzzerNo\": \"16\",\n    \"orderNo\": \"0012\",\n    \"orderType\": 1,\n    \"itemList\": [\n        {\n            \"itemNo\": \"I00100000086\",\n            \"itemName\": \"Lemon Raspberry Muffin\",\n            \"price\": \"3.50\",\n            \"quantity\": \"1\",\n            \"remarks\": \"\",\n            \"attributes\": [\n                {\n                    \"itemNo\": \"Z00000048\",\n                    \"itemName\": \"Less Sweet\",\n                    \"price\": \"0.00\",\n                    \"quantity\": 1,\n                    \"remarks\": \"\"\n                }\n            ]\n        }\n    ],\n    \"paymentDetails\": [\n        {\n            \"paymentType\": \"K1-NETSDB\",\n            \"paymentRefNo\": \"\",\n            \"amount\": 3.5\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://192.168.0.10/sendorderwithpayment"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": 6002,\n    \"message\": \"Invalid table number\",\n    \"data\": {}\n}"},{"id":"cbd84d59-e6c5-4505-96e7-28f9c45236ec","name":"Success - Send Order With Payment","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"transactionId\": \"K1-0012-1563953750\",\n    \"tableNo\": \"K1\",\n    \"pax\": 1,\n    \"transactionTime\": \"2019-07-24 15:35:50\",\n    \"buzzerNo\": \"16\",\n    \"orderNo\": \"0012\",\n    \"orderType\": 1,\n    \"itemList\": [\n        {\n            \"itemNo\": \"I00100000086\",\n            \"itemName\": \"Lemon Raspberry Muffin\",\n            \"price\": \"3.50\",\n            \"quantity\": \"1\",\n            \"remarks\": \"\",\n            \"attributes\": [\n                {\n                    \"itemNo\": \"Z00000048\",\n                    \"itemName\": \"Less Sweet\",\n                    \"price\": \"0.00\",\n                    \"quantity\": 1,\n                    \"remarks\": \"\"\n                }\n            ]\n        }\n    ],\n    \"paymentDetails\": [\n        {\n            \"paymentType\": \"K1-NETSDB\",\n            \"paymentRefNo\": \"\",\n            \"amount\": 3.5\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://192.168.0.10/sendorderwithpayment"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"code\": 200,\n    \"message\": \"Success\",\n    \"data\": {\n        \"orderId\": \"AJH568990922\",\n        \"transactionId\": \"K1-0012-1563953750\"\n    }\n}"}],"_postman_id":"c45b89ec-d085-4d94-8026-2c2265a192cd"}]}