{ "openapi": "3.0.1", "info": { "title": "Schiphol PublicFlight API", "description": "Public-Flights Flight API", "contact": { "name": "api-support@schiphol.nl" }, "version": "4.2" }, "servers": [ { "url": "https://{environment}.schiphol.nl/public-flights", "variables": { "environment": { "enum": [ "api", "api-acc" ], "default": "api" } } } ], "paths": { "/flights/{id}": { "get": { "summary": "Retrieves a Flight based on flight-id", "parameters": [ { "$ref": "#/components/parameters/AcceptHeader" }, { "$ref": "#/components/parameters/ResourceVersionHeader" }, { "name": "id", "in": "path", "description": "Unique numeric id of flight", "required": true, "schema": { "pattern": "^[0-9]+$", "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Flight" } } } }, "400": { "description": "Bad request", "content": {} }, "404": { "description": "Not Found", "content": {} } } } }, "/flights/ids": { "get": { "summary": "Retrieve flight IDs based on a datetime range", "description": "Returns a list of flight IDs for flights scheduled within the specified datetime range (filters on scheduleDateTime). Max date range is three days.", "parameters": [ { "$ref": "#/components/parameters/AcceptHeader" }, { "$ref": "#/components/parameters/ResourceVersionHeader" }, { "name": "fromDateTime", "in": "query", "description": "From date of search period. Format: yyyy-MM-dd'T'HH:mm:ss", "required": true, "schema": { "type": "string", "format": "local-date-time" } }, { "name": "toDateTime", "in": "query", "description": "To date of search period (inclusive). Format: yyyy-MM-dd'T'HH:mm:ss", "required": true, "schema": { "type": "string", "format": "local-date-time" } } ], "responses": { "200": { "description": "List of flight IDs", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string", "example": "141988470640710484" } } } } }, "400": { "description": "Invalid request parameters" }, "500": { "description": "Internal server error" } } } }, "/flights": { "get": { "summary": "Retrieves flights for a specific date", "description": "Retrieves flights for a specific date. If scheduleDate is provided as query parameter, it will retrieve flights for that date. If not provided it is defaulted to today. If there are more hits then allowed on one page response headers will contain the URLs where other pages of the results can be reached.For example:\u003Cbr/\u003ELink: <protocol://server_address:port/public-flights/resource> ; rel=\"first\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=10> rel=\"last\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=3> rel=\"next\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=1> rel=\"prev\"\u003Cbr/\u003E\u003Cbr/\u003E", "parameters": [ { "$ref": "#/components/parameters/AcceptHeader" }, { "$ref": "#/components/parameters/ResourceVersionHeader" }, { "name": "scheduleDate", "in": "query", "description": "Scheduled date to get flights for. Format: yyyy-MM-dd. Defaults to today if not provided", "schema": { "type": "string", "format": "date" } }, { "name": "scheduledate", "in": "query", "description": "See: scheduleDate. Prefer scheduleDate. If both scheduleDate and scheduledate are used scheduleDate takes precedence", "schema": { "type": "string", "format": "date" } }, { "name": "scheduleTime", "in": "query", "description": "Scheduled time to get flights from. Format: HH:mm", "schema": { "type": "string", "format": "hour-minute" } }, { "name": "flightName", "in": "query", "description": "Flight number as printed on the ticket", "schema": { "maxLength": 8, "minLength": 5, "type": "string" } }, { "name": "flightname", "in": "query", "description": "See: flightName. Prefer flightName. If both flightName and flightname are used flightName takes precedence", "schema": { "maxLength": 8, "minLength": 5, "type": "string" } }, { "name": "flightDirection", "in": "query", "description": "Direction of the flight", "schema": { "type": "string", "enum": [ "A", "D" ] } }, { "name": "flightdirection", "in": "query", "description": "See: flightDirection. Prefer using flightDirection. If both flightDirection and flightdirection are used flightDirection takes precedence", "schema": { "type": "string", "enum": [ "A", "D" ] } }, { "name": "airline", "in": "query", "description": "Prefix in flight number as printed on the ticket. For exmaple: KL. This can either be a 2-character (IATA) airline prefix or 3-character (ICAO) airline prefix. Only one airline (or airlineCode) can be queried at the same time. ", "schema": { "maxLength": 3, "minLength": 2, "type": "string" } }, { "name": "airlineCode", "in": "query", "description": "NVLS code of an airliner.", "schema": { "type": "integer", "format": "int32" } }, { "name": "route", "in": "query", "description": "IATA or ICAO code of airport in route; multiple values, comma separated", "schema": { "minLength": 1, "type": "string" } }, { "name": "includedelays", "in": "query", "description": "Include flights of earlier an scheduleDate when these have enough delay to shift to the date that is queried upon.", "schema": { "type": "boolean", "default": false } }, { "name": "includeDelays", "in": "query", "description": "See: includedelays. Prefer includedelays. If both includeDelays and includeDelays are used, includedelays take precedence.", "schema": { "type": "boolean", "default": false } }, { "name": "page", "in": "query", "description": "Page number", "schema": { "maximum": 499, "minimum": 0, "type": "integer", "format": "int32", "default": 0 } }, { "name": "sort", "in": "query", "description": "Specifies which field to use for sorting. Allowed values are flightName, scheduleDate, scheduleTime, flightDirection, mainFlight, airlineCode, id, and all fields from the searchDateTimeField parameter. Use plus or minus sign to indicate ascending or descending order. Multiple fields are allowed and should be separated by a comma. For example \"-scheduleDate, +scheduleTime\".", "schema": { "pattern": "^((\\+|-| )?(flightName|scheduleDate|scheduleTime|flightDirection|mainFlight|airlineCode|id|estimatedLandingTime|actualLandingTime|publicEstimatedOffBlockTime|actualOffBlockTime|expectedTimeBoarding|expectedTimeGateClosing|expectedTimeGateOpen|expectedTimeOnBelt|scheduleDateTime|lastUpdatedAt)(,|$))+$", "type": "string", "default": "+scheduleTime" } }, { "name": "fromDateTime", "in": "query", "description": "From date of search period. Format: yyyy-MM-dd'T'HH:mm:ss", "schema": { "type": "string", "format": "local-date-time" } }, { "name": "toDateTime", "in": "query", "description": "To date of search period (inclusive). Format: yyyy-MM-dd'T'HH:mm:ss", "schema": { "type": "string", "format": "local-date-time" } }, { "name": "searchDateTimeField", "in": "query", "description": "Query by a specific DateTime field. Allowed fields are estimatedLandingTime, actualLandingTime, publicEstimatedOffBlockTime, actualOffBlockTime, expectedTimeBoarding, expectedTimeGateClosing, expectedTimeGateOpen, expectedTimeOnBelt, scheduleDateTime, lastUpdatedAt", "schema": { "type": "string", "enum": [ "estimatedLandingTime", "actualLandingTime", "publicEstimatedOffBlockTime", "actualOffBlockTime", "expectedTimeBoarding", "expectedTimeGateClosing", "expectedTimeGateOpen", "expectedTimeOnBelt", "scheduleDateTime", "lastUpdatedAt" ] } }, { "name": "fromScheduleDate", "in": "query", "description": "Query by ScheduleDate range.", "schema": { "type": "string", "format": "date" } }, { "name": "toScheduleDate", "in": "query", "description": "Query by ScheduleDate range", "schema": { "type": "string", "format": "date" } }, { "name": "isOperationalFlight", "in": "query", "description": "Query based on operational/non-operational flights.true for operational and false for non-operational flights", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FlightList" } } } }, "204": { "description": "No content", "content": {} }, "400": { "description": "Bad request", "content": {} } } } }, "/airlines": { "get": { "summary": "Retrieves list of airlines", "description": "Retrieves a list of airlines. If there are more hits then allowed on one page response headers will contain the URLs where other pages of the results can be reached.For example:\u003Cbr/\u003ELink: <protocol://server_address:port/public-flights/resource> ; rel=\"first\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=10> rel=\"last\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=3> rel=\"next\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=1> rel=\"prev\"\u003Cbr/\u003E\u003Cbr/\u003E", "parameters": [ { "$ref": "#/components/parameters/AcceptHeader" }, { "$ref": "#/components/parameters/ResourceVersionHeader" }, { "name": "page", "in": "query", "description": "page number", "schema": { "maximum": 499, "minimum": 0, "type": "integer", "format": "int32", "default": 0 } }, { "name": "sort", "in": "query", "description": "Specifies which field to use for sorting. Allowed fields are publicName, iata, icao and nvls. Use plus or minus sign to indicate ascending or descending order.", "schema": { "pattern": "^((\\+|-| )?(publicName|iata|icao|nvls)(,|$))+$", "type": "string", "default": "+iata" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AirlineList" } } } }, "204": { "description": "No content", "content": {} }, "400": { "description": "Bad request", "content": {} } } } }, "/airlines/{airline}": { "get": { "summary": "Retrieves airline based on code (IATA or ICAO)", "description": "Retrieve airline based on IATA code or ICAO code.", "parameters": [ { "$ref": "#/components/parameters/AcceptHeader" }, { "$ref": "#/components/parameters/ResourceVersionHeader" }, { "name": "airline", "in": "path", "description": "IATA / ICAO code", "required": true, "schema": { "maxLength": 3, "minLength": 2, "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Airline" } } } }, "400": { "description": "Bad request", "content": {} }, "404": { "description": "Not Found", "content": {} } } } }, "/aircrafttypes": { "get": { "summary": "Retrieves list of aircrafttypes", "description": "Retrieves list of aircrafttypes. If there are more hits then allowed on one page response headers will contain the URLs where other pages of the results can be reached.For example:\u003Cbr/\u003ELink: <protocol://server_address:port/public-flights/resource> ; rel=\"first\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=10> rel=\"last\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=3> rel=\"next\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=1> rel=\"prev\"\u003Cbr/\u003E\u003Cbr/\u003E", "parameters": [ { "$ref": "#/components/parameters/AcceptHeader" }, { "$ref": "#/components/parameters/ResourceVersionHeader" }, { "name": "iataMain", "in": "query", "description": "IATA main code", "schema": { "maxLength": 3, "minLength": 3, "type": "string" } }, { "name": "iataSub", "in": "query", "description": "IATA sub code", "schema": { "maxLength": 3, "minLength": 3, "type": "string" } }, { "name": "page", "in": "query", "description": "Page number", "schema": { "maximum": 499, "minimum": 0, "type": "integer", "format": "int32", "default": 0 } }, { "name": "sort", "in": "query", "description": "Specifies which field to use for sorting. Allowed fields are iataMain, iataSub, longDescription and shortDescription. Use plus or minus sign to indicate ascending or descending order.", "schema": { "pattern": "^((\\+|-| )?(iataMain|iataSub|longDescription|shortDescription)(,|$))+$", "type": "string", "default": "+iataMain" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AircraftTypeList" } } } }, "204": { "description": "No content", "content": {} }, "400": { "description": "Bad request", "content": {} } } } }, "/destinations": { "get": { "summary": "Retrieves list of destinations", "description": "Retrieves list of destinations\u003Cbr/\u003E\u003Cbr/\u003EIf there are more pages of the result, header will contain custom String field - Link, which will contain URLs where other pages of the results can be reached.\u003Cbr/\u003EFor example:\u003Cbr/\u003ELink: <protocol://server_address:port/public-flights/resource> ; rel=\"first\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=10> rel=\"last\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=3> rel=\"next\", \u003Cbr/\u003E<protocol://server_address:port/public-flights/resource?page=1> rel=\"prev\"\u003Cbr/\u003E\u003Cbr/\u003E", "parameters": [ { "$ref": "#/components/parameters/AcceptHeader" }, { "$ref": "#/components/parameters/ResourceVersionHeader" }, { "name": "page", "in": "query", "description": "Page number", "schema": { "maximum": 499, "minimum": 0, "type": "integer", "format": "int32", "default": 0 } }, { "name": "sort", "in": "query", "description": "Specifies which field to use for sorting. Allowed fields are publicName.dutch, publicName.english, iata, country and city.. Use plus or minus sign to indicate ascending or descending order.", "schema": { "pattern": "^((\\+|-| )?(publicName\\.dutch|publicName\\.english|iata|country|city)(,|$))+$", "type": "string", "default": "+iata" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DestinationList" } } } }, "204": { "description": "No content", "content": {} }, "400": { "description": "Bad request", "content": {} } } } }, "/destinations/{iata}": { "get": { "summary": "Retrieves destination based on IATA code", "description": "Retrieves destination based on IATA code", "parameters": [ { "$ref": "#/components/parameters/AcceptHeader" }, { "$ref": "#/components/parameters/ResourceVersionHeader" }, { "name": "iata", "in": "path", "description": "IATA code", "required": true, "schema": { "maxLength": 3, "minLength": 3, "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Destination" } } } }, "400": { "description": "Bad request", "content": {} }, "404": { "description": "Not Found", "content": {} } } } } }, "security": [ { "AppIdHeader": [], "AppKeyHeader": [] } ], "components": { "securitySchemes": { "AppIdHeader": { "type": "apiKey", "in": "header", "name": "app_id", "description": "Your API app id" }, "AppKeyHeader": { "type": "apiKey", "in": "header", "name": "app_key", "description": "Your API app key" } }, "parameters": { "AcceptHeader": { "name": "Accept", "in": "header", "description": "Only 'application/json' is allowed", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, "ResourceVersionHeader": { "name": "ResourceVersion", "in": "header", "description": "Resource version of the API", "required": true, "style": "simple", "schema": { "type": "string", "example": "v4", "pattern": "v4" } } }, "schemas": { "RowType": { "type": "object", "properties": { "position": { "type": "string" }, "desks": { "$ref": "#/components/schemas/DesksType" } } }, "BaggageClaimType": { "type": "object", "properties": { "belts": { "type": "array", "items": { "type": "string" } } } }, "RemarksType": { "type": "object", "properties": { "remarks": { "type": "array", "items": { "type": "string" } } } }, "CodesharesType": { "type": "object", "properties": { "codeshares": { "type": "array", "items": { "type": "string" } } } }, "FlightList": { "type": "object", "properties": { "flights": { "type": "array", "items": { "$ref": "#/components/schemas/Flight" } } } }, "CheckinAllocationType": { "type": "object", "properties": { "endTime": { "type": "string", "format": "date-time" }, "rows": { "$ref": "#/components/schemas/RowsType" }, "startTime": { "type": "string", "format": "date-time" } } }, "RowsType": { "type": "object", "properties": { "rows": { "type": "array", "items": { "$ref": "#/components/schemas/RowType" } } } }, "PublicName": { "type": "object", "properties": { "dutch": { "type": "string" }, "english": { "type": "string" } } }, "DestinationList": { "type": "object", "properties": { "destinations": { "type": "array", "items": { "$ref": "#/components/schemas/Destination" } } } }, "Destination": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "iata": { "type": "string" }, "publicName": { "$ref": "#/components/schemas/PublicName" } } }, "Airline": { "type": "object", "properties": { "iata": { "type": "string" }, "icao": { "type": "string" }, "nvls": { "type": "integer", "format": "int64" }, "publicName": { "type": "string" } } }, "AirlineList": { "type": "object", "properties": { "airlines": { "type": "array", "items": { "$ref": "#/components/schemas/Airline" } } } }, "AircraftType": { "type": "object", "properties": { "iataMain": { "type": "string" }, "iataSub": { "type": "string" }, "longDescription": { "type": "string" }, "shortDescription": { "type": "string" } } }, "AircraftTypeList": { "type": "object", "properties": { "aircraftTypes": { "type": "array", "items": { "$ref": "#/components/schemas/AircraftType" } } } }, "Flight": { "type": "object", "properties": { "lastUpdatedAt": { "type": "string", "format": "date-time" }, "actualLandingTime": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "actualOffBlockTime": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "aircraftRegistration": { "type": "string" }, "aircraftType": { "$ref": "#/components/schemas/AircraftTypeType" }, "baggageClaim": { "$ref": "#/components/schemas/BaggageClaimType" }, "checkinAllocations": { "$ref": "#/components/schemas/CheckinAllocationsType" }, "codeshares": { "$ref": "#/components/schemas/CodesharesType" }, "estimatedLandingTime": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "expectedTimeBoarding": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "expectedTimeGateClosing": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "expectedTimeGateOpen": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "expectedTimeOnBelt": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "expectedSecurityFilter": { "type": "string", "description": "expected security filter" }, "flightDirection": { "type": "string", "enum": [ "A", "D" ] }, "flightName": { "type": "string" }, "flightNumber": { "type": "integer", "format": "int64" }, "gate": { "type": "string" }, "pier": { "type": "string" }, "id": { "type": "string" }, "isOperationalFlight": { "type": "boolean" }, "mainFlight": { "type": "string" }, "prefixIATA": { "type": "string" }, "prefixICAO": { "type": "string" }, "airlineCode": { "type": "integer", "format": "int64" }, "publicEstimatedOffBlockTime": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "publicFlightState": { "$ref": "#/components/schemas/PublicFlightStateType" }, "route": { "$ref": "#/components/schemas/RouteType" }, "scheduleDateTime": { "type": "string", "description": "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "format": "date-time" }, "scheduleDate": { "type": "string", "description": "yyyy-MM-dd", "format": "date" }, "scheduleTime": { "type": "string", "description": "hh:mm:ss" }, "serviceType": { "type": "string", "description": "The service type category of the commercial flight. For example: J = Passenger Line, C=Passenger Charter, F = Freight Line and H = Freight Charter etc." }, "terminal": { "type": "integer", "format": "int64" }, "transferPositions": { "$ref": "#/components/schemas/TransferPositionsType" }, "schemaVersion": { "type": "string" } } }, "RouteType": { "type": "object", "properties": { "destinations": { "type": "array", "items": { "type": "string" } }, "eu": { "type": "string", "description": "S (Schengen), E (Europe) or N (non-Europe)" }, "visa": { "type": "boolean", "description": "Indicates if a visum is required for destination" } } }, "DesksType": { "type": "object", "properties": { "desks": { "type": "array", "items": { "$ref": "#/components/schemas/DeskType" } } } }, "AircraftTypeType": { "type": "object", "properties": { "iataMain": { "type": "string" }, "iataSub": { "type": "string" } } }, "DeskType": { "type": "object", "properties": { "checkinClass": { "$ref": "#/components/schemas/CheckinClassType" }, "position": { "type": "integer", "format": "int64" } } }, "CheckinClassType": { "type": "object", "properties": { "code": { "type": "string" }, "description": { "type": "string" } } }, "TransferPositionsType": { "type": "object", "properties": { "transferPositions": { "type": "array", "items": { "type": "integer", "format": "int64" } } } }, "PublicFlightStateType": { "type": "object", "properties": { "flightStates": { "type": "array", "items": { "type": "string" } } } }, "CheckinAllocationsType": { "type": "object", "properties": { "checkinAllocations": { "type": "array", "items": { "$ref": "#/components/schemas/CheckinAllocationType" } }, "remarks": { "$ref": "#/components/schemas/RemarksType" } } } } } }