{"info":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","description":"<html><head></head><body><p>Central reservation system. Consists of</p>\n<ul>\n<li>managing availability in properties,</li>\n<li>managing rates in properties,</li>\n<li>creating reservations by guests and partners.</li>\n</ul>\n<p>Authorization headers:</p>\n<ul>\n<li>Authorization: Bearer jwt</li>\n<li>X-Property-Id: property id</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"14245247","collectionId":"b2033267-c6c0-42c6-83a8-3a7756bc003f","publishedId":"UVC2HUit","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-11-05T09:12:18.000Z"},"item":[{"name":"Reservation Management","item":[{"name":"Create reservation","id":"9c72d344-cf38-405a-bd09-5b4dc4fad77a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"contacts\": {\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\"\n    },\n    \"checkIn\": \"2022-08-01\",\n    \"checkOut\": \"2022-08-15\",\n    \"duration\": \"14\",\n    \"roomTypeId\": \"2a207e75-1698-4834-a371-29d6a65f3ea8\",\n    \"quotaId\": \"23dadf66-4e6d-4a61-a38e-9cc1899b84f7\",\n    \"guests\": [\n        {\n            \"productId\": \"4a72e4c2-126a-4fac-9353-94fc2843d251\",\n            \"firstName\": \"Bilbo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"1980-01-01\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"4a72e4c2-126a-4fac-9353-94fc2843d251\",\n            \"firstName\": \"Gandalf\",\n            \"lastName\": \"the Grey\",\n            \"birthdate\": \"1970-01-01\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"4a72e4c2-126a-4fac-9353-94fc2843d251\",\n            \"firstName\": \"Frodo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"2014-01-01\",\n            \"ageCategory\": \"kid\",\n            \"childAge\": \"7\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/reservation","description":"<p>Creates reservation - contacts and propertyId are required, other data is optional</p>\n","urlObject":{"path":["reservation"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"36c8e7ce-d35b-4ce0-843f-da4db6aaf80e","name":"Create reservation 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"contacts\": {\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\"\n    },\n    \"checkIn\": \"3018-07-01\",\n    \"checkOut\": \"3018-08-01\",\n    \"duration\": \"31\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"guests\": [\n        {\n            \"productId\": \"rest\",\n            \"firstName\": \"Bilbo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"2890-09-22\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"hide-the-ring\",\n            \"firstName\": \"Frodo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"3012-09-22\",\n            \"ageCategory\": \"kid\",\n            \"childAge\": \"6\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/reservation"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"873"},{"key":"ETag","value":"W/\"369-e11BNjzK/3dVZLGGjzmKpZuZFuQ\""},{"key":"Date","value":"Tue, 14 Dec 2021 08:39:57 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"propertyId\": \"rivendell\",\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\",\n        \"checkIn\": \"3018-07-01\",\n        \"checkOut\": \"3018-08-01\",\n        \"duration\": \"31\",\n        \"roomTypeId\": \"house-of-elrond\",\n        \"guests\": [\n            {\n                \"productId\": \"rest\",\n                \"firstName\": \"Bilbo\",\n                \"lastName\": \"Baggins\",\n                \"birthdate\": \"2890-09-22\",\n                \"ageCategory\": \"adult\",\n                \"childAge\": null\n            },\n            {\n                \"productId\": \"hide-the-ring\",\n                \"firstName\": \"Frodo\",\n                \"lastName\": \"Baggins\",\n                \"birthdate\": \"3012-09-22\",\n                \"ageCategory\": \"kid\",\n                \"childAge\": \"6\"\n            }\n        ],\n        \"meta\": null,\n        \"source\": null,\n        \"id\": \"frodo-bilbo\",\n        \"number\": \"111\",\n        \"status\": \"New\",\n        \"createdAt\": \"2021-12-14T08:39:57.295Z\",\n        \"updatedAt\": \"2021-12-14T08:39:57.295Z\"\n    }\n}"},{"id":"b5655273-5a15-42b9-a676-d7826efff4aa","name":"Create reservation 400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"contacts\": {\n        \"phone\": \"+7 (911) 111-11-11\"\n    },\n    \"checkIn\": \"3018-07-01\",\n    \"checkOut\": \"3018-08-01\",\n    \"duration\": \"31\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"guests\": [\n        {\n            \"productId\": \"rest\",\n            \"firstName\": \"Bilbo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"2890-09-22\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"hide-the-ring\",\n            \"firstName\": \"Frodo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"3012-09-22\",\n            \"ageCategory\": \"kid\",\n            \"childAge\": \"6\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/reservation"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"86"},{"key":"ETag","value":"W/\"56-IOnysPsfLaDwUZTPST8S3nHqsRU\""},{"key":"Date","value":"Tue, 14 Dec 2021 08:40:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"NOT_ENOUGH_DATA\",\n    \"data\": \"Specify name, phone and propertyId\"\n}"}],"_postman_id":"9c72d344-cf38-405a-bd09-5b4dc4fad77a"},{"name":"Update reservation","id":"4b8b9df0-fe51-42bf-bfbe-2e081288c500","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"contacts\": {\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\"\n    },\n    \"checkIn\": \"2022-04-01\",\n    \"checkOut\": \"2022-04-15\",\n    \"duration\": \"14\",\n    \"roomTypeId\": \"2a207e75-1698-4834-a371-29d6a65f3ea8\",\n    \"guests\": [\n        {\n            \"productId\": \"4a72e4c2-126a-4fac-9353-94fc2843d251\",\n            \"firstName\": \"Bilbo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"1980-01-01\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"4a72e4c2-126a-4fac-9353-94fc2843d251\",\n            \"firstName\": \"Gandalf\",\n            \"lastName\": \"the Grey\",\n            \"birthdate\": \"1970-01-01\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"4a72e4c2-126a-4fac-9353-94fc2843d251\",\n            \"firstName\": \"Frodo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"2014-01-01\",\n            \"ageCategory\": \"kid\",\n            \"childAge\": \"7\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/reservation/:id","description":"<p>Updates reservation</p>\n","urlObject":{"path":["reservation",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"07f6d105-6053-4b9d-ac4a-7175e627ca1a","key":"id"}]}},"response":[{"id":"bef8303f-767b-4c46-8e02-46ec0ef33a6d","name":"Update reservation 200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"contacts\": {\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\"\n    },\n    \"checkIn\": \"3018-07-01\",\n    \"checkOut\": \"3018-08-01\",\n    \"duration\": \"31\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"guests\": [\n        {\n            \"productId\": \"rest\",\n            \"firstName\": \"Bilbo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"2890-09-22\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"hide-the-ring\",\n            \"firstName\": \"Frodo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"3012-09-22\",\n            \"ageCategory\": \"kid\",\n            \"childAge\": \"6\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/reservation/:id","host":["http://localhost:3000"],"path":["reservation",":id"],"variable":[{"key":"id","value":"frodo-bilbo"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"899"},{"key":"ETag","value":"W/\"383-W4xAFthieIFOs+wHLGuz7VsYRts\""},{"key":"Date","value":"Tue, 14 Dec 2021 08:40:42 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"frodo-bilbo\",\n        \"number\": \"111\",\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\",\n        \"propertyId\": \"rivendell\",\n        \"checkIn\": \"3018-07-01\",\n        \"checkOut\": \"3018-08-01\",\n        \"duration\": \"31\",\n        \"roomTypeId\": \"house-of-elrond\",\n        \"guests\": [\n            {\n                \"productId\": \"rest\",\n                \"firstName\": \"Bilbo\",\n                \"lastName\": \"Baggins\",\n                \"birthdate\": \"2890-09-22\",\n                \"ageCategory\": \"adult\",\n                \"childAge\": null\n            },\n            {\n                \"productId\": \"hide-the-ring\",\n                \"firstName\": \"Frodo\",\n                \"lastName\": \"Baggins\",\n                \"birthdate\": \"3012-09-22\",\n                \"ageCategory\": \"kid\",\n                \"childAge\": \"6\"\n            }\n        ],\n        \"meta\": null,\n        \"source\": null,\n        \"status\": \"New\",\n        \"createdAt\": \"2021-12-01T09:17:00.359Z\",\n        \"updatedAt\": \"2021-12-14T08:40:42.132Z\"\n    }\n}"},{"id":"04fcde23-5c3d-4841-bfdc-3a64a54b564c","name":"Update reservation 404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"contacts\": {\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\"\n    },\n    \"checkIn\": \"3018-07-01\",\n    \"checkOut\": \"3018-08-01\",\n    \"duration\": \"31\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"guests\": [\n        {\n            \"productId\": \"rest\",\n            \"firstName\": \"Bilbo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"2890-09-22\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"hide-the-ring\",\n            \"firstName\": \"Frodo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"3012-09-22\",\n            \"ageCategory\": \"kid\",\n            \"childAge\": \"6\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/reservation/:id","host":["http://localhost:3000"],"path":["reservation",":id"],"variable":[{"key":"id","value":"frodo-gandalf"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"73"},{"key":"ETag","value":"W/\"49-aXnpj/MdlteukK3p8IxWRoJkX4Y\""},{"key":"Date","value":"Wed, 24 Nov 2021 13:25:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"RESERVATION_NOT_FOUND\",\n    \"data\": \"reservation not found\"\n}"},{"id":"4f8c5ee2-a43c-4f69-939b-d53d3bdb4a5e","name":"Update reservation 400","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"contacts\": {\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\"\n    },\n    \"checkIn\": \"3018-09-01\",\n    \"checkOut\": \"3018-08-01\",\n    \"duration\": \"31\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"guests\": [\n        {\n            \"productId\": \"rest\",\n            \"firstName\": \"Bilbo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"2890-09-22\",\n            \"ageCategory\": \"adult\",\n            \"childAge\": null\n        },\n        {\n            \"productId\": \"hide-the-ring\",\n            \"firstName\": \"Frodo\",\n            \"lastName\": \"Baggins\",\n            \"birthdate\": \"3012-09-22\",\n            \"ageCategory\": \"kid\",\n            \"childAge\": \"6\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/reservation/:id","host":["http://localhost:3000"],"path":["reservation",":id"],"variable":[{"key":"id","value":"frodo-bilbo"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"139"},{"key":"ETag","value":"W/\"8b-GYCs4pW339JDvGtvMZuByx1/AD4\""},{"key":"Date","value":"Thu, 25 Nov 2021 17:14:38 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"COMMON.ERROR\",\n    \"data\": \"Checkout must be after checkin, Duration must equal period between checkIn and checkOut\"\n}"}],"_postman_id":"4b8b9df0-fe51-42bf-bfbe-2e081288c500"},{"name":"Get reservation","id":"272b13f7-7eac-4a7e-88c5-dd3b7512f1f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/reservation/:id","description":"<p>Get reservation by id.\nPropertyId is required for authorization.</p>\n","urlObject":{"path":["reservation",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"b9170ccc-1c85-4518-9117-030abcccf35b","key":"id"}]}},"response":[{"id":"077b1f0c-2b4a-45d7-a382-a405fa16422f","name":"Get reservation 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/reservation/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["reservation",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"frodo-bilbo"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"789"},{"key":"ETag","value":"W/\"315-PDQuQbzqJqmShCioaGqxcmQBZiM\""},{"key":"Date","value":"Tue, 23 Nov 2021 15:03:02 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"frodo-bilbo\",\n        \"number\": \"111\",\n        \"name\": \"Frodo Baggins\",\n        \"phone\": \"+7 (911) 111-11-11\",\n        \"propertyId\": \"rivendell\",\n        \"checkIn\": \"3018-07-01\",\n        \"checkOut\": \"3018-08-01\",\n        \"duration\": \"31\",\n        \"roomTypeId\": \"house-of-elrond\",\n        \"guests\": [\n            {\n                \"productId\": \"rest\",\n                \"firstName\": \"Bilbo\",\n                \"lastName\": \"Baggins\",\n                \"birthdate\": \"2890-09-22\",\n                \"ageCategory\": \"adult\",\n                \"childAge\": null\n            },\n            {\n                \"productId\": \"hide-the-ring\",\n                \"firstName\": \"Frodo\",\n                \"lastName\": \"Baggins\",\n                \"birthdate\": \"3012-09-22\",\n                \"ageCategory\": \"kid\",\n                \"childAge\": \"6\"\n            }\n        ],\n        \"meta\": null,\n        \"source\": null,\n        \"status\": \"New\",\n        \"createdAt\": \"2021-12-01T09:17:00.359Z\",\n        \"updatedAt\": \"2021-12-14T08:40:42.132Z\"\n    }\n}"},{"id":"b3cb341f-8729-4772-872a-d75933787cc2","name":"Get reservation 404","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/reservation/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["reservation",":id"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}],"variable":[{"key":"id","value":"frodo-gandalf"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"73"},{"key":"ETag","value":"W/\"49-yBxClMrR8iD5EVQnjbG3+1khrnQ\""},{"key":"Date","value":"Tue, 23 Nov 2021 15:05:33 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"RESERVATION_NOT_FOUND\",\n    \"data\": \"Reservation not found\"\n}"},{"id":"4223f523-35ac-4b07-96d3-3cb7d4112f6d","name":"Get reservation 401","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/reservation/:id","host":["http://localhost:3000"],"path":["reservation",":id"],"query":[{"key":"propertyId","value":"rivendell","disabled":true}],"variable":[{"key":"id","value":"frodo-bilbo"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"71"},{"key":"ETag","value":"W/\"47-g9sPKJviiMyXOAC5LyJRZViMIms\""},{"key":"Date","value":"Thu, 25 Nov 2021 17:13:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"COMMON.ERROR\",\n    \"data\": \"User not authorized\"\n}"},{"id":"3af9a924-5a93-4fc9-b7dd-a6e66c681ab0","name":"Get reservation 403","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/reservation/:id?propertyId=lorien","host":["http://localhost:3000"],"path":["reservation",":id"],"query":[{"key":"propertyId","value":"lorien"}],"variable":[{"key":"id","value":"frodo-bilbo"}]}},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"83"},{"key":"ETag","value":"W/\"53-RfF7uka7aIvqA0csCTT1gT8kdd4\""},{"key":"Date","value":"Thu, 25 Nov 2021 17:13:27 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"COMMON.ERROR\",\n    \"data\": \"User has no rights for property\"\n}"}],"_postman_id":"272b13f7-7eac-4a7e-88c5-dd3b7512f1f2"},{"name":"Get all reservations","id":"68c06e0f-2b29-4647-9a62-7a1364430f6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/reservation?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619&roomTypeId=2a207e75-1698-4834-a371-29d6a65f3ea8&searchQuery=7911111111&pageSize=5&pageNumber=1","description":"<p>Returns total number and list of reservations for property with filter and search.</p>\n<ul>\n<li>property_id - is required.</li>\n<li>search_query - person's name or reservation number.</li>\n</ul>\n","urlObject":{"path":["reservation"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"},{"key":"roomTypeId","value":"2a207e75-1698-4834-a371-29d6a65f3ea8"},{"disabled":true,"key":"checkIn","value":"2933-01-01"},{"key":"searchQuery","value":"7911111111"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}],"variable":[]}},"response":[{"id":"0c26e38c-bf5f-4e18-aa9a-4226bb792dfe","name":"Get all reservations 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/reservation?propertyId=rivendell&roomTypeId=house-of-elrond&checkIn=3018-06-01&searchQuery=10&pageSize=5&pageNumber=1","host":["http://localhost:3000"],"path":["reservation"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"roomTypeId","value":"house-of-elrond"},{"key":"checkIn","value":"3018-06-01"},{"key":"searchQuery","value":"10"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"810"},{"key":"ETag","value":"W/\"32a-iG8Fkptaimj86oWgvRSfpuIBTqY\""},{"key":"Date","value":"Wed, 24 Nov 2021 10:52:31 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"data\": [\n            {\n                \"id\": \"frodo-bilbo\",\n                \"number\": \"111\",\n                \"name\": \"Frodo Baggins\",\n                \"phone\": \"+7 (911) 111-11-11\",\n                \"propertyId\": \"rivendell\",\n                \"checkIn\": \"3018-07-01\",\n                \"checkOut\": \"3018-08-01\",\n                \"duration\": \"31\",\n                \"roomTypeId\": \"house-of-elrond\",\n                \"guests\": [\n                    {\n                        \"productId\": \"rest\",\n                        \"firstName\": \"Bilbo\",\n                        \"lastName\": \"Baggins\",\n                        \"birthdate\": \"2890-09-22\",\n                        \"ageCategory\": \"adult\",\n                        \"childAge\": null\n                    },\n                    {\n                        \"productId\": \"hide-the-ring\",\n                        \"firstName\": \"Frodo\",\n                        \"lastName\": \"Baggins\",\n                        \"birthdate\": \"3012-09-22\",\n                        \"ageCategory\": \"kid\",\n                        \"childAge\": \"6\"\n                    }\n                ],\n                \"meta\": null,\n                \"source\": null,\n                \"status\": \"New\",\n                \"createdAt\": \"2021-12-01T09:17:00.359Z\",\n                \"updatedAt\": \"2021-12-14T08:40:42.132Z\"\n            }\n        ],\n        \"total\": 1\n    }\n}"}],"_postman_id":"68c06e0f-2b29-4647-9a62-7a1364430f6b"}],"id":"8826da32-e322-42e9-9a00-e2630cea9193","_postman_id":"8826da32-e322-42e9-9a00-e2630cea9193","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Availability","item":[{"name":"Quota Management","item":[{"name":"Create quota","id":"74b8c756-ed2c-4d34-bcf2-1ead9f9f96ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Bilbo Party\",\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/availability/quota","urlObject":{"path":["availability","quota"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"875fa5d9-7d53-4a86-9326-af9d8b01f99c","name":"Create quota 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Bilbo Party\",\n    \"propertyId\": \"rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/availability/quota"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"220"},{"key":"ETag","value":"W/\"dc-TPf1WxOCdm2A3vfPKO7CkznLqDw\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:44:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"name\": \"Bilbo Party\",\n        \"propertyId\": \"rivendell\",\n        \"id\": \"bilbo-party\",\n        \"createdAt\": \"2022-06-27T10:44:49.299Z\",\n        \"updatedAt\": \"2022-06-27T10:44:49.299Z\"\n    }\n}"}],"_postman_id":"74b8c756-ed2c-4d34-bcf2-1ead9f9f96ad"},{"name":"Get quota","id":"70050989-716b-4fb5-a87c-d92f8aeeb87f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/availability/quota/:id","urlObject":{"path":["availability","quota",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"23dadf66-4e6d-4a61-a38e-9cc1899b84f7","key":"id"}]}},"response":[{"id":"f71dee97-bd3e-4610-ad8d-f8ee62443697","name":"Get quota 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/availability/quota/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["availability","quota",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"bilbo-party"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"220"},{"key":"ETag","value":"W/\"dc-Khs6GPOFSVKhQD5PT2SVWyQDorE\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:45:46 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"bilbo-party\",\n        \"name\": \"Bilbo Party\",\n        \"propertyId\": \"rivendell\",\n        \"createdAt\": \"2022-06-27T10:45:21.668Z\",\n        \"updatedAt\": \"2022-06-27T10:45:21.668Z\"\n    }\n}"},{"id":"dd5c0d9d-866c-4079-b1e5-1c697e54963d","name":"Get quota 404","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/availability/quota/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["availability","quota",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"gollum-party"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-TdoFJYwTslr5iMNAg/Vs9M+bKnI\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:46:19 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"QUOTA_NOT_FOUND\",\n    \"data\": \"Quota not found\"\n}"}],"_postman_id":"70050989-716b-4fb5-a87c-d92f8aeeb87f"},{"name":"Update quota","id":"b1d18512-b4bc-4491-b369-e57e796e836b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Bilbo Party\",\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/availability/quota/:id","urlObject":{"path":["availability","quota",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"23dadf66-4e6d-4a61-a38e-9cc1899b84f7","key":"id"}]}},"response":[{"id":"7f9210df-2913-4ba4-8e4e-2f359145ea25","name":"Update quota 200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Bilbo Party\",\n    \"propertyId\": \"rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/availability/quota/:id","host":["http://localhost:3000"],"path":["availability","quota",":id"],"variable":[{"key":"id","value":"bilbo-party"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"220"},{"key":"ETag","value":"W/\"dc-GAtR6ChpH5TF6VJI7xd5d5Xh7bo\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:47:05 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"bilbo-party\",\n        \"name\": \"Bilbo Party\",\n        \"propertyId\": \"rivendell\",\n        \"createdAt\": \"2022-06-27T10:45:21.668Z\",\n        \"updatedAt\": \"2022-06-27T10:47:05.087Z\"\n    }\n}"},{"id":"24472e17-df3a-4c01-b84b-d286209b875e","name":"Update quota 404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Bilbo Party\",\n    \"propertyId\": \"rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/availability/quota/:id","host":["http://localhost:3000"],"path":["availability","quota",":id"],"variable":[{"key":"id","value":"gollum-party"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-TdoFJYwTslr5iMNAg/Vs9M+bKnI\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:47:52 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"QUOTA_NOT_FOUND\",\n    \"data\": \"Quota not found\"\n}"}],"_postman_id":"b1d18512-b4bc-4491-b369-e57e796e836b"},{"name":"Remove quota","id":"aaf3d1ed-7744-4e8e-8335-7f731f6d158e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/availability/quota/:id","urlObject":{"path":["availability","quota",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"23dadf66-4e6d-4a61-a38e-9cc1899b84f7","key":"id"}]}},"response":[{"id":"53b8425a-e39e-4563-8c2b-02d360e4b335","name":"Remove quota 200 removed","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/availability/quota/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["availability","quota",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"bilbo-party"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"28"},{"key":"ETag","value":"W/\"1c-Vt/6TvvrO9SE5YmGKzP/ETOJLzw\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:48:30 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": true\n}"},{"id":"8be7b429-517d-4e27-abd1-1fc966ab2d20","name":"Remove quota 200 not removed","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/availability/quota/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["availability","quota",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"goillum-party"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"29"},{"key":"ETag","value":"W/\"1d-e+nIlHTk+FJjlXA6rMMRZaSPbH8\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:48:48 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": false\n}"}],"_postman_id":"aaf3d1ed-7744-4e8e-8335-7f731f6d158e"},{"name":"Get all quotas","id":"71a73761-dede-436f-bea8-43bf8db9f01a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/availability/quota?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619&pageSize=5&pageNumber=1","urlObject":{"path":["availability","quota"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}],"variable":[]}},"response":[{"id":"23dd5c77-795a-4cc4-b71f-3cc687b3d0c6","name":"Get all quotas 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/availability/quota?propertyId=rivendell&pageSize=5&pageNumber=1","host":["http://localhost:3000"],"path":["availability","quota"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"828"},{"key":"ETag","value":"W/\"33c-c0YrRHe6m0LhSOvuSQIlOl2B2J4\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:49:50 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"data\": [\n            {\n                \"id\": \"aragorn-party\",\n                \"name\": \"Aragorn party\",\n                \"propertyId\": \"rivendell\",\n                \"createdAt\": \"2022-06-21T08:48:19.326Z\",\n                \"updatedAt\": \"2022-06-21T08:48:19.326Z\"\n            },\n            {\n                \"id\": \"erebor-party\",\n                \"name\": \"Quest of Erebor party\",\n                \"propertyId\": \"rivendell\",\n                \"createdAt\": \"2022-06-21T08:48:19.326Z\",\n                \"updatedAt\": \"2022-06-21T08:48:19.326Z\"\n            },\n            {\n                \"id\": \"ring-party\",\n                \"name\": \"Ring party\",\n                \"propertyId\": \"rivendell\",\n                \"createdAt\": \"2022-06-22T11:02:27.405Z\",\n                \"updatedAt\": \"2022-06-22T11:02:27.405Z\"\n            },\n            {\n                \"id\": \"bilbo-party\",\n                \"name\": \"Bilbo Party\",\n                \"propertyId\": \"rivendell\",\n                \"createdAt\": \"2022-06-27T10:44:49.299Z\",\n                \"updatedAt\": \"2022-06-27T10:44:49.299Z\"\n            }\n        ],\n        \"total\": 4\n    }\n}"}],"_postman_id":"71a73761-dede-436f-bea8-43bf8db9f01a"}],"id":"7e80040d-38ff-4012-899e-a55d7b9fb76e","_postman_id":"7e80040d-38ff-4012-899e-a55d7b9fb76e","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Quota Inventory Management","item":[{"name":"Batch upsert quota inventory by array","id":"751c55ae-67b5-43df-93dd-f8a6fece3d4e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"[\n    {\n        \"quotaId\": \"23dadf66-4e6d-4a61-a38e-9cc1899b84f7\",\n        \"roomTypeId\": \"2a207e75-1698-4834-a371-29d6a65f3ea8\",\n        \"date\": \"2022-07-01\",\n        \"amount\": \"9\"\n    },\n    {\n        \"quotaId\": \"23dadf66-4e6d-4a61-a38e-9cc1899b84f7\",\n        \"roomTypeId\": \"2a207e75-1698-4834-a371-29d6a65f3ea8\",\n        \"date\": \"2022-07-09\",\n        \"amount\": \"6\"\n    }\n]","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/availability/quota-inventory","urlObject":{"path":["availability","quota-inventory"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"c2c9b10c-ce96-4ff8-9553-131fc6a12a48","name":"Batch upsert quota inventory by array 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"[\n    {\n        \"quotaId\": \"bilbo-party\",\n        \"roomTypeId\": \"house-of-elrond\",\n        \"date\": \"2941-05-29\",\n        \"amount\": \"2\"\n    },\n    {\n        \"quotaId\": \"bilbo-party\",\n        \"roomTypeId\": \"house-of-elrond\",\n        \"date\": \"2941-05-30\",\n        \"amount\": \"2\"\n    },\n    {\n        \"quotaId\": \"bilbo-party\",\n        \"roomTypeId\": \"house-of-elrond\",\n        \"date\": \"2941-05-31\",\n        \"amount\": \"2\"\n    }\n]","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/availability/quota-inventory?propertyId=rivendell","host":["http://localhost:3000"],"path":["availability","quota-inventory"],"query":[{"key":"propertyId","value":"rivendell"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"35"},{"key":"ETag","value":"W/\"23-CifQu9h3ofetJ9Vb4KhZ+98CFmQ\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:51:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"total\": 3\n    }\n}"}],"_postman_id":"751c55ae-67b5-43df-93dd-f8a6fece3d4e"},{"name":"Batch upsert quota inventory by date range","id":"6598b9b5-6121-43b7-8e5b-26d2dcc0cc6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"quotaId\": \"23dadf66-4e6d-4a61-a38e-9cc1899b84f7\",\n    \"roomTypeId\": \"2a207e75-1698-4834-a371-29d6a65f3ea8\",\n    \"startDate\": \"2022-07-01\",\n    \"endDate\": \"2022-07-10\",\n    \"amount\": \"6\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/availability/quota-inventory?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619","urlObject":{"path":["availability","quota-inventory"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"}],"variable":[]}},"response":[{"id":"748b257a-f0f8-4804-ab2a-076d3f283463","name":"Batch upsert quota inventory by date range 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"quotaId\": \"bilbo-party\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"startDate\": \"2941-06-01\",\n    \"endDate\": \"2941-06-21\",\n    \"amount\": \"2\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/availability/quota-inventory?propertyId=rivendell","host":["http://localhost:3000"],"path":["availability","quota-inventory"],"query":[{"key":"propertyId","value":"rivendell"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"36"},{"key":"ETag","value":"W/\"24-aE0GNP+7wkZfRsvCJMtUuwG7614\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:53:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"total\": 21\n    }\n}"}],"_postman_id":"6598b9b5-6121-43b7-8e5b-26d2dcc0cc6b"},{"name":"Get all quota inventories","id":"a6185345-e477-4578-aee9-5825c383c427","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/availability/quota-inventory?quotaId=23dadf66-4e6d-4a61-a38e-9cc1899b84f7&pageSize=5&pageNumber=1","urlObject":{"path":["availability","quota-inventory"],"host":["http://localhost:3000"],"query":[{"key":"quotaId","value":"23dadf66-4e6d-4a61-a38e-9cc1899b84f7"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}],"variable":[]}},"response":[{"id":"e5fd08e3-469f-4c39-839e-cdfab548a5f4","name":"Get all quota inventories 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/availability/quota-inventory?propertyId=rivendell&quotaId=bilbo-party&pageSize=5&pageNumber=1","host":["http://localhost:3000"],"path":["availability","quota-inventory"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"quotaId","value":"bilbo-party"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1311"},{"key":"ETag","value":"W/\"51f-DKawhzV/LFNsmZ7FeZInHXVudHc\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:55:06 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"data\": [\n            {\n                \"id\": \"1\",\n                \"quotaId\": \"bilbo-party\",\n                \"roomTypeId\": \"house-of-elrond\",\n                \"date\": \"2941-05-29\",\n                \"amount\": 2,\n                \"createdAt\": \"2022-06-23T12:21:57.013Z\",\n                \"updatedAt\": \"2022-06-23T12:21:57.013Z\"\n            },\n            {\n                \"id\": \"2\",\n                \"quotaId\": \"bilbo-party\",\n                \"roomTypeId\": \"house-of-elrond\",\n                \"date\": \"2941-05-30\",\n                \"amount\": 2,\n                \"createdAt\": \"2022-06-23T12:21:57.013Z\",\n                \"updatedAt\": \"2022-06-23T12:21:57.013Z\"\n            },\n            {\n                \"id\": \"3\",\n                \"quotaId\": \"bilbo-party\",\n                \"roomTypeId\": \"house-of-elrond\",\n                \"date\": \"2941-05-31\",\n                \"amount\": 2,\n                \"createdAt\": \"2022-06-23T12:21:57.013Z\",\n                \"updatedAt\": \"2022-06-23T12:21:57.013Z\"\n            },\n            {\n                \"id\": \"4\",\n                \"quotaId\": \"bilbo-party\",\n                \"roomTypeId\": \"house-of-elrond\",\n                \"date\": \"2941-06-01\",\n                \"amount\": 2,\n                \"createdAt\": \"2022-06-23T12:21:57.013Z\",\n                \"updatedAt\": \"2022-06-23T12:21:57.013Z\"\n            },\n            {\n                \"id\": \"5\",\n                \"quotaId\": \"bilbo-party\",\n                \"roomTypeId\": \"house-of-elrond\",\n                \"date\": \"2941-06-02\",\n                \"amount\": 2,\n                \"createdAt\": \"2022-06-23T12:21:57.013Z\",\n                \"updatedAt\": \"2022-06-23T12:21:57.013Z\"\n            }\n        ],\n        \"total\": 100\n    }\n}"}],"_postman_id":"a6185345-e477-4578-aee9-5825c383c427"}],"id":"da752df4-dec7-4b3a-b7db-0fcf3d5325a5","_postman_id":"da752df4-dec7-4b3a-b7db-0fcf3d5325a5","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Get availability","id":"87063ced-b3bc-4fae-92f5-0996517f3257","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/availability?startDate=2022-08-01&endDate=2022-08-03&propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619","description":"<p>Gets all available room limits in property per period</p>\n","urlObject":{"path":["availability"],"host":["http://localhost:3000"],"query":[{"key":"startDate","value":"2022-08-01"},{"key":"endDate","value":"2022-08-03"},{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"}],"variable":[]}},"response":[{"id":"b3281e97-600a-4c5f-a0e3-38fd6086d94b","name":"Get availability 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/availability?propertyId=rivendell&startDate=2941-05-29&endDate=2941-05-31","host":["http://localhost:3000"],"path":["availability"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"startDate","value":"2941-05-29"},{"key":"endDate","value":"2941-05-31"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"7498"},{"key":"ETag","value":"W/\"1d4a-hrGw3V3AbqwB20Ln48R+2hw68tI\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:57:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"quotaId\": \"bilbo-party\",\n            \"roomTypeId\": \"house-of-elrond\",\n            \"date\": \"2941-05-29\",\n            \"amount\": 1,\n            \"reserved\": \"1\",\n            \"available\": \"2\"\n        },\n        {\n            \"quotaId\": \"bilbo-party\",\n            \"roomTypeId\": \"house-of-elrond\",\n            \"date\": \"2941-05-30\",\n            \"amount\": 1,\n            \"reserved\": \"1\",\n            \"available\": \"2\"\n        },\n        {\n            \"quotaId\": \"bilbo-party\",\n            \"roomTypeId\": \"house-of-elrond\",\n            \"date\": \"2941-05-31\",\n            \"amount\": 1,\n            \"reserved\": \"1\",\n            \"available\": \"2\"\n        }\n    ]\n}"},{"id":"f1a2dc25-8a32-4284-b682-b8acce938c95","name":"Get availability 200 no quotas","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/availability?propertyId=rivendell&startDate=2941-05-20&endDate=2941-05-28","host":["http://localhost:3000"],"path":["availability"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"startDate","value":"2941-05-20"},{"key":"endDate","value":"2941-05-28"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"7498"},{"key":"ETag","value":"W/\"1d4a-hrGw3V3AbqwB20Ln48R+2hw68tI\""},{"key":"Date","value":"Mon, 27 Jun 2022 10:57:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": []\n}"}],"_postman_id":"87063ced-b3bc-4fae-92f5-0996517f3257"}],"id":"5d4bd764-f342-49a0-ba79-ae332a6b8664","event":[{"listen":"prerequest","script":{"id":"a3662ec5-e0ba-4ff9-8bad-5e3c8a1ac705","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"85444758-a923-4cc3-922b-02488582575d","type":"text/javascript","exec":[""]}}],"_postman_id":"5d4bd764-f342-49a0-ba79-ae332a6b8664","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Rates","item":[{"name":"Settings Management","item":[{"name":"Get rates settings","id":"dc1fd638-cdac-4b7f-b6d5-876a045f8173","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/rates/settings?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619","urlObject":{"path":["rates","settings"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"}],"variable":[]}},"response":[{"id":"fc11e51b-933c-4ea6-8076-15b5094a5aaf","name":"Get rates settings 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates/settings?propertyId=rivendell","host":["http://localhost:3000"],"path":["rates","settings"],"query":[{"key":"propertyId","value":"rivendell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"215"},{"key":"ETag","value":"W/\"d7-9YfyCAHCOg+8sK/htQxgEVdbFCk\""},{"key":"Date","value":"Wed, 26 Jan 2022 10:03:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rivendell-settings\",\n        \"propertyId\": \"rivendell\",\n        \"settings\": {\n            \"stayUnit\": \"day\"\n        },\n        \"createdAt\": \"2022-01-26T10:03:37.015Z\",\n        \"updatedAt\": \"2022-01-26T10:03:37.015Z\"\n    }\n}"},{"id":"772b682f-55ec-4164-8e7b-c177975e3720","name":"Get rates settings 404","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates/settings?propertyId=erebor","host":["http://localhost:3000"],"path":["rates","settings"],"query":[{"key":"propertyId","value":"erebor"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"85"},{"key":"ETag","value":"W/\"55-RBh5hlbVN9OgzD+CdpuedAO7gU8\""},{"key":"Date","value":"Wed, 26 Jan 2022 10:05:02 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"SETTINGS_NOT_FOUND\",\n    \"data\": \"Settings not found\"\n}"}],"_postman_id":"dc1fd638-cdac-4b7f-b6d5-876a045f8173"},{"name":"Upsert rates settings","id":"9b5726c0-bd25-4b9b-bb20-c276da0e93b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"settings\": {\n        \"stayUnit\": \"night\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/settings","urlObject":{"path":["rates","settings"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"c737bcfa-02c0-4180-9503-7cfd50202a39","name":"Upsert rates settings 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"settings\": {\n        \"stayUnit\": \"day\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/settings"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"215"},{"key":"ETag","value":"W/\"d7-IkZm5duUC5HyLKmrpAdNfvMgcr0\""},{"key":"Date","value":"Wed, 26 Jan 2022 10:03:37 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"propertyId\": \"rivendell\",\n        \"settings\": {\n            \"stayUnit\": \"day\"\n        },\n        \"id\": \"rivendell-settings\",\n        \"createdAt\": \"2022-01-26T10:03:37.015Z\",\n        \"updatedAt\": \"2022-01-26T10:03:37.015Z\"\n    }\n}"}],"_postman_id":"9b5726c0-bd25-4b9b-bb20-c276da0e93b4"}],"id":"b3966e5c-e98d-47c1-a240-b4105430f38b","_postman_id":"b3966e5c-e98d-47c1-a240-b4105430f38b","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Seasons Management","item":[{"name":"Create season","id":"ad567ef1-8e8e-497a-9de8-0990224c62d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Third Age\",\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"startDate\": \"2000-01-01\",\n    \"endDate\": \"3021-12-31\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/season","urlObject":{"path":["rates","season"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"9c93cbdf-a8b4-4341-b47b-52827c951546","name":"Create season 201","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"id\": \"third-age\",\n    \"name\": \"Third Age\",\n    \"propertyId\": \"rivendell\",\n    \"startDate\": \"1-01-01\",\n    \"endDate\": \"3021-12-31\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/season"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"third-age\",\n        \"name\": \"Third Age\",\n        \"propertyId\": \"rivendell\",\n        \"startDate\": \"1-01-01\",\n        \"endDate\": \"3021-12-31\",\n        \"createdAt\": \"2021-11-25T15:41:52.176Z\",\n        \"updatedAt\": \"2021-11-25T15:41:52.176Z\"\n    }\n}\n\n"}],"_postman_id":"ad567ef1-8e8e-497a-9de8-0990224c62d6"},{"name":"Get season","id":"75ee015b-0cae-485e-8e18-fde5f678fcb8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/rates/season/:id","urlObject":{"path":["rates","season",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"7eca39e8-e575-4534-bfa3-aaf5afeb0c52","key":"id"}]}},"response":[{"id":"ca41696d-ba20-4c1c-bb97-2126cec4b1b0","name":"Get season 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates/season/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["rates","season",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"war-of-the-ring"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"290"},{"key":"ETag","value":"W/\"122-x3NkmcoeNZITHNbZOv9Ap8Na52U\""},{"key":"Date","value":"Wed, 26 Jan 2022 11:59:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"war-of-the-ring\",\n        \"name\": \"War of the Ring\",\n        \"propertyId\": \"rivendell\",\n        \"startDate\": \"3018-06-20\",\n        \"endDate\": \"3019-11-03\",\n        \"createdAt\": \"2021-11-25T15:41:52.176Z\",\n        \"updatedAt\": \"2021-11-25T15:41:52.176Z\"\n    }\n}"},{"id":"f162fbbb-6351-4f00-b8a1-c5180d8101d5","name":"Get season 404","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates/season/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["rates","season",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"fourth-age"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"74"},{"key":"ETag","value":"W/\"4a-KKCzXbZ4Io+5qurPX9AV5r2EghI\""},{"key":"Date","value":"Fri, 28 Jan 2022 14:34:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"SEASON_NOT_FOUND\",\n    \"data\": \"Season not found\"\n}"}],"_postman_id":"75ee015b-0cae-485e-8e18-fde5f678fcb8"},{"name":"Update season","id":"e65a925e-3972-4c46-8b7b-801e3af36c2e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"name\": \"Зима-весна\",\n    \"startDate\": \"2030-01-01\",\n    \"endDate\": \"2030-03-01\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/season/:id","urlObject":{"path":["rates","season",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"7eca39e8-e575-4534-bfa3-aaf5afeb0c52","key":"id"}]}},"response":[{"id":"48207621-30b7-419a-9d02-1a0d98ed01e9","name":"Update season 200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Third Age\",\n    \"propertyId\": \"rivendell\",\n    \"startDate\": \"1-01-01\",\n    \"endDate\": \"3021-12-31\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/rates/season/:id","host":["http://localhost:3000"],"path":["rates","season",":id"],"variable":[{"key":"id","value":"third-age"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"290"},{"key":"ETag","value":"W/\"122-x3NkmcoeNZITHNbZOv9Ap8Na52U\""},{"key":"Date","value":"Wed, 26 Jan 2022 11:57:07 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"third-age\",\n        \"name\": \"Third Age\",\n        \"propertyId\": \"rivendell\",\n        \"startDate\": \"1-01-01\",\n        \"endDate\": \"3021-12-31\",\n        \"createdAt\": \"2021-11-25T15:41:52.176Z\",\n        \"updatedAt\": \"2021-11-25T15:41:52.176Z\"\n    }\n}"},{"id":"e69523e9-8225-43ab-8320-94c0f159df54","name":"Update season 404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Fourth Age\",\n    \"propertyId\": \"rivendell\",\n    \"startDate\": \"1-01-01\",\n    \"endDate\": \"3021-12-31\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/rates/season/:id","host":["http://localhost:3000"],"path":["rates","season",":id"],"variable":[{"key":"id","value":"fourth-age"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"74"},{"key":"ETag","value":"W/\"4a-lJIlPSYRLPimIZM3y4TcLJueO3U\""},{"key":"Date","value":"Wed, 26 Jan 2022 11:57:50 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"SEASON_NOT_FOUND\",\n    \"data\": \"season not found\"\n}"}],"_postman_id":"e65a925e-3972-4c46-8b7b-801e3af36c2e"},{"name":"Remove season","id":"3a281597-79c9-4ad8-903d-e44d4222b82d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/rates/season/:id","urlObject":{"path":["rates","season",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"7bd9de61-bb53-4da0-85f2-fc0cbcf83dba","key":"id"}]}},"response":[{"id":"a9a3bbf1-c5e7-45a2-b0d0-0f23920c0fb8","name":"Delete season 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/rates/season/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["rates","season",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"third-age"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"47"},{"key":"ETag","value":"W/\"2f-/zocopcsBSRuprvsQA2rqVeZl7M\""},{"key":"Date","value":"Wed, 26 Jan 2022 12:08:37 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": true\n}"},{"id":"c7522a25-191c-4891-81a8-d61ef19fb6c4","name":"Delete non-existent season 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/rates/season/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["rates","season",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"fourth-age"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"47"},{"key":"ETag","value":"W/\"2f-wfU7H90qozlUqw0TN6m4DZ/sIXM\""},{"key":"Date","value":"Wed, 26 Jan 2022 12:09:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": false\n}"}],"_postman_id":"3a281597-79c9-4ad8-903d-e44d4222b82d"},{"name":"Get all seasons","id":"9c47f3e6-b471-41c7-9d4b-9cf1256ade73","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/rates/season?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619&pageSize=5&pageNumber=1","urlObject":{"path":["rates","season"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}],"variable":[]}},"response":[{"id":"52333468-fd27-4427-819c-e21418bc9395","name":"Get all seasons","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates/season?propertyId=rivendell&pageSize=5&pageNumber=1","host":["http://localhost:3000"],"path":["rates","season"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"850"},{"key":"ETag","value":"W/\"352-Q7D6qMNhyUViWA+7rq1rStu4qsU\""},{"key":"Date","value":"Thu, 24 Mar 2022 09:06:04 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"data\": [\n            {\n                \"id\": \"third-age\",\n                \"propertyId\": \"rivendell\",\n                \"name\": \"Third Age\",\n                \"startDate\": \"2000-01-01T00:00:00.000Z\",\n                \"endDate\": \"3021-03-25T00:00:00.000Z\",\n                \"createdAt\": \"2022-03-24T09:05:51.101Z\",\n                \"updatedAt\": \"2022-03-24T09:05:51.101Z\"\n            },\n            {\n                \"id\": \"quest-of-erebor\",\n                \"propertyId\": \"rivendell\",\n                \"name\": \"Quest of Erebor\",\n                \"startDate\": \"2941-04-27T00:00:00.000Z\",\n                \"endDate\": \"2941-11-23T00:00:00.000Z\",\n                \"createdAt\": \"2022-03-24T09:05:51.101Z\",\n                \"updatedAt\": \"2022-03-24T09:05:51.101Z\"\n            },\n            {\n                \"id\": \"war-of-the-ring\",\n                \"propertyId\": \"rivendell\",\n                \"name\": \"War of the Ring\",\n                \"startDate\": \"3018-06-20T00:00:00.000Z\",\n                \"endDate\": \"3019-11-03T00:00:00.000Z\",\n                \"createdAt\": \"2022-03-24T09:05:51.101Z\",\n                \"updatedAt\": \"2022-03-24T09:05:51.101Z\"\n            }\n        ],\n        \"total\": 3\n    }\n}"}],"_postman_id":"9c47f3e6-b471-41c7-9d4b-9cf1256ade73"}],"id":"baea0849-239a-4324-8111-5c26c7f2551d","_postman_id":"baea0849-239a-4324-8111-5c26c7f2551d","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Kids Policy Management","item":[{"name":" Create kids policy","id":"70ec28eb-e159-4a1f-8969-4463dba3b2c8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"minAge\": 0,\n    \"maxAge\": 1\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/kids-policy","urlObject":{"path":["rates","kids-policy"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"7bdf0df1-06f2-4881-b423-15c6d6835226","name":" Create kids policy 400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"minAge\": 1,\n    \"maxAge\": 0\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/kids-policy"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"87"},{"key":"ETag","value":"W/\"57-qPNkiVeiEZBdqPS8UgIOVf9Q5ds\""},{"key":"Date","value":"Wed, 16 Mar 2022 12:12:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"maxAge must be larger than minAge\"\n}"},{"id":"54d233ba-4502-4189-900b-a1625152ae49","name":" Create kids policy 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"minAge\": 0,\n    \"maxAge\": 1\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/kids-policy"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"221"},{"key":"ETag","value":"W/\"dd-PIqiK+fk4N3JhHnUXMQRCcbHR8M\""},{"key":"Date","value":"Wed, 16 Mar 2022 12:13:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"propertyId\": \"rivendell\",\n        \"minAge\": 0,\n        \"maxAge\": 1,\n        \"id\": \"rivendell-infant\",\n        \"createdAt\": \"2022-03-16T12:13:09.203Z\",\n        \"updatedAt\": \"2022-03-16T12:13:09.203Z\"\n    }\n}"}],"_postman_id":"70ec28eb-e159-4a1f-8969-4463dba3b2c8"},{"name":"Get kids policy","id":"d31861c9-4c63-4d70-8bc6-674477bdca5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/rates/kids-policy/:id","urlObject":{"path":["rates","kids-policy",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"14965939-70f6-42f2-bf5d-b6176660d74b","key":"id"}]}},"response":[{"id":"838ee146-d2b0-44d3-bbf6-f0193aee246a","name":"Get kids policy 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates/kids-policy/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["rates","kids-policy",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"rivendell-infant"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"221"},{"key":"ETag","value":"W/\"dd-3+I6m1qPD1ZYqQJL7RhV0HV2l3U\""},{"key":"Date","value":"Wed, 16 Mar 2022 12:19:05 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rivendell-infant\",\n        \"propertyId\": \"rivendell\",\n        \"minAge\": 0,\n        \"maxAge\": 1,\n        \"createdAt\": \"2022-03-16T11:26:32.554Z\",\n        \"updatedAt\": \"2022-03-16T11:26:32.554Z\"\n    }\n}"}],"_postman_id":"d31861c9-4c63-4d70-8bc6-674477bdca5e"},{"name":"Update kids policy","id":"3c828c33-a672-45e4-8566-d311ece660a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"minAge\": 0,\n    \"maxAge\": 1\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/kids-policy/:id","urlObject":{"path":["rates","kids-policy",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"14965939-70f6-42f2-bf5d-b6176660d74b","key":"id"}]}},"response":[{"id":"5c28b261-bf85-4223-b553-66041a7b666b","name":"Update kids policy 200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"minAge\": 0,\n    \"maxAge\": 1\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/rates/kids-policy/:id","host":["http://localhost:3000"],"path":["rates","kids-policy",":id"],"variable":[{"key":"id","value":"rivendell-infant"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"221"},{"key":"ETag","value":"W/\"dd-9RYbWBiY2nwPETPeI+XJ2XhIKss\""},{"key":"Date","value":"Wed, 16 Mar 2022 12:24:16 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rivendell-infant\",\n        \"propertyId\": \"rivendell\",\n        \"minAge\": 0,\n        \"maxAge\": 1,\n        \"createdAt\": \"2022-03-16T11:26:32.554Z\",\n        \"updatedAt\": \"2022-03-16T12:24:16.156Z\"\n    }\n}"},{"id":"20eaa69b-e632-4d0c-b30e-ffd13c1e7a3b","name":"Update kids policy 400","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"minAge\": 1,\n    \"maxAge\": 0\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/rates/kids-policy/:id","host":["http://localhost:3000"],"path":["rates","kids-policy",":id"],"variable":[{"key":"id","value":"rivendell-infant"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"87"},{"key":"ETag","value":"W/\"57-qPNkiVeiEZBdqPS8UgIOVf9Q5ds\""},{"key":"Date","value":"Wed, 16 Mar 2022 12:25:14 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"maxAge must be larger than minAge\"\n}"}],"_postman_id":"3c828c33-a672-45e4-8566-d311ece660a7"},{"name":"Remove kids policy","id":"a5920676-c360-4231-8177-177b29ff2a71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/rates/kids-policy/:id","urlObject":{"path":["rates","kids-policy",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"14965939-70f6-42f2-bf5d-b6176660d74b","key":"id"}]}},"response":[{"id":"2c8bbfa9-dcd7-42fa-9617-1a4bcae264c6","name":"Remove kids policy 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/rates/kids-policy/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["rates","kids-policy",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"rivendell-infant"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"47"},{"key":"ETag","value":"W/\"2f-/zocopcsBSRuprvsQA2rqVeZl7M\""},{"key":"Date","value":"Wed, 16 Mar 2022 12:27:00 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": true\n}"},{"id":"fce73370-fb7c-4109-a141-0c90fcdf8e60","name":"Remove non-existent kids policy 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/rates/kids-policy/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["rates","kids-policy",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"lorien-infant"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"28"},{"key":"ETag","value":"W/\"1c-Vt/6TvvrO9SE5YmGKzP/ETOJLzw\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:46:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": false\n}"}],"_postman_id":"a5920676-c360-4231-8177-177b29ff2a71"},{"name":"Get all kids policies","id":"d429a47c-88b3-4e2d-a462-baeee68ec191","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/rates/kids-policy?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619&pageNumber=1&pageSize=2","urlObject":{"path":["rates","kids-policy"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"},{"key":"pageNumber","value":"1"},{"key":"pageSize","value":"2"}],"variable":[]}},"response":[{"id":"9f03e03e-d4a5-4eab-ac2f-a5a4c66adf21","name":"Get all kids policies 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates/kids-policy?propertyId=rivendell&pageSize=5&pageNumber=1","host":["http://localhost:3000"],"path":["rates","kids-policy"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"pageSize","value":"5"},{"key":"pageNumber","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1216"},{"key":"ETag","value":"W/\"4c0-gispuTqwOqwkPpXkfwoewuWUvCQ\""},{"key":"Date","value":"Wed, 16 Mar 2022 12:28:22 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"data\": [\n            {\n                \"id\": \"rivendell-infant\",\n                \"propertyId\": \"rivendell\",\n                \"minAge\": 0,\n                \"maxAge\": 1,\n                \"createdAt\": \"2022-03-16T11:20:52.604Z\",\n                \"updatedAt\": \"2022-03-16T11:20:52.604Z\"\n            },\n            {\n                \"id\": \"rivendell-child\",\n                \"propertyId\": \"rivendell\",\n                \"minAge\": 2,\n                \"maxAge\": 8,\n                \"createdAt\": \"2022-03-16T11:20:52.605Z\",\n                \"updatedAt\": \"2022-03-16T11:20:52.605Z\"\n            },\n            {\n                \"id\": \"rivendell-teen\",\n                \"propertyId\": \"rivendell\",\n                \"minAge\": 9,\n                \"maxAge\": 17,\n                \"createdAt\": \"2022-03-16T12:17:26.965Z\",\n                \"updatedAt\": \"2022-03-16T12:17:26.965Z\"\n            }\n        ],\n        \"total\": 3\n    }\n}"}],"_postman_id":"d429a47c-88b3-4e2d-a462-baeee68ec191"}],"id":"46498f48-c65b-41f3-85e3-fcc5c1a5f4b7","_postman_id":"46498f48-c65b-41f3-85e3-fcc5c1a5f4b7","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Rates Management","item":[{"name":"Get rates","id":"1474de70-ce01-4cb2-8a80-073629951f41","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/rates?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619&seasonId=b235859b-4f50-408c-924c-47fd91bdb138&productId=4a72e4c2-126a-4fac-9353-94fc2843d251&roomTypeId=2a207e75-1698-4834-a371-29d6a65f3ea8","description":"<p>Get room types and rates for property, season and product</p>\n","urlObject":{"path":["rates"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"},{"key":"seasonId","value":"b235859b-4f50-408c-924c-47fd91bdb138"},{"key":"productId","value":"4a72e4c2-126a-4fac-9353-94fc2843d251"},{"key":"roomTypeId","value":"2a207e75-1698-4834-a371-29d6a65f3ea8"}],"variable":[]}},"response":[{"id":"2e5b1cfb-efe0-44fb-a47b-28b1947ac632","name":"Get rates 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates?propertyId=rivendell&seasonId=third-age&productId=rest&roomTypeId=house-of-elrond","host":["http://localhost:3000"],"path":["rates"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"seasonId","value":"third-age"},{"key":"productId","value":"rest"},{"key":"roomTypeId","value":"house-of-elrond"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"propertyId\": \"rivendell\",\n            \"productId\": \"rest\",\n            \"seasonId\": \"third-age\",\n            \"roomTypeId\": \"house-of-elrond\",\n            \"prices\": {\n                \"adult\": {\n                    \"main\": [\n                        { \"minOccupancy\": 1, \"pricePerUnit\": 1500 },\n                        { \"minOccupancy\": 2, \"pricePerUnit\": 1300 },\n                        { \"minOccupancy\": 4, \"pricePerUnit\": 1100 }\n                    ],\n                    \"extra\": 700\n                },\n                \"kid\": {\n                    \"main\": [\n                        {\n                            \"kidsPolicyId\": \"rivendell-infant\",\n                            \"minAge\": 0,\n                            \"maxAge\": 1,\n                            \"pricePerUnit\": 1000\n                        },\n                        {\n                            \"kidsPolicyId\": \"rivendell-child\",\n                            \"minAge\": 2,\n                            \"maxAge\": 8,\n                            \"pricePerUnit\": 1100\n                        },\n                        {\n                            \"kidsPolicyId\": \"rivendell-teen\",\n                            \"minAge\": 9,\n                            \"maxAge\": 17,\n                            \"pricePerUnit\": 1200\n                        }\n                    ],\n                    \"extra\": [\n                        {\n                            \"kidsPolicyId\": \"rivendell-infant\",\n                            \"minAge\": 0,\n                            \"maxAge\": 1,\n                            \"pricePerUnit\": 0\n                        },\n                        {\n                            \"kidsPolicyId\": \"rivendell-child\",\n                            \"minAge\": 2,\n                            \"maxAge\": 8,\n                            \"pricePerUnit\": 500\n                        },\n                        {\n                            \"kidsPolicyId\": \"rivendell-teen\",\n                            \"minAge\": 9,\n                            \"maxAge\": 17,\n                            \"pricePerUnit\": 500\n                        }\n                    ]\n                }\n            },\n            \"id\": \"rivendell-rest-third-age-house-of-elrond\",\n            \"createdAt\": \"2022-01-27T13:34:35.526Z\",\n            \"updatedAt\": \"2022-01-27T13:34:35.526Z\"\n        }\n    ]\n}"},{"id":"432a8e33-819d-4f75-b3da-47fcba566ce6","name":"Get rates 400","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates?propertyId=rivendell&productId=rest&roomTypeId=house-of-elrond","host":["http://localhost:3000"],"path":["rates"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"seasonId","value":"third-age","disabled":true},{"key":"productId","value":"rest"},{"key":"roomTypeId","value":"house-of-elrond","type":"text"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"80"},{"key":"ETag","value":"W/\"50-u3n5ITdYUErPYhPGIiEPWad7CuI\""},{"key":"Date","value":"Thu, 25 Nov 2021 17:06:01 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"seasonId should not be empty\"\n}"},{"id":"ecb82f77-c8e4-4bad-9956-ec5efee4af03","name":"Get rates 404","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/rates?propertyId=rivendell&seasonId=third-age&productId=hide-the-ring&roomTypeId=house-of-elrond","host":["http://localhost:3000"],"path":["rates"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"seasonId","value":"third-age"},{"key":"productId","value":"hide-the-ring"},{"key":"roomTypeId","value":"house-of-elrond"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-yxD6vLpRIqtxM2Wa6m9SSA1j0h0\""},{"key":"Date","value":"Tue, 01 Feb 2022 17:05:34 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"RATE_NOT_FOUND\",\n    \"data\": \"rate not found\"\n}"}],"_postman_id":"1474de70-ce01-4cb2-8a80-073629951f41"},{"name":"Upsert rates","id":"b1787ce1-7566-48ab-b567-09f835e678f9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"productId\": \"4a72e4c2-126a-4fac-9353-94fc2843d251\",\n    \"seasonId\": \"b235859b-4f50-408c-924c-47fd91bdb138\",\n    \"roomTypeId\": \"2a207e75-1698-4834-a371-29d6a65f3ea8\",\n    \"prices\": {\n        \"adult\": {\n            \"main\": [\n                { \"minOccupancy\": 1, \"pricePerUnit\": 1500 },\n                { \"minOccupancy\": 2, \"pricePerUnit\": 1300 },\n                { \"minOccupancy\": 4, \"pricePerUnit\": 1100 }\n            ],\n            \"extra\": 700\n        },\n        \"kid\": {\n            \"main\": [\n                { \"kidsPolicyId\": \"14965939-70f6-42f2-bf5d-b6176660d74b\", \"minAge\": 0, \"maxAge\": 1, \"pricePerUnit\": 1000 },\n                { \"kidsPolicyId\": \"5d73d828-c790-4f43-87aa-582e9418ed29\", \"minAge\": 2, \"maxAge\": 8, \"pricePerUnit\": 1100 },\n                { \"kidsPolicyId\": \"9e4086fc-640c-4c46-b349-d72a65570cb9\", \"minAge\": 9, \"maxAge\": 17, \"pricePerUnit\": 1200 }\n            ],\n            \"extra\": [\n                { \"kidsPolicyId\": \"14965939-70f6-42f2-bf5d-b6176660d74b\", \"minAge\": 0, \"maxAge\": 1, \"pricePerUnit\": 0 },\n                { \"kidsPolicyId\": \"5d73d828-c790-4f43-87aa-582e9418ed29\", \"minAge\": 2, \"maxAge\": 8, \"pricePerUnit\": 500 },\n                { \"kidsPolicyId\": \"9e4086fc-640c-4c46-b349-d72a65570cb9\", \"minAge\": 9, \"maxAge\": 17, \"pricePerUnit\": 500 }\n            ]\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates","description":"<p>Creates new or updates existing rates for property, season and product.</p>\n","urlObject":{"path":["rates"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"a1371e09-63a3-47fb-90ca-41647af3f47b","name":"Upsert rates 400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"productId\": \"rest\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"prices\": {\n        \"adult\": {\n            \"main\": [\n                { \"minOccupancy\": 1, \"pricePerUnit\": 1500 },\n                { \"minOccupancy\": 2, \"pricePerUnit\": 1300 },\n                { \"minOccupancy\": 4, \"pricePerUnit\": 1100 }\n            ],\n            \"extra\": 700\n        },\n        \"kid\": {\n            \"main\": [\n                {\n                    \"kidsPolicyId\": \"rivendell-infant\",\n                    \"minAge\": 0,\n                    \"maxAge\": 1,\n                    \"pricePerUnit\": 1000\n                },\n                {\n                    \"kidsPolicyId\": \"rivendell-child\",\n                    \"minAge\": 2,\n                    \"maxAge\": 8,\n                    \"pricePerUnit\": 1100\n                },\n                {\n                    \"kidsPolicyId\": \"rivendell-teen\",\n                    \"minAge\": 9,\n                    \"maxAge\": 17,\n                    \"pricePerUnit\": 1200\n                }\n            ],\n            \"extra\": [\n                {\n                    \"kidsPolicyId\": \"rivendell-infant\",\n                    \"minAge\": 0,\n                    \"maxAge\": 1,\n                    \"pricePerUnit\": 0\n                },\n                {\n                    \"kidsPolicyId\": \"rivendell-child\",\n                    \"minAge\": 2,\n                    \"maxAge\": 8,\n                    \"pricePerUnit\": 500\n                },\n                {\n                    \"kidsPolicyId\": \"rivendell-teen\",\n                    \"minAge\": 9,\n                    \"maxAge\": 17,\n                    \"pricePerUnit\": 500\n                }\n            ]\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"84"},{"key":"ETag","value":"W/\"54-IP03BqH48DTXFYccUssMvnmnDkk\""},{"key":"Date","value":"Thu, 25 Nov 2021 15:42:08 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"seasonId should not be empty\"\n}"},{"id":"35e88c76-7f75-442f-a69c-53330d1e1bb9","name":"Upsert rates 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"productId\": \"rest\",\n    \"seasonId\": \"third-age\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"prices\": {\n        \"adult\": {\n            \"main\": [\n                { \"minOccupancy\": 1, \"pricePerUnit\": 1500 },\n                { \"minOccupancy\": 2, \"pricePerUnit\": 1300 },\n                { \"minOccupancy\": 4, \"pricePerUnit\": 1100 }\n            ],\n            \"extra\": 700\n        },\n        \"kid\": {\n            \"main\": [\n                {\n                    \"kidsPolicyId\": \"rivendell-infant\",\n                    \"minAge\": 0,\n                    \"maxAge\": 1,\n                    \"pricePerUnit\": 1000\n                },\n                {\n                    \"kidsPolicyId\": \"rivendell-child\",\n                    \"minAge\": 2,\n                    \"maxAge\": 8,\n                    \"pricePerUnit\": 1100\n                },\n                {\n                    \"kidsPolicyId\": \"rivendell-teen\",\n                    \"minAge\": 9,\n                    \"maxAge\": 17,\n                    \"pricePerUnit\": 1200\n                }\n            ],\n            \"extra\": [\n                {\n                    \"kidsPolicyId\": \"rivendell-infant\",\n                    \"minAge\": 0,\n                    \"maxAge\": 1,\n                    \"pricePerUnit\": 0\n                },\n                {\n                    \"kidsPolicyId\": \"rivendell-child\",\n                    \"minAge\": 2,\n                    \"maxAge\": 8,\n                    \"pricePerUnit\": 500\n                },\n                {\n                    \"kidsPolicyId\": \"rivendell-teen\",\n                    \"minAge\": 9,\n                    \"maxAge\": 17,\n                    \"pricePerUnit\": 500\n                }\n            ]\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"652"},{"key":"ETag","value":"W/\"28c-/lt1PI0BWEc+xMCfanvtPXBcEyE\""},{"key":"Date","value":"Thu, 27 Jan 2022 13:34:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"propertyId\": \"rivendell\",\n        \"productId\": \"rest\",\n        \"seasonId\": \"third-age\",\n        \"roomTypeId\": \"house-of-elrond\",\n        \"prices\": {\n            \"adult\": {\n                \"main\": [\n                    { \"minOccupancy\": 1, \"pricePerUnit\": 1500 },\n                    { \"minOccupancy\": 2, \"pricePerUnit\": 1300 },\n                    { \"minOccupancy\": 4, \"pricePerUnit\": 1100 }\n                ],\n                \"extra\": 700\n            },\n            \"kid\": {\n                \"main\": [\n                    {\n                        \"kidsPolicyId\": \"rivendell-infant\",\n                        \"minAge\": 0,\n                        \"maxAge\": 1,\n                        \"pricePerUnit\": 1000\n                    },\n                    {\n                        \"kidsPolicyId\": \"rivendell-child\",\n                        \"minAge\": 2,\n                        \"maxAge\": 8,\n                        \"pricePerUnit\": 1100\n                    },\n                    {\n                        \"kidsPolicyId\": \"rivendell-teen\",\n                        \"minAge\": 9,\n                        \"maxAge\": 17,\n                        \"pricePerUnit\": 1200\n                    }\n                ],\n                \"extra\": [\n                    {\n                        \"kidsPolicyId\": \"rivendell-infant\",\n                        \"minAge\": 0,\n                        \"maxAge\": 1,\n                        \"pricePerUnit\": 0\n                    },\n                    {\n                        \"kidsPolicyId\": \"rivendell-child\",\n                        \"minAge\": 2,\n                        \"maxAge\": 8,\n                        \"pricePerUnit\": 500\n                    },\n                    {\n                        \"kidsPolicyId\": \"rivendell-teen\",\n                        \"minAge\": 9,\n                        \"maxAge\": 17,\n                        \"pricePerUnit\": 500\n                    }\n                ]\n            }\n        },\n        \"id\": \"rivendell-rest-third-age-house-of-elrond\",\n        \"createdAt\": \"2022-01-27T13:34:35.526Z\",\n        \"updatedAt\": \"2022-01-27T13:34:35.526Z\"\n    }\n}"}],"_postman_id":"b1787ce1-7566-48ab-b567-09f835e678f9"}],"id":"1df348fd-bb0f-4df8-809c-8f5f6ea3b9cf","_postman_id":"1df348fd-bb0f-4df8-809c-8f5f6ea3b9cf","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Calculate reservation","id":"0068e37e-ccd2-4051-9e3a-9e4bbb2ab4bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"startDate\": \"2023-08-20\",\n    \"endDate\": \"2023-08-23\",\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"roomTypeId\": \"2a207e75-1698-4834-a371-29d6a65f3ea8\",\n    \"guests\": [\n        {\n            \"ageCategory\": \"adult\",\n            \"bedType\": \"main\",\n            \"productId\": \"4a72e4c2-126a-4fac-9353-94fc2843d251\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/calculate-reservation","urlObject":{"path":["rates","calculate-reservation"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"1290445b-f126-4c9a-a97c-b7353dc727d5","name":"Calculate reservation 200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"startDate\": \"3018-06-01\",\n    \"endDate\": \"3018-07-01\",\n    \"propertyId\": \"rivendell\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"guests\": [\n        {\n            \"ageCategory\": \"adult\",\n            \"bedType\": \"main\",\n            \"productId\": \"rest\"\n        },\n        {\n            \"ageCategory\": \"kid\",\n            \"childAge\": 6,\n            \"bedType\": \"extra\",\n            \"productId\": \"rest\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/calculate-reservation"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"startDate\": \"3018-06-01\",\n        \"endDate\": \"3018-07-01\",\n        \"propertyId\": \"rivendell\",\n        \"roomTypeId\": \"house-of-elrond\",\n        \"guests\": [\n            {\n                \"ageCategory\": \"adult\",\n                \"bedType\": \"main\",\n                \"productId\": \"rest\",\n                \"costPerDayNight\": 1500,\n                \"total\": 46500\n            },\n            {\n                \"ageCategory\": \"kid\",\n                \"age\": 6,\n                \"bedType\": \"extra\",\n                \"productId\": \"rest\",\n                \"costPerDayNight\": 500,\n                \"total\": 15500\n            }\n        ],\n        \"perDay\": 2000,\n        \"total\": 62000\n    }\n}"},{"id":"6a0d44f7-d8b8-442b-afad-e8ff29ee9973","name":"Calculate reservation 404","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"startDate\": \"3018-06-01\",\n    \"endDate\": \"3018-07-01\",\n    \"propertyId\": \"rivendell\",\n    \"roomTypeId\": \"house-of-elrond\",\n    \"guests\": [\n        {\n            \"ageCategory\": \"adult\",\n            \"bedType\": \"main\",\n            \"productId\": \"rest\"\n        },\n        {\n            \"ageCategory\": \"kid\",\n            \"childAge\": 6,\n            \"bedType\": \"extra\",\n            \"productId\": \"hide-the-ring\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/rates/calculate-reservation"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"RATES_NOT_FOUND\",\n    \"data\": \"Rates not found for 3018-06-01 - 3018-07-01\"\n}"}],"_postman_id":"0068e37e-ccd2-4051-9e3a-9e4bbb2ab4bf"}],"id":"079252a5-00cd-4f39-82b6-95f9e101ca81","event":[{"listen":"prerequest","script":{"id":"e7fbc080-7737-4ab5-a327-162324df5833","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5dc484e4-7abe-413f-a4ac-018656e87d0e","type":"text/javascript","exec":[""]}}],"_postman_id":"079252a5-00cd-4f39-82b6-95f9e101ca81","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Directory Management","item":[{"name":"Room Types","item":[{"name":"Create room type","id":"69e80a22-a714-4897-8369-37c13560b5eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"name\": \"House of Elrond\",\n    \"maxOccupancy\": 10,\n    \"ext\": 10\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/room-type","urlObject":{"path":["directory","room-type"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"be9c94e8-26c5-491b-b6d2-ba11a644687f","name":"Create room type 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"name\": \"House of Elrond\",\n    \"maxOccupancy\": 10,\n    \"ext\": 10\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/room-type"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"268"},{"key":"ETag","value":"W/\"10c-oj1DnVJG07vjJE90PcMD2aQkMP8\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:11:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"house-of-elrond\",\n        \"propertyId\": \"rivendell\",\n        \"name\": \"House of Elrond\",\n        \"maxOccupancy\": 10,\n        \"ext\": 10,\n        \"createdAt\": \"2022-03-14T08:11:26.281Z\",\n        \"updatedAt\": \"2022-03-14T08:11:26.281Z\",\n        \"deletedAt\": null\n    }\n}"},{"id":"2afd57e3-ad16-4b82-ac6a-40ae7ed6185a","name":"Create room type 500","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"maxOccupancy\": 10,\n    \"ext\": 10\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/room-type"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"121"},{"key":"ETag","value":"W/\"79-AIM0gibVexmkY45O3SzIubfi/00\""},{"key":"Date","value":"Tue, 15 Mar 2022 09:44:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"Название обязательно для заполнения\"\n}"}],"_postman_id":"69e80a22-a714-4897-8369-37c13560b5eb"},{"name":"Get room type","id":"b59193f4-f31f-468a-a8df-d5568c165d52","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/directory/room-type/:id","urlObject":{"path":["directory","room-type",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"2a207e75-1698-4834-a371-29d6a65f3ea8","key":"id"}]}},"response":[{"id":"2c137ec4-3263-48b6-8890-852c97c62108","name":"Get room type 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/directory/room-type/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["directory","room-type",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"house-of-elrond"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"268"},{"key":"ETag","value":"W/\"10c-j/ChzF1enyMqIg1LOQYbk5cusF4\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:17:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"house-of-elrond\",\n        \"propertyId\": \"rivendell\",\n        \"name\": \"House of Elrond\",\n        \"maxOccupancy\": 10,\n        \"ext\": 10,\n        \"createdAt\": \"2022-03-09T16:59:50.179Z\",\n        \"updatedAt\": \"2022-03-14T07:45:54.471Z\",\n        \"deletedAt\": null\n    }\n}"},{"id":"1aa75593-bf8f-4d75-9216-0653f6bf1a90","name":"Get room type 500","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/directory/room-type/:id?propertyId=lorien","host":["http://localhost:3000"],"path":["directory","room-type",":id"],"query":[{"key":"propertyId","value":"lorien"}],"variable":[{"key":"id","value":"house-of-elrond"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-o0ly/IEi24eY5Fb8vp0MSr9ehLQ\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:18:16 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"RoomType not found\"\n}"}],"_postman_id":"b59193f4-f31f-468a-a8df-d5568c165d52"},{"name":"Update room type","id":"a7871def-2f6f-42cf-8349-32129c2c8b9d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"name\": \"House of Elrond\",\n    \"maxOccupancy\": 10,\n    \"ext\": 10\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/room-type/:id","urlObject":{"path":["directory","room-type",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"2a207e75-1698-4834-a371-29d6a65f3ea8","key":"id"}]}},"response":[{"id":"49ac5eea-def8-4eb0-bc61-a7a027ecfb86","name":"Update room type 500","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"lorien\",\n    \"name\": \"House of Elrond\",\n    \"maxOccupancy\": 10,\n    \"ext\": 10\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/directory/room-type/:id","host":["http://localhost:3000"],"path":["directory","room-type",":id"],"variable":[{"key":"id","value":"house-of-elrond"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-o0ly/IEi24eY5Fb8vp0MSr9ehLQ\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:19:20 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"RoomType not found\"\n}"},{"id":"d3be8701-90f2-4988-b17d-d02d5dc7aeed","name":"Update room type 200","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"propertyId\": \"rivendell\",\n    \"name\": \"House of Elrond\",\n    \"maxOccupancy\": 10,\n    \"ext\": 10\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/directory/room-type/:id","host":["http://localhost:3000"],"path":["directory","room-type",":id"],"variable":[{"key":"id","value":"house-of-elrond"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"268"},{"key":"ETag","value":"W/\"10c-j/ChzF1enyMqIg1LOQYbk5cusF4\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:19:55 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"house-of-elrond\",\n        \"propertyId\": \"rivendell\",\n        \"name\": \"House of Elrond\",\n        \"maxOccupancy\": 10,\n        \"ext\": 10,\n        \"createdAt\": \"2022-03-09T16:59:50.179Z\",\n        \"updatedAt\": \"2022-03-14T07:45:54.471Z\",\n        \"deletedAt\": null\n    }\n}"}],"_postman_id":"a7871def-2f6f-42cf-8349-32129c2c8b9d"},{"name":"Remove room type","id":"282721e0-b442-4cc8-af7c-583a27e77880","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/directory/room-type/:id","urlObject":{"path":["directory","room-type",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"2a207e75-1698-4834-a371-29d6a65f3ea8","key":"id"}]}},"response":[{"id":"8d606b24-ec30-4d78-abf4-7f3a73714f5d","name":"Remove room type 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/directory/room-type/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["directory","room-type",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"house-of-elrond"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:24:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"},{"id":"92d216d8-9def-47da-8e48-0ef9d5a1d410","name":"Remove room type 500","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/directory/room-type/:id?propertyId=lorien","host":["http://localhost:3000"],"path":["directory","room-type",":id"],"query":[{"key":"propertyId","value":"lorien"}],"variable":[{"key":"id","value":"house-of-elrond"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-o0ly/IEi24eY5Fb8vp0MSr9ehLQ\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:24:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"RoomType not found\"\n}"}],"_postman_id":"282721e0-b442-4cc8-af7c-583a27e77880"},{"name":"Get all room types","id":"750e5ed2-341d-4436-a187-8c43135bb3a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/directory/room-type?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619","urlObject":{"path":["directory","room-type"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"}],"variable":[]}},"response":[{"id":"83dab57b-5f4f-4255-b640-2dd03f3b375a","name":"Get all room types 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/directory/room-type?propertyId=rivendell","host":["http://localhost:3000"],"path":["directory","room-type"],"query":[{"key":"propertyId","value":"rivendell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"763"},{"key":"ETag","value":"W/\"2fb-DX1G+uqIuwNFXBFEc0KOI2Qzr8U\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:22:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"house-of-glorfindel\",\n            \"propertyId\": \"rivendell\",\n            \"name\": \"House of Glorfindel\",\n            \"maxOccupancy\": 10,\n            \"ext\": 5,\n            \"createdAt\": \"2022-03-09T16:59:50.178Z\",\n            \"updatedAt\": \"2022-03-09T16:59:50.178Z\",\n            \"deletedAt\": null\n        },\n        {\n            \"id\": \"house-of-elrond\",\n            \"propertyId\": \"rivendell\",\n            \"name\": \"House of Elrond\",\n            \"maxOccupancy\": 10,\n            \"ext\": 10,\n            \"createdAt\": \"2022-03-09T16:59:50.179Z\",\n            \"updatedAt\": \"2022-03-14T07:45:54.471Z\",\n            \"deletedAt\": null\n        }\n    ]\n}"}],"_postman_id":"750e5ed2-341d-4436-a187-8c43135bb3a1"},{"name":"Bulk create room types","id":"da883efc-6097-443f-bed7-c965ef631dcb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bulk\": [\n        {\n            \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n            \"name\": \"House of Glorfindel\",\n            \"maxOccupancy\": 5,\n            \"ext\": 4\n        },\n        {\n            \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n            \"name\": \"House of Elrond\",\n            \"maxOccupancy\": 10,\n            \"ext\": 10\n        }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/room-type/bulk","urlObject":{"path":["directory","room-type","bulk"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"c0e8e15f-78d1-445d-8876-0562e1cc86a0","name":"Bulk create room types 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bulk\": [\n        {\n            \"propertyId\": \"rivendell\",\n            \"name\": \"House of Glorfindel\",\n            \"maxOccupancy\": 5,\n            \"ext\": 4\n        },\n        {\n            \"propertyId\": \"rivendell\",\n            \"name\": \"House of Elrond\",\n            \"maxOccupancy\": 10,\n            \"ext\": 10\n        }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/directory/room-type/bulk?propertyId=rivendell","host":["http://localhost:3000"],"path":["directory","room-type","bulk"],"query":[{"key":"propertyId","value":"rivendell"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"517"},{"key":"ETag","value":"W/\"205-c6q0zx2w3CL9EBjrxeRq5WFYp18\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:25:32 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"propertyId\": \"rivendell\",\n            \"name\": \"House of Glorfindel\",\n            \"maxOccupancy\": 5,\n            \"ext\": 4,\n            \"deletedAt\": null,\n            \"id\": \"house-of-glorfindel\",\n            \"createdAt\": \"2022-03-14T08:25:32.107Z\",\n            \"updatedAt\": \"2022-03-14T08:25:32.107Z\"\n        },\n        {\n            \"propertyId\": \"rivendell\",\n            \"name\": \"House of Elrond\",\n            \"maxOccupancy\": 10,\n            \"ext\": 10,\n            \"deletedAt\": null,\n            \"id\": \"house-of-elrond\",\n            \"createdAt\": \"2022-03-14T08:25:32.107Z\",\n            \"updatedAt\": \"2022-03-14T08:25:32.107Z\"\n        }\n    ]\n}"}],"_postman_id":"da883efc-6097-443f-bed7-c965ef631dcb"}],"id":"59d94b31-5bea-48de-a825-7378b840f282","_postman_id":"59d94b31-5bea-48de-a825-7378b840f282","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Products","item":[{"name":"Create product","id":"531bdf9f-25c6-4912-894e-a42d4078fdc5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"rest\",\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/product/","urlObject":{"path":["directory","product",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"4acbe927-c7ae-4a5b-8669-a09b38dcc8e8","name":"Create product 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Rest\",\n    \"propertyId\": \"rivendell\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/product/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"230"},{"key":"ETag","value":"W/\"e6-kBPWnlIo2PFI8uaIo4Fc+czTjJA\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:43:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rest\",\n        \"name\": \"Rest\",\n        \"propertyId\": \"rivendell\",\n        \"createdAt\": \"2022-03-14T08:43:44.276Z\",\n        \"updatedAt\": \"2022-03-14T08:43:44.276Z\",\n        \"deletedAt\": null\n    }\n}"}],"_postman_id":"531bdf9f-25c6-4912-894e-a42d4078fdc5"},{"name":"Get product","id":"5aa58f29-c02e-4d4b-ac2c-fe88eeabfe98","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/directory/product/:id","urlObject":{"path":["directory","product",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"4a72e4c2-126a-4fac-9353-94fc2843d251","key":"id"}]}},"response":[{"id":"0bd70c41-13a3-40fb-b3de-4f1ee9b29bf3","name":"Get product 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/directory/product/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["directory","product",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"hide-the-ring"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"239"},{"key":"ETag","value":"W/\"ef-Rqddmho6zvnoPiDiMJhTVD2dwBE\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:33:22 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"hide-ring\",\n        \"name\": \"Hide the Ring\",\n        \"propertyId\": \"rivendell\",\n        \"createdAt\": \"2022-03-09T16:59:50.195Z\",\n        \"updatedAt\": \"2022-03-10T13:27:27.130Z\",\n        \"deletedAt\": null\n    }\n}"},{"id":"115fb82d-2e27-4890-998f-3a389a6c89dc","name":"Get product 500","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/directory/product/:id?propertyId=lorien","host":["http://localhost:3000"],"path":["directory","product",":id"],"query":[{"key":"propertyId","value":"lorien"}],"variable":[{"key":"id","value":"hide-the-ring"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"71"},{"key":"ETag","value":"W/\"47-wy+kwFRSLzJeGSHa1BIbw30MLwc\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:42:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"Product not found\"\n}"}],"_postman_id":"5aa58f29-c02e-4d4b-ac2c-fe88eeabfe98"},{"name":"Update product","id":"f9d1e18f-958b-498d-8f74-759ceb8b2397","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"hide the ring\",\n    \"propertyId\": \"47760976-ea2d-41b6-a320-690e02c08fc6\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/product/:id","urlObject":{"path":["directory","product",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"4a72e4c2-126a-4fac-9353-94fc2843d251","key":"id"}]}},"response":[{"id":"663864e5-28bc-4253-88b3-ced322e83341","name":"Update product 200","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Hide the Ring\",\n    \"propertyId\": \"rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/directory/product/:id","host":["http://localhost:3000"],"path":["directory","product",":id"],"variable":[{"key":"id","value":"hide-the-ring"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"239"},{"key":"ETag","value":"W/\"ef-Rqddmho6zvnoPiDiMJhTVD2dwBE\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:30:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"hide-the-ring\",\n        \"name\": \"Hide the Ring\",\n        \"propertyId\": \"rivendell\",\n        \"createdAt\": \"2022-03-09T16:59:50.195Z\",\n        \"updatedAt\": \"2022-03-10T13:27:27.130Z\",\n        \"deletedAt\": null\n    }\n}"},{"id":"1b0cc58a-b6e3-47ba-bfee-ccfc10066eb9","name":"Update product 500","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"hide the ring\",\n    \"propertyId\": \"lorien\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/directory/product/:id","host":["http://localhost:3000"],"path":["directory","product",":id"],"variable":[{"key":"id","value":"hide-ring"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"71"},{"key":"ETag","value":"W/\"47-wy+kwFRSLzJeGSHa1BIbw30MLwc\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:32:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"Product not found\"\n}"}],"_postman_id":"f9d1e18f-958b-498d-8f74-759ceb8b2397"},{"name":"Remove product","id":"03129653-9106-404c-9eb3-cf95f4f9fb6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/directory/product/:id","urlObject":{"path":["directory","product",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"4a72e4c2-126a-4fac-9353-94fc2843d251","key":"id"}]}},"response":[{"id":"6dce08e8-83fd-4247-bbf4-1dbff95d239f","name":"Remove product 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/directory/product/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["directory","product",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"hide-the-ring"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:29:25 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"},{"id":"96623ac4-dab3-4961-85c2-886341e9d0cf","name":"Remove product 500","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/directory/product/:id?propertyId=lorien","host":["http://localhost:3000"],"path":["directory","product",":id"],"query":[{"key":"propertyId","value":"lorien"}],"variable":[{"key":"id","value":"hide-the-ring"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"71"},{"key":"ETag","value":"W/\"47-wy+kwFRSLzJeGSHa1BIbw30MLwc\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:29:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"Product not found\"\n}"}],"_postman_id":"03129653-9106-404c-9eb3-cf95f4f9fb6a"},{"name":"Get all products","id":"252577f4-25a1-4fc5-8494-e7b09d3e9740","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/directory/product?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619","urlObject":{"path":["directory","product"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"}],"variable":[]}},"response":[{"id":"84bdaf0a-f0a1-4788-ac1c-9e0ae18ba8a8","name":"Get all products 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/directory/product?propertyId=rivendell","host":["http://localhost:3000"],"path":["directory","product"],"query":[{"key":"propertyId","value":"rivendell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1277"},{"key":"ETag","value":"W/\"4fd-6JPXV9nZvG+O4R52IiSJgQNtvqY\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:26:42 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"study\",\n            \"name\": \"Study\",\n            \"propertyId\": \"rivendell\",\n            \"createdAt\": \"2022-03-09T16:59:50.195Z\",\n            \"updatedAt\": \"2022-03-09T16:59:50.195Z\",\n            \"deletedAt\": null\n        },\n        {\n            \"id\": \"hide-the-ring\",\n            \"name\": \"Hide the Ring\",\n            \"propertyId\": \"rivendell\",\n            \"createdAt\": \"2022-03-09T16:59:50.196Z\",\n            \"updatedAt\": \"2022-03-09T16:59:50.196Z\",\n            \"deletedAt\": null\n        },\n        {\n            \"id\": \"rest\",\n            \"name\": \"Rest\",\n            \"propertyId\": \"rivendell\",\n            \"createdAt\": \"2022-03-09T17:11:15.854Z\",\n            \"updatedAt\": \"2022-03-09T17:11:15.854Z\",\n            \"deletedAt\": null\n        }\n    ]\n}"}],"_postman_id":"252577f4-25a1-4fc5-8494-e7b09d3e9740"},{"name":"Bulk create products","id":"b9a31529-372c-4f65-8b00-44b8c18341b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bulk\": [\n        {\n            \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n            \"name\": \"rest\"\n        },\n        { \n            \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n            \"name\": \"hide the ring\"\n        }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/product/bulk","urlObject":{"path":["directory","product","bulk"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"f66f4b54-ce19-41df-b0d3-80cebeafa873","name":"Bulk create products 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bulk\": [\n        {\n            \"propertyId\": \"rivendell\",\n            \"name\": \"Rest\"\n        },\n        { \n            \"propertyId\": \"rivendell\",\n            \"name\": \"Hide the Ring\"\n        }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/directory/product/bulk?propertyId=rivendell","host":["http://localhost:3000"],"path":["directory","product","bulk"],"query":[{"key":"propertyId","value":"rivendell"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"448"},{"key":"ETag","value":"W/\"1c0-1A24EswvKGlR3utmsJkEdTAywmM\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:28:14 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"propertyId\": \"rivendell\",\n            \"name\": \"Rest\",\n            \"deletedAt\": null,\n            \"id\": \"rest\",\n            \"createdAt\": \"2022-03-14T08:28:14.066Z\",\n            \"updatedAt\": \"2022-03-14T08:28:14.066Z\"\n        },\n        {\n            \"propertyId\": \"rivendell\",\n            \"name\": \"Hide the Ring\",\n            \"deletedAt\": null,\n            \"id\": \"hide-the-ring\",\n            \"createdAt\": \"2022-03-14T08:28:14.066Z\",\n            \"updatedAt\": \"2022-03-14T08:28:14.066Z\"\n        }\n    ]\n}"}],"_postman_id":"b9a31529-372c-4f65-8b00-44b8c18341b6"}],"id":"1b6c4a76-87b9-4f16-a148-7205eec6581e","event":[{"listen":"prerequest","script":{"id":"8b1b683c-df68-42e3-8c20-ed2dc7842208","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ae867f9f-3b8a-4239-a726-397d0e30fc04","type":"text/javascript","exec":[""]}}],"_postman_id":"1b6c4a76-87b9-4f16-a148-7205eec6581e","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}}],"id":"4616f784-d51a-496b-8662-f93f4e3159d7","_postman_id":"4616f784-d51a-496b-8662-f93f4e3159d7","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Administration","item":[{"name":"Users Management","item":[{"name":"Create user","event":[{"listen":"test","script":{"id":"0c0cb6f6-0846-4caa-87d3-5a79c7093434","exec":["const url = `${pm.variables.get('base_url')}/user`;","const method = 'POST';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const gandalfTheWhite = {","    email: \"gandalf-the-white@middle.earth\",","    password: \"passwd\"","}","const existingElrond = {","    email: \"elrond@middle.earth\",","    password: \"passwd\"","}","const sarumanWithoutPassword = {","    email: \"saruman@middle.earth\"","}","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(gandalfTheWhite)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and user data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.have.property(\"id\");","        pm.expect(response.json().data.email).to.eql(gandalfTheWhite.email);","    });","});","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(existingElrond)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if duplicate email\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"USER_ALREADY_EXISTS\");","        pm.expect(response.json().data).to.eql(\"Duplicate data for: email\");","    });","});","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(sarumanWithoutPassword)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not enough data\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"COMMON.ERROR\");","        pm.expect(response.json().data).to.eql(\"password should not be empty\");","    });","});",""],"type":"text/javascript"}}],"id":"c0c73ecc-54d4-459a-a5e4-1b886ea72ae3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"bilbo@middle.earth\",\n    \"phone\": \"+79111111111\",\n    \"firstName\": \"Bilbo\",\n    \"lastName\": \"Baggins\",\n    \"avatar\": \"https://cdnb.artstation.com/p/assets/covers/images/022/599/045/large/espen-netland-jakobsen-final-02.jpg?1576091415\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user","description":"<p>Creates new user.</p>\n<ul>\n<li>email - user email</li>\n<li>name - user's name</li>\n<li>password - user's password</li>\n</ul>\n","urlObject":{"path":["user"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"f3570055-3c34-4afe-a1b7-a03b98883883","name":"Create user 400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"phone\": \"+79111111111\",\n    \"firstName\": \"Gandalf\",\n    \"lastName\": \"the Grey\",\n    \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/user?propertyId=rivendell","host":["http://localhost:3000"],"path":["user"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"79"},{"key":"ETag","value":"W/\"4f-WvC7vnso49v3y2pgjgmP+LgYfKg\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:25:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"email should not be empty\"\n}"},{"id":"f7f0eca2-03fb-4538-bf3c-1d223f24ac4d","name":"Create user 409","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"phone\": \"+79111111111\",\n    \"firstName\": \"Gandalf\",\n    \"lastName\": \"the Grey\",\n    \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/user?propertyId=rivendell","host":["http://localhost:3000"],"path":["user"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}]}},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"86"},{"key":"ETag","value":"W/\"56-nYAgg/8eNyO2RRmPuN9B7CoWvV8\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:34:23 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"USER_ALREADY_EXISTS\",\n    \"data\": \"Duplicate data for: email\"\n}"},{"id":"61b1de2f-bc21-4e85-9c3f-5000af3f99d3","name":"Create user 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"phone\": \"+79111111111\",\n    \"firstName\": \"Gandalf\",\n    \"lastName\": \"the Grey\",\n    \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/user?propertyId=rivendell","host":["http://localhost:3000"],"path":["user"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"444"},{"key":"ETag","value":"W/\"1bc-Vo8yJ7IYruRxxOu1mOay7Fbh+AA\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:34:59 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"email\": \"gandalf@middle.earth\",\n        \"phone\": \"+79111111111\",\n        \"firstName\": \"Gandalf\",\n        \"lastName\": \"the Grey\",\n        \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n        \"password\": \"$2b$10$./Shvzaaostx1kwYOBFV.O1iN8HHWRYH0RD/xZ0Y/s6y8C3PtxdbG\",\n        \"deletedAt\": null,\n        \"id\": \"gandalf\",\n        \"createdAt\": \"2022-03-22T02:34:59.523Z\",\n        \"updatedAt\": \"2022-03-22T02:34:59.523Z\"\n    }\n}"}],"_postman_id":"c0c73ecc-54d4-459a-a5e4-1b886ea72ae3"},{"name":"Update user","event":[{"listen":"test","script":{"id":"7d955acb-0097-4e70-9ff0-bca91c5a6ad2","exec":["const url = `${pm.variables.get('base_url')}/user/`;","const method = 'PUT';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const gandalf = {","    email: \"gandalf@middle.earth\",","    password: \"passwd\"","};","const elrond = {","    email: \"elrond@middle.earth\",","    password: \"passwd\"","};","","const gandalfId = 'f8f2934c-7588-4079-93e1-ba7f87caca8f';","const unknownSarumanId = 'abcdef33-7588-4079-93e1-adcdef123456';","","pm.sendRequest({","    url: url + gandalfId,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(gandalf)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and user data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.have.property(\"id\");","        pm.expect(response.json().data.email).to.eql(gandalf.email);","    });","});","","pm.sendRequest({","    url: url + gandalfId,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(elrond)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if duplicate email\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"USER_ALREADY_EXISTS\");","        pm.expect(response.json().data).to.eql(\"Duplicate data for: email\");","","    });","});","","pm.sendRequest({","    url: url + unknownSarumanId,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(gandalf)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not found\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"USER_NOT_FOUND\");","        pm.expect(response.json().data).to.eql(\"User not found\");","    });","});",""],"type":"text/javascript"}}],"id":"dc031052-49bc-42b0-9d9a-c316468e9442","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"elrond@middle.earth\",\n    \"avatar\": \"https://i.pinimg.com/originals/26/93/09/2693091a0414ecd8caa2e4f634132e84.jpg\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user/:id","description":"<p>Updates existing user.</p>\n<ul>\n<li>email - user email</li>\n<li>name - user's name</li>\n<li>password - user's password</li>\n</ul>\n","urlObject":{"path":["user",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"89873f48-0564-4cc4-b69d-0824b11efbda","key":"id"}]}},"response":[{"id":"bb925333-4834-46b3-aa82-532681e2338b","name":"Update user 200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"phone\": \"+79111111112\",\n    \"firstName\": \"Gandalf\",\n    \"lastName\": \"the Grey\",\n    \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/user/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["user",":id"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}],"variable":[{"key":"id","value":"gandalf"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"438"},{"key":"ETag","value":"W/\"1b6-SFn2/APplaqHtflqd4Rl/loe6RM\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:00:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"gandalf\",\n        \"email\": \"gandalf@middle.earth\",\n        \"phone\": \"+79111111112\",\n        \"password\": \"$2b$10$RwMnhC/HpKIle2FEqwEwHu1EgJe3incAfO9Dy/aLIUvlAOhBUbJDO\",\n        \"firstName\": \"Gandalf\",\n        \"lastName\": \"the Grey\",\n        \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n        \"createdAt\": \"2022-03-22T00:00:16.424Z\",\n        \"updatedAt\": \"2022-03-22T00:00:53.074Z\",\n        \"deletedAt\": null\n    }\n}"},{"id":"a1d6d719-0db2-496f-8ff9-cf2666195e9d","name":"Update user 404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"phone\": \"+79111111112\",\n    \"firstName\": \"Gandalf\",\n    \"lastName\": \"the Grey\",\n    \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/user/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["user",":id"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}],"variable":[{"key":"id","value":"saruman"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"70"},{"key":"ETag","value":"W/\"46-gyz5+Oguxjved057Flm8GEWEfTk\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:09:16 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"USER_NOT_FOUND\",\n    \"data\": \"User not found\"\n}"},{"id":"c033eece-474c-43c8-b49c-e2d47c3752f2","name":"Update user 409","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf-white@middle.earth\",\n    \"phone\": \"+79111111112\",\n    \"firstName\": \"Gandalf\",\n    \"lastName\": \"the Grey\",\n    \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/user/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["user",":id"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}],"variable":[{"key":"id","value":"gandalf"}]}},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"86"},{"key":"ETag","value":"W/\"56-nYAgg/8eNyO2RRmPuN9B7CoWvV8\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:36:51 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"USER_ALREADY_EXISTS\",\n    \"data\": \"Duplicate data for: email\"\n}"}],"_postman_id":"dc031052-49bc-42b0-9d9a-c316468e9442"},{"name":"Get user","event":[{"listen":"test","script":{"id":"d12f2db1-ccf4-41c3-bb1b-f8474cdb214b","exec":["const url = `${pm.variables.get('base_url')}/user/`;","const method = 'GET';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const gandalfId = 'f8f2934c-7588-4079-93e1-ba7f87caca8f';","const unknownSarumanId = 'abcdef33-7588-4079-93e1-adcdef123456';","","pm.sendRequest({","    url: url + gandalfId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return user data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.have.property(\"id\");","        pm.expect(response.json().data).to.have.property(\"email\");","    });","});","","pm.sendRequest({","    url: url + unknownSarumanId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not found\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"USER_NOT_FOUND\");","        pm.expect(response.json().data).to.eql(\"User not found\");","    });","});",""],"type":"text/javascript"}}],"id":"1b6bd51a-ddd3-4c71-8457-b960a8085b65","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/user/:id","urlObject":{"path":["user",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"f8f2934c-7588-4079-93e1-ba7f87caca8f","key":"id"}]}},"response":[{"id":"75c1e94c-b95e-49f5-b1d6-1bc0c141e7ff","name":"Get user 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/user/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["user",":id"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}],"variable":[{"key":"id","value":"gandalf"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"438"},{"key":"ETag","value":"W/\"1b6-uj7BRrOhCI2S/9tqlCA2DJACVBE\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:37:21 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"gandalf\",\n        \"email\": \"gandalf@middle.earth\",\n        \"password\": \"$2b$10$0/hBMA1uhXjBV4.0cE0aIuBPk.TFW64bBJNt66.QowyLgL60b1QVq\",\n        \"phone\": \"+79111111112\",\n        \"firstName\": \"Gandalf\",\n        \"lastName\": \"the Grey\",\n        \"avatar\": \"https://cms.qz.com/wp-content/uploads/2018/08/gandalf-lord-of-the-rings-e1534255368438.jpg\",\n        \"createdAt\": \"2022-03-22T02:25:29.409Z\",\n        \"updatedAt\": \"2022-03-22T02:36:37.100Z\",\n        \"deletedAt\": null\n    }\n}"},{"id":"39b49cb9-bd24-438f-9b09-8bdd2c063400","name":"Get user 404","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/user/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["user",":id"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}],"variable":[{"key":"id","value":"saruman"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"70"},{"key":"ETag","value":"W/\"46-gyz5+Oguxjved057Flm8GEWEfTk\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:37:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"USER_NOT_FOUND\",\n    \"data\": \"User not found\"\n}"}],"_postman_id":"1b6bd51a-ddd3-4c71-8457-b960a8085b65"},{"name":"Delete user","event":[{"listen":"test","script":{"id":"81511fc3-9c5d-44af-90f9-8ae4dfba889f","exec":["const url = `${pm.variables.get('base_url')}/user/`;","const method = 'DELETE';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const elrondId = '89873f48-0564-4cc4-b69d-0824b11efbda';","const unknownSarumanId = 'abcdef33-7588-4079-93e1-adcdef123456';","","pm.sendRequest({","    url: url + elrondId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return true if deleted\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.be.true;","    });","});","","pm.sendRequest({","    url: url + unknownSarumanId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return false if not deleted\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.be.false;","    });","});",""],"type":"text/javascript"}}],"id":"291264c0-75b5-4cb8-b1f4-ebb7b9ba7092","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/user/:id","description":"<p>Deletes user if existed.</p>\n","urlObject":{"path":["user",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"f8f2934c-7588-4079-93e1-ba7f87caca33","key":"id"}]}},"response":[{"id":"a2a867cf-5f0f-431c-9bf5-632e99a63c19","name":"Delete user 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/user/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["user",":id"],"query":[{"key":"propertyId","value":"rivendell","type":"text"}],"variable":[{"key":"id","value":"gandalf"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"29"},{"key":"ETag","value":"W/\"1d-e+nIlHTk+FJjlXA6rMMRZaSPbH8\""},{"key":"Date","value":"Tue, 22 Mar 2022 02:38:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": true\n}"}],"_postman_id":"291264c0-75b5-4cb8-b1f4-ebb7b9ba7092"},{"name":"Get list of users","event":[{"listen":"test","script":{"id":"c913300a-365c-4394-b26b-6374ba3c89c8","exec":["const url = `${pm.variables.get('base_url')}/user?propertyId=${pm.variables.get('propertyId')}`;","const method = 'GET';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","pm.sendRequest({","    url,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return list of users\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.have.property(\"data\");","        pm.expect(response.json().data).to.have.property(\"total\");","    });","});",""],"type":"text/javascript"}}],"id":"460e6146-ec0a-4081-b836-e3292fb2be0a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/user?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619&pageSize=2&pageNumber=1","description":"<p>Returns paginated list of users.</p>\n","urlObject":{"path":["user"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"},{"key":"pageSize","value":"2"},{"key":"pageNumber","value":"1"}],"variable":[]}},"response":[{"id":"d667f81d-793b-40f0-b3b1-c1cc463a3fc9","name":"Get list of users 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/user?propertyId=rivendell&pageSize=2&pageNumber=1","host":["http://localhost:3000"],"path":["user"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"pageSize","value":"2"},{"key":"pageNumber","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"929"},{"key":"ETag","value":"W/\"3a1-RtiG561bLGmbdIwmE6RSmL9PM0k\""},{"key":"Date","value":"Fri, 08 Jul 2022 06:52:39 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"data\": [\n            {\n                \"id\": \"gandalf\",\n                \"email\": \"gandalf@middle.earth\",\n                \"password\": \"$2b$10$b0Y7efgJ9XC1jXDiVgC7deb8.uiNSy0ToYiA1ZJyGUTAjG0L9OFcK\",\n                \"phone\": \"+79111111112\",\n                \"firstName\": \"Gandalf\",\n                \"lastName\": \"the Grey\",\n                \"avatar\": \"https://static.wikia.nocookie.net/lotr/images/e/e7/Gandalf_the_Grey.jpg/revision/latest?cb=20121110131754\",\n                \"createdAt\": \"2022-06-10T11:54:54.765Z\",\n                \"updatedAt\": \"2022-06-10T11:54:54.765Z\",\n                \"deletedAt\": null\n            },\n            {\n                \"id\": \"elrond\",\n                \"email\": \"elrond@middle.earth\",\n                \"password\": \"$2b$10$b0Y7efgJ9XC1jXDiVgC7deb8.uiNSy0ToYiA1ZJyGUTAjG0L9OFcK\",\n                \"phone\": \"+79111111112\",\n                \"firstName\": \"Elrond\",\n                \"lastName\": \"Peredhel\",\n                \"avatar\": \"https://static.wikia.nocookie.net/lotr/images/9/9f/Elrond_of_Rivendell.jpg/revision/latest/scale-to-width-down/322?cb=20130202120854\",\n                \"createdAt\": \"2022-06-10T11:54:54.758Z\",\n                \"updatedAt\": \"2022-06-10T11:54:54.758Z\",\n                \"deletedAt\": null\n            }\n        ],\n        \"total\": 2\n    }\n}"}],"_postman_id":"460e6146-ec0a-4081-b836-e3292fb2be0a"}],"id":"7ee65089-8ebe-4610-afc4-952a8a7a51a6","_postman_id":"7ee65089-8ebe-4610-afc4-952a8a7a51a6","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Properties Management","item":[{"name":"Create property","event":[{"listen":"test","script":{"id":"71126826-b49c-490d-ad52-42cea0197988","exec":["const url = `${pm.variables.get('base_url')}/directory/property`;","const method = 'POST';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const hobbiton = {","    name: 'Hobbiton'","}","const emptyProperty = {}","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(hobbiton)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and property data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.have.property(\"id\");","        pm.expect(response.json().data.name).to.eql(hobbiton.name);","    });","});","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(emptyProperty)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not enough data\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"COMMON.ERROR\");","        pm.expect(response.json().data).to.eql(\"Имя обязательно для заполнения\");","    });","});",""],"type":"text/javascript"}}],"id":"2f0f7fee-81db-4225-b387-0fb4d1fd59d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/property/","urlObject":{"path":["directory","property",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"6639d434-959b-493d-a81d-08a19b5374c9","name":"Create property 500","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/property/"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"82"},{"key":"ETag","value":"W/\"52-yweYHhJfuyomL1puDPEiXhVNJkk\""},{"key":"Date","value":"Mon, 14 Mar 2022 07:55:48 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"Empty data. Nothing to save.\"\n}"},{"id":"d3f66f3c-e450-47eb-b9e0-86367365de47","name":"Create property 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/property/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"183"},{"key":"ETag","value":"W/\"b7-Nm113zIOeRdAGjlo439a8UA01H4\""},{"key":"Date","value":"Mon, 14 Mar 2022 07:56:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rivendell\",\n        \"name\": \"Rivendell\",\n        \"createdAt\": \"2022-03-14T07:56:17.892Z\",\n        \"updatedAt\": \"2022-03-14T07:56:17.892Z\",\n        \"deletedAt\": null\n    }\n}"}],"_postman_id":"2f0f7fee-81db-4225-b387-0fb4d1fd59d4"},{"name":"Get property","event":[{"listen":"test","script":{"id":"0a925e04-8533-41a6-a80c-a60b4a55b199","exec":["const url = `${pm.variables.get('base_url')}/directory/property/`;","const method = 'GET';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const rivendell = {","    name: 'Rivendell'","}","const rivendellId = '9093a8ba-6337-4ad8-aa3b-1de095cdd619';","const unknownPropertyId = 'abcdef12-6337-4ad8-aa3b-abcdef123456';","","pm.sendRequest({","    url: url + rivendellId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and property data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data.id).to.eql(rivendellId);","        pm.expect(response.json().data.name).to.eql(rivendell.name);","    });","});","","pm.sendRequest({","    url: url + unknownPropertyId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not found\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"COMMON.ERROR\");","        pm.expect(response.json().data).to.eql(\"Property not found\");","    });","});",""],"type":"text/javascript"}}],"id":"d7e10ab3-d272-4338-95a1-b3b752d5a02c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/directory/property/:id","urlObject":{"path":["directory","property",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619","key":"id"}]}},"response":[{"id":"477d396b-d05f-4d2a-a52a-01ff335978d4","name":"Get property 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/directory/property/:id","host":["http://localhost:3000"],"path":["directory","property",":id"],"variable":[{"key":"id","value":"rivendell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"183"},{"key":"ETag","value":"W/\"b7-B1dDasAG3Gsr3reSRvOdIk5LoU0\""},{"key":"Date","value":"Mon, 14 Mar 2022 07:56:51 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rivendell\",\n        \"name\": \"Rivendell\",\n        \"createdAt\": \"2022-03-09T16:59:50.158Z\",\n        \"updatedAt\": \"2022-03-10T12:24:28.264Z\",\n        \"deletedAt\": null\n    }\n}"},{"id":"4f43f1dd-c34d-40a2-a072-77a40f6ea7a7","name":"Get property 500","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/directory/property/:id","host":["http://localhost:3000"],"path":["directory","property",":id"],"variable":[{"key":"id","value":"lothlorien"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-dTP4HHFp52g7ZvLO58TKYENXuZw\""},{"key":"Date","value":"Mon, 14 Mar 2022 07:57:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"Property not found\"\n}"}],"_postman_id":"d7e10ab3-d272-4338-95a1-b3b752d5a02c"},{"name":"Update property","event":[{"listen":"test","script":{"id":"67c6cd93-01a3-437e-af30-f8e1696d85f6","exec":["const url = `${pm.variables.get('base_url')}/directory/property/`;","const method = 'PATCH';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const rivendell = {","    name: \"Rivendell\"","}","const rivendellId = '9093a8ba-6337-4ad8-aa3b-1de095cdd619';","const unknownPropertyId = 'abcdef12-6337-4ad8-aa3b-abcdef123456';","","pm.sendRequest({","    url: url + rivendellId,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(rivendell)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and property data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.have.property(\"id\");","        pm.expect(response.json().data.name).to.eql(rivendell.name);","    });","});","","pm.sendRequest({","    url: url + unknownPropertyId,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(rivendell)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not found\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"COMMON.ERROR\");","        pm.expect(response.json().data).to.eql(\"Property not found\");","    });","});",""],"type":"text/javascript"}}],"id":"eeae7f8c-0c42-4be4-ae1f-a22525d9b21a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/property/:id","urlObject":{"path":["directory","property",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619","key":"id"}]}},"response":[{"id":"0e37b22d-fdd8-418c-b6bf-068c2c6d0c56","name":"Update property 200","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/directory/property/:id","host":["http://localhost:3000"],"path":["directory","property",":id"],"variable":[{"key":"id","value":"rivendell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"183"},{"key":"ETag","value":"W/\"b7-B1dDasAG3Gsr3reSRvOdIk5LoU0\""},{"key":"Date","value":"Mon, 14 Mar 2022 07:44:42 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rivendell\",\n        \"name\": \"Rivendell\",\n        \"createdAt\": \"2022-03-09T16:59:50.158Z\",\n        \"updatedAt\": \"2022-03-10T12:24:28.264Z\",\n        \"deletedAt\": null\n    }\n}"},{"id":"a149597d-8d18-40d7-9a10-bb15253c91c5","name":"Update property 500","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Rivendell\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/directory/property/:id","host":["http://localhost:3000"],"path":["directory","property",":id"],"variable":[{"key":"id","value":"lothlorien"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"69"},{"key":"ETag","value":"W/\"45-g/0GMu+BMkmBupwv+/g5zuAK4kA\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:00:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"statusCode\": 404,\n    \"message\": \"Property not found\",\n    \"error\": \"Not Found\"\n}"}],"_postman_id":"eeae7f8c-0c42-4be4-ae1f-a22525d9b21a"},{"name":"Remove property","event":[{"listen":"test","script":{"id":"2c49f92d-4d96-40d9-9862-6be66744b752","exec":["const url = `${pm.variables.get('base_url')}/directory/property/`;","const method = 'DELETE';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const rivendellId = '9093a8ba-6337-4ad8-aa3b-1de095cdd619';","const unknownPropertyId = 'abcdef12-6337-4ad8-aa3b-abcdef123456';","","pm.sendRequest({","    url: url + rivendellId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success if deleted\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","    });","});","","pm.sendRequest({","    url: url + unknownPropertyId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not found\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"COMMON.ERROR\");","        pm.expect(response.json().data).to.eql(\"Property not found\");","    });","});",""],"type":"text/javascript"}}],"id":"c11d1bfc-ca57-4cae-8675-ed57850a94b9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/directory/property/:id","urlObject":{"path":["directory","property",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619","key":"id"}]}},"response":[{"id":"bc8a0fc7-acdd-420d-ab1b-b3e718d1265e","name":"Remove property 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/directory/property/:id","host":["http://localhost:3000"],"path":["directory","property",":id"],"variable":[{"key":"id","value":"rivendell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"16"},{"key":"ETag","value":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:05:41 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"},{"id":"1c27a13e-8acb-4b03-bed0-08147318a93e","name":"Remove property 500","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/directory/property/:id","host":["http://localhost:3000"],"path":["directory","property",":id"],"variable":[{"key":"id","value":"lothlorien"}]}},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"72"},{"key":"ETag","value":"W/\"48-dTP4HHFp52g7ZvLO58TKYENXuZw\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:06:24 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"Property not found\"\n}"}],"_postman_id":"c11d1bfc-ca57-4cae-8675-ed57850a94b9"},{"name":"Get all properties","event":[{"listen":"test","script":{"id":"c5980dc5-8ac4-4049-a1c1-197508c9045f","exec":["const url = `${pm.variables.get('base_url')}/directory/property`;","const method = 'GET';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","pm.sendRequest({","    url,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return list of available properties\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.be.an('array');","    });","});",""],"type":"text/javascript"}}],"id":"9384368d-6e26-4909-8389-75032898334d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/directory/property/","urlObject":{"path":["directory","property",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"564b0190-5579-4af6-9076-4f76189da3d2","name":"Get all properties 200","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/directory/property"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1786"},{"key":"ETag","value":"W/\"6fa-UH8necisGzi7LJUNtqHxb9oXY20\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:07:11 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"lorien\",\n            \"name\": \"Lothlorien\",\n            \"createdAt\": \"2022-03-09T16:59:50.158Z\",\n            \"updatedAt\": \"2022-03-09T16:59:50.158Z\",\n            \"deletedAt\": null\n        },\n        {\n            \"id\": \"rivendell\",\n            \"name\": \"Rivendell\",\n            \"createdAt\": \"2022-03-10T10:58:38.061Z\",\n            \"updatedAt\": \"2022-03-10T10:58:38.061Z\",\n            \"deletedAt\": null\n        }\n    ]\n}"}],"_postman_id":"9384368d-6e26-4909-8389-75032898334d"},{"name":"Bulk create properties","event":[{"listen":"test","script":{"id":"5d5d70b6-b90a-4a11-be8c-fad322a5093b","exec":["const url = `${pm.variables.get('base_url')}/directory/property/bulk`;","const method = 'POST';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const hobbiton = {","    name: \"Hobbiton\"","}","const edoras = {","    name: 'Edoras'","}","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify({ bulk: [hobbiton, edoras] })","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and property data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.be.an('array');","    });","});",""],"type":"text/javascript"}}],"id":"ed5cf5dd-3262-4032-8fe0-3c26a4026b2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bulk\": [\n        {\n            \"name\": \"Rivendell\"\n        },\n        {\n            \"name\": \"Lothlorien\"\n        }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/property/bulk","urlObject":{"path":["directory","property","bulk"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"cc7143cd-85cb-4a62-962a-ba9f9b6464f6","name":"Bulk create properties 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bulk\": [\n        {\n            \"name\": \"Rivendell\"\n        },\n        {\n            \"name\": \"Lothlorien\"\n        }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/directory/property/bulk"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"322"},{"key":"ETag","value":"W/\"142-P+TEz+pc7NRlUFIgDjBKVsRroyY\""},{"key":"Date","value":"Mon, 14 Mar 2022 08:09:41 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"name\": \"Rivendell\",\n        \"deletedAt\": null,\n        \"id\": \"rivendell\",\n        \"createdAt\": \"2022-03-14T08:09:41.663Z\",\n        \"updatedAt\": \"2022-03-14T08:09:41.663Z\"\n    },\n    {\n        \"name\": \"Lothlorien\",\n        \"deletedAt\": null,\n        \"id\": \"lorien\",\n        \"createdAt\": \"2022-03-14T08:09:41.663Z\",\n        \"updatedAt\": \"2022-03-14T08:09:41.663Z\"\n    }\n]"}],"_postman_id":"ed5cf5dd-3262-4032-8fe0-3c26a4026b2c"}],"id":"d137ddcf-b168-4911-955f-04ef18f6b1f8","_postman_id":"d137ddcf-b168-4911-955f-04ef18f6b1f8","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Membership Management","item":[{"name":"Create membership","event":[{"listen":"test","script":{"id":"68391f14-8869-4d3f-8d97-f477518c59a1","exec":["const url = `${pm.variables.get('base_url')}/property-user`;","const method = 'POST';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const galadrielForRivendell = {","    userId: '43e33bee-9c3f-4d57-a9f0-ffeed3c855a0',","    propertyId: '9093a8ba-6337-4ad8-aa3b-1de095cdd619',","    role: \"admin\"","}","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(galadrielForRivendell)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and user data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.have.property(\"id\");","        pm.expect(response.json().data.userId).to.eql(galadrielForRivendell.userId);","        pm.expect(response.json().data.propertyId).to.eql(galadrielForRivendell.propertyId);","        pm.expect(response.json().data.role).to.eql(galadrielForRivendell.role);","    });","});","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(galadrielForRivendell)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if duplicate\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"PROPERTY_USER_ALREADY_EXISTS\");","        pm.expect(response.json().data).to.eql(\"Duplicate data for: userId, propertyId\");","    });","});",""],"type":"text/javascript"}}],"id":"bc3a9517-0749-43b0-a860-5da7466d0100","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"propertyId\": \"7f2f566e-9d95-44ad-9310-3f3e18f6a3aa\",\n    \"role\": \"admin\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/membership","description":"<p>Gives user rights for property</p>\n","urlObject":{"path":["membership"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"36ce1e46-7b6b-4b8f-adaa-e71f5db1896d","name":"Create membership 409","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"propertyId\": \"rivendell\",\n    \"role\": null\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/membership"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"108"},{"key":"ETag","value":"W/\"6c-usQgqzaGHMyEhiRiwOWx9iBGp10\""},{"key":"Date","value":"Wed, 23 Mar 2022 11:03:56 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"MEMBERSHIP_ALREADY_EXISTS\",\n    \"data\": \"Duplicate data for: userId, propertyId\"\n}"},{"id":"a419b770-77a4-49f4-b3d4-e1cdeaf7cdb4","name":"Create membership 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"propertyId\": \"rivendell\",\n    \"role\": \"admin\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/membership"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"276"},{"key":"ETag","value":"W/\"114-h1lenr/aT/ojXoAGGsTeJFlEt6k\""},{"key":"Date","value":"Wed, 23 Mar 2022 11:08:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"userId\": \"gandalf\",\n        \"propertyId\": \"rivendell\",\n        \"role\": \"admin\",\n        \"deletedAt\": null,\n        \"id\": \"rivendell-gandalf\",\n        \"createdAt\": \"2022-03-23T11:08:17.066Z\",\n        \"updatedAt\": \"2022-03-23T11:08:17.066Z\"\n    }\n}"}],"_postman_id":"bc3a9517-0749-43b0-a860-5da7466d0100"},{"name":"Update membership","event":[{"listen":"test","script":{"id":"869308f9-ebbc-4919-b0f1-1ba83a0c42d7","exec":["const url = `${pm.variables.get('base_url')}/property-user/`;","const method = 'PUT';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const gandalfForRivendell = {","    id: '5089b483-38ef-450e-beac-6a24dc24e376',","    userId: 'f8f2934c-7588-4079-93e1-ba7f87caca8f',","    propertyId: '9093a8ba-6337-4ad8-aa3b-1de095cdd619',","    role: \"admin\"","}","const unknownSarumanForRivendell = {","    id: 'abcdef12-38ef-450e-beac-abcdef123456'","};","","pm.sendRequest({","    url: url + gandalfForRivendell.id,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(gandalfForRivendell)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and user data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.have.property(\"id\");","        pm.expect(response.json().data.userId).to.eql(gandalfForRivendell.userId);","        pm.expect(response.json().data.propertyId).to.eql(gandalfForRivendell.propertyId);","        pm.expect(response.json().data.role).to.eql(gandalfForRivendell.role);","    });","});","","pm.sendRequest({","    url: url + unknownSarumanForRivendell.id,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(gandalfForRivendell)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not found\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"PROPERTY_USER_NOT_FOUND\");","        pm.expect(response.json().data).to.eql(\"Property user not found\");","    });","});",""],"type":"text/javascript"}}],"id":"c27c2084-1436-4553-b1bb-bdec432dd99e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"userId\": \"f8f2934c-7588-4079-93e1-ba7f87caca8f\",\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"role\": \"admin\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/membership/:id","description":"<p>Updates user rights for property.</p>\n","urlObject":{"path":["membership",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"5089b483-38ef-450e-beac-6a24dc24e376","key":"id"}]}},"response":[{"id":"633aab6e-93fe-407e-912b-2206a56ba53d","name":"Update membership 404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"userId\": \"saruman\",\n    \"propertyId\": \"rivendell\",\n    \"role\": null\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/membership/:id","host":["http://localhost:3000"],"path":["membership",":id"],"variable":[{"key":"id","value":"rivendell-saruman"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"88"},{"key":"ETag","value":"W/\"58-y8ny6GRnLBCH3Zloirt2B8mjx2M\""},{"key":"Date","value":"Wed, 23 Mar 2022 11:04:32 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"MEMBERSHIP_NOT_FOUND\",\n    \"data\": \"Membership not found\"\n}"},{"id":"728a5e1e-20e8-4cb5-9288-bbeae11a1014","name":"Update membership 200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"userId\": \"f8f2934c-7588-4079-93e1-ba7f87caca8f\",\n    \"propertyId\": \"9093a8ba-6337-4ad8-aa3b-1de095cdd619\",\n    \"role\": null\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/membership/:id","host":["http://localhost:3000"],"path":["membership",":id"],"variable":[{"key":"id","value":"rivendell-gandalf"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"276"},{"key":"ETag","value":"W/\"114-COa6Oi0a7DGV7xAYUGCq6CqMit0\""},{"key":"Date","value":"Wed, 23 Mar 2022 11:07:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rivendell-gandalf\",\n        \"userId\": \"gandalf\",\n        \"propertyId\": \"rivendell\",\n        \"role\": null,\n        \"createdAt\": \"2022-03-23T10:54:54.310Z\",\n        \"updatedAt\": \"2022-03-23T11:07:36.894Z\",\n        \"deletedAt\": null\n    }\n}"}],"_postman_id":"c27c2084-1436-4553-b1bb-bdec432dd99e"},{"name":"Get membership","event":[{"listen":"test","script":{"id":"5c2e551d-cd6b-4c04-85aa-c2c2340a5a3e","exec":["const url = `${pm.variables.get('base_url')}/property-user/`;","const method = 'GET';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const gandalfForRivendellId = '5089b483-38ef-450e-beac-6a24dc24e376';","const unknownSarumanForRivendellId = 'abcdef12-38ef-450e-beac-abcdef123456';","","pm.sendRequest({","    url: url + gandalfForRivendellId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and user data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data.id).to.eql(gandalfForRivendellId);","    });","});","","pm.sendRequest({","    url: url + unknownSarumanForRivendellId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return error if not found\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql(\"PROPERTY_USER_NOT_FOUND\");","        pm.expect(response.json().data).to.eql(\"Property user not found\");","    });","});",""],"type":"text/javascript"}}],"id":"60cf6ee6-0507-48fa-973e-cb25a454d039","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/membership/:id","description":"<p>Shows user rights for property if exist</p>\n","urlObject":{"path":["membership",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"5089b483-38ef-450e-beac-6a24dc24e376","key":"id"}]}},"response":[{"id":"ecf6a9ab-9ce8-4537-8dbf-9c839df1a64b","name":"Get membership 404","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/membership/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["membership",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"rivendell-saruman"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"88"},{"key":"ETag","value":"W/\"58-y8ny6GRnLBCH3Zloirt2B8mjx2M\""},{"key":"Date","value":"Wed, 23 Mar 2022 11:05:03 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"MEMBERSHIP_NOT_FOUND\",\n    \"data\": \"Membership not found\"\n}"},{"id":"20bd09f9-380b-4c1b-bc6e-2754b65cc054","name":"Get membership 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/membership/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["membership",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"rivendell-gandalf"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"276"},{"key":"ETag","value":"W/\"114-fZcazbISWnWUsedcXhXiH1knd1U\""},{"key":"Date","value":"Wed, 23 Mar 2022 11:06:56 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"id\": \"rivendell-gandalf\",\n        \"userId\": \"gandalf\",\n        \"propertyId\": \"rivendell\",\n        \"role\": null,\n        \"createdAt\": \"2022-03-23T10:54:54.310Z\",\n        \"updatedAt\": \"2022-03-23T11:06:54.603Z\",\n        \"deletedAt\": null\n    }\n}"}],"_postman_id":"60cf6ee6-0507-48fa-973e-cb25a454d039"},{"name":"Delete membership","event":[{"listen":"test","script":{"id":"97ed4381-19e5-439d-9dbd-98adf81cc627","exec":["const url = `${pm.variables.get('base_url')}/property-user/`;","const method = 'DELETE';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const gandalfForRivendellId = '5089b483-38ef-450e-beac-6a24dc24e376';","const unknownSarumanForRivendellId = 'abcdef12-38ef-450e-beac-abcdef123456';","","pm.sendRequest({","    url: url + gandalfForRivendellId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return true if deleted\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.be.true;","    });","});","","pm.sendRequest({","    url: url + unknownSarumanForRivendellId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return false if not deleted\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.be.false;","    });","});",""],"type":"text/javascript"}}],"id":"e50615b4-9e48-4af3-9403-6ff7dfe936fe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/membership/:id","description":"<p>Removes user rights for property.</p>\n","urlObject":{"path":["membership",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"5089b483-38ef-450e-beac-6a24dc24e376","key":"id"}]}},"response":[{"id":"f366b274-17d8-44d7-9d7a-6dea2bdfea67","name":"Delete membership 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/membership/:id?propertyId=rivendell","host":["http://localhost:3000"],"path":["membership",":id"],"query":[{"key":"propertyId","value":"rivendell"}],"variable":[{"key":"id","value":"rivendell-gandalf"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"28"},{"key":"ETag","value":"W/\"1c-Vt/6TvvrO9SE5YmGKzP/ETOJLzw\""},{"key":"Date","value":"Wed, 23 Mar 2022 11:05:59 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": true\n}"}],"_postman_id":"e50615b4-9e48-4af3-9403-6ff7dfe936fe"},{"name":"Get list of users for property","event":[{"listen":"test","script":{"id":"2ee911f6-c421-47b2-aeb7-80ddc04e5aa7","exec":["const url = `${pm.variables.get('base_url')}/property-user/users?propertyId=`;","const method = 'GET';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const rivendellId = '9093a8ba-6337-4ad8-aa3b-1de095cdd619';","","pm.sendRequest({","    url: url + rivendellId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and user data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.be.an('array');","    });","});",""],"type":"text/javascript"}}],"id":"77026516-4b2d-4913-9574-42848d795b08","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/membership/users?propertyId=9093a8ba-6337-4ad8-aa3b-1de095cdd619","description":"<p>Returns paginated list of properties for user.</p>\n","urlObject":{"path":["membership","users"],"host":["http://localhost:3000"],"query":[{"key":"propertyId","value":"9093a8ba-6337-4ad8-aa3b-1de095cdd619"}],"variable":[]}},"response":[{"id":"dcdbb006-e62f-4d21-8057-7992351cea69","name":"Get list of users for property 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000 /membership/users?property=rivendell","host":["http://localhost:3000 "],"path":["membership","users"],"query":[{"key":"property","value":"rivendell"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"278"},{"key":"ETag","value":"W/\"116-3NBspEsjr+r033iKf6RDrQz3vSg\""},{"key":"Date","value":"Wed, 23 Mar 2022 11:00:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"rivendell-gandalf\",\n            \"userId\": \"gandalf\",\n            \"propertyId\": \"rivendell\",\n            \"role\": null,\n            \"createdAt\": \"2022-03-23T10:54:54.310Z\",\n            \"updatedAt\": \"2022-03-23T10:55:35.861Z\",\n            \"deletedAt\": null\n       }\n    ]\n}"}],"_postman_id":"77026516-4b2d-4913-9574-42848d795b08"},{"name":"Get list of properies for user","event":[{"listen":"prerequest","script":{"id":"ab16a20c-186a-4382-bcb8-3ef9402f2dcc","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"a0b4b9ae-0ff2-4c1c-aede-232dcecf8eea","exec":["const url = `${pm.variables.get('base_url')}/property-user/properties?userId=`;","const method = 'GET';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const gandalfId = 'f8f2934c-7588-4079-93e1-ba7f87caca8f';","","pm.sendRequest({","    url: url + gandalfId,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return success and user data\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response.json().success).to.be.true;","        pm.expect(response.json().data).to.be.an('array');","    });","});",""],"type":"text/javascript"}}],"id":"3148ae22-a6fb-42c3-a321-bfa283b3c620","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/membership/properties?userId=f8f2934c-7588-4079-93e1-ba7f87caca8f","description":"<p>Returns paginated list of properties for user.</p>\n","urlObject":{"path":["membership","properties"],"host":["http://localhost:3000"],"query":[{"key":"userId","value":"f8f2934c-7588-4079-93e1-ba7f87caca8f"}],"variable":[]}},"response":[{"id":"720bc354-8b08-4343-a7cf-df0ec634196a","name":"Get list of properies for user 200","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000 /membership/properties?propertyId=rivendell&userId=gandalf","host":["http://localhost:3000 "],"path":["membership","properties"],"query":[{"key":"propertyId","value":"rivendell"},{"key":"userId","value":"gandalf"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1817"},{"key":"ETag","value":"W/\"719-qED3y53CCoWMpjwjCro90AyNsqI\""},{"key":"Date","value":"Fri, 25 Mar 2022 07:02:21 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": [\n        {\n            \"id\": \"rivendell-gandalf\",\n            \"userId\": \"gandalf\",\n            \"propertyId\": \"rivendell\",\n            \"role\": \"admin\",\n            \"createdAt\": \"2022-03-24T13:47:18.463Z\",\n            \"updatedAt\": \"2022-03-24T13:47:18.463Z\",\n            \"deletedAt\": null\n        },\n        {\n            \"id\": \"lorien-gandalf\",\n            \"userId\": \"gandalf\",\n            \"propertyId\": \"lorien\",\n            \"role\": \"admin\",\n            \"createdAt\": \"2022-03-24T13:47:18.463Z\",\n            \"updatedAt\": \"2022-03-24T13:47:18.463Z\",\n            \"deletedAt\": null\n        }\n    ]\n}"}],"_postman_id":"3148ae22-a6fb-42c3-a321-bfa283b3c620"},{"name":"Accept invitation","id":"2a859ada-04e9-4948-98f8-34f76b47887f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"PUT","header":[],"url":"http://localhost:3000/membership/invitation/:id","urlObject":{"path":["membership","invitation",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"47686457-edd7-4560-86d6-ae5df132bce2","key":"id"}]}},"response":[{"id":"05f909cf-a9da-4d1c-8223-581240c0b8c0","name":"Accept invitation 200","originalRequest":{"method":"PUT","header":[],"url":{"raw":"http://localhost:3000/membership/invitation/:id","host":["http://localhost:3000"],"path":["membership","invitation",":id"],"variable":[{"key":"id","value":"lorien"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"28"},{"key":"ETag","value":"W/\"1c-Vt/6TvvrO9SE5YmGKzP/ETOJLzw\""},{"key":"Date","value":"Thu, 22 Sep 2022 10:54:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": true\n}"}],"_postman_id":"2a859ada-04e9-4948-98f8-34f76b47887f"},{"name":"Reject invitation","id":"88c65397-38f6-489c-bf33-47033742e2b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/membership/invitation/:id","urlObject":{"path":["membership","invitation",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"type":"any","value":"0e6566a8-1796-4e6a-8875-988aff513d04","key":"id"}]}},"response":[{"id":"8ff8579f-51e0-483d-9b40-eaf6aeff9c41","name":"Reject invitation 200","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:3000/membership/invitation/:id","host":["http://localhost:3000"],"path":["membership","invitation",":id"],"variable":[{"key":"id","value":"lorien"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"28"},{"key":"ETag","value":"W/\"1c-Vt/6TvvrO9SE5YmGKzP/ETOJLzw\""},{"key":"Date","value":"Thu, 22 Sep 2022 10:54:38 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": true\n}"}],"_postman_id":"88c65397-38f6-489c-bf33-47033742e2b6"}],"id":"cd734152-8f33-4676-81f8-e3b56908bd92","_postman_id":"cd734152-8f33-4676-81f8-e3b56908bd92","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}}],"id":"1397cc3f-5568-41f8-a368-bac415e7dbf2","_postman_id":"1397cc3f-5568-41f8-a368-bac415e7dbf2","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}}},{"name":"Sign in","event":[{"listen":"test","script":{"id":"7dbe464b-8a46-4212-94cc-20cbfbcc0fdc","exec":["const url = `${pm.variables.get('base_url')}/auth/login`;","const method = 'POST';","const header = {","    'Content-Type': 'application/json',","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","const gandalf = {","    \"email\": \"gandalf@middle.earth\",","    \"password\": \"passwd\"","};","const gandalfWrongPassword = {","    \"email\": \"gandalf@middle.earth\",","    \"password\": \"wrongpasswd\"","};","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(gandalf)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return token if right credentials\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response).to.have.jsonBody('accessToken');","        pm.expect(response).to.have.jsonBody('user');","    });","});","","pm.sendRequest({","    url,","    method,","    header,","    body: {","        mode: 'raw',","        raw: JSON.stringify(gandalfWrongPassword)","    }","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return false if wrong credentials\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql('COMMON.ERROR');","        pm.expect(response.json().data).to.eql('User does not exist');","    });","});",""],"type":"text/javascript"}}],"id":"9de0394c-30fc-431f-ab9f-c35b1b5e3fbb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/auth/login","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":true,"source":{"_postman_id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","id":"b2033267-c6c0-42c6-83a8-3a7756bc003f","name":"CRS API","type":"collection"}},"urlObject":{"path":["auth","login"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"dadd6862-8325-423d-baa3-8131d4905b72","name":"Sign in 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"password\": \"passwd\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/auth/login"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"429"},{"key":"ETag","value":"W/\"1ad-K7fJrp9Lx4H+ESESjUSkKk8EvXk\""},{"key":"Date","value":"Tue, 22 Mar 2022 13:31:08 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IkdhbmRhbGYgdGhlIEdyZXkiLCJ1c2VycGljIjoiaHR0cHM6Ly9jbXMucXouY29tL3dwLWNvbnRlbnQvdXBsb2Fkcy8yMDE4LzA4L2dhbmRhbGYtbG9yZC1vZi10aGUtcmluZ3MtZTE1MzQyNTUzNjg0MzguanBnIiwicHJvcGVydGllcyI6WyI5MDkzYThiYS02MzM3LTRhZDgtYWEzYi0xZGUwOTVjZGQ2MTkiLCI0Nzc2MDk3Ni1lYTJkLTQxYjYtYTMyMC02OTBlMDJjMDhmYzYiXSwiaWF0IjoxNjQ3OTU1ODY4NzQ3fQ.Re9KZX3cU6afGpBYn6U7ID3UHu8sFwJLx1Kv4dO5GsU\"\n}"},{"id":"d5d5c0c8-636a-4798-83a0-e85b0ed55f75","name":" Sign in 401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"gandalf@middle.earth\",\n    \"password\": \"wrongpass\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/auth/login"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"73"},{"key":"ETag","value":"W/\"49-7NcApw5HRBDopx5jLmbboNeRDOs\""},{"key":"Date","value":"Tue, 22 Mar 2022 13:32:41 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"User does not exist\"\n}"}],"_postman_id":"9de0394c-30fc-431f-ab9f-c35b1b5e3fbb"},{"name":"Refresh auth token","event":[{"listen":"test","script":{"id":"aaccb3bb-442c-46ef-8ef2-6cad3f0000db","exec":["const url = `${pm.variables.get('base_url')}/auth/refresh-token`;","const method = 'POST';","const header = {","    'Authorization': `Bearer ${pm.variables.get('jwt_token')}`,","    'X-Property-Id': pm.variables.get('property_id')","};","","pm.sendRequest({","    url,","    method,","    header,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return token if authorized\", function () {","        pm.expect(error).to.equal(null);","        pm.expect(response).to.have.jsonBody('accessToken');","    });","});","","pm.sendRequest({","    url,","    method,","}, (error, response) => {","    if (error) console.log(error);","","    pm.test(\"should return false if not authorized\", function () {","        pm.expect(response).to.be.error;","        pm.expect(response.json().success).to.be.false;","        pm.expect(response.json().errorCode).to.eql('COMMON.ERROR');","        pm.expect(response.json().data).to.eql('User not authorized');","    });","});",""],"type":"text/javascript"}}],"id":"60b4c593-028d-4873-9e51-2064e3f9ca23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:3000/auth/refresh-token","urlObject":{"path":["auth","refresh-token"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"8fcace5e-1efe-41cb-94d4-84713c11a66c","name":"Refresh auth token 201","originalRequest":{"method":"POST","header":[],"url":"http://localhost:3000/auth/refresh-token"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"406"},{"key":"ETag","value":"W/\"196-OYcp3QtKAGgW+RrZFS0V0SPuTzc\""},{"key":"Date","value":"Sat, 26 Mar 2022 17:27:12 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImY4ZjI5MzRjLTc1ODgtNDA3OS05M2UxLWJhN2Y4N2NhY2E4ZiIsInVzZXJuYW1lIjoidW5kZWZpbmVkIHVuZGVmaW5lZCIsInByb3BlcnRpZXMiOlsiOTA5M2E4YmEtNjMzNy00YWQ4LWFhM2ItMWRlMDk1Y2RkNjE5IiwiNDc3NjA5NzYtZWEyZC00MWI2LWEzMjAtNjkwZTAyYzA4ZmM2IiwiMDEyZjI4MmMtYjI4Yy00ZWUxLTgwZjItNTFhZTE0ZDU4N2VmIl0sImlhdCI6MTY0ODMxNTYzMjc5Mn0.fwVFXhcdJ9TI7m2EnZMfIQ44E6x9V8MuJNE2C5K5b54\"\n}"},{"id":"6f962051-1394-4d72-af9d-148254c268e8","name":"Refresh auth token 401","originalRequest":{"method":"POST","header":[],"url":"http://localhost:3000/auth/refresh-token"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"73"},{"key":"ETag","value":"W/\"49-ynJcHCSUkVUST1+jGoCO443Gmr0\""},{"key":"Date","value":"Sat, 26 Mar 2022 17:28:19 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"errorCode\": \"COMMON.ERROR\",\n    \"data\": \"User not authorized\"\n}"}],"_postman_id":"60b4c593-028d-4873-9e51-2064e3f9ca23"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"jwt_token"}]}},"event":[{"listen":"prerequest","script":{"id":"d1f5e62d-2c3a-45cf-8dec-7a25cc86d30e","type":"text/javascript","exec":["var Header = require('postman-collection').Header","pm.request.headers.add(new Header(\"X-Property-Id: \" + pm.collectionVariables.get('propertyId')))",""]}},{"listen":"test","script":{"id":"0ff22ab0-4799-4174-a25a-58ecb7c15537","type":"text/javascript","exec":[""]}}],"variable":[{"key":"base_url","value":"http://localhost:3000"},{"key":"jwt_token","value":"jwt_token"},{"key":"propertyId","value":"rivendell"}]}