Scenario:
A UK traveler from London, Heathrow to JFK on August 30, 2022, for tourism purposes.
Solution:
Using trips endpoint reference we can build out the following request URL & Body:
Request URL:
Now let’s look at the API response (attached).
We can see there is a lot more data being returned back in this endpoint versus the procedures endpoint (most notably COVID restrictions). However, in our current use case we are only interested in Visa Requirements.
If we look carefully at the response we can see data.attributes.outbound.summary.groupings.type=VISAS has an included field that returns the same procedure id as before:
5683d46a-9338-41b1-a1f5-897a598e9a57
Since this is the only procedure within the included array, this is the correct procedure to display.