Use Case: Get Visa Requirements for a Specific Country (example 1)
Example:
If you are only interested in VISA requirements you could use the procedures endpoint to retrieve and display this information.
Endpoint URL (Sandbox):
https://requirements-api.sandbox.joinsherpa.com/v2/procedures
Endpoint URL (Production):
https://requirements-api.joinsherpa.com/v2/procedures
Scenario
Let’s see how to query this endpoint using a trip scenario.
Scenario: A UK traveller is going from London, Heathrow to JFK on August 30, 2022, for tourism purposes.
Solution:
If we take a look at the filters for this endpoint, we can determine the ones we will need for our scenario: country, category, nationalities, documentType.
Filter | Value |
---|---|
country | US |
category | DOC_REQUIRED |
nationalities | GBR |
documentType | VISA,E_VISA,EMBASSY_VISA,ETA |
Request URL
Using these filters and values we can build the following request URL:
API Response
In the API response (see attachment), you will notice two procedures are returned with the following IDs:
33a0e979-29eb-430d-a636-eb075baff42f
5683d46a-9338-41b1-a1f5-897a598e9a57
The first procedure 33a0e979-29eb-430d-a636-eb075baff42f is for an Electronic Travel Authorization (ESTA), however, this only applies to transits and does not fit our scenario.
We can filter transits out by looking at data.attributes.travelPurpose:"TRANSIT"
The second procedure 5683d46a-9338-41b1-a1f5-897a598e9a57 is also for an Electronic Travel Authorization (ESTA), however, this time the travelPurpose
is TOURISM
.
So, we can use the travelPurpose
property to filter trips that are for TOURISM
only and display this procedure.
Upcoming Procedures
What about the traveller’s trip dates and upcoming procedures?
Our API will response will only include active and upcoming procedures. The data.attributes.startDate
can be used to differentiate between active and upcoming procedures that may come into effect during a traveller’s trip.
Download API Response
You can download the sample API response file here.
Updated 11 months ago