tkapi is a Node.js API wrapper that provides to Turkish Airlines API endpoints.
You can use these endpoints:
The Availability Request message requests Flight Availability for a city pair on a specific date for a specific number and type of passengers. Calendar with best price of each day in a week and full flight list with their price depending on cabin will be provided.
This is a lookup method that gives fare family list to be used for getAvailability request. The output changes depending on ports location (domestic or international) and ticket type (award ticket or not)
Lists all ports in details.
This method retrieves schedule info. It lists all flights in requested route and operation days in a week.
This method returns the detailed information of the reservations created through our reservation system in XML format. It covers reservations made from all sales channels.
Calculates miles for flight.
Calculates award miles with tax.
You can see how to use the wrapper in the examples folder. (Once you need to install packages for run.)
Firstly, run the following commands to use wrapper,
npm install
npm run-script build
Once you have created an account from the Turkish Airlines developer portal, you should create an application then you need to get an API key and API secret.
- Wrapper created.
- Request models improved. (You can send request easily!)
- Library available on npmjs!
- Project merged with c0b41's contribution. Thanks for support.
- The complex parameter validation structure has been removed. You can handle body/status values via returned body.
- 2 new endpoints added. (calculateFlightMiles / calculateAwardMilesWithTax)
You can see example request data and much more in documentations.
https://developer.turkishairlines.com
https://developer.turkishairlines.com/documentation
tkapi is available under the MIT license. See the LICENSE file for more info.