Visa API

  • endpoint: https://booking-api.skypicker.com/api/v0.1/travel_info

  • method: POST

Travel Info

The responses are G-zipped and need to be unpacked (response header Content-Encoding: gzip).

travel_info

  • visa information is provided for specific flight and passengers
POST https://booking-api.skypicker.com/api/v0.1/travel_info
Requestsexample 1
Headers
Content-Type: application/json
Body
{
    "flights":[
        {
            "src_country":"ES",
            "dst_country":"us",
            "atime":"2019-05-17T20:15:00",
            "dtime":"2019-05-17T17:00:00",
            "airline":{
                "id":"DY"
            }
        },
        {
            "src_country":"US",
            "dst_country":"RU",
            "atime":"2019-06-17T20:15:00",
            "dtime":"2019-06-17T17:00:00",
            "airline":{
                "id":"FR"
            }
        },
        {
            "src_country":"RU",
            "dst_country":"ES",
            "atime":"2019-06-17T20:15:00",
            "dtime":"2019-06-17T17:00:00",
            "airline":{
                "id":"FR"
            }
        }
    ],
    "passengers":[
        {
            "id":0000001,
            "nationality":"CA"
        },
        {
            "id":0000002,
            "nationality":"RU"
        }
    ]
}
Schema
{
    "$schema":"http://json-schema.org/draft-07/schema#",
    "type":"object",
    "properties":{
        "flights":{
            "type":"array",
            "items":{
                "type":"object",
                "properties":{
                    "src_country":{
                        "type":"string",
                        "minLength":2,
                        "maxLength":2
                    },
                    "dst_country":{
                        "type":"string",
                        "minLength":2,
                        "maxLength":2
                    },
                    "atime":{
                        "type":"string",
                        "pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$"
                    },
                    "dtime":{
                        "type":"string",
                        "pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$"
                    },
                    "airline":{
                        "type":"object",
                        "properties":{
                            "id":{
                                "type":[
                                    "string",
                                    "integer"
                                ]
                            }
                        },
                        "required":[
                            "id"
                        ]
                    }
                },
                "required":[
                    "src_country",
                    "dst_country",
                    "atime",
                    "dtime",
                    "airline"
                ]
            }
        }
    },
    "passengers":{
        "type":"array",
        "items":{
            "type":"object",
            "properties":{
                "id":{
                    "type":"integer"
                },
                "nationality":{
                    "type":"string",
                    "minLength":2,
                    "maxLength":2
                }
            },
            "required":[
                "id",
                "nationality"
            ]
        },
        "maxItems":25
    },
    "required":[
        "flights",
        "passengers"
    ]
}
Responses200
Headers
Content-Type: application/json
Body
{
  "0000001": {
    "0": {
      "health": [],
      "passport": [],
      "visa": [
        {
          "country": "US",
          "info": "",
          "status": "critical",
          "timestamp": 1522329527
        },
        {
          "country": "ES",
          "info": "",
          "status": "critical",
          "timestamp": 1522329527
        }
      ]
    }
  },
  "0000002": {
    "0": {
      "health": [],
      "passport": [],
      "visa": [
        {
          "country": "US",
          "info": "",
          "status": "ok",
          "timestamp": 1521648590
        },
        {
          "country": "ES",
          "info": "",
          "status": "ok",
          "timestamp": 1521647986
        }
      ]
    }
  }
}

Flights
POST/api/v0.1/travel_info

Request with a list of flights and a list of passengers.

A JSON response contains visa information for each passenger and each segment of his itinerary with parameters:

  • visa

    • country - the country to which the passenger may a need visa
    • info - empty field or additional information about the requirements
    • status - main information
      • critical - passenger needs a visa
      • notice - passenger may need a visa
      • ok
    • timestamp
  • passport - can be empty or have the same structure as visa

  • health - can be empty or have the same structure as visa


Generated by aglio on 20 Sep 2019