Overview

Your API key

Each user has an API key, which is separated from any other API keys. To get or change the API key, send an email to it@viselio.com. After your key request is approved, our support team will contact you with the neccessary information.

Authentication

This is an HTTPS-only API. Authentication is based on the API keys. Each API key is associated with a Viselio user. Results returned from various responses are based upon the role of the user to which the API key is tied.

The API key is passed via HTTP Basic Authentication and goes in the username field. A dummy password, such as X, goes in the password field.

API Endpoints

API requests are made to https://a2.viselio.com/ and https://r.viselio.com/, all requests are served over HTTPS. The current version is v1.

Formats

The API will only support JSON at this time.

Rate Limiting

Each account is allowed to make a limited number of requests per 10 minute period. This limit is based on the number of Docs Sites the account has:
Number of Sites Rate Limit
1 2000 requests every 10 mins
2 3000 requests every 10 mins
3 or more 4000 requests every 10 mins

Endpoints

Introduction

Welcome to Viselio for Developers! Just like you, we are enthusiastic web developers and we love to automate things. Please find below the full documentation and API reference in order to reach this goal. We wish you successful programming!

API URI: https://a2.viselio.com/API_KEY

Applications API

Get available visa types and number of entries
Required parameters: office_id, destination, nationality

Header: GET

/YOUR_API_KEY/public/visatypes/office_id/1/destination/cn/nationality/ru HTTP/1.1

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:visatypes",
    "method": "get",
    "result": {
        "1": {
            "name": "Tourist",
            "entries_number": {
                "1": {
                    "name": "Single"
                },
                "2": {
                    "name": "Double"
                }
            }
        },
        "2": {
            "name": "Business",
            "entries_number": {
                "1": {
                    "name": "Single"
                },
                "2": {
                    "name": "Double"
                },
                "3": {
                    "name": "Multiple 6 months"
                },
                "4": {
                    "name": "Multiple 1 year"
                }
            }
        }
    }
}
Get available processing times
Required parameters: office_id, destination, nationality

Header: GET

/YOUR_API_KEY/public/visatypes/office_id/1/destination/cn/nationality/ru HTTP/1.1

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:other",
    "method": "get",
    "result": {
        "marital_status": {
            "1": "Married",
            "2": "Single"
        },
        "accommodation_type": {
            "1": "Hostel",
            "2": "Hotel"
        }
    }
}
Get available params ID's

Required parameters: office_id, destination, nationality
Header: GET

/YOUR_API_KEY/public/other/office_id/1/destination/cn/nationality/ru HTTP/1.1

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:other",
    "method": "get",
    "result": {
        "marital_status": {
            "1": "Married",
            "2": "Single"
        },
        "accommodation_type": {
            "1": "Hostel",
            "2": "Hotel"
        }
    }
}
Get available processing times

 

Required parameters: office_id, destination, nationality, visa_type, entries_number

Header: GET

/YOUR_API_KEY/public/proctime/office_id/1/destination/cn/nationality/ru/visa_type/1/entries_number/1 HTTP/1.1

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:proctime",
    "method": "get",
    "result": [
        "Standard",
        "Express (2-3 days)",
        "Urgent (24h)"
    ]
}
Create Application
Required parameters: email, office_id, destination, nationality, visa_type, entries_number, expedited_service

Sample JSON Request:

POST
/YOUR_API_KEY/public/appdata HTTP/1.1
Content-type: application/json

