Calculate Flight Miles

Calculates miles for flight.

 

Input

Name Description Type Required

origin

3 digits code City. String (IZM) Yes

destination

3 digits code City. String (IZM) Yes

cabin_code

Cabin Code. String (Y) No

class_code

Class Info. String (Y) No

marketingClassCode

Marketing Class Code. String No

card_type

Card type String (CC, CP,EC,EP) No

flightDate

Flight date (DD.MM.YYYY). String No

operatingFlightNumber

Operating Flight Number. String (TK1000) No

marketingFlightNumber

Marketing Flight Number. String (TK1000) No

Output

MilesResponseDetail

Name Description Type

definition

Definition. String

flightCount

Flight count. String

baseMiles

Base miles which will be earned. String

baseBonus

Base bonus which will be earned. String

promoMiles

Statu miles. String

promoPoints

Promotion bonus miles. String

totalMiles

Total miles which will be earned String

cabinType

Array of all ports in city. String

classCodes

3 Letter IATA airport code String

Request

			
{
	"cabin_code": "Y",
	"card_type": "EP",
	"class_code": "",
	"destination": "IST",
	"flightDate": "21.04.2017",
	"operatingFlightNumber": "TK1000",
	"origin": "FRA"
}
			
        

Response

			
{
   "status": "SUCCESS",
   "message":    {
      "code": "TK-0000",
      "description": "Request Processed Successfully."
   },
   "data": {"milesResponseDetail":    [
            {
         "promoPoints": "0",
         "promoMiles": "0",
         "baseMiles": "292",
         "basePoint": "292",
         "definition": "Frankfurt-Istanbul (Economy: W,P,F,U,V)",
         "classCodes": "W,P,F,U,V",
         "flightCount": "1",
         "totalMiles": "292",
         "cabinType": "Economy"
      },
            {
         "promoPoints": "0",
         "promoMiles": "0",
         "baseMiles": "585",
         "basePoint": "585",
         "definition": "Frankfurt-Istanbul (Economy: G)",
         "classCodes": "G",
         "flightCount": "1",
         "totalMiles": "585",
         "cabinType": "Economy"
      },
            {
         "promoPoints": "0",
         "promoMiles": "0",
         "baseMiles": "877",
         "basePoint": "877",
         "definition": "Frankfurt-Istanbul (Economy: T,L)",
         "classCodes": "T,L",
         "flightCount": "1",
         "totalMiles": "877",
         "cabinType": "Economy"
      },
            {
         "promoPoints": "0",
         "promoMiles": "0",
         "baseMiles": "1461",
         "basePoint": "1461",
         "definition": "Frankfurt-Istanbul (Economy: M,H,S,E,Q,A,O)",
         "classCodes": "M,H,S,E,Q,A,O",
         "flightCount": "1",
         "totalMiles": "1461",
         "cabinType": "Economy"
      },
            {
         "promoPoints": "0",
         "promoMiles": "0",
         "baseMiles": "1754",
         "basePoint": "1754",
         "definition": "Frankfurt-Istanbul (Economy: B)",
         "classCodes": "B",
         "flightCount": "1",
         "totalMiles": "1754",
         "cabinType": "Economy"
      },
            {
         "promoPoints": "0",
         "promoMiles": "0",
         "baseMiles": "1754",
         "basePoint": "1754",
         "definition": "Frankfurt-Istanbul (Economy: Y)",
         "classCodes": "Y",
         "flightCount": "1",
         "totalMiles": "1754",
         "cabinType": "Economy"
      }
   ]}
}
			
		

You can find how to test an API in documentation page.