{"info":{"_postman_id":"5d4a66a0-b53a-4f10-9229-6392c8a287ec","name":"API Facade - Public APIs","description":"General API requests. \n\nYou need to set the global variables \"yourAPIKey\", \"yourEmail\" and \"yourSecret\" if you're using JWT auth","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Events API","item":[{"name":"Store events","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"published\": {","                \"type\": \"boolean\"","            },","            \"title\": {","                \"type\": \"string\"","            },","            \"categoryId\": {","                \"type\": \"string\"","            },","            \"description\": {","                \"type\": \"string\"","            },","            \"location\": {","                \"type\": \"string\"","            },","            \"storeId\": {","                \"type\": \"string\"","            },","            \"date\": {","                \"type\": \"string\"","            },","            \"endDate\": {","                \"type\": \"string\"","            }","        },","        \"required\": [","          \"id\",","          \"published\",","          \"title\",","          \"categoryId\",","          \"description\",","          \"location\",","          \"storeId\",","          \"date\",","          \"endDate\"","        ]","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"23f87910-b583-4e7d-bb10-88b5341ad172","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/events?storeId=d4c4e2e4-f67f-4aec-b249-e3a4ad3fc820","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","events"],"query":[{"key":"storeId","value":"d4c4e2e4-f67f-4aec-b249-e3a4ad3fc820"}]}},"response":[],"_postman_id":"23f87910-b583-4e7d-bb10-88b5341ad172"}],"id":"958d30a0-369e-4430-89f7-732e6b1d4535","description":"Retrieve information about instore events at Bilka stores\n\nThe Events API uses basic authentication or JWT","_postman_id":"958d30a0-369e-4430-89f7-732e6b1d4535"},{"name":"Jobs API","item":[{"name":"All jobs","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"published\": {","                \"type\": \"string\"","            },","            \"title\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"description\": {","                \"type\": \"string\"","            },","            \"start\": {","                \"type\": \"string\"","            },","            \"hours\": {","                \"type\": [\"string\",\"null\"]","            },","            \"jobType\": {","                \"type\": [\"string\",\"null\"]","            },","            \"applicationLink\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"unsolicited\": {","                \"type\": \"boolean\"","            },","            \"trainee\": {","                \"type\": \"boolean\"","            },","            \"url\": {","                \"type\": \"string\"","            },","            \"country\": {","                \"type\": \"string\"","            },","            \"region\": {","                \"type\": [\"string\",\"null\"]","            },","            \"categories\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"string\"","                }","            },","            \"address\": {","                \"type\": [\"object\",\"null\"],","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": [\"string\",\"null\"]","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"4a795057-c58a-4618-bcd3-c7e480e63eb9","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.dansksupermarked.dk/v1/jobs","description":"GET all jobs. Paginated to 10 by default"},"response":[],"_postman_id":"4a795057-c58a-4618-bcd3-c7e480e63eb9"},{"name":"Jobs - Country Filter","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"published\": {","                \"type\": \"string\"","            },","            \"title\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"description\": {","                \"type\": \"string\"","            },","            \"start\": {","                \"type\": \"string\"","            },","            \"hours\": {","                \"type\": [\"string\",\"null\"]","            },","            \"jobType\": {","                \"type\": [\"string\",\"null\"]","            },","            \"applicationLink\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"unsolicited\": {","                \"type\": \"boolean\"","            },","            \"trainee\": {","                \"type\": \"boolean\"","            },","            \"url\": {","                \"type\": \"string\"","            },","            \"country\": {","                \"type\": \"string\"","            },","            \"region\": {","                \"type\": [\"string\",\"null\"]","            },","            \"categories\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"string\"","                }","            },","            \"address\": {","                \"type\": [\"object\",\"null\"],","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": [\"string\",\"null\"]","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"0961000e-8a4d-4bb5-b7c2-6936b26c7182","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/jobs?country=se","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","jobs"],"query":[{"key":"country","value":"se"}]},"description":"GET all jobs in a country. Paginated to 10 by default.\n\nCountry values supported are: \"dk\", \"se\", \"de\", \"pl\""},"response":[],"_postman_id":"0961000e-8a4d-4bb5-b7c2-6936b26c7182"},{"name":"Jobs - Zip Code Filter","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"published\": {","                \"type\": \"string\"","            },","            \"title\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"description\": {","                \"type\": \"string\"","            },","            \"start\": {","                \"type\": \"string\"","            },","            \"hours\": {","                \"type\": [\"string\",\"null\"]","            },","            \"jobType\": {","                \"type\": [\"string\",\"null\"]","            },","            \"applicationLink\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"unsolicited\": {","                \"type\": \"boolean\"","            },","            \"trainee\": {","                \"type\": \"boolean\"","            },","            \"url\": {","                \"type\": \"string\"","            },","            \"country\": {","                \"type\": \"string\"","            },","            \"region\": {","                \"type\": [\"string\",\"null\"]","            },","            \"categories\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"string\"","                }","            },","            \"address\": {","                \"type\": [\"object\",\"null\"],","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": [\"string\",\"null\"]","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"3010d97e-a50e-4846-8c9f-8e1e9a97276c","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/jobs?zip=8000","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","jobs"],"query":[{"key":"zip","value":"8000"}]},"description":"GET all jobs in a zip code. Paginated to 10 by default."},"response":[],"_postman_id":"3010d97e-a50e-4846-8c9f-8e1e9a97276c"},{"name":"Jobs - City Filter","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"published\": {","                \"type\": \"string\"","            },","            \"title\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"description\": {","                \"type\": \"string\"","            },","            \"start\": {","                \"type\": \"string\"","            },","            \"hours\": {","                \"type\": [\"string\",\"null\"]","            },","            \"jobType\": {","                \"type\": [\"string\",\"null\"]","            },","            \"applicationLink\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"unsolicited\": {","                \"type\": \"boolean\"","            },","            \"trainee\": {","                \"type\": \"boolean\"","            },","            \"url\": {","                \"type\": \"string\"","            },","            \"country\": {","                \"type\": \"string\"","            },","            \"region\": {","                \"type\": [\"string\",\"null\"]","            },","            \"categories\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"string\"","                }","            },","            \"address\": {","                \"type\": [\"object\",\"null\"],","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": [\"string\",\"null\"]","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"1dc8141f-37b1-492a-a169-de6f58eb9a1a","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/jobs?city=odense","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","jobs"],"query":[{"key":"city","value":"odense"}]},"description":"GET all jobs in a city. Paginated to 10 by default."},"response":[],"_postman_id":"1dc8141f-37b1-492a-a169-de6f58eb9a1a"},{"name":"Jobs - Fields Filter","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"published\": {","                \"type\": \"string\"","            },","            \"title\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"description\": {","                \"type\": \"string\"","            },","            \"start\": {","                \"type\": \"string\"","            },","            \"hours\": {","                \"type\": \"string\"","            },","            \"jobType\": {","                \"type\": [\"string\",\"null\"]","            },","            \"applicationLink\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"unsolicited\": {","                \"type\": \"boolean\"","            },","            \"trainee\": {","                \"type\": \"boolean\"","            },","            \"url\": {","                \"type\": \"string\"","            },","            \"country\": {","                \"type\": \"string\"","            },","            \"region\": {","                \"type\": [\"string\",\"null\"]","            },","            \"categories\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"string\"","                }","            },","            \"address\": {","                \"type\": [\"object\",\"null\"],","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": [\"string\",\"null\"]","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"4d3939e5-a1a6-4475-8174-1959b6050e4c","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/jobs?fields=title,brand,applicationLink","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","jobs"],"query":[{"key":"fields","value":"title,brand,applicationLink"}]},"description":"GET all jobs with only selected attributes / fields"},"response":[],"_postman_id":"4d3939e5-a1a6-4475-8174-1959b6050e4c"},{"name":"Jobs - Pagination","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"published\": {","                \"type\": \"string\"","            },","            \"title\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"description\": {","                \"type\": \"string\"","            },","            \"start\": {","                \"type\": \"string\"","            },","            \"hours\": {","                \"type\": [\"string\",\"null\"]","            },","            \"jobType\": {","                \"type\": [\"string\",\"null\"]","            },","            \"applicationLink\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"unsolicited\": {","                \"type\": \"boolean\"","            },","            \"trainee\": {","                \"type\": \"boolean\"","            },","            \"url\": {","                \"type\": \"string\"","            },","            \"country\": {","                \"type\": \"string\"","            },","            \"region\": {","                \"type\": [\"string\",\"null\"]","            },","            \"categories\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"string\"","                }","            },","            \"address\": {","                \"type\": [\"object\",\"null\"],","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": [\"string\",\"null\"]","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"653224c1-79a1-4fce-9411-8be7c5c30497","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/jobs?per_page=20&page=2","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","jobs"],"query":[{"key":"per_page","value":"20"},{"key":"page","value":"2"}]},"description":"GET all jobs using pagination parameters"},"response":[],"_postman_id":"653224c1-79a1-4fce-9411-8be7c5c30497"}],"id":"f2b62b53-9e4c-460a-b1ac-4c626ac7c343","description":"Retrieve information on all jobs available in Dansk Supermarked across brands and countries\n\nThe jobs API uses basic authentication or JWT","_postman_id":"f2b62b53-9e4c-460a-b1ac-4c626ac7c343"},{"name":"Stores API","item":[{"name":"All stores","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"name\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"address\": {","                \"type\": \"object\",","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": \"string\"","            },","            \"distance_km\": {","                \"type\": [\"number\",\"null\"]","            },","            \"hours\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"object\",","                    \"properties\": {","                        \"date\": {","                            \"type\": \"string\"","                        },","                        \"open\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"close\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"closed\": {","                            \"type\": \"boolean\"","                        },","                        \"type\": {","                            \"type\": \"string\"","                        }","                    }","                }","            }","        }","    }","}","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Link header set for easy pagination\"] = postman.getResponseHeader(\"Link\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"72b8c177-6da0-43ce-afe3-22f29597f209","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.dansksupermarked.dk/v1/stores/","description":"GET all stores. Paginated to 10 by default."},"response":[],"_postman_id":"72b8c177-6da0-43ce-afe3-22f29597f209"},{"name":"Stores - GET Specific store","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"object\",","    \"properties\": {","        \"id\": {","            \"type\": \"string\"","        },","        \"created\": {","            \"type\": \"string\"","        },","        \"modified\": {","            \"type\": \"string\"","        },","        \"name\": {","            \"type\": \"string\"","        },","        \"brand\": {","            \"type\": \"string\"","        },","        \"address\": {","            \"type\": \"object\",","            \"properties\": {","                \"street\": {","                    \"type\": \"string\"","                },","                \"city\": {","                    \"type\": \"string\"","                },","                \"zip\": {","                    \"type\": \"string\"","                },","                \"country\": {","                    \"type\": \"string\"","                },","                \"extra\": {","                    \"type\": [\"string\",\"null\"]","                }","            }","        },","        \"coordinates\": {","            \"type\": \"array\",","            \"items\": {","                \"type\": \"number\"","            }","        },","        \"type\": {","            \"type\": \"string\"","        },","        \"distance_km\": {","            \"type\": [\"number\",\"null\"]","        },","        \"hours\": {","            \"type\": [\"array\",\"null\"],","            \"items\": {","                \"type\": \"object\",","                \"properties\": {","                    \"date\": {","                        \"type\": \"string\"","                    },","                    \"open\": {","                        \"type\": [\"string\",\"null\"]","                    },","                    \"close\": {","                        \"type\": [\"string\",\"null\"]","                    },","                    \"closed\": {","                        \"type\": \"boolean\"","                    },","                    \"type\": {","                        \"type\": \"string\"","                    }","                }","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"4ad0280c-d441-4f81-ab3c-572e94e2a067","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.dansksupermarked.dk/v1/stores/d4c4e2e4-f67f-4aec-b249-e3a4ad3fc820","description":"Get a specific store. You can also use the \"fields\" parameter on these requests"},"response":[],"_postman_id":"4ad0280c-d441-4f81-ab3c-572e94e2a067"},{"name":"Stores - Fields Filter","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"name\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"address\": {","                \"type\": \"object\",","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": \"string\"","            },","            \"distance_km\": {","                \"type\": [\"number\",\"null\"]","            },","            \"hours\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"object\",","                    \"properties\": {","                        \"date\": {","                            \"type\": \"string\"","                        },","                        \"open\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"close\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"closed\": {","                            \"type\": \"boolean\"","                        },","                        \"type\": {","                            \"type\": \"string\"","                        }","                    }","                }","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Link header set for easy pagination\"] = postman.getResponseHeader(\"Link\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"da4df7fd-47f8-4006-aa6b-4862ddf0d4e3","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/stores/?fields=name,address,coordinates","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","stores",""],"query":[{"key":"fields","value":"name,address,coordinates"}]},"description":"GET all stores and selecting specific response fields / attributes"},"response":[],"_postman_id":"da4df7fd-47f8-4006-aa6b-4862ddf0d4e3"},{"name":"Stores - Pagination","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"name\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"address\": {","                \"type\": \"object\",","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": \"string\"","            },","            \"distance_km\": {","                \"type\": [\"number\",\"null\"]","            },","            \"hours\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"object\",","                    \"properties\": {","                        \"date\": {","                            \"type\": \"string\"","                        },","                        \"open\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"close\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"closed\": {","                            \"type\": \"boolean\"","                        },","                        \"type\": {","                            \"type\": \"string\"","                        }","                    }","                }","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Link header set for easy pagination\"] = postman.getResponseHeader(\"Link\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"898738ee-f5ab-40ff-b2e8-cba6730ac101","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/stores/?per_page=50&page=1","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","stores",""],"query":[{"key":"per_page","value":"50"},{"key":"page","value":"1"}]},"description":"GET all stores using pagination parameters"},"response":[],"_postman_id":"898738ee-f5ab-40ff-b2e8-cba6730ac101"},{"name":"Stores - Proximity Request","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"name\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"address\": {","                \"type\": \"object\",","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": \"string\"","            },","            \"distance_km\": {","                \"type\": [\"number\",\"null\"]","            },","            \"hours\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"object\",","                    \"properties\": {","                        \"date\": {","                            \"type\": \"string\"","                        },","                        \"open\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"close\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"closed\": {","                            \"type\": \"boolean\"","                        },","                        \"type\": {","                            \"type\": \"string\"","                        }","                    }","                }","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Link header set for easy pagination\"] = postman.getResponseHeader(\"Link\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"d06811ba-e847-4cd6-8e6f-f8c076f155eb","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/stores/?geo=55.1,10.2&radius=20","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","stores",""],"query":[{"key":"geo","value":"55.1,10.2"},{"key":"radius","value":"20"}]},"description":"GET all stores within a radius of a geopoint"},"response":[],"_postman_id":"d06811ba-e847-4cd6-8e6f-f8c076f155eb"},{"name":"Stores - Brand Alias","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"name\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"address\": {","                \"type\": \"object\",","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": \"string\"","            },","            \"distance_km\": {","                \"type\": [\"number\",\"null\"]","            },","            \"hours\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"object\",","                    \"properties\": {","                        \"date\": {","                            \"type\": \"string\"","                        },","                        \"open\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"close\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"closed\": {","                            \"type\": \"boolean\"","                        },","                        \"type\": {","                            \"type\": \"string\"","                        }","                    }","                }","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Link header set for easy pagination\"] = postman.getResponseHeader(\"Link\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"29367765-969d-4fb0-9507-e739969716b7","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.dansksupermarked.dk/v1/stores/netto/dk","description":"GET all stores of a specific brand using an alias. \n\nOptions are: \"netto\", \"foetex\", \"bilka\" and country part options are: \"dk\", \"se\", \"pl\", \"de\""},"response":[],"_postman_id":"29367765-969d-4fb0-9507-e739969716b7"},{"name":"Stores - City Filter","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"name\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"address\": {","                \"type\": \"object\",","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": \"string\"","            },","            \"distance_km\": {","                \"type\": [\"number\",\"null\"]","            },","            \"hours\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"object\",","                    \"properties\": {","                        \"date\": {","                            \"type\": \"string\"","                        },","                        \"open\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"close\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"closed\": {","                            \"type\": \"boolean\"","                        },","                        \"type\": {","                            \"type\": \"string\"","                        }","                    }","                }","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Link header set for easy pagination\"] = postman.getResponseHeader(\"Link\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"35237593-9be4-44e8-be34-1e6f4ce74aca","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/stores/?city=berlin","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","stores",""],"query":[{"key":"city","value":"berlin"}]},"description":"GET all stores in a city"},"response":[],"_postman_id":"35237593-9be4-44e8-be34-1e6f4ce74aca"},{"name":"Stores - Zip Code Filter","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// This script generates the authorization header for you if you're accessing an API that requires basic auth or JWT auth. You can control which auth method using the boolean \"basicAuth\" below.","","// You must have set the global variables \"yourAPIKey\", \"yourSecret\" and \"yourEmail\"","","var basicAuth = false;","","var authorizationHeader;","","if (basicAuth) {","    var inputWords = CryptoJS.enc.Utf8.parse(pm.variables.get('yourAPIKey'));","    var authorization = CryptoJS.enc.Base64.stringify(inputWords);","    authorizationHeader = 'Basic ' + authorization;","}","else {","    var base64object = function(input) {","        var inputWords = CryptoJS.enc.Utf8.parse(JSON.stringify(input));","        var base64 = CryptoJS.enc.Base64.stringify(inputWords);","        var output = removeIllegalCharacters(base64);","        return output;","    };","","    var removeIllegalCharacters = function(input) {","        return input","            .replace(/=/g, '')","            .replace(/\\+/g, '-')","            .replace(/\\//g, '_');","    };","    var url = request.url;","    var slashIndex = url.toLowerCase().startsWith('http') ? 8 : 0;","    var path = url.substring(url.indexOf('/', slashIndex), url.length);","    ","    var exp = Date.now() / 1000 | 0;","    var iss = pm.variables.get('yourEmail');","    var mth = request.method;","    var sub = path;","    var header = { 'alg': 'HS256', 'typ': 'JWT' };","    var payload = { 'exp': exp, 'iss': iss, 'mth': mth, 'sub': sub };","    ","    var unsignedToken = base64object(header) + \".\" + base64object(payload);","    ","    var signatureHash = CryptoJS.HmacSHA256(unsignedToken, pm.variables.get('yourSecret'));","    var signature = CryptoJS.enc.Base64.stringify(signatureHash);","    var token = unsignedToken + '.' + signature;","    ","    authorizationHeader = \"JWT \" + removeIllegalCharacters(token);","}","postman.setGlobalVariable('AuthorizationHeader', authorizationHeader);"]}},{"listen":"test","script":{"type":"text/javascript","exec":["var jsonschema = {","    \"type\": \"array\",","    \"items\": {","        \"type\": \"object\",","        \"properties\": {","            \"id\": {","                \"type\": \"string\"","            },","            \"created\": {","                \"type\": \"string\"","            },","            \"modified\": {","                \"type\": \"string\"","            },","            \"name\": {","                \"type\": \"string\"","            },","            \"brand\": {","                \"type\": \"string\"","            },","            \"address\": {","                \"type\": \"object\",","                \"properties\": {","                    \"street\": {","                        \"type\": \"string\"","                    },","                    \"city\": {","                        \"type\": \"string\"","                    },","                    \"zip\": {","                        \"type\": \"string\"","                    },","                    \"country\": {","                        \"type\": \"string\"","                    },","                    \"extra\": {","                        \"type\": [\"string\",\"null\"]","                    }","                }","            },","            \"coordinates\": {","                \"type\": \"array\",","                \"items\": {","                    \"type\": \"number\"","                }","            },","            \"type\": {","                \"type\": \"string\"","            },","            \"distance_km\": {","                \"type\": [\"number\",\"null\"]","            },","            \"hours\": {","                \"type\": [\"array\",\"null\"],","                \"items\": {","                    \"type\": \"object\",","                    \"properties\": {","                        \"date\": {","                            \"type\": \"string\"","                        },","                        \"open\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"close\": {","                            \"type\": [\"string\",\"null\"]","                        },","                        \"closed\": {","                            \"type\": \"boolean\"","                        },","                        \"type\": {","                            \"type\": \"string\"","                        }","                    }","                }","            }","        }","    }","};","","tests[\"yourAPIKey global variable is set\"] = pm.variables.get(\"yourAPIKey\");","tests[\"yourSecret global variable is set\"] = pm.variables.get(\"yourSecret\");","tests[\"yourEmail global variable is set\"] = pm.variables.get(\"yourEmail\");","","tests[\"Everything is 200 OK\"] = responseCode.code === 200;","tests[\"Response Content-Type is JSON\"] = postman.getResponseHeader(\"Content-Type\") && postman.getResponseHeader(\"Content-Type\").has(\"application/json\");","tests[\"Content-Encoding is gzip\"] = postman.getResponseHeader(\"Content-Encoding\").has(\"gzip\");","tests[\"Response Cache-Control is set\"] = postman.getResponseHeader(\"Cache-Control\");","tests[\"Response ETag is set\"] = postman.getResponseHeader(\"ETag\");","tests[\"Link header set for easy pagination\"] = postman.getResponseHeader(\"Link\");","tests[\"Custom Header X-Total-Count is set\"] = postman.getResponseHeader(\"X-Total-Count\");","tests[\"Custom Header X-Runtime is set\"] = postman.getResponseHeader(\"X-Runtime\");","tests[\"Custom Header X-Trace-Id is set\"] = postman.getResponseHeader(\"X-Trace-Id\");","tests[\"Custom Header X-RateLimit-Limit is set\"] = postman.getResponseHeader(\"X-RateLimit-Limit\");","tests[\"Custom Header X-RateLimit-Remaining is set\"] = postman.getResponseHeader(\"X-RateLimit-Remaining\");","tests[\"Custom Header X-RateLimit-Reset is set\"] = postman.getResponseHeader(\"X-RateLimit-Reset\");","tests[\"Response JSON schema validated\"] = tv4.validate(JSON.parse(responseBody),jsonschema);"]}}],"id":"79c8bedf-24d1-43ae-b45a-7cb35411706b","request":{"method":"GET","header":[{"key":"Authorization","value":"{{AuthorizationHeader}}"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.dansksupermarked.dk/v1/stores/?zip=2000","protocol":"https","host":["api","dansksupermarked","dk"],"path":["v1","stores",""],"query":[{"key":"zip","value":"2000"}]},"description":"GET all stores by zipcode"},"response":[],"_postman_id":"79c8bedf-24d1-43ae-b45a-7cb35411706b"}],"id":"5700e676-cc4b-4f24-91ff-040d9cd39fd2","description":"API for retrieving DS store information across brands and countries\n\nThe Stores API uses Basic Authentication or JWT authentication. ","_postman_id":"5700e676-cc4b-4f24-91ff-040d9cd39fd2"}]}