Retrieving Visa appointments

Retrieving visa appointments similar to GNIB appointments

source: hosted on Github here

webapp: hosted on Heroku here shows available timings for GNIB and Visa appointments

In Ireland, registering with Garda allows you a legal permission to stay in Ireland. But if you need to leave the country and travel for any reason, and need to come back, you need a visa. A single entry visa allows returning once, while a multi-entry visa allows returning multiple times. Unfortunately, the visa appointments are also made online in much the same as the GNIB ones. They require filling out a form before viewing available dates and timings. Since in the previous posts, I managed to create scripts, and a webapp to easily view the timings without the hassle of filling out the forms, I sought to do the same for visa appointments as well.

In this post, I describe how the system for visa appointments works, and reverse engineer a way to get the timings. They can be viewed online here and the source code can be accessed here.

Dates and Timings

Although much of the system works in a similar manner, it is slightly different enough to require a different code rather than just changing the API endpoint used to get appointments. In the visa system, there are available dates for appointments which are then queried to get available times. So the system first queries the available dates, and then once the user selects a particular date, queries for the available timings.

The url for getting the available dates is and the parameters required are:

    "openagent": "",
    "type": "I"

openagent is a null parameter, so it has no value or is empty. type signifies the visa appointment is for an individual. Like the GNIB system, much of this code is from this javascript file.

Making the request provides dates as a list of strings of the form DD/MM/YYYY. These need to be passed as a parameter to the url to get the timings for appointments on that particular date. The parameters for this request are:

    "openagent": "",
    "type": "I",
    "num": 1,
    "dt": "<date>"

The num parameter specifies the number of people associated with the appointment, which for an individual is 1. The dt parameter specifies the date for which these appointments are requested.

The response to this request is rather similar to the response of the GNIB request. It contains a field called slots that contains the timings for that particular date in the format:

    "slots": [
            "id": "string",
            "time": "DD/MM/YYYY - HH:MM"

The usual checks for errors, null values, empty lists etc. apply here. Updating the scripts, and the heroku webapp to retrieve visa appointments is not much work beyond what was previously done.

Future Work

  • Chrome extension