{"info":{"_postman_id":"accd802a-1166-4c85-a9a5-0107353c9697","name":"Kuro","description":"<html><head></head><body><h2 id=\"the-kuro-api\">The KURO API</h2>\n<p>The api builds relationships between <code>shops</code>, <code>products</code>, <code>users</code> and <code>categories</code></p>\n<p>With the current situation in the world (SARS-COV2) \"the corona virus\", we aim to get the state of products in supermarkets. This should show what product is available at what quantity in which supermarket.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"4294690","collectionId":"accd802a-1166-4c85-a9a5-0107353c9697","publishedId":"SzS8s5Jf","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-03-22T17:25:08.000Z"},"item":[{"name":"Users","item":[{"name":"Get All Users","id":"078e038f-1a65-4ac5-a989-1589dbe3ee51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/users","urlObject":{"protocol":"https","path":["api","users"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"078e038f-1a65-4ac5-a989-1589dbe3ee51"},{"name":"Create User","event":[{"listen":"test","script":{"id":"f39fb4be-2b39-4603-8405-f9554aaa3a29","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var user = responseJSON.user || {};","","    tests['Response has \"_id\" property'] = user.hasOwnProperty('_id');","    tests['Response has \"username\" property'] = user.hasOwnProperty('username');","    tests['Response has \"email\" property'] = user.hasOwnProperty('email');","    tests['Response has \"createdAt\" property'] = user.hasOwnProperty('createdAt');","    tests['Response\\'s \"createdAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(user.createdAt);","    tests['Response has \"updatedAt\" property'] = user.hasOwnProperty('updatedAt');","    tests['Response\\'s \"updatedAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(user.updatedAt);","    ","    if (tests['Response has \"_id\" property']) {","        pm.globals.set('userId', user._id);","        tests['Global variable \"productId\" has been set'] = pm.globals.get('userId') === user._id;","    }","}","}"],"type":"text/javascript"}}],"id":"cd7b916d-53c6-4ef0-bfa4-b6cdda3ea222","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"user\":{\n\t\t\"username\": \"Test335\",\n\t\t\"email\": \"bla460@mail.com\"\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"https://kuro.tlahmann.com/api/users","urlObject":{"protocol":"https","path":["api","users"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"cd7b916d-53c6-4ef0-bfa4-b6cdda3ea222"},{"name":"Get User by ID","event":[{"listen":"test","script":{"id":"c60ff2f3-9e1e-46c6-9d53-30b27f3f4245","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var user = responseJSON.user || {};","","    tests['Response has \"_id\" property'] = user.hasOwnProperty('_id');","    tests['Response has \"username\" property'] = user.hasOwnProperty('username');","    tests['Response has \"email\" property'] = user.hasOwnProperty('email');","    tests['Response has \"createdAt\" property'] = user.hasOwnProperty('createdAt');","    tests['Response\\'s \"createdAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(user.createdAt);","    tests['Response has \"updatedAt\" property'] = user.hasOwnProperty('updatedAt');","    tests['Response\\'s \"updatedAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(user.updatedAt);","}","}"],"type":"text/javascript"}}],"id":"56ca12ae-bc6b-439d-b74c-2b7e6624c496","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/users/{{userId}}","urlObject":{"protocol":"https","path":["api","users","{{userId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"56ca12ae-bc6b-439d-b74c-2b7e6624c496"},{"name":"Update User by ID","event":[{"listen":"test","script":{"id":"5f4f256b-42e1-4083-940e-5be3efcc553a","exec":["if(!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var user = responseJSON.user || {};","","    tests['Response has \"_id\" property'] = user.hasOwnProperty('_id');","    tests['Response has \"username\" property'] = user.hasOwnProperty('username');","    tests['Response has \"email\" property'] = user.hasOwnProperty('email');","    tests['Response has \"createdAt\" property'] = user.hasOwnProperty('createdAt');","    tests['Response\\'s \"createdAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(user.createdAt);","    tests['Response has \"updatedAt\" property'] = user.hasOwnProperty('updatedAt');","    tests['Response\\'s \"updatedAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(user.updatedAt);","}","}"],"type":"text/javascript"}}],"id":"a1c4ba93-0679-47f0-8238-1830562aa817","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"user\": {\n\t\t\"username\": \"Changed429\"\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"https://kuro.tlahmann.com/api/users/{{userId}}","urlObject":{"protocol":"https","path":["api","users","{{userId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a1c4ba93-0679-47f0-8238-1830562aa817"}],"id":"ba3e0636-d7ca-4ed4-b7c6-b8afc8b9dce0","_postman_id":"ba3e0636-d7ca-4ed4-b7c6-b8afc8b9dce0","description":""},{"name":"Products","item":[{"name":"Get All Products","id":"7713a3a2-6811-4090-83d1-2a224fc175e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/products","urlObject":{"protocol":"https","path":["api","products"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"7713a3a2-6811-4090-83d1-2a224fc175e6"},{"name":"Create Product","event":[{"listen":"test","script":{"id":"b7670d5d-4a65-4daa-9c23-257a7b34b268","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var product = responseJSON.product || {};","","    tests['Response has \"_id\" property'] = product.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = product.hasOwnProperty('name');","    tests['Response has \"description\" property'] = product.hasOwnProperty('description');","    ","    if (tests['Response has \"_id\" property']) {","        pm.globals.set('productId', product._id);","        tests['Global variable \"productId\" has been set'] = pm.globals.get('productId') === product._id;","    }","}","}"],"type":"text/javascript"}}],"id":"b7ae07f1-d1c7-4f32-8944-c5b539b7847c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"product\": {\n\t\t\"name\": \"Beatmungsgerät\",\n\t\t\"description\": \"Gegen Atemnot\",\n\t\t\"categories\": [\"Luft\"]\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"https://kuro.tlahmann.com/api/products","urlObject":{"protocol":"https","path":["api","products"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b7ae07f1-d1c7-4f32-8944-c5b539b7847c"},{"name":"Get Product by ID","event":[{"listen":"test","script":{"id":"c60ff2f3-9e1e-46c6-9d53-30b27f3f4245","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var product = responseJSON.product || {};","","    tests['Response has \"_id\" property'] = product.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = product.hasOwnProperty('name');","    tests['Response has \"description\" property'] = product.hasOwnProperty('description');","}","}"],"type":"text/javascript"}}],"id":"a4275159-cbc4-495d-9b42-7f031d693329","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/products/{{productId}}","urlObject":{"protocol":"https","path":["api","products","{{productId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a4275159-cbc4-495d-9b42-7f031d693329"},{"name":"Update Product by ID","event":[{"listen":"test","script":{"id":"5f4f256b-42e1-4083-940e-5be3efcc553a","exec":["if(!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var product = responseJSON.product || {};","","    tests['Response has \"_id\" property'] = product.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = product.hasOwnProperty('name');","    tests['Response has \"description\" property'] = product.hasOwnProperty('description');","}","}"],"type":"text/javascript"}}],"id":"0117fdf9-a5bd-41b2-b3aa-127115d8c497","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"product\": {\n\t\t\"name\": \"Atemschutzmaste\",\n\t\t\"description\": \"Gegen Tröpfchenübertragung\",\n\t\t\"categories\": [\"Luft\", \"Haushalt\"]\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"https://kuro.tlahmann.com/api/products/{{productId}}","urlObject":{"protocol":"https","path":["api","products","{{productId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0117fdf9-a5bd-41b2-b3aa-127115d8c497"},{"name":"Copy Product by ID","event":[{"listen":"test","script":{"id":"e3cab6ef-63af-49d6-bab0-4d74b4bb599b","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var product = responseJSON.product || {};","","    tests['Response has \"_id\" property'] = product.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = product.hasOwnProperty('name');","    tests['Response has \"description\" property'] = product.hasOwnProperty('description');","    ","    if (tests['Response has \"_id\" property']) {","        pm.globals.set('productId', product._id);","        tests['Global variable \"productId\" has been set'] = pm.globals.get('productId') === product._id;","    }","}","}"],"type":"text/javascript"}}],"id":"f6cf3e52-b9ae-45d3-8df0-8f92b1f8cbd5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"https://kuro.tlahmann.com/api/products/{{productId}}","urlObject":{"protocol":"https","path":["api","products","{{productId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f6cf3e52-b9ae-45d3-8df0-8f92b1f8cbd5"},{"name":"Delete Product by ID","event":[{"listen":"test","script":{"id":"be73f3b0-b1e1-4ecb-9f36-6e8824a061a3","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","}"],"type":"text/javascript"}}],"id":"59f445d3-3ec2-44c9-8a79-e586e7bd9f47","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://kuro.tlahmann.com/api/products/{{productId}}","urlObject":{"protocol":"https","path":["api","products","{{productId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"59f445d3-3ec2-44c9-8a79-e586e7bd9f47"}],"id":"ab4658d8-436c-49a4-b9cc-a892523e62f4","_postman_id":"ab4658d8-436c-49a4-b9cc-a892523e62f4","description":""},{"name":"Shops","item":[{"name":"Get All Shops","id":"1ecc07a3-def2-4bdb-b27c-36621907eeb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/shops","urlObject":{"protocol":"https","path":["api","shops"],"host":["kuro","tlahmann","com"],"query":[{"disabled":true,"key":"include","value":"address"}],"variable":[]}},"response":[],"_postman_id":"1ecc07a3-def2-4bdb-b27c-36621907eeb3"},{"name":"Get All Shops with query, Lat, Long, Distance","id":"f470def7-f887-406c-8f31-617ca743d476","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/shops?lat=48.3988342&long=9.9919789&distance=500&pageSize=25&page=0&include=address","urlObject":{"protocol":"https","path":["api","shops"],"host":["kuro","tlahmann","com"],"query":[{"key":"lat","value":"48.3988342"},{"key":"long","value":"9.9919789"},{"key":"distance","value":"500"},{"key":"pageSize","value":"25"},{"key":"page","value":"0"},{"key":"include","value":"address"}],"variable":[]}},"response":[],"_postman_id":"f470def7-f887-406c-8f31-617ca743d476"},{"name":"Create Shop","event":[{"listen":"test","script":{"id":"b7670d5d-4a65-4daa-9c23-257a7b34b268","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var shop = responseJSON.shop || {};","","    tests['Response has \"_id\" property'] = shop.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = shop.hasOwnProperty('name');","    tests['Response has \"location\" property'] = shop.hasOwnProperty('location');","    if (tests['Response has \"location\" property']) {","        tests['Response has \"coordinates\" property'] = shop['location'].hasOwnProperty('coordinates');","        tests['Response \"coordinates\" property is array of length 2'] = Array.isArray(shop['location']['coordinates']) && shop['location']['coordinates'].length === 2;","    }","    ","    tests['Response has \"products\" property'] = shop.hasOwnProperty('products');","    tests['Response has \"products\" property is an Array'] = Array.isArray(shop['products']);","    tests['Response has \"createdAt\" property'] = shop.hasOwnProperty('createdAt');","    tests['Response\\'s \"createdAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.createdAt);","    tests['Response has \"updatedAt\" property'] = shop.hasOwnProperty('updatedAt');","    tests['Response\\'s \"updatedAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.updatedAt);","    ","    if (tests['Response has \"_id\" property']) {","        pm.globals.set('shopId', shop._id);","        tests['Global variable \"shopId\" has been set'] = pm.globals.get('shopId') === shop._id;","    }","}","}"],"type":"text/javascript"}}],"id":"c22104c2-dee6-4f32-8698-7540253c3cb8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"shop\": {\n\t\t\"name\": \"REWE City\",\n\t\t\"location\": {\n\t\t\t\"latitude\": \"48.3988342\",\n\t\t\t\"longitude\": \"9.9919789\"\n\t\t},\n\t\t\"stock\": [\n            {\"product\": \"5e8209eb4c47910b7637f4e0\", \"quantity\": 10},\n            {\"product\": \"5e8209eb4c47910b7637f4e1\", \"quantity\": 20}\n        ],\n\t\t\"products\": [\n            \"5e8209eb4c47910b7637f4e0\",\n            \"5e8209eb4c47910b7637f4e1\",\n            \"5e8209eb4c47910b7637f4e2\",\n            \"5e8209eb4c47910b7637f4e3\",\n            \"5e8209eb4c47910b7637f4e4\"\n        ]\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"https://kuro.tlahmann.com/api/shops","urlObject":{"protocol":"https","path":["api","shops"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c22104c2-dee6-4f32-8698-7540253c3cb8"},{"name":"Get Shop by ID","event":[{"listen":"test","script":{"id":"c60ff2f3-9e1e-46c6-9d53-30b27f3f4245","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var shop = responseJSON.shop || {};","","    tests['Response has \"_id\" property'] = shop.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = shop.hasOwnProperty('name');","    tests['Response has \"latitude\" property'] = shop.hasOwnProperty('latitude');","    tests['Response has \"longitude\" property'] = shop.hasOwnProperty('longitude');","    tests['Response has \"products\" property'] = shop.hasOwnProperty('products');","    tests['Response has \"products\" property is an Array'] = Array.isArray(shop['products']);","    tests['Response has \"createdAt\" property'] = shop.hasOwnProperty('createdAt');","    tests['Response\\'s \"createdAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.createdAt);","    tests['Response has \"updatedAt\" property'] = shop.hasOwnProperty('updatedAt');","    tests['Response\\'s \"updatedAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.updatedAt);","}","}"],"type":"text/javascript"}}],"id":"77dc6975-d25f-428c-b679-63ca7e38abf2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/shops/{{shopId}}","urlObject":{"protocol":"https","path":["api","shops","{{shopId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"77dc6975-d25f-428c-b679-63ca7e38abf2"},{"name":"Update Shop by ID","event":[{"listen":"test","script":{"id":"5f4f256b-42e1-4083-940e-5be3efcc553a","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var shop = responseJSON.shop || {};","","    tests['Response has \"_id\" property'] = shop.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = shop.hasOwnProperty('name');","    tests['Response has \"latitude\" property'] = shop.hasOwnProperty('latitude');","    tests['Response has \"longitude\" property'] = shop.hasOwnProperty('longitude');","    ","    ","    tests['\"name\" property has been updated'] = shop['name'] === 'Ed & Eka';","    ","    tests['Response has \"products\" property'] = shop.hasOwnProperty('products');","    tests['Response has \"products\" property is an Array'] = Array.isArray(shop['products']);","    tests['Response has \"createdAt\" property'] = shop.hasOwnProperty('createdAt');","    tests['Response\\'s \"createdAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.createdAt);","    tests['Response has \"updatedAt\" property'] = shop.hasOwnProperty('updatedAt');","    tests['Response\\'s \"updatedAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.updatedAt);","}","}"],"type":"text/javascript"}}],"id":"6208e48d-318f-4405-8296-ce1d90b6d23b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"shop\": {\n\t\t\"stock\": [\n            {\"product\": \"5e8209eb4c47910b7637f4e0\", \"quantity\": 0},\n            {\"product\": \"5e8209eb4c47910b7637f4e1\", \"quantity\": 1}\n        ]\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"https://kuro.tlahmann.com/api/shops/{{shopId}}","urlObject":{"protocol":"https","path":["api","shops","{{shopId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"6208e48d-318f-4405-8296-ce1d90b6d23b"},{"name":"Copy Shop by ID","event":[{"listen":"test","script":{"id":"e3cab6ef-63af-49d6-bab0-4d74b4bb599b","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var shop = responseJSON.shop || {};","","    tests['Response has \"_id\" property'] = shop.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = shop.hasOwnProperty('name');","    tests['Response has \"latitude\" property'] = shop.hasOwnProperty('latitude');","    tests['Response has \"longitude\" property'] = shop.hasOwnProperty('longitude');","    tests['Response has \"products\" property'] = shop.hasOwnProperty('products');","    tests['Response has \"products\" property is an Array'] = Array.isArray(shop['products']);","    tests['Response has \"createdAt\" property'] = shop.hasOwnProperty('createdAt');","    tests['Response\\'s \"createdAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.createdAt);","    tests['Response has \"updatedAt\" property'] = shop.hasOwnProperty('updatedAt');","    tests['Response\\'s \"updatedAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.updatedAt);","    ","    if (tests['Response has \"_id\" property']) {","        pm.globals.set('shopId', shop._id);","        tests['Global variable \"shopId\" has been set'] = pm.globals.get('shopId') === shop._id;","    }","}","}"],"type":"text/javascript"}}],"id":"cc06d032-747e-42f4-a02b-30980bda470f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"https://kuro.tlahmann.com/api/shops/{{shopId}}","urlObject":{"protocol":"https","path":["api","shops","{{shopId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"cc06d032-747e-42f4-a02b-30980bda470f"},{"name":"Delete Shop by ID","event":[{"listen":"test","script":{"id":"c08bb810-624e-4362-ad92-73d77fb72843","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","}"],"type":"text/javascript"}}],"id":"915cfa14-bd7b-4c67-a6ce-259c41f882a5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://kuro.tlahmann.com/api/shops/{{shopId}}","urlObject":{"protocol":"https","path":["api","shops","{{shopId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"915cfa14-bd7b-4c67-a6ce-259c41f882a5"}],"id":"cd49f7aa-42cf-4e10-800e-2dbdb96e50a5","_postman_id":"cd49f7aa-42cf-4e10-800e-2dbdb96e50a5","description":""},{"name":"Addresses","item":[{"name":"Get All Addresses","id":"954e270f-ce30-401b-a883-53cde54cc1f4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/addresses","urlObject":{"protocol":"https","path":["api","addresses"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"954e270f-ce30-401b-a883-53cde54cc1f4"},{"name":"Create Address","event":[{"listen":"test","script":{"id":"b7670d5d-4a65-4daa-9c23-257a7b34b268","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var address = responseJSON.address || {};","","    tests['Response has \"_id\" property'] = address.hasOwnProperty('_id');","    tests['Response has \"address\" property'] = address.hasOwnProperty('address');","    tests['Response has \"address2\" property'] = address.hasOwnProperty('address2');","    tests['Response has \"district\" property'] = address.hasOwnProperty('district');","    tests['Response has \"city\" property'] = address.hasOwnProperty('city');","    tests['Response has \"postralCode\" property'] = address.hasOwnProperty('postralCode');","    ","    if (tests['Response has \"_id\" property']) {","        pm.globals.set('addressId', address._id);","        tests['Global variable \"addressId\" has been set'] = pm.globals.get('addressId') === address._id;","    }","}","}"],"type":"text/javascript"}}],"id":"c9c61f7b-2a2c-48b4-af8c-3233a0b0b6ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"address\": {\n\t\t\"address\": \"Herrenkellergasse 18\",\n\t\t\"address2\": null,\n\t\t\"district\": null,\n\t\t\"city\": \"Ulm\",\n\t\t\"postralCode\": \"89073\"\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"https://kuro.tlahmann.com/api/addresses","urlObject":{"protocol":"https","path":["api","addresses"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c9c61f7b-2a2c-48b4-af8c-3233a0b0b6ff"},{"name":"Get Address by ID","event":[{"listen":"test","script":{"id":"c60ff2f3-9e1e-46c6-9d53-30b27f3f4245","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var shop = responseJSON.shop || {};","","    tests['Response has \"_id\" property'] = shop.hasOwnProperty('_id');","    tests['Response has \"name\" property'] = shop.hasOwnProperty('name');","    tests['Response has \"latitude\" property'] = shop.hasOwnProperty('latitude');","    tests['Response has \"longitude\" property'] = shop.hasOwnProperty('longitude');","    tests['Response has \"products\" property'] = shop.hasOwnProperty('products');","    tests['Response has \"products\" property is an Array'] = Array.isArray(shop['products']);","    tests['Response has \"createdAt\" property'] = shop.hasOwnProperty('createdAt');","    tests['Response\\'s \"createdAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.createdAt);","    tests['Response has \"updatedAt\" property'] = shop.hasOwnProperty('updatedAt');","    tests['Response\\'s \"updatedAt\" property is an ISO 8601 timestamp'] = /^\\d{4,}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d+.\\d+(?:[+-][0-2]\\d:[0-5]\\d|Z)$/.test(shop.updatedAt);","}","}"],"type":"text/javascript"}}],"id":"345fb35c-0179-46c8-8b65-f21efb5e5df9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kuro.tlahmann.com/api/addresses/{{addressId}}","urlObject":{"protocol":"https","path":["api","addresses","{{addressId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"345fb35c-0179-46c8-8b65-f21efb5e5df9"},{"name":"Update Address by ID","event":[{"listen":"test","script":{"id":"5f4f256b-42e1-4083-940e-5be3efcc553a","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var address = responseJSON.address || {};","","    tests['Response has \"_id\" property'] = address.hasOwnProperty('_id');","    tests['Response has \"address\" property'] = address.hasOwnProperty('address');","    tests['Response has \"address2\" property'] = address.hasOwnProperty('address2');","    tests['Response has \"district\" property'] = address.hasOwnProperty('district');","    tests['Response has \"city\" property'] = address.hasOwnProperty('city');","    tests['Response has \"postralCode\" property'] = address.hasOwnProperty('postralCode');","}","}"],"type":"text/javascript"}}],"id":"9bc7bf09-6607-40f5-896b-4bdfe8f4f5d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"address\": {\n\t\t\"address\": \"Beispielstraße 4\",\n\t\t\"address2\": \"1 Obergeschoss\",\n\t\t\"district\": null,\n\t\t\"city\": \"Ulm\",\n\t\t\"postralCode\": \"89074\"\n\t}\n}","options":{"raw":{"language":"json"}}},"url":"https://kuro.tlahmann.com/api/addresses/{{addressId}}","urlObject":{"protocol":"https","path":["api","addresses","{{addressId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"9bc7bf09-6607-40f5-896b-4bdfe8f4f5d2"},{"name":"Copy Address by ID","event":[{"listen":"test","script":{"id":"e3cab6ef-63af-49d6-bab0-4d74b4bb599b","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","","if(is200Response){","    var responseJSON = JSON.parse(responseBody);","    var address = responseJSON.address || {};","","    tests['Response has \"_id\" property'] = address.hasOwnProperty('_id');","    tests['Response has \"address\" property'] = address.hasOwnProperty('address');","    tests['Response has \"address2\" property'] = address.hasOwnProperty('address2');","    tests['Response has \"district\" property'] = address.hasOwnProperty('district');","    tests['Response has \"city\" property'] = address.hasOwnProperty('city');","    tests['Response has \"postralCode\" property'] = address.hasOwnProperty('postralCode');","    ","    if (tests['Response has \"_id\" property']) {","        pm.globals.set('addressId', address._id);","        tests['Global variable \"addressId\" has been set'] = pm.globals.get('addressId') === address._id;","    }","}","}"],"type":"text/javascript"}}],"id":"d9d36bc9-744a-443e-a0d3-60cf873c8760","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"https://kuro.tlahmann.com/api/addresses/{{addressId}}","urlObject":{"protocol":"https","path":["api","addresses","{{addressId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d9d36bc9-744a-443e-a0d3-60cf873c8760"},{"name":"Delete Address by ID","event":[{"listen":"test","script":{"id":"c08bb810-624e-4362-ad92-73d77fb72843","exec":["if (!(environment.isIntegrationTest)) {","var is200Response = responseCode.code === 200;","","tests['Response code is 200 OK'] = is200Response;","}"],"type":"text/javascript"}}],"id":"746b5a92-0503-431c-a72f-48dc66a73250","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://kuro.tlahmann.com/api/addresses/{{addressId}}","urlObject":{"protocol":"https","path":["api","addresses","{{addressId}}"],"host":["kuro","tlahmann","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"746b5a92-0503-431c-a72f-48dc66a73250"}],"id":"1e6efd0d-57c1-4a5d-84b7-46db7daa4239","_postman_id":"1e6efd0d-57c1-4a5d-84b7-46db7daa4239","description":""}],"event":[{"listen":"prerequest","script":{"id":"93a66865-b527-4661-9cef-da90be284fc8","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"731f5318-f95f-43cd-a48b-4079381e4776","type":"text/javascript","exec":[""]}}]}