{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b8dd20af-3f10-4271-8278-b0ab4eff5ad3","name":"Dual Link API","description":"<strong>Version 4.0</strong>\n*******************\n\n# How to authenticate\n\n\nTo use all API endpoints you must have a valid token. As soon as you get the token, you must include in all the request headers. This methos gives you a secure access to the API link every requuest to your user account.\n\nEvery business will have his own token, and you must add the header \"Authorization\" with the value of the token for each venue.\n\n*******************\n\n# URL endpoint variables\n\n\nDual Link will give the right values for every venue so you can use in your own integration. The varibales are represented in the URL enpoint with brackets\n\n{{server}} : The server/host computer where all the API and db are allocation. Could be diferent for each venue, country and so on.\n\n{{business_id}} : The identifier of Dual Link business. Each venue / business has his own ID (UUID).\n\n<strong>Header variables</strong>\n\n{{token}} : The authentication token that links the business with the user account.\n\n*******************\n\n# API Notes\n\n\nAll API request must be use the HTTPS protocol. We don't support the non secure HTTP protocol.\n\nThe mayority of the Dual Link API is like a RESTful API but with a few modifications:\n\n- The API request can be GET, POST, PUT, PATCH or DELETE depends on the action.\n- All IDs in the API are a string represation of 36 UUID characters.\n- You can consider that all response with a code other than 200 like an error.\n- All reponses are return in a JSON format\n\n*******************\n\n# Response format\n\n\nAll succesful resquest gives a response in a JSON format with the attribute 'status' and the value 'OK' and the attribute 'data' with the result values. Be aware that the attribute 'data' is always an array.\n\n<code>\n{  \n    \"status\": \"OK\",  \n    \"data\": [{  \n        ...  \n    }]  \n}  \n</code>\n\nIf the request result has an error, (even if you get a 200 HTTP code), the response will give a JSON object with the attribute 'status' and with the value 'Error'. Also you'll get another 2 more attributes, the 'error_code' and 'error_message'\n\n<code>\n{  \n    \"status\": \"Error\",  \n    \"error_message\": \"Business Not found\",  \n    \"error_code\": 100  \n}  \n</code>\n\n\n*******************\n\n# Bit flag / option flag structure\n\nTo store some structures like allergies, we store in a Integer variable in the form of bit flag / option flag. It's efficient in memory and bandwidth and you can store several values into one integer without the need to create a key for each value. It's a common pattern in C code, but because could be strange for a web developer we like to point out how it works.\n\nEvery integer is represented in bit 0 or 1. For example this table shows you a small example of the converion betwen a number (decimal) and his binary representation\n\n\n| Binary value | decimal value |\n| ------------ | ------------- |\n| 000          | 0             |\n| 001          | 1             |\n| 010          | 2             |\n| 011          | 3             |\n| 100          | 4             |\n\nThe idea is to use every bit position to hold on of the values. For example: if of declaring serveral options or enum like:\n\noption1 = 0  \noption2 = 1  \noption3 = 2  \noption4 = 3  \n\nyou only can hold in a variable one option at one time. Or is option 1 or 2 but not both.\n\ninstead, if we declare:  \n\n| Declaration |binary value |\n| ---------- | -------- |\n|option1 = 1 | 000**1** |\n|option2 = 2 | 00**1**0 |\n|option3 = 4 | 0**1**00 |\n|option4 = 8 | **1**000 |\n\n\nYou can have multiple options in one variable. For example if the value of the variable is 3 (0**11**) that meas you have the option 1 (00**1**) and the option 2 (0**1**0) at the same time. The binary AND operation result from option1 + option2 is 3 (0**11**). \n\nAnother exmaple: \n\nif have the value 5 (**1**0**1**) that means you have the option1 (00**1**) and the option3 (**1**00)\n\n\n# Allergies values\n\n- Gluten       = 1\n- Crustaceans  = 2\n- Eggs         = 4\n- Fish         = 8\n- Peanuts      = 16\n- Soya         = 32\n- Milk         = 64\n- Nuts         = 128\n- Celery       = 256\n- Mustard      = 512\n- Sesame       = 1024\n- Sulphates    = 2048\n- Mollusk      = 4096\n- Lupins       = 8192\n\n","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"1656383","team":1274168,"collectionId":"b8dd20af-3f10-4271-8278-b0ab4eff5ad3","publishedId":"TW77f3Ro","public":true,"publicUrl":"https://docapi.dual-link.com","privateUrl":"https://go.postman.co/documentation/1656383-b8dd20af-3f10-4271-8278-b0ab4eff5ad3","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2021-02-09T22:24:56.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/4a22dbdf89070b432da789da397958227395c39e3dd6abce2740d6eda8b1dc2a","favicon":"https://dual-link.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://docapi.dual-link.com/view/metadata/TW77f3Ro"}