{
	"info": {
		"_postman_id": "d8217af7-dabb-4c43-9daf-71cca9d7386d",
		"name": "Skylink API",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "14984106"
	},
	"item": [
		{
			"name": "AirShopping",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"var template = `",
							"<style type=\"text/css\">",
							"    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}",
							"    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}",
							"    .tftable tr {background-color:#ffffff;}",
							"    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}",
							"    .tftable tr:hover {background-color:#e0ffff;}",
							"</style>",
							"",
							"<table class=\"tftable\" border=\"1\">",
							"    <tr>",
							"        <th>ID</th>",
							"        <th>Price</th>",
							"        <th>Action</th>",
							"    </tr>",
							"    ",
							"<script>",
							"    var hcdAllArray = [];",
							"    var ii = 0;",
							"</script>",
							"    {{#each response.aFlights}}",
							"<script>",
							"    var hcdArray = [];",
							"</script>",
							"    {{#each route}}",
							"<script>",
							"    hcdArray.push(\"{{legs.0.hcd}}\");",
							"</script>",
							"    {{/each}}",
							"<script>",
							"    hcdAllArray[{{id}}] = hcdArray;",
							"</script>",
							"",
							"        <tr>",
							"            <td>{{id}}</td>",
							"            <td>{{cur}} {{price.adt.amt}}</td>",
							"            <td><button onclick=\"showHcd({{id}})\">Collect HCD</button></td>",
							"        </tr>",
							"    {{/each}}",
							"</table>",
							"",
							"<script>",
							"    function showHcd(id) {",
							"        console.log(hcdAllArray[id]);",
							"    }",
							"</script>",
							"",
							"`;",
							"",
							"function constructVisualizerPayload() {",
							"    return {response: pm.response.json()};",
							"}",
							"",
							"pm.visualizer.set(template, constructVisualizerPayload());"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"protocolProfileBehavior": {
				"disableCookies": true
			},
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"cur\": \"EUR\",\n    \"lng\": \"de\",\n    \"Flight\": {\n        \"route\": [\n            {\n                \"dac\": \"FRA\",\n                \"aac\": \"LAX\",\n                \"ddt\": \"2025-09-13\"\n            },\n            {\n                \"dac\": \"LAX\",\n                \"aac\": \"FRA\",\n                \"ddt\": \"2025-09-27\"\n            }\n        ]\n    },\n    \"aPax\": [\n        {\n            \"typ\": \"adt\",\n            \"qty\": 1\n        },\n        {\n            \"typ\": \"chd\",\n            \"qty\": 1\n        }\n    ],\n    \"Search\": {\n        \"non\": true,\n        \"bag\": 1,\n        \"trf\": \"ABFU\"\n    },\n    \"Output\":{\n        \"leg\": false\n    }\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{rest_endpoint}}/AirShopping",
					"host": [
						"{{rest_endpoint}}"
					],
					"path": [
						"AirShopping"
					]
				}
			},
			"response": []
		},
		{
			"name": "OfferCheck",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"var template = `",
							"<style type=\"text/css\">",
							"    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}",
							"    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}",
							"    .tftable tr {background-color:#ffffff;}",
							"    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}",
							"    .tftable tr:hover {background-color:#e0ffff;}",
							"</style>",
							"",
							"<table class=\"tftable\" border=\"1\">",
							"    <tr>",
							"        <th>ID</th>",
							"        <th>Price</th>",
							"        <th>Action</th>",
							"    </tr>",
							"    ",
							"<script>",
							"    var hcdAllArray = [];",
							"    var ii = 0;",
							"</script>",
							"    {{#each response.aFlights}}",
							"<script>",
							"    var hcdArray = [];",
							"</script>",
							"    {{#each route}}",
							"<script>",
							"    hcdArray.push(\"{{legs.0.hcd}}\");",
							"</script>",
							"    {{/each}}",
							"<script>",
							"    hcdAllArray[{{id}}] = hcdArray;",
							"</script>",
							"",
							"        <tr>",
							"            <td>{{id}}</td>",
							"            <td>{{cur}} {{price.adt.amt}}</td>",
							"            <td><button onclick=\"showHcd({{id}})\">Collect HCD</button></td>",
							"        </tr>",
							"    {{/each}}",
							"</table>",
							"",
							"<script>",
							"    function showHcd(id) {",
							"        console.log(hcdAllArray[id]);",
							"    }",
							"</script>",
							"",
							"`;",
							"",
							"function constructVisualizerPayload() {",
							"    return {response: pm.response.json()};",
							"}",
							"",
							"pm.visualizer.set(template, constructVisualizerPayload());"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"protocolProfileBehavior": {
				"disableCookies": true
			},
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"hcds\": [\"ZiXX!F!1512!9!0!0\", \"ZiXX!F!1512!9!1!0\"],\n    \"cur\": \"EUR\"\n}\n",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{rest_endpoint}}/OfferCheck",
					"host": [
						"{{rest_endpoint}}"
					],
					"path": [
						"OfferCheck"
					]
				}
			},
			"response": []
		},
		{
			"name": "OrderCreate",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"var template = `",
							"<style type=\"text/css\">",
							"    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}",
							"    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}",
							"    .tftable tr {background-color:#ffffff;}",
							"    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}",
							"    .tftable tr:hover {background-color:#e0ffff;}",
							"</style>",
							"",
							"<table class=\"tftable\" border=\"1\">",
							"    <tr>",
							"        <th>ID</th>",
							"        <th>Price</th>",
							"        <th>Action</th>",
							"    </tr>",
							"    ",
							"<script>",
							"    var hcdAllArray = [];",
							"    var ii = 0;",
							"</script>",
							"    {{#each response.aFlights}}",
							"<script>",
							"    var hcdArray = [];",
							"</script>",
							"    {{#each route}}",
							"<script>",
							"    hcdArray.push(\"{{legs.0.hcd}}\");",
							"</script>",
							"    {{/each}}",
							"<script>",
							"    hcdAllArray[{{id}}] = hcdArray;",
							"</script>",
							"",
							"        <tr>",
							"            <td>{{id}}</td>",
							"            <td>{{cur}} {{price.adt.amt}}</td>",
							"            <td><button onclick=\"showHcd({{id}})\">Collect HCD</button></td>",
							"        </tr>",
							"    {{/each}}",
							"</table>",
							"",
							"<script>",
							"    function showHcd(id) {",
							"        console.log(hcdAllArray[id]);",
							"    }",
							"</script>",
							"",
							"`;",
							"",
							"function constructVisualizerPayload() {",
							"    return {response: pm.response.json()};",
							"}",
							"",
							"pm.visualizer.set(template, constructVisualizerPayload());"
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"protocolProfileBehavior": {
				"disableCookies": true
			},
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"hcds\": [\"ZiXX!F!1512!9!0!0\", \"ZiXX!F!1512!9!1!0\"],\n    \"cur\": \"EUR\",\n    \"aTvr\"\n}\n",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{rest_endpoint}}/OrderCreate",
					"host": [
						"{{rest_endpoint}}"
					],
					"path": [
						"OrderCreate"
					]
				}
			},
			"response": []
		},
		{
			"name": "OrderRetrieve",
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {},
				"disableCookies": true
			},
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"crs\": \"Sabre|ABC\",\n    \"bcd\": \"XXXXXX\"\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{rest_endpoint}}/OrderRetrieve",
					"host": [
						"{{rest_endpoint}}"
					],
					"path": [
						"OrderRetrieve"
					]
				},
				"description": "hhgg jjngfdgfdg"
			},
			"response": []
		}
	],
	"auth": {
		"type": "apikey",
		"apikey": [
			{
				"key": "value",
				"value": "{{token}}",
				"type": "string"
			},
			{
				"key": "key",
				"value": "My-Authorization",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		}
	]
}