Comprehensive documentation for AirToronto Backend REST API.

Airlines

POST - api/airlines/search

Conduct a full text search on the airlines collection which will match the provided query on the following properties: country, iata, icao, name

Query Paramaters

{
	"limit": Int, // number of search results to return (default 10)
}

Body (JSON)

{
	"query": String, // the query string
	"include": [String] // fields to include in response (default ALL)
	"exclude": [String] // fields to exlucde in response (default NONE)
}

Response Status Codes

200 - Query successfully performed

400 - Incorrect payload, tried to exclude score field which is not allowed

Response Body

{
	"data": [Object] 
}

Airports

POST - api/airports/search

Conduct a full text search on the airports collection which will match the provided query on the following properties: city, country, iata, name

Query Paramaters

{
	"limit": Int, // number of search results to return (default 10)
}

Body (JSON)