Sherpa - Visa and Travel Restrictions API

Sherpa Developer Hub

Welcome to the Sherpa developer hub. We offer a suite of solutions that guides travellers from planning to a safe return home. Take a look at the integration guides, specific use cases and an interactive API Reference. Ready? Let's go.

Guides    API Reference

🏑 Quarantine Free Travel

Exploring destinations that don't require travellers to quarantine

This guide explores ways to utilize the Sherpa API to provide travellers with countries they can travel to without having to quarantine on arrival and without having to quarantine on return.

The approach can be broken out into following steps:

  1. Query and filter inbound quarantine procedures of all countries
  2. Query and filter inbound quarantine procedures when returning

Query and Filter Inbound Quarantine Procedures of All Countries

In order to identify all countries that currently don't have a quarantine procedure imposed when departing from an origin country, we can utilize the category filter NO_QUARANTINE.

https://requirements-api.sandbox.joinsherpa.com/v2/procedures?key={apiKey}
&filter[category]=NO_QUARANTINE
&filter[activeDate]=2020-11-10
&filter[originCountries]=CAN

In the example, we are requesting all procedures of the category "No Quarantine" in effect that apply if a traveler is departing (originating) from Canada on November 11th, 2020 (activeDate).

🚧

Active dates far out in the future are prone to changes

Many restrictions and procedures are changing on a weekly basis. Very much like weather forecasts, the further the active date is from the current date, the more inaccurate the results will be.

Following example shows a sample response, highlighting only the first procedure returned.

{
    "meta": {
        "copyright": "Sherpa",
        "version": "2.4.2"
    },
    "data": [
        {
            "id": "0bfe5eff-5e18-45fc-9ee6-4840ed4291da",
            "type": "PROCEDURE",
            "attributes": {
                "country": "POL",
                "title": "No quarantine required",
                "description": "Travelers arriving from selected countries are not required to quarantine on arrival in Poland.",
                "directionality": "NO_CHANGE",
                "more": [],
                "tags": [],
                "source": {
                    "sourceType": "GOVERNMENT",
                    "title": "Polish Government",
                    "url": "https://www.gov.pl/web/coronavirus/travel"
                },
                "lastCheckedAt": "2020-10-06T00:00:00Z",
                "lastUpdatedAt": "2020-10-06T04:53:00Z",
                "stillCurrentAt": "2020-10-06T00:00:00Z",
                "createdAt": "2020-07-15T15:34:21Z",
                "startDate": "2020-06-13T00:00:00Z",
                "endDate": null,
                "included": [
                    {
                        "isoAlpha3": "GBR",
                        "countryName": "United Kingdom",
                        "type": "COUNTRY",
                        "locationType": "ORIGIN"
                    },
                    ...
                    {
                        "isoAlpha3": "KOR",
                        "countryName": "Korea (Republic of)",
                        "type": "COUNTRY",
                        "locationType": "ORIGIN"
                    }
                ],
                "category": "NO_QUARANTINE",
                "subCategory": "ON_ARRIVAL"
            },
            "relationships": {
                "country": {
                    "data": {
                        "id": "POL",
                        "type": "COUNTRY"
                    }
                }
            }
        },
        ...
    ]
}

Each procedure indicates through the attribute country, what country it belongs to. Based on this attribute, we now have a list of countries, a Canadian traveller can go to, without having to quarantine. Regions like provinces, states etc. can be filtered out if only countries are of interest.

🚧

Procedures also include regions

The procedures endpoint, when queried will return both on a country and region level.

const countries = response.data
    .filter(d => d.attributes.region == null) // Procedures also include regions
    .map(d => d.attributes.country);
    
// countries might have multiple quarantine restrictions
const uniqueCountries = [...new Set(countries)]; 

// sample list
["POL", "RKS", "GHA", "BRA", "SRB", "UKR", "TON", "COL", "LUX", "SYC", "SWE", "ISR", "BIH", "CZE", "BLR", "ROU", "FRA", "UGA", "DNK", "BGR", "AND", "BEL", "PYF", "MNE", "SVK", "MLT", "ESP", "GBR", "ITA", "NLD", "LTU", "VAT", "HRV", "NIC", "USA", "CAN", "AUS", "CHN"]

Query and Filter Inbound Quarantine Procedures when Returning

Now that we have a comprehensive list of countries our traveler could go to, we are interesting in narrowing it even more down to see which of these countries a quarantine on return is not required.
We have to inverse our previous search for each of the listed countries.

In the following example we're only looking at the first listed country in our previous example, assuming that our traveler is returning after a 2 week (14 days) vacation.

https://requirements-api.sandbox.joinsherpa.com/v2/procedures?key={apiKey}
&filter[country]=CAN
&filter[category]=NO_QUARANTINE
&filter[activeDate]=2020-11-24
&filter[originCountries]=POL // This was the first country in our sample list

As we now know that Poland is the country we're departing from (origin) and Canada the country we are arriving in (destination) for our return, we can provide an additional filter &filter[country]=CAN to further reduce the number of results.

In our response we can see that, unfortunately our traveler will have to quarantine on return from Poland as no "No Quarantine" procedure was returned from the Sherpa API.

See below a working Javascript only example:

Updated 2 months ago


🏑 Quarantine Free Travel


Exploring destinations that don't require travellers to quarantine

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.