{"info":{"_postman_id":"7734fef3-ad8b-4c7e-b445-348ab873c6d1","name":"andrew-ecommerce","description":"<html><head></head><body><p>A webservice containing logic to handle products, payments and subscriptions for the Andrew Insurance product</p>\n<p>Multiple listeners are set up for this microservice:  </p>\n<ul>\n<li>Public listener: User facing aka frontend authenticated and authorized endpoints</li>\n<li>Private listener: Unauthenticated not accessible from the internet endpoints</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"13953520","collectionId":"7734fef3-ad8b-4c7e-b445-348ab873c6d1","publishedId":"2s9YsGhDL8","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-01-04T13:58:01.000Z"},"item":[{"name":"PUBLIC LISTENER","item":[{"name":"API","item":[{"name":"product","item":[{"name":"create a product using the STRIPE gateway","id":"484bd0bd-63c5-4f41-b0b8-e48199648ade","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"vehicle insurance andrew\",\n    \"currency\": \"EUR\",\n    \"price\": 117.50,\n    \"description\": \"vehicle insurance andrew\",\n    \"subscription\": true,\n    \"periodicity\": \"month\",\n    \"active\": true,\n    \"gateway\": \"STRIPE\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/product","urlObject":{"path":["product"],"host":["http://localhost:3000/api"],"query":[],"variable":[]}},"response":[{"id":"c0e22667-41d9-42e0-9b7d-5f734a9d9a14","name":"create a product using the STRIPE gateway","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"vehicle insurance andrew\",\n    \"currency\": \"EUR\",\n    \"price\": 117.50,\n    \"description\": \"vehicle insurance andrew\",\n    \"subscription\": true,\n    \"periodicity\": \"month\",\n    \"active\": true,\n    \"gateway\": \"STRIPE\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/product"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"355"},{"key":"ETag","value":"W/\"163-sn7mWL6bLCMMVCW9Tsy+pbHFwAE\""},{"key":"Date","value":"Fri, 22 Dec 2023 12:23:02 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"name\": \"vehicle insurance andrew\",\n    \"currency\": \"EUR\",\n    \"price\": 117.5,\n    \"subscription\": true,\n    \"periodicity\": \"month\",\n    \"description\": \"vehicle insurance andrew\",\n    \"gateway\": \"STRIPE\",\n    \"gatewayResourceId\": \"prod_PEawgpASvJ6VV4\",\n    \"active\": true,\n    \"_id\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n    \"createdAt\": \"2023-12-22T12:23:02.756Z\",\n    \"updatedAt\": \"2023-12-22T12:23:02.756Z\",\n    \"__v\": 0\n}"}],"_postman_id":"484bd0bd-63c5-4f41-b0b8-e48199648ade"},{"name":"retrieve one product","id":"3b158b47-6351-48ac-8e3d-1565bcd1890a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/product/70b1fcba-3953-4ea3-9f66-8f7f218dd00a","urlObject":{"path":["product","70b1fcba-3953-4ea3-9f66-8f7f218dd00a"],"host":["http://localhost:3000/api"],"query":[],"variable":[]}},"response":[{"id":"c0e9d1bf-2748-4959-96af-801732c83100","name":"retrieve one product","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/product/70b1fcba-3953-4ea3-9f66-8f7f218dd00a"},"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":"355"},{"key":"ETag","value":"W/\"163-dyJ+AyweKuxBX1QW5a6eM548zc4\""},{"key":"Date","value":"Fri, 22 Dec 2023 12:24:12 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n    \"name\": \"vehicle insurance andrew\",\n    \"currency\": \"EUR\",\n    \"price\": 117.5,\n    \"subscription\": true,\n    \"periodicity\": \"month\",\n    \"description\": \"vehicle insurance andrew\",\n    \"gateway\": \"STRIPE\",\n    \"gatewayResourceId\": \"prod_PEawgpASvJ6VV4\",\n    \"active\": true,\n    \"createdAt\": \"2023-12-22T12:23:02.756Z\",\n    \"updatedAt\": \"2023-12-22T12:23:02.756Z\",\n    \"__v\": 0\n}"}],"_postman_id":"3b158b47-6351-48ac-8e3d-1565bcd1890a"},{"name":"update product","id":"ab5b01a6-b002-4ee4-91f1-7a62f3cd4996","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"vehicle insurance andrew\",\n    \"currency\": \"EUR\",\n    \"price\": 117.50,\n    \"description\": \"vehicle insurance andrew\",\n    \"subscription\": true,\n    \"periodicity\": \"month\",\n    \"active\": true,\n    \"gateway\": \"STRIPE\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/product/70b1fcba-3953-4ea3-9f66-8f7f218dd00a","urlObject":{"path":["product","70b1fcba-3953-4ea3-9f66-8f7f218dd00a"],"host":["http://localhost:3000/api"],"query":[],"variable":[]}},"response":[{"id":"179c4a8f-62bc-4e5b-bd09-620a13d7a8d1","name":"update product","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"vehicle insurance andrew\",\n    \"currency\": \"EUR\",\n    \"price\": 117.50,\n    \"description\": \"vehicle insurance andrew\",\n    \"subscription\": true,\n    \"periodicity\": \"month\",\n    \"active\": true,\n    \"gateway\": \"STRIPE\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/product/70b1fcba-3953-4ea3-9f66-8f7f218dd00a"},"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":"355"},{"key":"ETag","value":"W/\"163-dyJ+AyweKuxBX1QW5a6eM548zc4\""},{"key":"Date","value":"Fri, 22 Dec 2023 12:41:04 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n    \"name\": \"vehicle insurance andrew\",\n    \"currency\": \"EUR\",\n    \"price\": 117.5,\n    \"subscription\": true,\n    \"periodicity\": \"month\",\n    \"description\": \"vehicle insurance andrew\",\n    \"gateway\": \"STRIPE\",\n    \"gatewayResourceId\": \"prod_PEawgpASvJ6VV4\",\n    \"active\": true,\n    \"createdAt\": \"2023-12-22T12:23:02.756Z\",\n    \"updatedAt\": \"2023-12-22T12:23:02.756Z\",\n    \"__v\": 0\n}"}],"_postman_id":"ab5b01a6-b002-4ee4-91f1-7a62f3cd4996"},{"name":"list all products","id":"a809075a-64d7-4eb8-9f4c-2ad9a499563d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/product","urlObject":{"path":["product"],"host":["http://localhost:3000/api"],"query":[],"variable":[]}},"response":[{"id":"efb44a41-d7d7-44a0-8106-8af85e95460e","name":"list all products for the STRIPE gateway","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:3000/api/product?gateway=STRIPE","host":["http://localhost:3000/api"],"path":["product"],"query":[{"key":"gateway","value":"STRIPE"}]}},"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":"400"},{"key":"ETag","value":"W/\"190-2tGnfjUSOZuGBJUUq76NGDdoKkQ\""},{"key":"Date","value":"Fri, 22 Dec 2023 12:26:23 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n            \"name\": \"vehicle insurance andrew\",\n            \"currency\": \"EUR\",\n            \"price\": 117.5,\n            \"subscription\": true,\n            \"periodicity\": \"month\",\n            \"description\": \"vehicle insurance andrew\",\n            \"gateway\": \"STRIPE\",\n            \"gatewayResourceId\": \"prod_PEawgpASvJ6VV4\",\n            \"active\": true,\n            \"createdAt\": \"2023-12-22T12:23:02.756Z\",\n            \"updatedAt\": \"2023-12-22T12:23:02.756Z\",\n            \"__v\": 0\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"},{"id":"6896bb47-b20f-4053-8541-15b500623e51","name":"list all products","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/product"},"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":"400"},{"key":"ETag","value":"W/\"190-2tGnfjUSOZuGBJUUq76NGDdoKkQ\""},{"key":"Date","value":"Fri, 22 Dec 2023 12:26:56 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n            \"name\": \"vehicle insurance andrew\",\n            \"currency\": \"EUR\",\n            \"price\": 117.5,\n            \"subscription\": true,\n            \"periodicity\": \"month\",\n            \"description\": \"vehicle insurance andrew\",\n            \"gateway\": \"STRIPE\",\n            \"gatewayResourceId\": \"prod_PEawgpASvJ6VV4\",\n            \"active\": true,\n            \"createdAt\": \"2023-12-22T12:23:02.756Z\",\n            \"updatedAt\": \"2023-12-22T12:23:02.756Z\",\n            \"__v\": 0\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"}],"_postman_id":"a809075a-64d7-4eb8-9f4c-2ad9a499563d"}],"id":"d38c88e2-32ac-45dc-a28b-e79c9cf01afa","_postman_id":"d38c88e2-32ac-45dc-a28b-e79c9cf01afa","description":""}],"id":"e5bbe0d1-ae8d-4cfa-9778-934c5f6fdd58","_postman_id":"e5bbe0d1-ae8d-4cfa-9778-934c5f6fdd58","description":""}],"id":"2b21315a-e94e-42b1-a221-e9d599cc6cb3","_postman_id":"2b21315a-e94e-42b1-a221-e9d599cc6cb3","description":""},{"name":"PRIVATE LISTENER","item":[{"name":"API","item":[{"name":"gateway","item":[{"name":"create a checkout url","id":"7a2c278a-2a41-47ca-90bc-d6dd4db24bfe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"mike@yopmail.com\",\n    \"gateway\": \"STRIPE\",\n    \"fullName\": \"mike doe\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3001/api/gateway/checkout","urlObject":{"path":["gateway","checkout"],"host":["http://localhost:3001/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7a2c278a-2a41-47ca-90bc-d6dd4db24bfe"},{"name":"create a customer","id":"cdb0a336-68b4-4af3-8524-bd207fb9b185","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"jacko@yopmail.com\",\n    \"gateway\": \"STRIPE\",\n    \"fullName\": \"jacko doe\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3001/api/gateway/customer","urlObject":{"path":["gateway","customer"],"host":["http://localhost:3001/api"],"query":[],"variable":[]}},"response":[{"id":"41d1a0a7-7e2c-4a1a-875f-3bcf5f869e93","name":"create a customer","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"mike@yopmail.com\",\n    \"gateway\": \"STRIPE\",\n    \"fullName\": \"mike doe\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3001/api/gateway/customer"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"ETag","value":"W/\"2d-TzqGaG8wOTDu4Yc/H4cjUa+DJZs\""},{"key":"Date","value":"Fri, 22 Dec 2023 12:58:20 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"3dd27c0d-39a7-4448-8620-eb015a5ca52b\"\n}"}],"_postman_id":"cdb0a336-68b4-4af3-8524-bd207fb9b185"}],"id":"97676712-3599-44b4-b546-9421d6b09d7e","_postman_id":"97676712-3599-44b4-b546-9421d6b09d7e","description":""}],"id":"9a204a22-815f-4f39-86c8-54d88aae4872","_postman_id":"9a204a22-815f-4f39-86c8-54d88aae4872","description":""}],"id":"138a6ced-bafa-4807-900a-9fc99e1d40b7","_postman_id":"138a6ced-bafa-4807-900a-9fc99e1d40b7","description":""}],"event":[{"listen":"prerequest","script":{"id":"37f514b5-d60c-4059-b18a-a5f671ecabbb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"840c8da3-f43b-4b54-8071-ffa751bd3271","type":"text/javascript","exec":[""]}}],"variable":[{"key":"ROOT_URL_PUBLIC_LISTENER","value":"http://localhost:3000/api"},{"key":"ROOT_URL_PRIVATE_LISTENER","value":"http://localhost:3001/api","type":"string"}]}