{
	"info": {
		"_postman_id": "2905f77a-7ada-4b4b-ae49-6116c4b9d359",
		"name": "confirmation",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "27594153"
	},
	"item": [
		{
			"name": "event/confirmation/mandatory_fields",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"function getRandomInt(max) {\r",
							"  return Math.floor(Math.random() * max);\r",
							"}\r",
							"var randDom = getRandomInt(100000);\r",
							"pm.variables.set('randomSequence_id', randDom);\r",
							"var nonce = request.headers['x-auth-nonce'];\r",
							"var data = request.data;\r",
							"var newData = data.toString().replace(\"{{randomSequence_id}}\", randDom)\r",
							"var secret  = 'add token secret';\r",
							"var signature = CryptoJS.SHA256(nonce + newData + secret).toString()\r",
							"pm.globals.set(\"signature\", signature);"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "X-Auth-Token",
						"value": "add token",
						"type": "text"
					},
					{
						"key": "X-Auth-Nonce",
						"value": "8989898hhjhj",
						"type": "text"
					},
					{
						"key": "X-Auth-Signature",
						"value": "{{signature}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"type\": \"confirmation\",\n    \"confirmation_timestamp\": 1745308909,\n    \"user_merchant_id\": \"foo00400\",\n    \"sequence_id\": \"{{randomSequence_id}}\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://api.covery.ai/api/sendEvent",
					"protocol": "https",
					"host": [
						"api",
						"covery",
						"ai"
					],
					"path": [
						"api",
						"sendEvent"
					]
				}
			},
			"response": []
		},
		{
			"name": "event/confirmation/all_fields",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"function getRandomInt(max) {\r",
							"  return Math.floor(Math.random() * max);\r",
							"}\r",
							"var randDom = getRandomInt(100000);\r",
							"pm.variables.set('randomSequence_id', randDom);\r",
							"var nonce = request.headers['x-auth-nonce'];\r",
							"var data = request.data;\r",
							"var newData = data.toString().replace(\"{{randomSequence_id}}\", randDom)\r",
							"var secret  = 'add token secret';\r",
							"var signature = CryptoJS.SHA256(nonce + newData + secret).toString()\r",
							"pm.globals.set(\"signature\", signature);"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "X-Auth-Token",
						"value": "add token",
						"type": "text"
					},
					{
						"key": "X-Auth-Nonce",
						"value": "8989898hhjhj",
						"type": "text"
					},
					{
						"key": "X-Auth-Signature",
						"value": "{{signature}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"type\": \"confirmation\",\n    \"confirmation_timestamp\": 1745308909,\n    \"user_merchant_id\": \"f7800400\",\n    \"sequence_id\": \"{{randomSequence_id}}\",\n    \"group_id\": \"21\",\n    \"email\": \"meowmail@gmail.com\",\n    \"phone\": \"7676765665\",\n    \"email_confirmed\": true,\n    \"phone_confirmed\": true,\n    \"document_id\": [\n        1,\n        2\n    ],\n    \"ajax_validation\": true,\n    \"cookie_enabled\": true,\n    \"cpu_class\": \"x64\",\n    \"device_fingerprint\": \"DVTWL9EF7D98FAF03E93FF19619E19D2\",\n    \"device_id\": \"cd1357\",\n    \"do_not_track\": true,\n    \"anonymous\": false,\n    \"ip\": \"131.183.100.87\",\n    \"real_ip\": \"131.183.100.87\",\n    \"local_ip_list\": [\n        \"131.183.112.65\",\n        \"131.183.120.66\"\n    ],\n    \"language\": \"ua\",\n    \"languages\": [\n        \"ua\",\n        \"en\"\n    ],\n    \"language_browser\": [\n        \"ua\",\n        \"en\"\n    ],\n    \"language_user\": \"ua\",\n    \"language_system\": \"ua\",\n    \"os\": \"ubuntu 22.04\",\n    \"screen_resolution\": \"1024x1647\",\n    \"screen_orientation\": \"horizontal\",\n    \"client_resolution\": \"1024x1647\",\n    \"timezone_offset\": 120,\n    \"user_agent\": \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36\",\n    \"plugins\": [\n        \"adblock\",\n        \"pixel\"\n      ],\n    \"referer_url\": \"https://referer_url.com\",\n    \"origin_url\": \"https://origin_url.com\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://api.covery.ai/api/sendEvent",
					"protocol": "https",
					"host": [
						"api",
						"covery",
						"ai"
					],
					"path": [
						"api",
						"sendEvent"
					]
				}
			},
			"response": []
		}
	]
}