Travelport / travelport-uapi-tutorial-php

The travelport-uapi-tutorial-php is a PHP project for Universal API that will help you connect and code a standard workflow including Air, Vehicle, and Hotel.
35 stars 47 forks source link

Booking #85

Open nitincdac opened 7 years ago

nitincdac commented 7 years ago

Hi,

With your amazing help, I have somehow completed the first step of searching. I am using this with PHP. I have used the following XML for request.

now after this step, I want to do a test booking. can you please share few things regarding this Booking step: 1. Please tell me the steps for sending the booking request & then generating the PNR 2. Can you please share a XML example for booking request & PNR generation ? 3. Can you please share a sample PHP program for the same ? Regards
vivekjyotipramanik commented 7 years ago

Hi nitincdac,

Please find below the link with all the Air workflows. Please let us know how it goes. Thanks.

https://support.travelport.com/webhelp/uapi/uAPI.htm#SampleWeb/Alternative_Sample_Pages/Samples_Air-Galileo-Overview.htm%3FTocPath%3DSamples%7CXML%2520Samples%2520%7CAir%2520Samples%7CAir%2520Workflows%7CGalileo%2520(1G)%2520Workflows%7C_____0

We do not have any AirPrice/AirBook samples with PHP, but I am currently working on them, so hopefully will be available soon. Thanks.

nitincdac commented 7 years ago

Hi

Please tell me about booking request :

This is my "lowFareSearchRequest" :

<?xml version="1.0" encoding="UTF-8"?>

