Impact the future of visa services.

General Flow
Get a list of visa offers
Get Application Form
Save Order
Submit the Order
Upload Documents
Check Order Status
General Flow

1. Get a list of visa offers Visa application form is not permanent and could be changed by a consulate or embassy. As soon as embassy changes the application, we reflect the change in our system and create a new version of the same application. End-point is required to get a latest and up to date id of application for chosen destination.

2. Get Application Form Function supposed to be used for retrieving a list of questions of particular application by its ID

3. Save Order You have to create an order and send user data to VisaHQ. Can be called several times in a row for updating user information.

4. Submit the Order Completes the order and submits it to VisaHQ

5. Upload documents In most of the cases, embassies and consulates require scan copies of documents and booking confirmations to be attached. You can upload user scans using a current function.

6. Check order status After order submission, it’s possible to check for its current status

Note: Get a list of visa offers and Get Application form functions are optional and could be replaced on hard-code. We should consider it to simplify initial development and reduce the amount of tests. But we should not stick to hard code on a long run.

Get a list of visa offers
POST https://bvhq11p.visahq.org/v0/services/5/search

HTTP request headers

{
    "Date": "<current_date>", /*Thu, 01 Aug 2019 09:35:33 GMT*/
    "Token": "<your_api_token>",
    "Authorization": "<your_api_authorization_key>",
}

HTTP request body

{
    "residency": "CN",  //customer’s residency */
    "citizenship": "CN", /* customer’s citizenship */
    "destination": enum ("TR","LK","IN","KH","VN","MM","TJ","GE","KG","AM","AZ","…"), /* destinations alpha2 code */
    "visa_group": 68, //visa type (tourist, business, etc.)
}

HTTP response example

{
    "id": "<service_item_id>",
    "service_id": "<service_id>",
    "residency": "<residency_alpha2>",
    "citizenship": "<citizenship_alpha2>",
    "destination": "<destination_alpha2>",
    "visa_group": "<visa_group_id>",
    "Prices":[
        /* bold selection below is iterative and shows all available combinations of visa processing times */
        /* and visa types. Cost information should be ignored */
        {
            "keys":{
                "proc_time":{
                    "id":4,
                    "name":"2-3 business days",
                    "days_count":3
                },
                "visa_type":{
                    "id":3,
                    "name":"90 days Multiple Entry"
                }},
                "fields":[
                    {
                        "id":"0",
                        "label":"Embassy fee",
                        "Value":88
                    },
                    {
                        "id":"1",
                        "label":"Service fee",
                        "value":35.7
                    }
                ]
            }
        }
    ]
}

Returns 404 if no application available

Get Application Form
GET https://bvhq11p.visahq.org/v0/services/5/items/<service_item_id>/application

service_item_id is a value received from previous (Get a list of visa offers) request


Simplified response example. Full responses can be found in archive

{
    "service_id": <service_id>,
    "service_item_id": <service_item_id>,
    "items":[ # Questions section
        {
            "label":"Traveler contacts",
            "items":[ # Questions group
                {
                    "is_iterated":false,
                    "conditions":[
                        {
                            "question_id": "refused",
                            "value": "true",
                            "operator":"="
                        }
                    ],
                    "items":[ # Questions
                        {
                            "id":"homeaddress",
                            "is_required":false,
                            "label":"Home address",
                            "help":"Please provide address where you currently reside.",
                            "view":"text"
                        }
                    ]
                }
            ]
        }
    ]
}
Save Order
POST https://bvhq11p.visahq.org/v0/basket/add-service

Simplified request example. Full request can be found in archive


price object need to be an exact copy of the proper element from the prices array received from Get Application

ID function

{
    "price":{
        "keys":{
            "proc_time":{
                "id":4,
                "name":"2-3 business days",
                "Days_count":3
            },
            "visa_type":{
                "id":3,
                "name":"90 days Multiple Entry"
            }
        },
        "fields":[
            {
                "id":"0",
                "label":"Embassy fee",
                "value":88
            },
            {
                "id":"1",
                "label":"Service fee",
                "value":35.7
            }
        ]
    },
    "service":<service_id>,
    "service_item":<service_item_id>,
    "application":{
        "first-name":["John"],
        "last-name":["Doe"]
    }
}

Simplified response example. Full responses can be found in archive


{
    "<basket_item_id>":{
        <order_item_object>
    }
}
Submit the Order
POST https://bvhq11p.visahq.org/v0/basket/finish
{
    "Invoice":{}
}

Full Response can be found in archive

* Make sure you save order_id. It will be used in further calls

{
    "id": 1503,
    "invoice": "DE1385",
    "user_id": "13041",
    "status": "unpaid",
    "created": "2017-12-28T11:38:50.786+00:00",
    "updated": "2017-12-28T11:38:50.897+00:00",
    "total": 219,
    "service_list": [..]
}
Upload Documents
POST https://bvhq11p.visahq.org//v0/orders/{orderId}/files

Request body contains a file that needs to be uploaded

* Note: only one file per request

{
    "id":123,
    "date": "2017-12-28T11:29:25.657+00:00",
    "author":"John Smith",
    "url":"https://bvhq11p.visahq.org/v0/orders/{orderId}/downloads/123"
}
Check Order Status
GET https://bvhq11p.visahq.org//v0/external-orders/{orderId}

The response is the same as in Submit Order call

Application status located at service_list[0].status

{
    "id": 1503,
    "invoice": "DE1385",
    "user_id": "13041",
    "status": "unpaid",
    "created": "2017-12-28T11:38:50.786+00:00",
    "updated": "2017-12-28T11:38:50.897+00:00",
    "total": 219,
    "service_list": [
        {
            "id": 1480,
            "order_id": 1503,
            "currency": {
                "code": "EUR",
                "numeric": "978",
                "label": "Euro"
            },
            "total": 219,
            "created": "2017-12-28T11:38:50.790+00:00",
            "updated": "2017-12-28T11:38:50.790+00:00",
            "status": "pending",
            //……..
        }
    ]
}