Personalized travel restrictions for every journey.
The Trips endpoint lets developers retrieve personalized travel restrictions and documents based on trip context like origin, destination, and date of travel.
The Trips endpoint is a convenient way to retrieve contextualized Restrictions and Procedures enforced by Countries or Regions.
ISO 3166-1 is a standard defining a code for the names of countries, dependent territories, and special areas of geographical interest. We will use this terminology throughout this document instead of countries and territories. At sherpa°, we default to ISO 3166-1 alpha-3 unless stated otherwise.
When the customer’s ticket between two locations includes one or more locations in between where travellers have to disembark the airplane and board another one. The customer will not be leaving the airport in this scenario.
A transit or connection only applies when the customer has purchased the entire trip as a single ticket. This means they would usually not be required to collect their baggage and have them rechecked. If the trip is international, they may be able to stay in the international section of the airport without crossing the border control or customs gates.
A technology used by travel companies that combines flights from different carriers that don't traditionally work together to go from point A to B via C. Travellers might also create their custom trip by booking separate tickets simultaneously to reach their final destination. The customer may leave the airport in this scenario to fly out from another airport in the same city.
The key difference with a regular transit described above is that it can result in some unique scenarios on international transits where a traveller must collect their baggage, pass through customs or border control, and re-check their baggage before carrying on to their next flight.
If a trip between an origin and destination has at least one connection or transit, excluding self transit or virtual interlining.
A trip that has multiple flights, and the traveller is able to leave the airport at each transit point, even if they stay inside the airport. All trips with self-transit or virtual interlining are multi-connection trips.
A flight between two points where the origin and destination and transit points are located in the same ISO 3166-1 Territory. For example, Toronto to Vancouver, New York to Los Angeles, Edmonton to Calgary, etc.
Sherpaº currently only supports domestic requirements for the United States, Canada, and Australia. Domestic requirements will only be shown on flights that take place wholly within these ISO 3166-1 Territory.
A flight between two points where the origin and destination [or transit points] are located in a different ISO 3166-1 Territory. For example, London to Paris (the U.K. and France), New York to Tokyo (USA and Japan), etc.
All international travel requirements that apply will be shown on these trips.
This is an international flight between two points where passengers are not formally entering the destination ISO 3166-1 Territory, but only transiting through on their way to a final destination.
For example, if one is flying from Toronto to Dubai with a layover in London, Toronto to London would be considered an international transit. International transit requirements will apply from Toronto to London and international flight requirements will apply from London to Dubai.
Each call to the API must include your unique API key and the content type as headers. Additional optional headers are listed in the table below.
Header | Required | Description |
---|---|---|
x-api-key | Y | Your unique API key that is used to authenticate requests. |
Content-Type | Y | The content type returned as the API response. Set to application/vnd.api+json |
Accept-Encoding | N | The type of compression to use for the API response. Set to gzip , br |
A trip can be described with a type and an attribute object containing the trip details.
Property | Type | Description |
---|---|---|
type | string | The type of the trip. Set to TRIP |
attributes | object | An object that contains the attributes of a trip including the language, traveller, currency and travel nodes |
The attributes
object contains all the details relevant to the trip. This includes information about the traveller, origin, destination, and localization attributes such as language and currency.
Property | Type | Description |
---|---|---|
locale | string | The language the API response should be returned in, for example en-US . View our list of supported languages |
traveller | object | An object that contains the passports and traveller arrays |
currency | string | The currency the visa and ETA prices will be returned in. Possible values: USD , CAD , GBP , EUR |
travelNodes | array | An array of objects which contains itinerary details for the origin, destinations and any transits if applicable. |
A Traveller object is used to describe the specific travellers taking part in a trip. A traveller is an individual (PAX) person.
Property | Type | Description |
---|---|---|
passports | array | The nationality of the traveller defined with ISO3 Country Code |
vaccinations | object | List of vaccinations a traveller has received and disclosed (Optional). |
A travel node is either an origin or destination and contains all of the related itinerary details. The table below defines the properties related to this object.
Property | Type | Description |
---|---|---|
type | string | Either ORIGIN , DESTINATION , or TRANSIT |
locationCode | string | The location code of the travel node. This can be an ISO3 Country Code or a supported airport code. |
airportCode | string | The airport code of the travel node. This can be a supported airport code. |
departure | object | An object which contains the date , time , flightNumber and travelMode |
arrival | object | An object which contains the date , time , flightNumber and travelMode |
Property | Type | Description |
---|---|---|
date | string | Arrival or departure date in the following format: YYYY-MM-DD |
time | string | Arrival or departure time in the following format: HH:MM |
flightNumber | string | Pass the full flight number without spaces: CC#### |
travelMode | string | Currently the only accepted value is AIR |
Even though a trip might be valid syntax, it might not provide the desired output. Here are some cases we currently don't support along with a brief description and example
Airport -> Airport (within same region) Example: SFO -> SAN Travel rules remain the same within the same region.
Airport → Airport (Within same country but different regions with no domestic info) Example: SXF → FRA We currently only fully support regions from selected countries.
Airport → Region (Within same country but different regions with no domestic info) Example: COK → IN-DL
Example: SXF → DE-HE
Region → Airport (Within same country but different regions with no domestic info) Example: DE-HE → SXF
Region → Region (Within same country but different regions with no domestic info) Example: DE-HE → DE-BR
Headlines as part of the summary are fully localized and can be easily used to display information to the end users.
The outlined examples are a current snapshot and the exact copy of the messages may change as we continuously improve on making travel rules understandable.
Examples of invalid trips
Country -> Country (same country) Example: CAN -> CAN
Country -> Region (region in same country) Region -> Country (region in same country) Example: CA-ON -> CAN
Country -> Airport (airport in same country) Airport -> Country (airport in same country) Example: YYZ -> CAN
Visa requirements show the destination country's visa (paper and eVisa) requirements for a traveller. The Visa requirements section can be found as part of the /v3/trips response or as a stand-alone request for entry requirements under the /v2/procedures resource endpoint.
Looking at a /v3/trips response, the visa requirements are listed under the attributes informationGroups with the type: VISA_REQUIREMENTS (data.attributes.informationGroups[x].type)
For a typical trip going one way from Canada(CAN) to Italy(ITA), a snippet below shows what to expect. The informationGroups section has a list of the response ids which point to details about each visa requirement necessary for the trip.
Property | Type | Description |
---|---|---|
name | string | The name of the informationGroup |
type | string | The type of informationGroup |
tooltip | string | The tooltip that can be used in conjunction with our icon guide. |
groupings | array | An array containing the groupings of procedures |
groupings.name | string | The name of the country the procedure applies to |
A search of the id "9e170760-a9cc-446b-9389-4be9f4e29022" takes us to the included[0]
section of the trip response, where details of the visa requirement are listed below.
The visa requirement contains the following attributes as explained in the tables below:
Property | Type | Description |
---|---|---|
id | string | The unique procedure id |
type | string | Possible values: PROCEDURE for visa requirements<br/>RESTRICTION for travel restrictions<br/>PRODUCT for a visa product |
attributes | object | An object containing the visa attributes, whose properties are listed below |
category | string | The category of the requirement. For visa procedures, the possible categories are: DOC_REQUIRED , DOC_REQUIREMENT , NO_DOC_REQUIRED , RE_ENTRY_PERMIT , VISA , NO_VISA , PASSPORT |
subcategory | string | Describes the time the requirement is applicable<br/>Visa procedures can have the following subcategories: BEFORE_DEPARTURE , BEFORE_ARRIVAL , IN_FLIGHT , ON_ARRIVAL , DOMESTIC , IN_AIRPORT |