Show visas by destination

Overview

You can retrieve all visa requirements for all countries using the Procedures endpoint with specific filters. However, due to API response size limitations, it's recommended to break down requests by selecting a few countries at a time.

Required Filters

Use these filters to get visa requirements:

FilterValue
country(select countries)
categoryDOC_REQUIRED
documentTypeVISA, E_VISA, EMBASSY_VISA, ETA

Note: Attempting to retrieve all procedures for all countries in a single request will likely fail due to exceeding the API response's maximum size limit.


Example 1: UK Traveler to US for Tourism

Scenario

A UK traveler is planning a trip from London Heathrow to JFK on August 30, 2022, for tourism purposes.

API Request Configuration

FilterValue
countryUS
categoryDOC_REQUIRED
nationalitiesGBR
documentTypeVISA, E_VISA, EMBASSY_VISA, ETA

Request URL

https://requirements-api.joinsherpa.com/v2/procedures?key={{yourApiKey}}&filter[country]=US&filter[category]=DOC_REQUIRED&filter[nationalities]=GBR&filter[documentType]=VISA,E_VISA,EMBASSY_VISA,ETA

Response Analysis

The API returns two procedures with these IDs:

  • 33a0e979-29eb-430d-a636-eb075baff42f
  • 5683d46a-9338-41b1-a1f5-897a598e9a57

Procedure Details

  1. Procedure 33a0e979-29eb-430d-a636-eb075baff42f

    • Type: Electronic Travel Authorization (ESTA)
    • Travel Purpose: TRANSIT
    • Status: Not applicable for tourism scenario
  2. Procedure 5683d46a-9338-41b1-a1f5-897a598e9a57

    • Type: Electronic Travel Authorization (ESTA)
    • Travel Purpose: TOURISM
    • Status: Applicable for tourism scenario

Filtering Logic

Use the travelPurpose property to filter procedures:

  • Filter out procedures where data.attributes.travelPurpose equals "TRANSIT"
  • Display procedures where data.attributes.travelPurpose equals "TOURISM"

Handling Upcoming Procedures

The API response includes both active and upcoming procedures. Use data.attributes.startDate to differentiate between:

  • Active procedures: Currently in effect
  • Upcoming procedures: May come into effect during the traveler's trip

Example 2: Cambodia Tour with Multiple Visa Options

Scenario

A traveler is viewing tour details for Cambodia. The departure location is unknown, nationality will be selected via dropdown, and there are no specific tour dates (tours run monthly).

API Request Configuration

FilterValue
countryKHM
categoryDOC_REQUIRED
nationalitiesGBR
documentTypeVISA, E_VISA, EMBASSY_VISA, ETA

Request URL

https://requirements-api.joinsherpa.com/v2/procedures?key=%7B%7ByourApiKey%7D%7D&filter%5Bcountry%5D=KHM&filter%5Bcategory%5D=DOC_REQUIRED&filter%5Bnationalities%5D=GBR&filter%5BdocumentType%5D=VISA,E_VISA,EMBASSY_VISA,ETA

Response Analysis

The API returns two procedures with these IDs:

  • 53aa1073-d0a5-4a08-af40-773448a6db45
  • bfd08ae5-122e-44cd-8b3f-88ec386d59a0

Procedure Details

  1. Procedure 53aa1073-d0a5-4a08-af40-773448a6db45

    • Document Type: E_VISA
    • Status: Available option
  2. Procedure bfd08ae5-122e-44cd-8b3f-88ec386d59a0

    • Document Type: VISA
    • Status: Available option

Implementation Recommendation

Display both visa options to travelers since multiple visa types are available for this itinerary.

Handling Upcoming Procedures

The API response includes both active and upcoming procedures. Use data.attributes.startDate to differentiate between:

  • Active procedures: Currently in effect
  • Upcoming procedures: May come into effect during the traveler's trip