{
    "email": "hello@viselio.com",
    "destination": "CH",
    "office_id": 1,
    "nationality": "DE",
    "visa_type": 1,
    "entries_number": 1,
    "expedited_service": 0,
    "lang": "en",
    "email_send": true,
    "first_name": "Friedrich",
    "middle_name": "von",
    "last_name": "Hans",
    "contact_phone": "49 114567890",
    "contact_address_street": "Strasse",
    "contact_address_number": "456b",
    "contact_address_zip": "11000",
    "contact_address_city": "Munich",
    "contact_address_country": "DE",
    "school_name": "7 Schuller",
    "school_street_name": "Strasse Zwei",
    "school_street_num": "123",
    "school_zip": "10115",
    "school_city": "Berlin",
    "school_country": "DE",
    "school_phone": "49 114567890",
    "marital_status": 1,
    "birth_date": "02.05.2017",
    "birth_city": "Berlin",
    "birth_country": "DE",
    "passport_number": "123456789",
    "passport_valid_from": "02.05.2017",
    "passport_valid_to": "02.05.2018",
    "place_of_issue": "Berlin",
    "entry_date": "02.07.2017",
    "exit_date": "12.07.2017",
    "cities_visit_list": [
        {
            "city_name": "Berlin",
            "date_from": "02.07.2017",
            "date_to": "12.07.2017",
            "accommodation": 1,
            "accommodation_name": "Some hotel",
            "street_name": "Strasse Drei",
            "street_number": "32323",
            "zip": "23423"
        }
    ],
    "shipp_name": "Hans Bulger",
    "shipp_street": "Strasse View",
    "shipp_street_number": "546z",
    "shipp_zip": "10115",
    "shipp_city": "Berlin",
    "shipp_country": "DE"
}
Response:
{
    "code": 200,
    "status": "success",
    "action": "public:appdata",
    "method": "post",
    "result": {
        "app_id": "48b61cfc-740c-4003-b26e-aa9c2bbf51bf"
    }
}
Get nationalities
Required parameters: office_id, destination, nationality

Header: GET

/YOUR_API_KEY/public/offices/

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:nationalities",
    "method": "get",
    "result": {
        "3": {
            "name": "Albania"
        },
        "11": {
            "name": "Argentina"
        },
        "12": {
            "name": "Armenia"
        },
        "14": {
            "name": "Australia"
        }
...
}
Get offices
Header: GET

/YOUR_API_KEY/public/offices/

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:offices",
    "method": "get",
    "result": {
        "1": {
            "city": "Bern",
            "country": "Switzerland"
        },
        "2": {
            "city": "Berlin",
            "country": "Germany"
        },
        "3": {
            "city": "Vienna",
            "country": "Austria"
        },
        "4": {
            "city": "Paris ",
            "country": "France"
        },
        "5": {
            "city": "London",
            "country": "United Kingdom"
        }
    }
}
Get destinations
Required parameters: office_id

Header: GET

/YOUR_API_KEY/public/destinations/office_id/1/ ru HTTP/1.1

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:destinations",
    "method": "get",
    "result": {
        "4": {
            "name": "Algeria"
        },
        "7": {
            "name": "Angola"
        },
        "11": {
            "name": "Argentina"
        },
        "16": {
            "name": "Azerbaijan"
        },
        "18": {
            "name": "Bahrain"
        },
...
}
}

Requirements API

Get all nationalities
 Header: GET https://r.viselio.com/api/allNationalities/4597065b0f5abc60b0311cf28f317229

Response:

{
      "code": 200,
      "status": "success",
      "action": "public:other",
      "method": "get",
      "result": 
              {
                "id":"1",
                "name":"Afghanistan"
              },
              {
                "id":"3",
                "name":"Albania"
              },
              {
                "id":"4",
                "name":"Algeria"
              },
              {
                "id":"6",
                "name":"Andorra"
              },
...
}
Check If User needs a Visa
Required parameters: country_from_id, country_to_id

Header: GET https://r.viselio.com/api/timShort/4597065b0f5abc60b0311cf28f317229/country_from_id/country_to_id

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:other",
    "method": "get",
    "result": {
        "marital_status": {
            "1": "Married",
            "2": "Single"
        },
        "accommodation_type": {
            "1": "Hostel",
            "2": "Hotel"
        }
    }
}
Get price calculation

Required parameters: office_id, destination, nationality, visa_type, entries_number, expedited_service

Header: GET /API_KEY/public/prices/office_id/1/destination/cn/nationality/ru/visa_type/1/entries_number/1/expedited_service/0 HTTP/1.1

Response:

{
    "code": 200,
    "status": "success",
    "action": "public:prices",
    "method": "get",
    "result": {
        "without_vat": {
        "price_total": 109.6379,
        "price_ambassy_fee": 40,
        "price_vsh_fee": 0,
        "price_fee": 69.6379
        },
        "with_vat": {
            "price_total": 115,
            "price_ambassy_fee": 40,
            "price_vsh_fee": 0,
            "price_fee": 75
         },
         vat_percent": 7.7,
         "currency": "CHF"
     }
 }