Calculate Flight Miles

Flight accrual calculator that calculates how many points member will earn with the given input.

 

Input

Request Header

Name Description Type Required

clientCode

ClientCode information of clients calling for service String Mandatory

clientUsername

ClientUserName information of client calling for service String Mandatory

channel

Channel information calling for service String Mandatory

airlineCode

Airline Code String Optional

application

Application information calling for service String Optional

clientTransactionId

Transaction information of the making service call String Mandatory

languageCode

The language in which the query was made. Such as TR, EN String Mandatory

calculateFlightMilesDetail

Name Description Type Required

origin

Origin airport code. String(3) Mandatory

destination

Destination airport code. String(3) Mandatory

class_code

Booking class code. If there is class info, then without looking at cabin code, method calculates how many miles to be earned according to class. If not present then for all booking classes within cabin_code (class). Response can be filtered by giving cabin or class code. If not provided, method calculates the miles that can be earned on that route for all possible booking classes and cabin types. String(10) Optional*

cabin_code

Cabin class code. String(1) Optional*

card_type

Card type. Possible values – tier codes from M&S recognition schema: CC: Classic Card. CP: Classic Plus Card. EC: Elite Card. EP: Elite Plus Card. String(2) Mandatory

flightDate

Flight date (Format: dd.MM.yyyy). Blank: the day of date that query is being done. String(10) Optional

Output

Name Description Type

resultCode

Result code. String(20)

resultDescription

Result description. String(4000)

description

Message description String

definition

Definition of earning miles. Format: source_city_name-destination_city_name (CabinClass : bookingClass1,bookingClass2 … bookingClassN). F.e: “Istanbul-New York (Economy : Y,B,S,G,H,L,M,Q,T,V,W,E,P,F)”. String(556)

flightCount

Flight count. Always 1. String(1)

baseMiles

Status miles which will be earned. String(10)

basePoint

NOT USED. Always 0. Burn points which will be earned. String(1)

promoMiles

Promotion miles. String(10)

promoPoints

NOT USED. Always 0. Promotion bonus miles. String(10)

totalMiles

Total miles which will be earned (totalMiles = baseMiles + promoMiles). String(10)

cabinType

Cabin class name (i.e. Economy). String(50)

classCodes

Class codes, delimited with comma (i.e Y,B,S,G,H,L,M,Q,T,V,W,E,P,F ..). String(100)

ErrorCodes

Error Codes

Code Description Detailed Description

MS00907000

Success Success

MS00907003

Invalid Credentials. Invalid Credentials.

MS00907009

Error in Process. Error in Process.

MS00907011

No flight found. No flight found.

Request

			
{
    "requestHeader": 
        {
          "clientCode": "WEBSDOM",
          "clientUsername": "WEBSDOM",
          "channel": "WEB",
          "airlineCode": "TK",
          "application": "LOYALTY_SERVICE",
          "clientTransactionId": "1608296844337",
          "languageCode": "EN"
        },
        "calculateFlightMilesDetail": {
          "card_type": "CC",
          "class_code": "H",
          "destination": "DSS",
          "flightDate": "19.12.2020",
          "origin": "IST"
        }
}
			
        

Response

			
	"responseHeader": {
          "ns3:statusCode": "SUCCESS",
          "ns3:messages": {
            "-messageType": "info",
            "-messageCode": "MS00907000",
            "ns3:localizedDescription": "Success"
          },
          "ns3:clientTransactionId": "1608296844337",
          "ns3:serverTransactionId": "1608296844337"
        },
        "return": {
          "resultCode": "00",
          "resultDescription": "Success",
          "milesResponseDetail": {
            "baseMiles": "3309",
            "basePoint": "0",
            "cabinType": "Economy",
            "classCodes": "H",
            "definition": "IST-DSS (Economy: H)",
            "flightCount": "1",
            "promoMiles": "0",
            "promoPoints": "0",
            "totalMiles": "3309"
          }
        }
			
		

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