NAV Navbar
shell
  • Introduction
  • Environments
  • Authentication
  • Countries
  • Visa Requirements
  • Baggage Policy
  • Visa Restrictions Index
  • Health Information
  • Errors
  • Introduction

    Welcome to the Smart Backpacker API!

    Easily find Visa Requirements, Currency Exchange, Airline's Baggage Policy and your Passport Ranking among others.

    Environments

    Production

    https://api.smartbackpackerapp.com/

    Development

    https://smart-backpacker.herokuapp.com/

    Authentication

    All the endpoints require a Bearer JWT Authorization token in the headers, so make sure you have it when performing a request. It should follow the form:

    Authorization: Bearer <your_access_token>

    curl "https://api.smartbackpackerapp.com/v1/endpoint/" -H "Authorization: Bearer <your_access_token>"
    

    Countries

    List of all the countries in the world including Country Code, Name and Currency. You can also filter by Schengen countries.

    Json response for all the countries (200):

    curl "https://api.smartbackpackerapp.com/v1/countries"
    
    [
      {
        "code": "AR",
        "name": "Argentina",
        "currency": "ARS"
      },
      {
        "code": "IE",
        "name": "Ireland",
        "currency": "EUR"
      }
    ]
    

    Json response for the Schengen countries (26):

    curl "https://api.smartbackpackerapp.com/v1/countries?query=schengen"
    
    [
      {
        "code": "AT",
        "name": "Austria",
        "currency": "EUR"
      }
    ]
    

    HTTP Request

    GET /v1/countries

    Optional Query Parameters

    Parameter Value Description
    query schengen Retrieves only the countries that belong to the Schengen Area

    HTTP Response

    Code Description
    200 Success
    500 Internal Server Error
    503 Service Unavailable

    Response

    Visa Requirements

    Where you can find out Visa Requirements and Currency Exchange information given a country code from and a country code to.

    Json response for traveling from AR (Argentina) to AU (Australia):

    curl "https://api.smartbackpackerapp.com/v1/traveling/AR/to/AU?baseCurrency=EUR"
    
    {
      "countryName": "Australia",
      "countryCode": "AU",
      "visaRequirements": {
        "visaCategory": "VisaRequired",
        "description": "May apply online (Online Visitor e600 visa). Transit visa is not required."
      },
      "exchangeRate": {
        "baseCurrency": "EUR",
        "foreignCurrency": "AUD",
        "rate": 1.5055
      }
    }
    

    HTTP Request

    GET /v1/traveling/{from}/to/{to}

    Query Parameters

    Parameter Description
    baseCurrency Currency code to get information about currency exchange

    HTTP Response

    Code Description
    200 Success
    400 Whenever to and from are the same country
    404 Country not found
    500 Internal Server Error
    503 Service Unavailable

    Response

    Visa Category

    Baggage Policy

    Where you can find Airline's Baggage Policy information.

    Json response for the Airline Air France:

    curl "https://api.smartbackpackerapp.com/v1/airlines?name=Air France"
    
    {
      "name": "Air France",
      "baggagePolicy": {
        "allowance": [
          {
            "baggageType": "CabinBag",
            "kgs": null,
            "size": {
              "height": 55,
              "width": 35,
              "depth": 25
            }
          },
          {
            "baggageType": "SmallBag",
            "kgs": null,
            "size": {
              "height": 40,
              "width": 30,
              "depth": 15
            }
          }
       ],
       "extra": "The combined weight of your hand baggage item and accessory must not exceed 12 kg or 18 kg, depending on your travel cabin. You can take 1 or 2 hand baggage items depending on your flight cabin, as well as 1 accessory.",
       "website": "https://www.airfrance.fr/FR/en/common/guidevoyageur/pratique/bagages-cabine-airfrance.htm"
      }
    }
    

    HTTP Request

    GET /v1/airlines

    Query Parameters

    Parameter Description
    name The exact name of the airline, case sensitive.

    HTTP Response

    Code Description
    200 Success
    404 Airline not found
    500 Internal Server Error
    503 Service Unavailable

    Response

    Visa Restrictions Index

    Where you can find out the passport ranking based on the Henley & Partners Visa Restrictions Index 2017.

    Json response for AR (Argentina):

    {
      "rank": 20,
      "count": 154,
      "sharing": 2
    }
    

    HTTP Request

    GET /v1/ranking/{country_code}

    HTTP Response

    Code Description
    200 Success
    404 Country not found
    500 Internal Server Error
    503 Service Unavailable

    Response

    Health Information

    Where you can find out information about mandatory, recommended and optional vaccines, in addition to health travel alerts provided by CDC (Centers for Disease Control and Prevention).

    Json response for AR (Argentina):

    {
        "vaccinations": {
            "mandatory": [],
            "recommendations": [{
                    "disease": "Hepatitis A",
                    "description": "CDC recommends this vaccine because you can get hepatitis A through contaminated food or water in Argentina, regardless of where you are eating or staying.",
                    "diseaseCategories": [
                        "GetVaccinated",
                        "EatAndDrinkSafely"
                    ],
                },
                {
                    "disease": "Typhoid",
                    "description": "You can get typhoid through contaminated food or water in Argentina. CDC recommends this vaccine for most travelers, especially if you are staying with friends or relatives, visiting smaller cities or rural areas, or if you are an adventurous eater.",
                    "diseaseCategories": [
                        "GetVaccinated",
                        "EatAndDrinkSafely"
                    ],
                }
            ],
            "optional": [{
                    "disease": "Hepatitis B",
                    "description": "You can get hepatitis B through sexual contact, contaminated needles, and blood products, so CDC recommends this vaccine if you might have sex with a new partner, get a tattoo or piercing, or have any medical procedures.",
                    "diseaseCategories": [
                        "GetVaccinated",
                        "AvoidSharingBodyFluids",
                        "AvoidNonSterileEquipment"
                    ],
                },
                {
                    "disease": "Rabies",
                    "description": "Although rabies can be found in dogs, bats, and other mammals in Argentina, it is not a major risk to most travelers. CDC recommends this vaccine only for these groups: Travelers involved in outdoor and other activities in remote areas that put them at risk for animal bites (such as adventure travel and caving). People who will be working with or around animals (such as veterinarians, wildlife professionals, and researchers). People who are taking long trips or moving to remote areas in Argentina Children, because they tend to play with animals, might not report bites, and are more likely to have animal bites on their head and neck.",
                    "diseaseCategories": [
                        "GetVaccinated",
                        "KeepAwayFromAnimals"
                    ],
                },
                {
                    "disease": "Yellow Fever",
                    "description": "Yellow fever is a risk in certain parts of Argentina, so CDC recommends the yellow fever vaccine for travelers 9 months of age or older to these areas. For more information on this recommendation, see yellow fever recommendations and requirements for Argentina.Your doctor can help you decide if this vaccine is right for you based on your travel plans.",
                    "diseaseCategories": [
                        "GetVaccinated",
                        "PreventBugBites"
                    ],
                }
            ],
        },
        "notices": {
            "alertLevel": "LevelTwo",
            "alerts": [{
                "title": "Zika Virus in Argentina",
                "link": "",
                "description": "Zika virus (or Zika) has been reported. Public health officials have reported that mosquitoes are infected with Zika and spreading it to people."
            }],
        }
    }
    

    HTTP Request

    GET /v1/health/{country_code}

    HTTP Response

    Code Description
    200 Success
    404 Country not found
    500 Internal Server Error
    503 Service Unavailable

    Response

    Disease Category

    Errors

    The Smart Backpacker API uses the following error codes:

    All the errors have the following json form:

    {
      "code": 100
      "error": "Country not found: Mars"
    }
    
    Code Meaning
    100 Entity not found (Country, Airline, etc).
    101 Cannot search traveling to the same country.