AgentDataWS
Click here for a complete list of operations.
GetBookingByBookingCode
Get booking information by booking code, return XML booking information
Test
The test form is only available for requests from the local machine.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /AgentDataWS.asmx HTTP/1.1 Host: api.datacom.vn Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://tempuri.org/GetBookingByBookingCode" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <Authentication xmlns="http://tempuri.org/"> <HeaderUser>string</HeaderUser> <HeaderPassword>string</HeaderPassword> </Authentication> </soap:Header> <soap:Body> <GetBookingByBookingCode xmlns="http://tempuri.org/"> <Account>string</Account> <Password>string</Password> <BookingCode>string</BookingCode> <GetPassenger>boolean</GetPassenger> <GetBaggage>boolean</GetBaggage> <GetFlightSegment>boolean</GetFlightSegment> </GetBookingByBookingCode> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetBookingByBookingCodeResponse xmlns="http://tempuri.org/"> <GetBookingByBookingCodeResult> <Id>int</Id> <BookingStatusDepart>string</BookingStatusDepart> <BookingStatusReturn>string</BookingStatusReturn> <BookingCodeDepart>string</BookingCodeDepart> <BookingCodeReturn>string</BookingCodeReturn> <StartPoint>string</StartPoint> <EndPoint>string</EndPoint> <DepartDate>dateTime</DepartDate> <ReturnDate>dateTime</ReturnDate> <Itinerary>int</Itinerary> <AirlineCodeDepart>string</AirlineCodeDepart> <AirlineCodeReturn>string</AirlineCodeReturn> <BookingDate>dateTime</BookingDate> <Timelimit>dateTime</Timelimit> <IssueDate>dateTime</IssueDate> <ContactName>string</ContactName> <ContactTitle>boolean</ContactTitle> <Address>string</Address> <Email>string</Email> <Area>string</Area> <Phone>string</Phone> <System>string</System> <Remark>string</Remark> <TotalPrice>double</TotalPrice> <TotalFee>double</TotalFee> <TotalBagPrice>double</TotalBagPrice> <Discount>double</Discount> <Currency>string</Currency> <Note>string</Note> <ResponseTime>double</ResponseTime> <ErrorMessage>string</ErrorMessage> <PaymentCode>string</PaymentCode> <PaymentMethod>string</PaymentMethod> <BookingImage>string</BookingImage> <ListPassenger> <Passenger> <PassengerId>int</PassengerId> <Type>string</Type> <FirstName>string</FirstName> <LastName>string</LastName> <Gender>boolean</Gender> <Birthday>dateTime</Birthday> <Fare>double</Fare> <Tax>double</Tax> <Fee>double</Fee> <ServiceFee>double</ServiceFee> <BaggageFee>double</BaggageFee> </Passenger> <Passenger> <PassengerId>int</PassengerId> <Type>string</Type> <FirstName>string</FirstName> <LastName>string</LastName> <Gender>boolean</Gender> <Birthday>dateTime</Birthday> <Fare>double</Fare> <Tax>double</Tax> <Fee>double</Fee> <ServiceFee>double</ServiceFee> <BaggageFee>double</BaggageFee> </Passenger> </ListPassenger> <ListBaggage> <Baggage> <PassengerId>int</PassengerId> <BaggageName>string</BaggageName> <Price>double</Price> <Value>string</Value> <Currency>string</Currency> </Baggage> <Baggage> <PassengerId>int</PassengerId> <BaggageName>string</BaggageName> <Price>double</Price> <Value>string</Value> <Currency>string</Currency> </Baggage> </ListBaggage> <ListFlightSegment> <FlightSegment> <FlightId>int</FlightId> <DepartureDate>dateTime</DepartureDate> <ArrivalDate>dateTime</ArrivalDate> <Class>string</Class> <StartTerminal>string</StartTerminal> <EndTerminal>string</EndTerminal> <DepartureAirportCode>string</DepartureAirportCode> <DestinationAirportCode>string</DestinationAirportCode> <AirlineCode>string</AirlineCode> <FlightNo>string</FlightNo> <FlightDuration>double</FlightDuration> <AircraftIATA>string</AircraftIATA> <StopPoint>string</StopPoint> <StopTime>double</StopTime> <DifferentDay>boolean</DifferentDay> <OvernightStop>boolean</OvernightStop> <ChangeTerminal>boolean</ChangeTerminal> <ChangeAirport>boolean</ChangeAirport> <Transit>boolean</Transit> </FlightSegment> <FlightSegment> <FlightId>int</FlightId> <DepartureDate>dateTime</DepartureDate> <ArrivalDate>dateTime</ArrivalDate> <Class>string</Class> <StartTerminal>string</StartTerminal> <EndTerminal>string</EndTerminal> <DepartureAirportCode>string</DepartureAirportCode> <DestinationAirportCode>string</DestinationAirportCode> <AirlineCode>string</AirlineCode> <FlightNo>string</FlightNo> <FlightDuration>double</FlightDuration> <AircraftIATA>string</AircraftIATA> <StopPoint>string</StopPoint> <StopTime>double</StopTime> <DifferentDay>boolean</DifferentDay> <OvernightStop>boolean</OvernightStop> <ChangeTerminal>boolean</ChangeTerminal> <ChangeAirport>boolean</ChangeAirport> <Transit>boolean</Transit> </FlightSegment> </ListFlightSegment> </GetBookingByBookingCodeResult> </GetBookingByBookingCodeResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /AgentDataWS.asmx HTTP/1.1 Host: api.datacom.vn Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Header> <Authentication xmlns="http://tempuri.org/"> <HeaderUser>string</HeaderUser> <HeaderPassword>string</HeaderPassword> </Authentication> </soap12:Header> <soap12:Body> <GetBookingByBookingCode xmlns="http://tempuri.org/"> <Account>string</Account> <Password>string</Password> <BookingCode>string</BookingCode> <GetPassenger>boolean</GetPassenger> <GetBaggage>boolean</GetBaggage> <GetFlightSegment>boolean</GetFlightSegment> </GetBookingByBookingCode> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetBookingByBookingCodeResponse xmlns="http://tempuri.org/"> <GetBookingByBookingCodeResult> <Id>int</Id> <BookingStatusDepart>string</BookingStatusDepart> <BookingStatusReturn>string</BookingStatusReturn> <BookingCodeDepart>string</BookingCodeDepart> <BookingCodeReturn>string</BookingCodeReturn> <StartPoint>string</StartPoint> <EndPoint>string</EndPoint> <DepartDate>dateTime</DepartDate> <ReturnDate>dateTime</ReturnDate> <Itinerary>int</Itinerary> <AirlineCodeDepart>string</AirlineCodeDepart> <AirlineCodeReturn>string</AirlineCodeReturn> <BookingDate>dateTime</BookingDate> <Timelimit>dateTime</Timelimit> <IssueDate>dateTime</IssueDate> <ContactName>string</ContactName> <ContactTitle>boolean</ContactTitle> <Address>string</Address> <Email>string</Email> <Area>string</Area> <Phone>string</Phone> <System>string</System> <Remark>string</Remark> <TotalPrice>double</TotalPrice> <TotalFee>double</TotalFee> <TotalBagPrice>double</TotalBagPrice> <Discount>double</Discount> <Currency>string</Currency> <Note>string</Note> <ResponseTime>double</ResponseTime> <ErrorMessage>string</ErrorMessage> <PaymentCode>string</PaymentCode> <PaymentMethod>string</PaymentMethod> <BookingImage>string</BookingImage> <ListPassenger> <Passenger> <PassengerId>int</PassengerId> <Type>string</Type> <FirstName>string</FirstName> <LastName>string</LastName> <Gender>boolean</Gender> <Birthday>dateTime</Birthday> <Fare>double</Fare> <Tax>double</Tax> <Fee>double</Fee> <ServiceFee>double</ServiceFee> <BaggageFee>double</BaggageFee> </Passenger> <Passenger> <PassengerId>int</PassengerId> <Type>string</Type> <FirstName>string</FirstName> <LastName>string</LastName> <Gender>boolean</Gender> <Birthday>dateTime</Birthday> <Fare>double</Fare> <Tax>double</Tax> <Fee>double</Fee> <ServiceFee>double</ServiceFee> <BaggageFee>double</BaggageFee> </Passenger> </ListPassenger> <ListBaggage> <Baggage> <PassengerId>int</PassengerId> <BaggageName>string</BaggageName> <Price>double</Price> <Value>string</Value> <Currency>string</Currency> </Baggage> <Baggage> <PassengerId>int</PassengerId> <BaggageName>string</BaggageName> <Price>double</Price> <Value>string</Value> <Currency>string</Currency> </Baggage> </ListBaggage> <ListFlightSegment> <FlightSegment> <FlightId>int</FlightId> <DepartureDate>dateTime</DepartureDate> <ArrivalDate>dateTime</ArrivalDate> <Class>string</Class> <StartTerminal>string</StartTerminal> <EndTerminal>string</EndTerminal> <DepartureAirportCode>string</DepartureAirportCode> <DestinationAirportCode>string</DestinationAirportCode> <AirlineCode>string</AirlineCode> <FlightNo>string</FlightNo> <FlightDuration>double</FlightDuration> <AircraftIATA>string</AircraftIATA> <StopPoint>string</StopPoint> <StopTime>double</StopTime> <DifferentDay>boolean</DifferentDay> <OvernightStop>boolean</OvernightStop> <ChangeTerminal>boolean</ChangeTerminal> <ChangeAirport>boolean</ChangeAirport> <Transit>boolean</Transit> </FlightSegment> <FlightSegment> <FlightId>int</FlightId> <DepartureDate>dateTime</DepartureDate> <ArrivalDate>dateTime</ArrivalDate> <Class>string</Class> <StartTerminal>string</StartTerminal> <EndTerminal>string</EndTerminal> <DepartureAirportCode>string</DepartureAirportCode> <DestinationAirportCode>string</DestinationAirportCode> <AirlineCode>string</AirlineCode> <FlightNo>string</FlightNo> <FlightDuration>double</FlightDuration> <AircraftIATA>string</AircraftIATA> <StopPoint>string</StopPoint> <StopTime>double</StopTime> <DifferentDay>boolean</DifferentDay> <OvernightStop>boolean</OvernightStop> <ChangeTerminal>boolean</ChangeTerminal> <ChangeAirport>boolean</ChangeAirport> <Transit>boolean</Transit> </FlightSegment> </ListFlightSegment> </GetBookingByBookingCodeResult> </GetBookingByBookingCodeResponse> </soap12:Body> </soap12:Envelope>