Document

advertisement
Milefy API
v2.1
Table of Contents
1.
2.
Introduction .......................................................................................................................................... 4
1.1.
Authentication............................................................................................................................... 4
1.2.
Environments ................................................................................................................................ 4
Web methods ........................................................................................................................................ 5
2.1.
2.1.1.
Url .......................................................................................................................................... 5
2.1.2.
Method .................................................................................................................................. 5
2.1.3.
Arguments ............................................................................................................................. 5
2.1.4.
Description ............................................................................................................................ 5
2.1.5.
Request structure .................................................................................................................. 5
2.1.6.
Request example ................................................................................................................... 7
2.1.7.
Response structure .............................................................................................................10
2.1.8.
Response example...............................................................................................................12
2.2.
CalculateOne ...............................................................................................................................16
2.2.1.
Url ........................................................................................................................................16
2.2.2.
Method ................................................................................................................................16
2.2.3.
Arguments ...........................................................................................................................16
2.2.4.
Description ..........................................................................................................................16
2.2.5.
Request structure ................................................................................................................16
2.2.6.
Request example .................................................................................................................17
2.2.7.
Response structure .............................................................................................................19
2.3.
3.
Calculate ........................................................................................................................................ 5
Programs .....................................................................................................................................20
2.3.1.
Url ........................................................................................................................................20
2.3.2.
Method ................................................................................................................................20
2.3.3.
Arguments ...........................................................................................................................20
2.3.5.
Description ..........................................................................................................................20
2.3.6.
Request structure ................................................................................................................20
2.3.7.
Response structure .............................................................................................................20
2.3.8.
Response example...............................................................................................................21
Ways of improvements .......................................................................................................................24
Appendix A. Supported programs and codes..............................................................................................25
Appendix B. Tiers.........................................................................................................................................26
Appendix C. Response codes.......................................................................................................................27
Appendix D. Accrual types. .........................................................................................................................28
Appendix E. Alliances. .................................................................................................................................29
Appendix F. Errors codes and descriptions. ................................................................................................30
Change history.............................................................................................................................................31
1. Introduction
The 30K MilesEngine exports a REST based web service over HTTPS, using JSON to
encode service request and response data.
1.1. Authentication
30K uses an SSL secured channel to transmit data from client to the service. The
customer is authenticated using HTTP Basic Authentication (over HTTPS) via a
customer login and password that is provided when the customer registers for
the service. The sample of the C# code responsible for adding essential http
header below:
var bytes = Encoding.UTF8.GetBytes(
string.Format("{0}:{1}",
_configuration.UserName,
_configuration.Password));
var base64AutorizationData = Convert.ToBase64String(bytes);
var webRequest = WebRequest.Create(url);
webRequest.Method = httpVerb;
webRequest.ContentType = "application/json";
webRequest.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip");
webRequest.Headers.Add(HttpRequestHeader.ContentEncoding, "utf-8");
webRequest.Headers.Add(
HttpRequestHeader.Authorization,
string.Format("Basic {0}", base64AutorizationData));
1.2. Environments
There are two environments available for the customer:
a) The TESTING environment is to be used for integration and testing
purposes. It’s usually slower than the LIVE environment (see further
below).
b) The LIVE environment is to be used after successful integration and receipt
of LIVE service credentials (different from the TESTING environment
credentials). The LIVE environment guarantees the most accurate
calculations and up to date loyalty programs and their rules configuration.
NB: above endpoints will be later referred to as “base service URL” and web
methods urls will assume usage of the base service URL at the beginning. This
applies to both TESTING or LIVE environments.
2. Web methods
2.1. Calculate
2.1.1. Url
The URL of the web method is “api/miles/calculate”.
2.1.2. Method
The HTTP verb to be used is POST.
2.1.3. Arguments
Data is to be supplied in the body of the request as JSON encoded value.
2.1.4. Description
The Calculate web method uses provided flight information to calculate
accruals for every given flight taking into consideration each loyalty program
that applies or specified target program from the request (will depend on the
chosen calculation strategy as configured for the service and customer).
2.1.5. Request structure
Level
1. Request
1.1. RequestFlight
Facet
Key
Type
Flights
flts
Array
TargetPrograms
tgp
Array
FlightId
fid
String
Price
pri
Object
Legs
lg
Array
Description
Required
Collection of
RequestFlight objects
accruals need to be
calculated for.
Collection of
TargetProgram objects
used to set specific
loyalty programs and
elite statuses that are
requested for computing
accruals.
YES
UniqueId of the flight.
Used to link entries from
request and response.
PriceInfo object.
Generally is required only
for the revenue based
programs.
Collection of the
FlightLeg objects
reflecting the legs of a
flight. A leg is a one-way
direction from point A to
point Z via any number of
intermediate points or
YES
NO
NO
YES
direct route. Round trip
flights have 2 legs, oneway flights have one,
multi-city flights have 3
or more.
1.1.1. PriceInfo
CurrencyCode
cc
String
The ISO 4217 alphabetic
code of the currency
The total fare price
The base fare price
The taxes amount
The carrier surcharges
amount
YES
TotalPrice
BaseFare
Taxes
CarrierSurcharges
tp
bf
tx
cx
Decimal
Decimal
Decimal
Decimal
1.1.2. FlightLeg
Segments
sg
Array
Collection of the
FlightSegment objects
that describe the
sequence of sector flights
within a leg. It
basically represents one
takeoff-landing pair.
YES
1.1.2.1. FlightSegment
MarketingAirlineCode
mac
String
YES
OperatingAirlineCode
oac
String
DepartureAirportCode
dac
String
DestinationAirportCode
aac
String
DepartureDate
dd
DateTime
FareCode
fc
String
FlightNumber
fn
Integer
IATA code of the
marketing (selling)
airline. 2 letters code: LH,
UA etc.
IATA code of the
operating (owner of the
plane) airline. 2 letters
code: LH, UA etc.
IATA code of the
departure airport. 3
letters code: LHR, JFK etc.
IATA code of the
destination (arrival)
airport. 3 letters code:
LHR, JFK etc.
Date in the
“mm/dd/yyyy” or ISO8601 compliant format.
E.g. “02/29/2014” or
“2014-02-29” or “201402-29T09:35:00”. NB:
Time is optional.
One-letter code
describing fare code or
RBD (reservation booking
designator) of the fare.
M, S, N etc..
Flight number without
the marketing airline
code. If the flight number
is LH345 the value to be
sent is simply 345.
Similarly, 1, 12, 443, 7683
are correct formats of
flight numbers.
YES
NO
NO
NO
YES
YES
YES
YES
YES
YES
1.2. TargetProgram
Distance
dn
Integer
Flown distance in miles.
Rounded. If not specified
could cause flight to be
skipped or miles
calculated wrong by
internal mechanism and
thus wrong accruals
computed. For utmost
accuracy, this should be
included in the request.
NO
ProgramCode
pc
String
YES
UserTier
ut
Integer
Program Code as known
by MilesAPI. See
Appendix A for the entire
list of available values.
Code of the tier with
given program. See
Appendix B for the entire
list of available values.
If not set the basic tier of
the program will be used.
2.1.6. Request example
{
"flts": [{
"fid":"SK1674-SK0503|SK0502-SK0679",
"pri":{
"cc":"USD",
“tp”:150.0,
"bf":128.5
},
"lg":[{
"sg":[{
"mac":"SK",
"oac":"SK",
"dac":"TXL",
"aac":"CPH",
"dd":"2013-07-02T09:35:00",
"fc":"A",
"fn":1674,
"dn":213
NO
},{
"mac":"SK",
"oac":"SK",
"dac":"CPH",
"aac":"LHR",
"dd":"2013-07-02T12:05:00",
"fc":"A",
"fn":503,
"dn":610}]
},{
"sg":[{
"mac":"SK",
"oac":"SK",
"dac":"LHR",
"aac":"CPH",
"dd":"2013-07-16T09:50:00",
"fc":"A",
"fn":502,
"dn":610
},{
"mac":"SK",
"oac":"SK",
"dac":"CPH",
"aac":"TXL",
"dd":"2013-07-16T15:05:00",
"fc":"A",
"fn":679,
"dn":213}]
}]},{
"fid":"SK1674-SK0505|SK0502-SK0679",
"pri":{
"cc":"USD",
“tp”:750.0,
"bf":677.3
},
"lg":[{
"sg":[{
"mac":"SK",
"oac":"SK",
"dac":"TXL",
"aac":"CPH",
"dd":"2013-07-02T09:35:00",
"fc":"A",
"fn":1674,
"dn":213
},{
"mac":"SK",
"oac":"SK",
"dac":"CPH",
"aac":"LHR",
"dd":"2013-07-02T14:50:00",
"fc":"A",
"fn":505,
"dn":610}]
},{
"sg":[{
"mac":"SK",
"oac":"SK",
"dac":"LHR",
"aac":"CPH",
"dd":"2013-07-16T09:50:00",
"fc":"A",
"fn":502,
"dn":610
},{
"mac":"SK",
"oac":"SK",
"dac":"CPH",
"aac":"TXL",
"dd":"2013-07-16T15:05:00",
"fc":"A",
"fn":679,
"dn":213}]
}]
}],
"tgp":[{
"tc":"MAM",
"ut":8
},{
"tc":"QFF",
"ut":8
}
]
}
2.1.7. Response structure
Level
1. Response
1.1. Status
1.2. MilesResponse
Success
Facet
Key
Success
Type
Boolean
Status
Status
Object
Value
Value
Object
Code
Code
Integer
Message
Message
String
UniqueId
uid
String
Description
Indicates if request executed
successfully. Either true or false.
Status object contains code and
message describing performed
operation.
MilesResponse object containing
information about accruals for
each flight in the request as well as
detailed information about each
program that produced accruals for
any flight from the request. It
won’t be populated in case of
error.
Required
YES
Status code of the response
assigned by the system. See
Appendix C for all values available.
User friendly message which
explains response’s status.
YES
Unique id of the request as
assigned by the Milefy API. Keep it
YES
YES
NO
YES
1.2.1. ResponseFlight
1.2.1.1.ProgramMilesInfo
1.2.1.1.1. MilesInfo
1.2.2. ProgramInfo
Flights
flts
Array
Programs
prg
Array
Errors
err
Array
FlightId
fid
String
Programs
aprg
Array
ProgramCode
pc
String
UserTier
ut
Integer
Miles
mi
Array
AccrualType
at
Integer
val
Double
ProgramCode
pc
String
ProgramName
HelpUrl
pn
hu
String
String
WebSiteUrl
wu
String
SignupUrl
su
String
Alliance
al
Integer
MilesTypeCon
figuration
mtc
Array
for further reference in regards to
the performed request and
received responses
Collection of ResponseFlight
objects containing information
about calculated accruals
Collection of ProgramInfo objects
containing summary for every
program applied to the request
flights. Empty if none of the
programs apply.
Collection of Error objects used to
indicate errors, if any
YES
NO
Unique identifier of the flight as it’s
been received within request. Used
to link entries from request and
response.
Collection of ProgramMilesInfo
objects containing information
about accruals from each
applicable loyalty program. Can be
empty if none of the programs
apply to the given flight.
YES
Code of the program the Miles
calculated for. See Appendix A for
the entire list of available values.
Code of the status tier following
Miles calculated for. See Appendix
B for the entire list of available
values.
Collection of MilesInfo objects that
contain detailed accrual
information.
YES
Code of the accrual type metric.
See Appendix D for more details.
Value of specific accrual type that
the user earns with given program.
YES
Program Code as known by
MilesAPI. See Appendix A for the
entire list of available values.
The name of the loyalty program
URL to the program’s help page (a
password recovery page usually) if
any specified.
URL to the program’s official page
if any set
URL to the program’s signup page if
any specified.
Code of the alliance as known by
MIlesAPI. See Appendix E for more
details.
Collection of AccrualTypeInfo
objects containing information
about all accrual types configured
YES
NO
YES
YES
YES
YES
NO
NO
NO
YES
YES
1.2.2.1. AccrualTypeInfo
1.2.2.2. TierConfiguration
1.2.3. Error
TiersConfigura
tion
tc
Array
Airlines
arl
Array
AccrualType
at
Integer
Name
atn
String
Tier
ta
Integer
Name
tn
String
Code
ec
String
Message
em
String
2.1.8. Response example
{
"Success": true,
"Status":{
"Code": 0,
"Message": "OK"
},
"Value": {
"uid": "78e9dc6f-510c-4d11-9c3f-8cae6fb62a69",
"flts":[{
"fid": "SK1674-SK0503|SK0502-SK0679",
"aprg":[{
"pc": "ALM",
“ut”: 1,
"mi":[{
(available) for the given program.
Collection of TierConfiguration
objects describing all status tiers
configured (available) with the
given program.
Collection of owning and affiliated
airlines IATA codes for the given
program.
Code of the accrual type metric.
See Appendix D for more details.
User friendly name of the accrual
type metric as configured in the
system.
YES
YES
YES
YES
Code of the status tier of given
program as set in request. See
Appendix B for the entire list of
available values.
If not set, the basic tier of the
program will be used.
User friendly name of the tier as
configured in the system.
YES
Error code which references
specific problem handled whilst
processing request. See Appendix F
for full list of codes.
Default user friendly message
explaining error.
YES
YES
YES
"at": "1",
"val": 8228
},{
"at": "2",
"val": 8228
},{
"at": "3",
"val": 24
},{
"at": "4",
"val": 0
}]
},{
"pc": "ALM",
“ut”: 8,
"mi":[{
"at": "1",
"val": 8228
},{
"at": "2",
"val": 8228
},{
"at": "3",
"val": 24
},{
"at": "4",
"val": 0
}]}]
},{
"fid": "SK1674-SK0505|SK0502-SK0679",
"aprg":[{
"pc": "ALM",
“ut”: 1,
"mi":[{
"at": "1",
"val": 8228
},{
"at": "2",
"val": 8228
},{
"at": "3",
"val": 24
},{
"at": "4",
"val": 0
}]
},{
"pc": "ALM",
“ut”: 8,
"mi":[{
"at": "1",
"val": 8228
},{
"at": "2",
"val": 8228
},{
"at": "3",
"val": 24
},{
"at": "4",
"val": 0
}]
}]
}
],
"prg": [{
"pc": "ALM",
"pn": "Avianca LifeMiles",
"hu": "https://www.lifemiles.com/eng/cus/cnt/cntgetpas.aspx",
"su": "https://www.lifemiles.com/eng/mya/myp/mypfasenr.aspx",
"al": "4",
"mtc":[{
"at": "1",
"atn": "Award Miles"
},{
"at": "2",
"atn": "Qualifying Miles"
},{
"at": "3",
"atn": "Qualifying Flights"
},{
"at": "4",
"atn": ""
}],
"tc":[{
"ta": "1",
"tn": "Basic"
},{
"ta": "8",
"tn": "Silver"
},{
"ta": "16",
"tn": "Gold"
},{
"ta": "32",
"tn": "Diamond"
}],
“arl”:[“AV”,”TK”,”2K”]
}] }}
2.2. CalculateOne
2.2.1. Url
The URL of the web method is “api/miles/calculateone”.
2.2.2. Method
The HTTP verb to be used is POST.
2.2.3. Arguments
Data is to be supplied in the body of the request as JSON encoded value.
2.2.4. Description
The CalculateOne web method uses provided flight information to calculate
accruals for all supported frequent flyer programs and their tiers that apply.
2.2.5. Request structure
Level
1. Request
1.1. PriceInfo
1.2. FlightLeg
Facet
Key
Type
FlightId
fid
String
Price
pri
Object
Legs
lg
Array
CurrencyCode
cc
String
TotalPrice
BaseFare
Taxes
CarrierSurcharges
tp
bf
tx
cx
Decimal
Decimal
Decimal
Decimal
Segments
sg
Array
Description
Required
UniqueId of the flight.
Used to link entries from
request and response.
PriceInfo object.
Generally is required only
for the revenue based
programs.
Collection of the
FlightLeg objects
reflecting the legs of a
flight. A leg is a one-way
direction from point A to
point Z via any number of
intermediate points or
direct route. Round trip
flights have 2 legs, oneway flights have one,
multi-city flights have 3
or more.
YES
The ISO 4217 alphabetic
code of the currency
The total fare price
The base fare price
The taxes amount
The carrier surcharges
amount
YES
Collection of the
FlightSegment objects
that describe the
sequence of sector flights
within a leg. It
basically represents one
YES
NO
YES
YES
NO
NO
NO
takeoff-landing pair.
1.2.1. FlightSegment
MarketingAirlineCode
mac
String
OperatingAirlineCode
oac
String
DepartureAirportCode
dac
String
DestinationAirportCode
aac
String
DepartureDate
dd
DateTime
FareCode
fc
String
FlightNumber
fn
Integer
Distance
dn
Integer
2.2.6. Request example
{
"fid":"SK1674-SK0503|SK0502-SK0679",
"pri":{
"cc":"USD",
IATA code of the
marketing (selling)
airline. 2 letters code: LH,
UA etc.
IATA code of the
operating (owner of the
plane) airline. 2 letters
code: LH, UA etc.
IATA code of the
departure airport. 3
letters code: LHR, JFK etc.
IATA code of the
destination (arrival)
airport. 3 letters code:
LHR, JFK etc.
Date in the
“mm/dd/yyyy” or ISO8601 compliant format.
E.g. “02/29/2014” or
“2014-02-29” or “201402-29T09:35:00”. NB:
Time is optional.
One-letter code
describing fare code or
RBD (reservation booking
designator) of the fare.
M, S, N etc..
Flight number without
the marketing airline
code. If the flight number
is LH345 the value to be
sent is simply 345.
Similarly, 1, 12, 443, 7683
are correct formats of
flight numbers.
Flown distance in miles.
Rounded. If not specified
could cause flight to be
skipped or miles
calculated wrong by
internal mechanism and
thus wrong accruals
computed. For utmost
accuracy, this should be
included in the request.
YES
YES
YES
YES
YES
YES
YES
NO
“tp”:150.0,
"bf":128.5
},
"lg":[{
"sg":[{
"mac":"SK",
"oac":"SK",
"dac":"TXL",
"aac":"CPH",
"dd":"2013-07-02T09:35:00",
"fc":"A",
"fn":1674,
"dn":213
},{
"mac":"SK",
"oac":"SK",
"dac":"CPH",
"aac":"LHR",
"dd":"2013-07-02T12:05:00",
"fc":"A",
"fn":503,
"dn":610}]
},{
"sg":[{
"mac":"SK",
"oac":"SK",
"dac":"LHR",
"aac":"CPH",
"dd":"2013-07-16T09:50:00",
"fc":"A",
"fn":502,
"dn":610
},{
"mac":"SK",
"oac":"SK",
"dac":"CPH",
"aac":"TXL",
"dd":"2013-07-16T15:05:00",
"fc":"A",
"fn":679,
"dn":213}]
}]
}
2.2.7. Response structure
The structure of the response is exactly the same as described within 2.1.7.
2.3. Programs
2.3.1. Url
The URL of the web method is “api/miles/programs”
2.3.2. Method
The HTTP verb to be used is GET.
2.3.3. Arguments
2.3.4. No data needs to be passed to the method.
2.3.5. Description
The Programs web method should be used to retrieve detailed information
about all supported frequent flyer programs. This data could be later on linked
to the accruals calculated using Calculate web method and program code as a
cross reference.
2.3.6. Request structure
Request is just a plain GET request without any parameters involved.
2.3.7. Response structure
Level
1. Response
1.1. Status
1.1.1. ProgramInfo
Success
Facet
Key
Success
Type
Boolean
Status
Status
Object
Value
Value
Object
Code
Code
Integer
Message
Message
String
ProgramCode
pc
String
ProgramName
HelpUrl
pn
hu
String
String
WebSiteUrl
wu
String
SignupUrl
Su
String
Alliance
al
Integer
Description
Indicates if request executed
successfully. Either true or false.
Status object contains code and
message describing performed
operation.
Collection of ProgramInfo objects
containing detailed information for
every frequent flyer program the
Milefy API supports. Won’t be
populated in case of any server
error.
Required
YES
Status code of the response
assigned by the system. See
Appendix C for all values available.
User friendly message which
explains response’s status.
YES
Program Code as known by
MilesAPI. See Appendix A for the
entire list of available values.
The name of the loyalty program
URL to the program’s help page (a
password recovery page usually) if
any specified.
URL to the program’s official page
if any set
URL to the program’s signup page if
any specified.
Code of the alliance as known by
YES
YES
NO
YES
YES
NO
NO
NO
NO
1.1.1.1. AccrualTypeInfo
1.1.1.2. TierConfiguration
MilesTypeCon
figuration
mtc
Array
TiersConfigura
tion
tc
Array
Airlines
arl
Array
AccrualType
at
Integer
Name
atn
String
Tier
ta
Integer
Name
tn
String
MIlesAPI. See Appendix E for more
details.
Collection of AccrualTypeInfo
objects containing information
about all accrual types configured
(available) for the given program.
Collection of TierConfiguration
objects describing all status tiers
configured (available) with the
given program.
Collection of owning and affiliated
airlines IATA codes for the given
program.
YES
YES
YES
Code of the accrual type metric.
See Appendix D for more details.
User friendly name of the accrual
type metric as configured in the
system.
YES
Code of the status tier of given
program as set in request. See
Appendix B for the entire list of
available values.
If not set, the basic tier of the
program will be used.
User friendly name of the tier as
configured in the system.
YES
YES
YES
2.3.8. Response example
{
"Success": true,
"Status":{
"Code": 0,
"Message": "OK"
},
"Value":[{
"pc": "UMP",
"pn": "United MileagePlus",
"hu": "https://www.united.com/web/en-US/apps/account/settings/pin/pinResolution2.aspx",
"su": "https://www.united.com/web/en-US/apps/account/enroll.aspx?sdl=sds&sdl=sd",
"al": "StarAlliance",
"mtc":[{
"at": "1",
"atn": "Redeemable miles"
},{
"at": "2",
"atn": "Status Miles"
}],
"tc":[{
"ta": "1",
"tn": "Member"
},{
"ta": "8",
"tn": "Premier Silver"
},{
"ta": "16",
"tn": "Premier Gold"
},{
"ta": "24",
"tn": "Premier Platinum"
},{
"ta": "32",
"tn": "Premier 1K"
}],
“arl”:[“UA”]
},{
"pc": "MAS",
"pn": "Miles and Smiles",
"hu": "https://www4.thy.com/tkmiles/pinproblems.tk?lang=en",
"su": "https://www4.thy.com/tkmiles/membersignin.tk?lang=en",
"al": "StarAlliance",
"mtc":[{
"at": "1",
"atn": "Redeemable Miles"
},{
"at": "2",
"atn": "Status miles"
}],
"tc":[{
"ta": "1",
"tn": "Classic"
},{
"ta": "8",
"tn": "Classic Plus"
},{
"ta": "16",
"tn": "Elite"
},{
"ta": "24",
"tn": "Elite Plus"
} ],
“arl”:[“TK”]
}]
}
3.
Ways of improvements
1. Currently applied programs summary is being sent as a part of the response
to the Calculate method. However, there is a Programs method (detailed in
section 2.2) which allows all program details to be downloaded once,
cached locally and then being used to reference programs data from the
Calculate method.
2. It’s been confirmed that it’s more efficient to split big results sets to the
smaller chunks to achieve best performance. In other words rather than
send one request of 1000 flights it’s quicker to split that into 5 requests of
200 flights, send them simultaneously, combine responses back to one
single response once all sub requests completed. We recommend this
approach.
3. To decrease the size of responses and thus reduce response time we’d
strictly recommend adding “Accept-Encoding: gzip, deflate” header to the
request to force response being compressed.
Appendix A. Supported programs and codes.
Code (three letter codes)
ARP
AMB
LGC
AFL
MCP
TPB
ACA
ACP
AKF
IFR
NZA
AMP
AMM
AAA
AMC
ASC
ALM
BAC
CXA
CDF
CEM
SPC
CCM
OKP
DSM
EAM
EKS
EYG
IML
FPL
GFF
GOS
FWC
IBP
JMB
JJP
JTB
KSP
Name
Aerolineas Plus
Aegean Airlines Miles&Bonus
Aer Lingus Gold Circle
Aeroflot Bonus
Aeromexico Club Premier
Air Berlin topbonus
Air Canada Altitude/Aeroplan
Air China Phoenix Miles
Air France/KLM Flying Blue
Air India Flying Returns
Air New Zealand AirPoints
Alaska Airlines Mileage Plan
Alitalia MilleMiglia
American Airlines AAdvantage
ANA Mileage Club
Asiana Club
Avianca LifeMiles
British Airways Executive Club
Cathay Pacific AsiaMiles
China Airlines Dynasty Flyer
China Eastern Eastern Miles
China Southern Sky Pearl Club
Copa Airlines ConnectMiles
Czech Airlines OK Plus
Delta SkyMiles
El Al Matmid
Emirates Skywards
Etihad Airways Guest
EVA Air Inifinity MileageLands
Finnair Plus
Garuda Frequent Flyer
GOL Smiles
Hainan Airlines Fortune Wings Club
Iberia Plus
JAL Mileage Bank
Jet Airways JetPrivilege
JetBlue TrueBlue
Korean Air Skypass
KOC
LAP
LMM
MHE
MEA
PMM
QFF
QAP
SPR
SEB
SVA
SKF
SAV
TMF
TPV
ROP
MAS
UMP
GLP
VAE
VFC
VAV
Kuwait Airways Oasis Club
LAN LANPass
Lufthansa Miles & More
Malaysia Airlines Enrich
Middle East Airlines Cedar Miles
Philippine Airlines Mabuhay Miles
Qantas Frequent Flyer
Qatar Airways Privilege Club
S7 Priority Club
SAS EuroBonus
Saudi Arabian Airlines Alfursan
Singapore Airlines KrisFlyer
South African Airways Voyager
TAM Fidelidade
TAP Victoria
Thai Airways Royal Orchid Plus
Turkish Airlines Miles&Smiles
United Airlines MileagePlus
Vietnam Airlines Golden Lotus Plus
Virgin America Elevate
Virgin Atlantic Flying Club
Virgin Australia Velocity Frequent Flyer
Appendix B. Tiers.
Code
Name
0
Unknown
1
Basic
8
Tier1 (for instance, “Silver”)
16
Tier2 (for instance, “Gold”)
24
Tier3 (for instance, “Platinum”)
32
Tier4 (for instance, “Diamond”)
33
Tier5
34
Tier6
35
Tier7
NB: Naming conventions and applications vary across programs.
Appendix C. Response codes.
Code
0
-1
Description
Indicates successful operation.
General error code. Indicates that error
occurred whilst processing request.
Appendix D. Accrual types.
Code
1
2
3
4
5
Name
RDM. Redeemable miles usually by
default.
EQM. Elite qualifying miles by default.
EQS. Elite qualifying segments by
default.
EQP. Elite qualifying points by default.
EQD. Elite qualifying dollars by default.
Appendix E. Alliances.
Code
0
1
2
3
4
Name
Unknown
Independent
OneWorld
SkyTeam
StarAlliance
Appendix F. Errors codes and descriptions.
Code
FLEMP
FLIDE
FLTPE
FLLGE
FLSGE
FLSGDAE
FLSGAAE
FLSGMKE
FLSGOPE
FLSGFCE
FLSGDDE
FLSGFNE
PCUKNW
PTUKNW
Description
Flights collection is empty.
The FlightId field is not set for some flight(s).
Flight doesn’t have total price specified in the price block.
Legs are not set for some flight(s).
Segment are not set for some flight(s).
Departure airport code is either not set or has been provided
in non-IATA format.
Arrival airport code is either not set or has been provided in
non-IATA format.
Marketing airline code is either not set or has been provided
in non-IATA format.
Operating airline code is either not set or has been provided
in non-IATA format.
The fare code is not set for some flight(s).
Departure date is either not populated or set in the wrong
format which was not parsed.
The flight number is not set for some flight(s).
Unknown program code detected.
Unknown program tier code detected for the certain
program.
Change history
Change Date
03/13/2014
06/23/2014
Author(s)
Alex Jawad,
Vitali Pukhalski
Vitali Pukhalski
Description
V1 document created
a) The “UserTier” field added to the ProgramMilesInfo
section.
07/10/2014
Vitali Pukhalski
07/11/2014
Vitali Pukhalski
07/25/2014
Vitali Pukhalski
10/23/2014
10/21/2015
Vitali Pukhalski
Vitali Pukhalski
b) The “CalculateOne” method description added.
v2.0 document created to reflect revenue based programs related
changes in API.
a) The “PriceInfo” property description added to the Calculate
and CalculateOne requests and requests samples.
b) The “EarningBase” property added
a) The “DepartureDate” field added support for the ISO-8601 date
formats (YYYY-MM-DD generally).
b) Appendix F updated with new error codes.
The Airlines field added to the ProgramInfo structure.
The “PriceInfo” added “TotalPrice” property.
Appendix A - “Programs codes and names” updated.
Appendix D - “AccrualTypes” updated with EQD metric.
Appendix F - added FLTPE error code to indicate empty TotalPrice
Download