{ "info": { "_postman_id": "757d3b97-a7ba-4706-b366-5259dd04937b", "name": "LinksRez LPA - Hotel Developer Portal", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "16796244" }, "item": [ { "name": "Hotel", "item": [ { "name": "Get Hotels", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);", "console.log(jsonData);", "", "var hotel = jsonData[_.random(0, jsonData.length-1)]", "console.log(\"Using Hotel:\");", "console.log(hotel);", "", "var chainCode = hotel.basicPropertyInfo.chainCode;", "console.log(\"Using ChainCode:\");", "console.log(chainCode);", "", "var brandCode = hotel.basicPropertyInfo.brandCode;", "console.log(\"Using BrandCode:\");", "console.log(brandCode);", "", "var facilityCode = hotel.basicPropertyInfo.code;", "console.log(\"Using FacilityCode:\");", "console.log(facilityCode);", "", "postman.setEnvironmentVariable(\"hotel_chainCode\", chainCode);", "postman.setEnvironmentVariable(\"hotel_brandCode\", brandCode);", "postman.setEnvironmentVariable(\"hotel_facilityCode\", facilityCode);", "", "", "", "pm.collectionVariables.set(\"hotel_chainCode\", chainCode);", "pm.collectionVariables.set(\"hotel_brandCode\", brandCode);", "pm.collectionVariables.set(\"hotel_facilityCode\", facilityCode);", "", "", "var hotel2 = jsonData[_.random(0, jsonData.length-1)]", "var chainCode2 = hotel2.basicPropertyInfo.chainCode;", "var brandCode2 = hotel2.basicPropertyInfo.brandCode;", "var facilityCode2 = hotel2.basicPropertyInfo.code;", "pm.collectionVariables.set(\"hotel_chainCode_2\", chainCode2);", "pm.collectionVariables.set(\"hotel_brandCode_2\", brandCode2);", "pm.collectionVariables.set(\"hotel_facilityCode_2\", facilityCode2);", "", "var hotel3 = jsonData[_.random(0, jsonData.length-1)]", "var chainCode3 = hotel3.basicPropertyInfo.chainCode;", "var brandCode3 = hotel3.basicPropertyInfo.brandCode;", "var facilityCode3 = hotel3.basicPropertyInfo.code;", "pm.collectionVariables.set(\"hotel_chainCode_3\", chainCode2);", "pm.collectionVariables.set(\"hotel_brandCode_3\", brandCode2);", "pm.collectionVariables.set(\"hotel_facilityCode_3\", facilityCode2);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json", "disabled": true }, { "key": "Accept", "type": "text", "value": "application/json", "disabled": true } ], "url": { "raw": "{{url}}/api/{{ver}}/hotel?chainCode={{hotel_chainCode}}&city={{city}}&state={{state}}&country={{country}}&distance={{distance}}&distanceunit=M", "host": [ "{{url}}" ], "path": [ "api", "{{ver}}", "hotel" ], "query": [ { "key": "chainCode", "value": "{{hotel_chainCode}}" }, { "key": "city", "value": "{{city}}" }, { "key": "state", "value": "{{state}}" }, { "key": "country", "value": "{{country}}" }, { "key": "distance", "value": "{{distance}}" }, { "key": "distanceunit", "value": "M" } ] } }, "response": [] }, { "name": "Get Hotels GPS", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);", "console.log(jsonData);", "", "var hotel = jsonData[_.random(0, jsonData.length-1)]", "console.log(\"Using Hotel:\");", "console.log(hotel);", "", "var chainCode = hotel.basicPropertyInfo.chainCode;", "console.log(\"Using ChainCode:\");", "console.log(chainCode);", "", "var brandCode = hotel.basicPropertyInfo.brandCode;", "console.log(\"Using BrandCode:\");", "console.log(brandCode);", "", "var facilityCode = hotel.basicPropertyInfo.code;", "console.log(\"Using FacilityCode:\");", "console.log(facilityCode);", "", "postman.setEnvironmentVariable(\"hotel_chainCode\", chainCode);", "postman.setEnvironmentVariable(\"hotel_brandCode\", brandCode);", "postman.setEnvironmentVariable(\"hotel_facilityCode\", facilityCode);", "", "pm.collectionVariables.set(\"hotel_chainCode\", chainCode);", "pm.collectionVariables.set(\"hotel_brandCode\", brandCode);", "pm.collectionVariables.set(\"hotel_facilityCode\", facilityCode);", "", "", "var hotel2 = jsonData[_.random(0, jsonData.length-1)]", "var chainCode2 = hotel2.basicPropertyInfo.chainCode;", "var brandCode2 = hotel2.basicPropertyInfo.brandCode;", "var facilityCode2 = hotel2.basicPropertyInfo.code;", "pm.collectionVariables.set(\"hotel_chainCode_2\", chainCode2);", "pm.collectionVariables.set(\"hotel_brandCode_2\", brandCode2);", "pm.collectionVariables.set(\"hotel_facilityCode_2\", facilityCode2);", "", "var hotel3 = jsonData[_.random(0, jsonData.length-1)]", "var chainCode3 = hotel3.basicPropertyInfo.chainCode;", "var brandCode3 = hotel3.basicPropertyInfo.brandCode;", "var facilityCode3 = hotel3.basicPropertyInfo.code;", "pm.collectionVariables.set(\"hotel_chainCode_3\", chainCode2);", "pm.collectionVariables.set(\"hotel_brandCode_3\", brandCode2);", "pm.collectionVariables.set(\"hotel_facilityCode_3\", facilityCode2);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json", "disabled": true }, { "key": "Accept", "type": "text", "value": "application/json", "disabled": true } ], "url": { "raw": "{{url}}/api/{{ver}}/hotel?chainCode={{hotel_chainCode}}&distance={{distance}}&latitude={{latitude}}&longitude={{longitude}}&distanceunit=M", "host": [ "{{url}}" ], "path": [ "api", "{{ver}}", "hotel" ], "query": [ { "key": "chainCode", "value": "{{hotel_chainCode}}" }, { "key": "distance", "value": "{{distance}}" }, { "key": "latitude", "value": "{{latitude}}" }, { "key": "longitude", "value": "{{longitude}}" }, { "key": "distanceunit", "value": "M" } ] } }, "response": [] }, { "name": "GET Hotel Description", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "formdata", "formdata": [] }, "url": { "raw": "{{url}}/api/{{ver}}/hotel/description?chainCode={{hotel_chainCode}}&brandCode={{hotel_brandCode}}&facilityCode={{hotel_facilityCode}}", "host": [ "{{url}}" ], "path": [ "api", "{{ver}}", "hotel", "description" ], "query": [ { "key": "chainCode", "value": "{{hotel_chainCode}}" }, { "key": "brandCode", "value": "{{hotel_brandCode}}" }, { "key": "facilityCode", "value": "{{hotel_facilityCode}}" } ] } }, "response": [] }, { "name": "POST Hotel Description", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"hotelDescriptionRQArray\": [\r\n {\r\n \"chainCode\": \"{{hotel_chainCode}}\",\r\n \"brandCode\": \"{{hotel_brandCode}}\",\r\n \"facilityCode\": \"{{hotel_facilityCode}}\"\r\n },\r\n {\r\n \"chainCode\": \"{{hotel_chainCode_2}}\",\r\n \"brandCode\": \"{{hotel_brandCode_2}}\",\r\n \"facilityCode\": \"{{hotel_facilityCode_2}}\"\r\n },\r\n {\r\n \"chainCode\": \"{{hotel_chainCode_3}}\",\r\n \"brandCode\": \"{{hotel_brandCode_3}}\",\r\n \"facilityCode\": \"{{hotel_facilityCode_3}}\"\r\n }\r\n ]\r\n}\r\n\r\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/api/{{ver_hotel}}/hotel/description", "host": [ "{{url}}" ], "path": [ "api", "{{ver_hotel}}", "hotel", "description" ] } }, "response": [] }, { "name": "Retrieve Offers", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);", "console.log(jsonData);", "", "var offer = jsonData.offers[_.random(0, jsonData.offers.length-1)]", "console.log(\"Using Offer:\");", "console.log(offer);", "", "var ratePlanCode = offer.product[0].roomStay.ratePlan.ratePlanCode.value;", "console.log(\"RatePlanCode:\");", "console.log(ratePlanCode);", "", "var roomTypeCode = offer.product[0].roomStay.roomType.code.value;", "console.log(\"roomTypeCode:\");", "console.log(roomTypeCode);", "", "pm.collectionVariables.set(\"ratePlanCode\", ratePlanCode);", "pm.collectionVariables.set(\"roomTypeCode\", roomTypeCode);", "", "", "//Not every provider uses this", "var extensionPoint = offer.extensionPoint", "if(extensionPoint != null){", " var clientId = extensionPoint.any[0][\"clientId\"];", " console.log(\"clientId:\");", " console.log(clientId);", " pm.collectionVariables.set(\"clientId\", clientId);", "} else {", " pm.collectionVariables.set(\"clientId\", null);", " console.log(\"clientId: NULL\");", "}", "", "//May fail on some providers so may fail on NullPointerException", "var ratePlanName = offer.product[0].roomStay.ratePlan.ratePlanName;", "if(ratePlanName != null) {", " console.log(\"ratePlanName:\");", " console.log(ratePlanName);", " pm.collectionVariables.set(\"ratePlanName\", ratePlanName);", "} else {", " pm.collectionVariables.set(\"ratePlanName\", null);", " console.log(\"ratePlanName: NULL\");", "}" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json", "disabled": true }, { "key": "Accept", "type": "text", "value": "application/json", "disabled": true } ], "body": { "mode": "raw", "raw": "{\r\n \"basicPropertyInfo\": [\r\n {\r\n \"chainCode\": \"{{hotel_chainCode}}\",\r\n \"brandCode\": \"{{hotel_brandCode}}\",\r\n \"code\": \"{{hotel_facilityCode}}\"\r\n }\r\n ],\r\n \"baseHospitalityFacilityQuery\": {\r\n \"dateTimeSpan\": {\r\n \"start\": \"{{start_date}}\",\r\n \"end\": \"{{end_date}}\"\r\n },\r\n \"guestCount\": [\r\n {\r\n \"ageQualifyingCode\": \"ADULT\",\r\n \"value\": \"2\"\r\n }\r\n ]\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/api/{{ver}}/hotel/offers", "host": [ "{{url}}" ], "path": [ "api", "{{ver}}", "hotel", "offers" ] } }, "response": [] }, { "name": "Retrieve Offers", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);", "console.log(jsonData);", "", "var offer = jsonData.offers[_.random(0, jsonData.offers.length-1)]", "console.log(\"Using Offer:\");", "console.log(offer);", "", "var ratePlanCode = offer.product[0].roomStay.ratePlan.ratePlanCode.value;", "console.log(\"RatePlanCode:\");", "console.log(ratePlanCode);", "", "var roomTypeCode = offer.product[0].roomStay.roomType.code.value;", "console.log(\"roomTypeCode:\");", "console.log(roomTypeCode);", "", "pm.collectionVariables.set(\"ratePlanCode\", ratePlanCode);", "pm.collectionVariables.set(\"roomTypeCode\", roomTypeCode);", "", "", "//Not every provider uses this", "var extensionPoint = offer.extensionPoint", "if(extensionPoint != null){", " var clientId = extensionPoint.any[0][\"clientId\"];", " console.log(\"clientId:\");", " console.log(clientId);", " pm.collectionVariables.set(\"clientId\", clientId);", "} else {", " pm.collectionVariables.set(\"clientId\", null);", " console.log(\"clientId: NULL\");", "}", "", "//May fail on some providers so may fail on NullPointerException", "var ratePlanName = offer.product[0].roomStay.ratePlan.ratePlanName;", "if(ratePlanName != null) {", " console.log(\"ratePlanName:\");", " console.log(ratePlanName);", " pm.collectionVariables.set(\"ratePlanName\", ratePlanName);", "} else {", " pm.collectionVariables.set(\"ratePlanName\", null);", " console.log(\"ratePlanName: NULL\");", "}" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json", "disabled": true }, { "key": "Accept", "type": "text", "value": "application/json", "disabled": true } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/api/{{ver}}/hotel/offers?chain={{hotel_chainCode}}&brand={{hotel_brandCode}}&code={{hotel_facilityCode}}&start={{start_date}}&end={{end_date}}&aguestcounts=2&roomquantity=1", "host": [ "{{url}}" ], "path": [ "api", "{{ver}}", "hotel", "offers" ], "query": [ { "key": "chain", "value": "{{hotel_chainCode}}" }, { "key": "brand", "value": "{{hotel_brandCode}}" }, { "key": "code", "value": "{{hotel_facilityCode}}" }, { "key": "start", "value": "{{start_date}}" }, { "key": "end", "value": "{{end_date}}" }, { "key": "aguestcounts", "value": "2" }, { "key": "roomquantity", "value": "1" } ] } }, "response": [] }, { "name": "CREATE Booking", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);", "console.log(jsonData);", "", "var orderRS = jsonData.createOrderRS[_.random(0, jsonData.createOrderRS.length-1)]", "console.log(\"Using OrderRS:\");", "console.log(orderRS);", "", "var confirmationId = orderRS.order.confirmationID.value;", "console.log(\"confirmationId:\");", "console.log(confirmationId);", "", "var gnrNumber = null;", "if (orderRS.order.extensionPoint && orderRS.order.extensionPoint.any && orderRS.order.extensionPoint.any[0]) {", " gnrNumber = orderRS.order.extensionPoint.any[0][\"gnrNumber\"];", " console.log(\"gnrNumber\");", " console.log(gnrNumber);", " pm.collectionVariables.set(\"gnrNumber\", gnrNumber);", "}", "", "pm.collectionVariables.set(\"confirmationId\", confirmationId);", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"createOrderRQ\": [\r\n {\r\n \"payloadStdAttributes\": {\r\n \"target\": \"TEST\",\r\n \"version\": 5.000,\r\n \"transactionStatusCode\": \"START\",\r\n \"retransmissionIndicatorInd\": false\r\n },\r\n \"order\": {\r\n \"offer\": [\r\n {\r\n \"product\": [\r\n {\r\n \"@type\": \"ProductHospitality\",\r\n \"roomStay\": {\r\n \"roomType\": {\r\n \"code\": {\r\n \"value\": \"{{roomTypeCode}}\"\r\n }\r\n },\r\n \"ratePlan\": {\r\n \"ratePlanCode\": {\r\n \"value\": \"{{ratePlanCode}}\"\r\n },\r\n \"ratePlanName\": \"{{ratePlanName}}\"\r\n }\r\n },\r\n \"guestCount\": [\r\n {\r\n \"ageQualifyingCode\": \"ADULT\",\r\n \"value\": 1\r\n }\r\n ],\r\n \"dateTimeSpan\": {\r\n \"timeSpan\": {\r\n \"start\": \"{{start_date}}\",\r\n \"end\": \"{{end_date}}\"\r\n }\r\n }\r\n }\r\n ],\r\n \"facilityIdentifier\": {\r\n \"@type\": \"FacilityHotel\",\r\n \"facilityKey\": {\r\n \"@type\": \"FacilityKeyHotel\",\r\n \"facilityCode\": \"{{hotel_facilityCode}}\",\r\n \"chainCode\": \"{{hotel_chainCode}}\",\r\n \"brandCode\": \"{{hotel_brandCode}}\"\r\n }\r\n },\r\n \"extensionPoint\": {\r\n \"any\": [\r\n {\r\n \"clientId\": \"{{clientId}}\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"primaryTraveler\": {\r\n \"personName\": {\r\n \"given\": [\r\n \"Ron\"\r\n ],\r\n \"surname\": \"{{surname}}\"\r\n },\r\n \"address\": [\r\n {\r\n \"addressLine\": [\r\n \"48 BEECHWOOD DR.\"\r\n ],\r\n \"city\": \"N. ANDOVER\",\r\n \"stateProv\": {\r\n \"value\": \"MA\"\r\n },\r\n \"country\": {\r\n \"value\": \"US\"\r\n },\r\n \"postalCode\": \"01845\",\r\n \"extensionPointDetail\": {\r\n \"any\": [\r\n {\r\n \"addressType\": \"travel\",\r\n \"company\": \"LINKS GOLF TRAVEL\"\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"addressLine\": [\r\n \"755 Crossover Lane\"\r\n ],\r\n \"city\": \"Memphis\",\r\n \"stateProv\": {\r\n \"value\": \"TN\"\r\n },\r\n \"country\": {\r\n \"value\": \"US\"\r\n },\r\n \"postalCode\": \"28301\",\r\n \"extensionPointDetail\": {\r\n \"any\": [\r\n {\r\n \"addressType\": \"business\",\r\n \"company\": \"HILTON\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"telephone\": [\r\n {\r\n \"phoneNumber\": \"9012345677\",\r\n \"remark\": \"business\"\r\n }\r\n ],\r\n \"email\": [\r\n {\r\n \"address\": \"ronswanson@gmail.com\",\r\n \"remark\": \"home\"\r\n }\r\n ]\r\n },\r\n \"payment\": [\r\n {\r\n \"formOfPayment\": {\r\n \"paymentCard\": {\r\n \"cardCode\": \"VI\",\r\n \"cardHolderName\": \"{{card_name}}\",\r\n \"cardNumber\": {\r\n \"plainText\": \"{{card_num}}\"\r\n },\r\n \"seriesCode\": {\r\n \"plainText\": \"{{card_cvv}}\"\r\n },\r\n \"expireDate\": \"{{card_expire}}\"\r\n },\r\n \"guaranteeTypeCode\": {\r\n \"value\": \"CREDIT_CARD\"\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/api/{{ver}}/hotel/order", "host": [ "{{url}}" ], "path": [ "api", "{{ver}}", "hotel", "order" ] } }, "response": [] }, { "name": "GET Booking", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/api/{{ver}}/hotel/order?chainCode={{hotel_chainCode}}&confirmationId={{confirmationId}}&surname={{surname}}", "host": [ "{{url}}" ], "path": [ "api", "{{ver}}", "hotel", "order" ], "query": [ { "key": "chainCode", "value": "{{hotel_chainCode}}" }, { "key": "confirmationId", "value": "{{confirmationId}}" }, { "key": "surname", "value": "{{surname}}" } ] } }, "response": [] }, { "name": "DELETE Booking", "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"deleteOrderRQ\": [\r\n {\r\n \"payloadStdAttributes\": {\r\n \"target\": \"TEST\",\r\n \"version\": 5.0,\r\n \"primaryLangID\": \"EN\",\r\n \"echoToken\": \"whatever\",\r\n \"timeStamp\": \"2020-08-23T10:00:00\",\r\n \"transactionStatusCode\": \"START\",\r\n \"transactionIdentifier\": \"randomString1234\"\r\n },\r\n \"order\": {\r\n \"primaryTraveler\": {\r\n \"personName\": {\r\n \"surname\": \"{{surname}}\"\r\n }\r\n },\r\n \"confirmationID\": {\r\n \"value\": \"{{confirmationId}}\"\r\n },\r\n \"extensionPoint\": {\r\n \"any\": [\r\n {\r\n \"gnrNumber\": \"{{gnrNumber}}\"\r\n }\r\n ]\r\n },\r\n \"offer\": [\r\n {\r\n \"facilityIdentifier\": {\r\n \"@type\": \"FacilityHotel\",\r\n \"facilityKey\": {\r\n \"@type\": \"FacilityKeyHotel\",\r\n \"facilityCode\": \"{{hotel_facilityCode}}\",\r\n \"chainCode\": \"{{hotel_chainCode}}\"\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{url}}/api/{{ver}}/hotel/order", "host": [ "{{url}}" ], "path": [ "api", "{{ver}}", "hotel", "order" ] } }, "response": [] } ] }, { "name": "Hotel Bookings", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "{{url}}/admin/v1/hotel/bookings", "host": [ "{{url}}" ], "path": [ "admin", "v1", "hotel", "bookings" ] } }, "response": [] } ], "auth": { "type": "apikey", "apikey": [ { "key": "value", "value": "XXXXXXXXX", "type": "string" }, { "key": "key", "value": "api-key", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "url", "value": "https://hotel-api-2445583353637.production.gw.apicast.io:443" }, { "key": "hotel_chainCode", "value": "XX" }, { "key": "city", "value": "Boston" }, { "key": "state", "value": "MA" }, { "key": "country", "value": "US" }, { "key": "distance", "value": "25" }, { "key": "ver", "value": "v2" }, { "key": "latitude", "value": "48.85341" }, { "key": "longitude", "value": "2.3488" }, { "key": "start_date", "value": "2021-12-18" }, { "key": "end_date", "value": "2021-12-19" }, { "key": "hotel_brandCode", "value": "" }, { "key": "hotel_facilityCode", "value": "" }, { "key": "hotel_chainCode_2", "value": "" }, { "key": "hotel_brandCode_2", "value": "" }, { "key": "hotel_facilityCode_2", "value": "" }, { "key": "hotel_chainCode_3", "value": "" }, { "key": "hotel_brandCode_3", "value": "" }, { "key": "hotel_facilityCode_3", "value": "" }, { "key": "ratePlanCode", "value": "" }, { "key": "roomTypeCode", "value": "" }, { "key": "clientId", "value": "" }, { "key": "ratePlanName", "value": "" }, { "key": "surname", "value": "Johnson" }, { "key": "card_num", "value": "4111111111111111" }, { "key": "card_cvv", "value": "123" }, { "key": "card_expire", "value": "1224" }, { "key": "card_name", "value": "RON JOHNSON" }, { "key": "confirmationId", "value": "" }, { "key": "gnrNumber", "value": "" } ] }