This is my "lowFareSearchResponse" : DL 6729 SHANGHAI AIRLINES CO LTD FM9302 DL 3479 ENDEAVOR AIR DBA DELTA CONNECTION DL 7766 CHINA SOUTHERN AIRLINES CZ379 MU 9302 SHANGHAI AIRLINES CO LTD FM9302 MU 9320 SHANGHAI AIRLINES CO LTD FM9320 MF 9285 CHINA SOUTHERN AIRLINES CZ699 MF 9283 CHINA SOUTHERN AIRLINES CZ399 DL 6782 CHINA SOUTHERN AIRLINES CZ699 DL 7751 CHINA SOUTHERN AIRLINES CZ399 DL 7803 CHINA SOUTHERN AIRLINES CZ659 CZ 1136 DELTA AIR LINES DL1908 DL 7830 CHINA SOUTHERN AIRLINES CZ327 CZ 1296 DELTA AIR LINES DL4100 b5zbTZSYeFfEryqM5eyphc9WI+oET4lamCKFjjwShaHisHcbCfGeeptw4Gmth/P4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wCldEViJRmeVMNutd1cS71cX4aohbQekEp8hv2nFspuR900sPZSPhA7b4abjsgR9iqJdIhuYrSCI4ZhhRa1cL gCXetZxMfujEryqM5eyphc9WI+oET4la/scwJs53iaCqezeNuMvJn5tw4Gmth/P4/Vwy8K+tJqY+lin/K4YbVygMXr7PMH/A 9FzgZW9nE5rEryqM5eyphc9WI+oET4la1S3qFKqCAVr7QZbS6mfRhZtw4Gmth/P4/Vwy8K+tJqajrMBbDrs9LCgMXr7PMH/A HbUfDJPBzM3wCldEViJRmeVMNutd1cS71cX4aohbQel7owRcskfPEeR900sPZSPhA7b4abjsgR9iqJdIhuYrSCI4ZhhRa1cL BlWMExG0yajEryqM5eyphc9WI+oET4lamCKFjjwShaHisHcbCfGeejTNT+ZT99Mq/Vwy8K+tJqbVOYq2NOp7oCgMXr7PMH/A Main Cabin Main Cabin Upgrade to Main Cabin for additional must-haves and added flexibility. When you book in the Main Cabin, you can: • Select an available seat at purchase • Make Same Day Travel changes (fees may apply) • Receive full Medallion® benefits The Main Cabin reflects our high standards in Economy Travel. Select from a host of affordable travel customizable options, including Wi-Fi (where available), Starbucks® coffee, complimentary entertainment from Delta Studio™ where available complimentary snacks and non-alcoholic beverages on nearly all flights, Delta EATS menu for purchase on flights 900 miles and award-winning service. Additional benefits include: 1. Ability to select available seats at purchase 2. Same-Day Travel Changes are permitted on a space-available basis. Fees may apply 3. Changes and refunds depend on fare rules Low affordable fare with perks https://merchandisingmanagement.pp.travelport.com/documents/10431/12001/eco.png https://merchandisingmanagement.pp.travelport.com/documents/10431/12001/eco.png ECONOMY SAVER ECONOMY SA Trade up to Economy SAVER in order to earn 3 to 5 times more miles. ECONOMY SAVER fare - 1 - Checked Baggage: 1 Bag, Max 23Kg, 158cm. 2 - Carry On / Hand Baggage: 1 Bag, Max 10Kg. 3 - Flight and/or Travel Date Changes (Rebooking): Additional fee. 4 - Refund: Non Refundable fare. 5 - Pre Reserved Seating: Free. 6 - Meals and Beverages on board: Free hot meal and/or appetizers. Choice of soft drinks and juices during the flight. 7 - On board WiFi connectivity: Additional fee where available. ∙ 75-125% Bonus miles ∙ Cabin upgrade to Comfort is available for purchase The experience on board: ∙ Ergonomic seats on one of the newest fleets in Europe ∙ Video Audio seatback entertainment with a wide choice of films and music (may depend on AC type) **********Awarded SKYTRAX 4 Star Rating********** GDS/S8 ECONOMY SAVER https://merchandisingmanagement.pp.travelport.com/documents/10431/62634/economy.jpg https://merchandisingmanagement.pp.travelport.com/documents/10431/62634/economy.jpg Then I did the AirPriceRequest This is my "airPricingRequest" : This is my "airPricingResponse" : * NONREF/HEBO3BPATEH * PRICING RULES VALIDATING CARRIER DEFAULT SU Taxes returned at the FareInfo level are for informational purposes only, and may differ from those returned at the Itinerary/Passenger Type levels. No Merchandising optional services returned for Flight(s) [SU][221] No Merchandising optional services returned for Flight(s) [SU][122] AEROFLOT RUSSIAN AIRLINES AEROFLOT RUSSIAN AIRLINES b5zbTZSYeFfEryqM5eyphc9WI+oET4lamCKFjjwShaHisHcbCfGeeptw4Gmth/P4a0SVK0v5KdFJrI1u+WTtIGZhag+VuWAQ ECONOMY SAVER ECONOMY SA ECONOMY SAVER fare - 1 - Checked Baggage: 1 Bag, Max 23Kg, 158cm. 2 - Carry On / Hand Baggage: 1 Bag, Max 10Kg. 3 - Flight and/or Travel Date Changes (Rebooking): Additional fee. 4 - Refund: Non Refundable fare. 5 - Pre Reserved Seating: Free. 6 - Meals and Beverages on board: Free hot meal and/or appetizers. Choice of soft drinks and juices during the flight. 7 - On board WiFi connectivity: Additional fee where available. ∙ 75-125% Bonus miles ∙ Cabin upgrade to Comfort is available for purchase The experience on board: ∙ Ergonomic seats on one of the newest fleets in Europe ∙ Video Audio seatback entertainment with a wide choice of films and music (may depend on AC type) **********Awarded SKYTRAX 4 Star Rating********** GDS/S8 Trade up to Economy SAVER in order to earn 3 to 5 times more miles. ECONOMY SAVER fare - 1 - Checked Baggage: 1 Bag, Max 23Kg, 158cm. 2 - Carry On / Hand Baggage: 1 Bag, Max 10Kg. 3 - Flight and/or Travel Date Changes (Rebooking): Additional fee. 4 - Refund: Non Refundable fare. 5 - Pre Reserved Seating: Free. 6 - Meals and Beverages on board: Free hot meal and/or appetizers. Choice of soft drinks and juices during the flight. 7 - On board WiFi connectivity: Additional fee where available. ∙ 75-125% Bonus miles ∙ Cabin upgrade to Comfort is available for purchase The experience on board: ∙ Ergonomic seats on one of the newest fleets in Europe ∙ Video Audio seatback entertainment with a wide choice of films and music (may depend on AC type) **********Awarded SKYTRAX 4 Star Rating********** GDS/S8 ECONOMY SAVER https://merchandisingmanagement.pp.travelport.com/documents/10431/62634/economy.jpg https://merchandisingmanagement.pp.travelport.com/documents/10431/62634/economy.jpg Checked Baggage Checked Baggage Checked Baggage Allowance. (S5/BG-null/0CD) Checked Baggage Allowance. (S5/BG-null/0CD) Checked Baggage Check Bag Carry On Hand Baggage Upgrade To Comfort Upgrade To Comfort Upgrade To Comfort. (S5/BF-null/UTC) Upgrade To Comfort. (S5/BF-null/UTC) Upgrade To Comfort Upgrade Rebooking Making changes to your reservation Flight and/or Travel Date Changes (Rebooking). (S5/BF-VC/059) We understand that from time to time you may need to amend your reservation. The amount you will have to pay will depend on the route and class booked. Flight and/or Travel Date Changes (Rebooking). (S5/BF-VC/059) We understand that from time to time you may need to amend your reservation. The amount you will have to pay will depend on the route and class booked. Rebooking Rebooking Pre Reserved Seating Pre Reserved Seating Pre Reserved Seating. (S5/BF-SE/050) Pre Reserved Seating. (S5/BF-SE/050) Pre Reserved Seating Seating Ticket Change(s) Ticket Change(s) Ticket Change(s). (S5/BF-VC-CNS) Ticket Change(s). (S5/BF-VC-CNS) Ticket Change(s) Tkt Change Refund Refund Refund. (S5/BF-VR/RBA) Refund. (S5/BF-VR/RBA) Refund Refund Refund before Departure Refund before Departure Refund before Check In Closure / Departure. (S5/BF-VR/RBC) Refund before Check In Closure / Departure. (S5/BF-VR/RBC) Refund before Departure Ref dep Meals and Beverages Internet Access INTERNET ACCESS On board WiFi connectivity. (S5/IE-IT/0CL) On board WiFi connectivity. (S5/IE-IT/0CL) Internet Access WiFi Bonus Miles Bonus Miles Bonus Miles. (S5/FF-MG/0CM) Bonus Miles. (S5/FF-MG/0CM) Bonus Miles Miles PRIORITY CHECK IN Upgrade using Miles Upgrade using Miles Upgrade using Miles. (S5/UP-ME/0NI) Upgrade using Miles. (S5/UP-ME/0NI) Upgrade using Miles Upgrade ADT CAN SU X/MOW SU NYC364.87NUC364.87END ROE6.90652 SU MYTRIPANDMORE.COM/BAGGAGEDETAILSSU.BAGG 1P BAGGAGE DISCOUNTS MAY APPLY BASED ON FREQUENT FLYER STATUS/ ONLINE CHECKIN/FORM OF PAYMENT/MILITARY/ETC. UPTO50LB/23KG AND UPTO62LI/158LCM UPTO50LB/23KG AND UPTO62LI/158LCM 1P UPTO22LB/10KG AND UPTO45LI/115LCM PET IN CABIN 1P UPTO22LB/10KG AND UPTO45LI/115LCM PET IN CABIN ALL SEGMENTS MUST BE CONFIRMED * REBOOK 01/ Q 02/ Q *CK SEGS BOOKED COMPLY WITH TKTG TL RULE 0077GFB1000F00020101ADT00 01QVOLA 02000100020047GFB2000F000200010101NADTV3001ESA10010000299 b5zbTZSYeFfEryqM5eyphc9WI+oET4lamCKFjjwShaHisHcbCfGeeptw4Gmth/P4a0SVK0v5KdFJrI1u+WTtIGZhag+VuWAQ ECO CLASSIC ECO CLASS ECONOMY CLASSIC fare - 1 - Checked Baggage: 1 Bag, Max 23Kg, 158cm. 2 - Carry On / Hand Baggage: 1 Bag, Max 10Kg. 3 - Flight and/or Travel Date Changes (Rebooking): Additional fee. 4 - Refund: Additional fee. 5 - Pre Reserved Seating: Free. 6 - Meals and Beverages on board: Free hot meal and/or appetizers. Choice of soft drinks and juices during the flight. 7 - On board WiFi connectivity: Additional fee where available. ∙ 100-150% Bonus miles ∙ Cabin upgrade to Comfort is available for purchase The experience on board: ∙ Ergonomic seats on one of the newest fleets in Europe ∙ Video Audio seatback entertainment with a wide choice of films and music (may depend on AC type) **********Awarded SKYTRAX 4 Star Rating********** GDS/S8 Upgrade to Economy CLASSIC to be able to return or rebook your tickets for a fee and to earn additional miles. ECONOMY CLASSIC fare - 1 - Checked Baggage: 1 Bag, Max 23Kg, 158cm. 2 - Carry On / Hand Baggage: 1 Bag, Max 10Kg. 3 - Flight and/or Travel Date Changes (Rebooking): Additional fee. 4 - Refund: Additional fee. 5 - Pre Reserved Seating: Free. 6 - Meals and Beverages on board: Free hot meal and/or appetizers. Choice of soft drinks and juices during the flight. 7 - On board WiFi connectivity: Additional fee where available. ∙ 100-150% Bonus miles ∙ Cabin upgrade to Comfort is available for purchase The experience on board: ∙ Ergonomic seats on one of the newest fleets in Europe ∙ Video Audio seatback entertainment with a wide choice of films and music (may depend on AC type) **********Awarded SKYTRAX 4 Star Rating********** GDS/S8 ECO CLASSIC https://merchandisingmanagement.pp.travelport.com/documents/10431/62634/ECONOMY_B777.jpg https://merchandisingmanagement.pp.travelport.com/documents/10431/62634/ECONOMY_B777.jpg Checked Baggage Checked Baggage Checked Baggage Allowance. (S5/BG-null/0CD) Checked Baggage Allowance. (S5/BG-null/0CD) Checked Baggage Check Bag Carry On Hand Baggage Pre Reserved Seating Pre Reserved Seating Pre Reserved Seating. (S5/BF-SE/050) Pre Reserved Seating. (S5/BF-SE/050) Pre Reserved Seating Seating Upgrade To Comfort Upgrade To Comfort Upgrade To Comfort. (S5/BF-null/UTC) Upgrade To Comfort. (S5/BF-null/UTC) Upgrade To Comfort Upgrade Rebooking Making changes to your reservation Flight and/or Travel Date Changes (Rebooking). (S5/BF-VC/059) We understand that from time to time you may need to amend your reservation. The amount you will have to pay will depend on the route and class booked. Flight and/or Travel Date Changes (Rebooking). (S5/BF-VC/059) We understand that from time to time you may need to amend your reservation. The amount you will have to pay will depend on the route and class booked. Rebooking Rebooking Refund before Departure Refund before Departure Refund before Check In Closure / Departure. (S5/BF-VR/RBC) Refund before Check In Closure / Departure. (S5/BF-VR/RBC) Refund before Departure Ref dep Ticket Change(s) Ticket Change(s) Ticket Change(s). (S5/BF-VC-CNS) Ticket Change(s). (S5/BF-VC-CNS) Ticket Change(s) Tkt Change Refund Refund Refund. (S5/BF-VR/RBA) Refund. (S5/BF-VR/RBA) Refund Refund Meals and Beverages Internet Access INTERNET ACCESS On board WiFi connectivity. (S5/IE-IT/0CL) On board WiFi connectivity. (S5/IE-IT/0CL) Internet Access WiFi Bonus Miles Bonus Miles Bonus Miles. (S5/FF-MG/0CM) Bonus Miles. (S5/FF-MG/0CM) Bonus Miles Miles PRIORITY CHECK IN Upgrade using Miles Upgrade using Miles Upgrade using Miles. (S5/UP-ME/0NI) Upgrade using Miles. (S5/UP-ME/0NI) Upgrade using Miles Upgrade ADT CAN SU X/MOW SU NYC364.87NUC364.87END ROE6.90652 SU MYTRIPANDMORE.COM/BAGGAGEDETAILSSU.BAGG 1P BAGGAGE DISCOUNTS MAY APPLY BASED ON FREQUENT FLYER STATUS/ ONLINE CHECKIN/FORM OF PAYMENT/MILITARY/ETC. UPTO50LB/23KG AND UPTO62LI/158LCM UPTO50LB/23KG AND UPTO62LI/158LCM 1P UPTO22LB/10KG AND UPTO45LI/115LCM PET IN CABIN 1P UPTO22LB/10KG AND UPTO45LI/115LCM PET IN CABIN ALL SEGMENTS MUST BE CONFIRMED * REBOOK 01/ Q 02/ Q *CK SEGS BOOKED COMPLY WITH TKTG TL RULE 0077GFB1000F00020101ADT00 01QCOLA 02000100020047GFB2000F000200010101NADTV3001ECA10010000299 ------------------------------------------ Now please tell me what would be minimal request xml for Air Booking. regards
vivekjyotipramanik commented 7 years ago

Hi nitincdac,

Please find below the sample request and response for booking. Please let us know how it goes. Thanks.

https://support.travelport.com/webhelp/uapi/Content/SampleWeb/SampleFiles/001-03_1G_AirBook_Rq.xml

https://support.travelport.com/webhelp/uapi/Content/SampleWeb/SampleFiles/001-03_1G_AirBook_Rs.xml