Closed gaurav99t closed 7 years ago
Hi,
I've received this question before. Please check the answer I gave here to get some insight into how to interpret the MasterPricerTravelBoardSearchReply.
But as I said in that comment too, I do not provide support for understanding the responses from Amadeus. For that you should contact your Amadeus support person who should be assigned to your project (or refer to the Web Services Extranet documentation)
amadeus support team is not helpful for certain questions they only asks for reading documentation which is big and complicated. i have read your reply regarding to this question and it is really helpful but if i get any question related to the same can i ask you? because you can understand problem in a second and can reply within few minutes of typing
I can try, and if I know the answer, I'll give it to you. This will also help future users of the library who could encounter the same issues.
But I give no guarantees, and if I don't know the answer, you'll have to find it yourself.
So, as for this particular issue, is your question answered? If so, you can close it.
i need some time to understand and matching your answer withe the XML response. i will let you know whatever the status will be. I will close this issue after studying the xml response or will get back to you with some questions thank you very much
No problem, take your time!
After spending full day in studying XML response i think i have understood this point but still want to post here so you can make sure if i got it correctly.
Suppose i request for 50 Recommendations with this request
Now i get XML response and it contain 50
and every
<propFlightGrDetail>
<flightProposal>
<ref>1</ref>
</flightProposal>
<flightProposal>
<ref>0215</ref>
<unitQualifier>EFT</unitQualifier>
</flightProposal>
<flightProposal>
<ref>9W</ref>
<unitQualifier>MCX</unitQualifier>
</flightProposal>
</propFlightGrDetail>
but somehow 10 to 20 recommendations are returned in the XML response
So confusion comes here if there are 50
Some recommendations have below code only once
<segmentFlightRef>
<referencingDetail>
<refQualifier>S</refQualifier>
<refNumber>1</refNumber>
</referencingDetail>
<referencingDetail>
<refQualifier>B</refQualifier>
<refNumber>2</refNumber>
</referencingDetail>
</segmentFlightRef>
and some recommendations have below code more than once, like below code
<segmentFlightRef>
<referencingDetail>
<refQualifier>S</refQualifier>
<refNumber>2</refNumber>
</referencingDetail>
<referencingDetail>
<refQualifier>B</refQualifier>
<refNumber>2</refNumber>
</referencingDetail>
</segmentFlightRef>
<segmentFlightRef>
<referencingDetail>
<refQualifier>S</refQualifier>
<refNumber>3</refNumber>
</referencingDetail>
<referencingDetail>
<refQualifier>B</refQualifier>
<refNumber>2</refNumber>
</referencingDetail>
</segmentFlightRef>
So what my conclusion is that same fare will be applied for below groupOfFlight.
So if a recommendation contain 7 to 8 times
So it means same
Did i get it correctly? sorry for bad english
Recommendations are combinations of flights that are offered at a given price by a given airline. To know what kind of flights are associated with a certain recommendation, you must match the refNumbers of the recommendations with the correct nodes under gropOfFlights to get all the flights in a recommendation.
For example in your last recommendation example, to know which flights match this recommendation, you need to retrieve all flights under /Fare_MasterPricerTravelBoardSearchReply/flightIndex/groupOfFlights
where the refQualifier = 'S'
So in this case you need to get the groupOfFlights nodes with references 2 and 3. Here is an XPATH query which will extract all flights for this recommendation (with references 2 and 3):
/Fare_MasterPricerTravelBoardSearchReply/flightIndex/groupOfFlights[./propFlightGrDetail/flightProposal[1]/ref = '2' or ./propFlightGrDetail/flightProposal[1]/ref = '3']/flightDetails
Here's some tips that you might find helpful:
Tip A
By doing this you'll get a treeview of the returned results that will be much simpler to understand and navigate in comparison to the raw output of the XML and the objects.
Tip B, Preprocess
if( !isset( $key ) ) $array[$key] = false;
You could call this Postprocess as well, it depends on if you do further processingen down the line. In my specific case its Request > Reply (Amadeus) > Preprocess > Models etc > View (output). The 'Preprocess' basically normalizes everything and makes the parsing much more simple (by flattening arrays etc). Basically my team then has an output that more resembles the Amadeus Sandbox API which makes rapid development a breeze.
Good points. I use Altova XmlSpy to view the XML in a visual format (and run xpath queries).
I can also recommend the Symfony DomCrawler for preprocessing.
im still confued with this point. Im not sure if i was able to explain my doubt clearly or not. I will try again now with the help of screen shots
I searched for 10 Recommendations, and i got the following XML tree with 10 nodes of
here is the screen shot
<propFlightGrDetail>
<flightProposal>
<ref>1</ref>
</flightProposal>
</propFlightGrDetail>
with
<segmentFlightRef>
<referencingDetail>
<refQualifier>S</refQualifier>
<refNumber>1</refNumber>
</referencingDetail>
</segmentFlightRef>
Now below screen shot matches the flight and recommendation just because of their refNumber and ref is matched
now have a look at this screen shot, in this single recommendation we have 4 segmentFlightRef with refNumber 6, 7, 8, 9
now my doubt is, will all these 6, 7, 8, 9 groupOfFlights have same price and other details? below screen shots matches above recommendation
im sorry for this issue but im confused i have converted all XML into PHP array and dealing with it
Yes, this means that this one recommendation consists of all the flights from groupOfFlights 6, 7, 8 and 9 together.
So you can book this recommendation for the price mentioned in the recommendation, and for that price, you get all of those flights together;
then i must close this issue :-) if this is the correct case thanks a lot for your help i will disturb you again very soon :-)
im sorry for reopening the issue.
but im confused with the reply when two itinerary are searched.
in this recommendation why do i see refNumber 6 times with refQualifier S i have attached the XML reply in docx extension
I'm sorry, but I don't know the answer to that question. I'm not a MasterPricer expert. I suggest you contact your Amadeus support contact for further information on how to interpret the MP response.
Also, I don't seem to be able to open your docx.
hi DerMika i know you can not provide support regarding these questions, i just asked you if you could give me an idea AMADEUS support is very bad they don't help with questions.
If you get time or wish to open docx file. just please rename it to .XML extension then it will be open into text editor
thanks for your time DerMika
@gaurav99t Either you are not properly setup with your Amadeus manager or your office id is some crazy country with not good DAP team. Please contact DAP team for this kind of issues.
We have help from London and everything is easily explained and also docs even that are hard to get, if you spend some time on them explains everything (especially user guides).
About your issue, just confirm for me that this is 2 leg search, right?
You get Recommendation
with many segmentFlightRef
(which we call options). Each segment ref has ref qualifiers describing which flight you should take from groupOfFlights
based on segment ref and then refNumber
.
If u search for 2 legs flights, you get 2 refNumber
s, each one for each leg. (for example return trip)
Yes when i do return trip then i get this issue. But i think they have reference to return trip as well which is on flightIndex[1][groupOfFlights]
and all recommendations return set of 2 leg trip which can be mapped from flightIndex[0][groupOfFlights] and flightIndex[1][groupOfFlights] respectively
I would agree with @bimusiek - if your support from Amadeus is terrible, you need to tell them that and you need to demand help from Amadeus. After all, if you have a project in progress, you are paying for support. If you do not currently have a development project open with Amadeus, I suggest you do that.
Hi @gaurav99t , what's the status on this issue, do you still need help with this?
hi DerMika, im in contact with amadeus support but they are very lazy, for single recommendations i have followed your suggestions but for round trip i will ask from amadeus team later. Im sure what i have understood for round trip is correct according to your suggestion for single trip but still i need to make sure from amdeus peoples, Currently im working in getting a demo ticket book with its print itself as per amadeus team help. But as they are very lazy and they are not always in the mood to answer our questions im going so slow with this :-(
but i will update status here once im sure with correct things, So it will be helpful to others thats the reason for not closing the topic
Ok, thanks for the update and I agree with your reasoning to keep the issue open.
So, what was the feedback?
feedback is what we discussed was correct :-)
Hi @DerMika - In one of your above comments you mentioned matching the refQualifier
on 'S'
Why is that? (Since we see repeated ref numbers with with different refQualifier
s like 'B'
Thanks!
Because refQualifier = S means a reference to a segment. refQualifier = B is a reference to a baggage coverage reference. You can see what the refQualifiers mean by looking up the Fare_MasterPricerTravelBoardSearch functional docs --> Reply structure --> Browse structure and navigating to the node you want to know more of.
Here is a screenshot of the relevant codeset:
Hi All, i was having the same question, and this discussion helped me with one way flight, But for round trip i can't understand the response fully. @gaurav99t you said that you are working with round trip and you will ask the amadues team, can you please put what conclusion you have regarding this? thanks!
i get XML response from Fare_MasterPricerTravelBoardSearch but how can i get fare price for each flight? So i can display all flights with fare price into my webpage