{
	"info": {
		"_postman_id": "fa9bfe9e-d62f-4904-aa43-d3832f4d9ef5",
		"name": "Mapp Connect",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "25698325"
	},
	"item": [
		{
			"name": "Ping",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"let key = \"keUE8P3aKkeQqjYu6F2dJEBS8h6QAUEe\"; // add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				},
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/cbe8cfa6-48b8-455a-bcb6-f09cf51f209f/ping",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"cbe8cfa6-48b8-455a-bcb6-f09cf51f209f",
						"ping"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get Group List",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"keUE8P3aKkeQqjYu6F2dJEBS8h6QAUEe\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				},
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/cbe8cfa6-48b8-455a-bcb6-f09cf51f209f/group",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"cbe8cfa6-48b8-455a-bcb6-f09cf51f209f",
						"group"
					]
				}
			},
			"response": []
		},
		{
			"name": "List of SMS prepared Messages",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"keUE8P3aKkeQqjYu6F2dJEBS8h6QAUEe\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				},
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/cbe8cfa6-48b8-455a-bcb6-f09cf51f209f/message/sms",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"cbe8cfa6-48b8-455a-bcb6-f09cf51f209f",
						"message",
						"sms"
					]
				}
			},
			"response": []
		},
		{
			"name": "List of Email prepared Messages",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				},
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/message",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"message"
					]
				}
			},
			"response": []
		},
		{
			"name": "List of Push prepared Messages",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				},
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/message/push",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"message",
						"push"
					]
				}
			},
			"response": []
		},
		{
			"name": "List of Mobile Apps",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				},
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": ""
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/mobile-app",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"mobile-app"
					]
				}
			},
			"response": []
		},
		{
			"name": "Add User and subscribe to group",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"email\":\"user@mapp.com\", \n    \"group\":\"1700279524\"\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=user",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "user"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Subscribing to the group with double opt-in",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"email\":\"user@mapp.com\", \n   \"group\":\"2324333335\", \n   \"first\":\"firstval\",\n   \"second\":\"secondval\",\n   \"doubleOptIn\":\"true\"   \n\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=user",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "user"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Unsubscribing from the group",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n   \"email\":\"user@mapp.com\", \n   \"group\":\"2324333335\", \n   \"unsubscribe\":\"true\"\n\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=user",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "user"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Removing a user",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n   \"email\":\"user@mapp.com\", \n   \"group\":\"2324333335\", \n   \"delete\":\"true\"\n\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=user",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "user"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Send prepared SMS message to a user with parameters",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n           \"recipientMobileNumber\":\"+48666777888\", \n           \"messageId\":\"2324333335\", \n           \"param1\":\"param 1 value\"\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=sms",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "sms"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Send a single message to a user with parameters",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{           \"email\":\"user@mapp.com\", \n           \"messageId\":\"2324333335\", \n           \"first\":\"firstval\",\n           \"second\":\"secondval\"   \n\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=email",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "email"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Send prepared Push message to a user with parameters",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n           \"email\":\"user@mapp.com\", \n           \"pushMessageId\":\"1234\",\n           \"mobileAppId\":\"5678\",\n           \"param1\":\"param 1 value\"\n\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=push",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "push"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Send a transactional email and store transaction (order) details in Transactional RD",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n   \"email\":\"user@mapp.com\",\n           \"messageId\":\"2324333335\",\n           \"items\":[{\"sku\":\"JB-129\",\"name\":\"Dungen-H\",\"price\":\"15\",\"qty_ordered\":\"1\"}],\n           \"group\":\"1200073880\",//optional if user is not wexisting in engage system, he will be added to this group\n           \"orderId\":\"1012\",\n           \"timestamp\": \"2020-04-28T12:30:08.537Z\",\n           \"currency\":\"GBP\"\n\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=user",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "user"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Store transaction (order) details in Transactional RD Copy without email sendout",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"email\":\"user@mapp.com\", \n    \"group\":\"1700279524\"\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=user",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "user"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Cancel transaction (order) details in Transactional RD without sending transactional email",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n   \"email\":\"user@mapp.com\",\n    \"items\":[{\"sku\":\"JB-129\",\"name\":\"Dungen-H\",\"price\":\"15\",\"productQuantity\":\"0\",\"returnedQuantity\":\"1\"}],\n    \"group\":\"1200073880\", //optional if user is not wexisting in engage system, he will be added to this group\n    \"orderId\":\"1012\",\n    \"timestamp\": \"2020-04-28T12:30:08.537Z\",\n    \"currency\":\"GBP\"\n\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=transaction",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "transaction"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Save wishlist item in Wishlist RD",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n   \"email\":\"user@mapp.com\", \n    \"productSKU\":„ASZ-3434-21\",\n    \"productPrice\":„30\",\n    \"size\":\"12\"\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=wishlist",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "wishlist"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Save abandoned cart item in Abandoned Cart RD",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n   \"email\":\"user@mapp.com\", \n    \"productSKU\":„ASZ-3434-21\",\n    \"productPrice\":„30\",\n    \"size\":\"12\"\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=abandonedcart",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "abandonedcart"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Trigger automation (Whiteboard plan)",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n    \"email\":\"user@mapp.com\", \n    \"external_event\":\"new_account\",\n   \"value1\":\"account_URL\"\n \n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=automation",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "automation"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Add/update Product Catalog Item",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n   \"brand\":\"Import\",\n   \"category\":\"prodcut\",\n   \"description\":\"prodcut\",\n   \"imageURL\":\"prodcut\",\n   \"msrp\":\"prodcut\",\n   \"productName\":\"prodcut\",\n   \"productPrice\":\"3.4\", //required \n   \"productSKU\":\"prodcut\", //required\n    \"productURL\":\"prodcut\",\n   \"variant\":\"prodcut\",\n   \"zoomImageURL\":\"prodcut\"\n \n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=product",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "product"
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "Add coupon code",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var Property = require('postman-collection').Property;",
							"",
							"function encodeParams(object) {",
							"    let buff = Buffer.from(JSON.stringify(object));",
							"    let base64data = normalizeBase64string(buff.toString('base64')); return base64data;",
							"}",
							"",
							"",
							"function normalizeBase64string(base64string) {",
							"    return base64string.replace('+', '-').replace('/', '_').replace(/=+$/, '');",
							"}",
							"",
							"let request_body = pm.request.body.raw;",
							"let request_uri = [...pm.request.url.path];",
							"request_uri.shift();",
							"request_uri = '/' + request_uri.join('/')",
							"",
							"request_uri = Property.replaceSubstitutions(request_uri, pm.collectionVariables.toObject());",
							"",
							"let query_string = pm.request.url.getQueryString();",
							"// add the secret key of the integration here - can be (re-)generated in Mapp Connect UI",
							"let key = \"nLCvBsG2f6Oi8dn3OPxC7ZxwiQ45bVhS\";",
							"",
							"",
							"let request_data = request_uri.toString();",
							" if (request_body) {",
							"    request_data += '|' + request_body;",
							"}",
							"if (query_string) {",
							"    request_data += '|' + query_string.toString();",
							"}",
							"",
							"console.log(request_data);",
							"",
							"let request_hash = CryptoJS.SHA1(request_data).toString(CryptoJS.digest);",
							"const jwtHeader = {",
							"    alg: 'HS256'",
							"};",
							"const jwtBody = {",
							"    'request-hash': request_hash,",
							"    exp: Date.now() + 600000",
							"};",
							"",
							"const encodedBody = encodeParams(jwtBody);",
							"const encodedHeader = encodeParams(jwtHeader);",
							"",
							"const signature = CryptoJS.HmacSHA256(encodedHeader + '.' + encodedBody, key).toString(CryptoJS.enc.Base64)",
							"",
							"let jwt = `${encodedHeader}.${encodedBody}.${signature}`;",
							"",
							"console.log(jwt);",
							"",
							"pm.request.headers.add({key: \"auth-token\", value: jwt});"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{ \n   \"listName\":\"campaing1\",  //when list not exist it will be created   \n  \"value\":\"summer1jaosajsoas\"\n}"
				},
				"url": {
					"raw": "https://jamie.h.shortest-route.com/charon/api/v1/integration/aefeccf3-ec0e-4234-95ad-6005e3fee6f5/event?subtype=coupon",
					"protocol": "https",
					"host": [
						"jamie",
						"h",
						"shortest-route",
						"com"
					],
					"path": [
						"charon",
						"api",
						"v1",
						"integration",
						"aefeccf3-ec0e-4234-95ad-6005e3fee6f5",
						"event"
					],
					"query": [
						{
							"key": "subtype",
							"value": "coupon"
						}
					]
				}
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	]
}