Flight Application (Category 04) Rules Web Service
Flight Application (Category 04) Rules API is used to further restrict a fare beyond a specified routing and/or transfer capabilities. The API is designed by ATPCO to meet your needs for automated table creation so you can reduce manual input and get your fares to market faster.
Request
Your request to the Flight Application (Category 04) Rules Web Service must provide a valid OAuth Access Token. For instructions on how to obtain and use an OAuth Access Token programmatically, see OAuth Access Tokens and Authentication. You must also specify parameters in the request body.
Request Header Parameters
See OAuth Access Tokens and Authentication for instructions on header parameters needed for authentication.
Request Body
The request body should be formatted as a JSON object (examples below).
Request Object Parameters
All data requests must be received in the JSON format specified by ATPCO, with field names and sub values found in Data Application unless otherwise specified (fields and sub values (i.e., parameters) detailed below). Field names and provided values must be enclosed in quotation marks (e.g., "tvlDtExp"
).
-
""
or" "
as a field name or field value: an empty or non-empty blank string within quotation marks in the request is ignored and will not appear in the JSON response - Invalid field names in a request are ignored
- Invalid field values in a request generate an error
If your request contains field names that are invalid in a request yet valid in a response (e.g., msgs
or msg
), those fields will be eliminated during processing and overlaid when necessary in the response.
All String fields (enclosed in double quotes) will have leading and trailing spaces removed unless removing all blanks would violate a possible value for a field where blank(s) is valid on a JSON request. Some fields may have special leading/trailing blanks removal rules such as NoteText996
, where only trailing blanks are removed to preserve any intentional text indentations.
Field name | Value | Issue | System Handling |
---|---|---|---|
" tvlDtExp" |
Extra leading space | ignored | |
"tvlDtExp " |
Extra trailing space | ignored | |
"tvlDExp" |
Field name incorrect. Missing 't' | ignored | |
" WAS" |
Extra leading space | Error invalid city format |
Examples of Invalid Field names and values
The request object can include any of the following parameters:
Category 4 Parameters
Field name | Description | Type | Format | Example |
---|---|---|---|---|
flightApplication04 |
Wrapper for Category 4 domain | Collection of key-value pairs | { } |
|
fltApplCd |
Indicates the application of the flight number | Number | "1" = Valid on; "0"= Not valid on | "1"` |
|
flight1 |
The first flight number | String (max 4-character) | "0000-9999" 4 digit number; "Any" = Any flight |
"1234" |
carrier1 |
The standard IATA code of the airline for which the data applies | String (max 2-character) | 2 byte alpha or alphanumeric | "XX" |
firstCxrFlt986 |
An existing table number referring to a table containing the carriers on which the transportation specified must occur. | Number (max 8-character) | Up to 8 bytes. To create a new Carrier flight 986 table please refer to 986 Flight Table section | "12345678" |
flt1ToFlt2RI |
A code specifying the relationship between flight 1 or first carrier table to the second flight number or table | Number (max 1-character) | "0" = Or; "1" = To; "2" = From/To; "3" = Through |
"2" |
flight2 |
The second flight number | String (max 4-character) | "0000-9999" 4 digit number; "Any" = any flight |
"5678" |
carrier2 |
The standard IATA code of the airline for which the data applies | String (max 2-character) | 2 byte alpha or alphanumeric | "XX" |
secondCxrFlt986 |
An existing table number referring to a table containing the carriers on which the transportation specified must occur. | Number (max 8-character) | Up to 8 bytes. To create a new Carrier flight 986 table please refer to 986 Flight Table section | "81234567" |
flt2ToFlt3RI |
A field specifying the relationship between Flight 2 and Flight 3 | Number (max 1-character) | "0" = Or; "1" = To; "2" = From/To |
|
flight3 |
The third flight number | String (max 4-character) | "0000-9999" 4 byte number; "Any" = any flight |
"7910" |
carrier3 |
The standard IATA code of the airline for which the data applies | String (max 2-character) | 2 byte alpha or alphanumeric | "XX" |
dayOfWeekItems |
The day of week travel is permitted | String | "1" = Monday; "2" = Tuesday; "3" = Wednesday; "4" = Thursday; "5" = Friday; "6" = Saturday; "7" = Sunday |
"["01" ]"= Single Day; "["1","3"]" = Multiple Days |
inbndOutbnd |
A code indicating directional application of provision | Number (max 1-character) | "1" = Outbound only; "2" = Inbound only; "3" = Either not both; "4" = Either or both; "5" = Both |
"1" |
trvlLocAppl |
A code specifying positive, negative, or conditional application of the two following geographic locations | Number | "0" = Must not be; "1" = Must be; "2" = If travel is |
"2" |
trvlLocVia |
A code specifying whether the two following locations should be applied as between/and, via, or from/to/via points | String | "X" = From/To Via; "B" = Between And; "V" = Via |
"V" |
loc1GeoSpec995 |
A existing table number referring to a table containing information indicating the portion of travel to which data applies | Number (max 8-character) | Up to 8 bytes. To create a new Location 1 995 table please refer to 995 Geographic Table section | "12345678" |
loc2GeoSpec995 |
A existing table number referring to a table containing information indicating the portion of travel to which data applies | Number (max 8-character) | Up to 8 bytes. To create a new Location 2 995 table please refer to 995 Geographic Table section | "12345678" |
viaAppl |
A code specifying positive, negative, or conditional application of the two following geographic locations | Number | "0" = Must not be; "1" = Must be; "2" = If travel is |
"2" |
viaGeoSpec995 |
A existing table number referring to a table containing information indicating the portion of travel to which data applies | Number (max 8-character) | Up to 8 bytes. To create a new Via Geo 995 table please refer to 995 Geographic Table section | "12345678" |
hiddnTktd |
An indicator used to specify the geo points in the GEO SPEC tables as being ticketed, hidden, or both. When value is not provided applies to both | String | "Y" = Hidden; "N" = Ticketed |
"N" |
nonStop |
An indicator to specify that the flight is a non-stop flight on which a fare is or is not valid | String (max 1-character) | "Y" = Yes; "N" = No |
"N" |
direct |
An indicator to specify that the flight is a direct flight on which a fare is or is not valid | String(max 1-character) | "Y" = Yes; "N" = No |
"N" |
oneStop |
An indicator to specify that the flight is a one-stop flight on which a fare is or isn't valid | String (max 1-character) | "Y" = Yes; "N" = No |
"N" |
multiStop |
An indicator to specify that the flight is a multi-stop flight on which a fare is or is not valid | String(max 1-character) | "Y" = Yes; "N" = No |
"N" |
sameFlt |
An indicator to specify that the flight is a same flight on which a fare is or is not valid | String (max 1-character) | "Y" = Yes; "N" = No |
"N" |
online |
An indicator to specify that the flight is an online flight on which a fare is or is not valid | String (max 1-character) | "Y" = Yes; "N" = No |
"N" |
interline |
An indicator to specify that the flight is an interline flight on which a fare is or is not valid | String (max 1-character) | "Y" = Yes; "N" = No |
"N" |
equipmentReqd |
An indicator specifying if the following equipment is valid for the flights | String (max 1-character) | "Y" = Yes; "N" = No |
"N" |
equipmentTyp |
A valid three position code indicating the type of equipment | String (max 3-character) | 3 byte alpha or alphanumeric | "32A" |
994 Override Date Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
ovrrdDt994 |
Wrapper for 994 Subdomain | Collection of key-value pairs | { } |
|
tvlEff |
The first date travel is valid for the Category Record 3 provisions | String | YYYYMMDD | "20180930" |
tvlDisc |
The last date travel is valid for the Category Record 3 provisions | String | YYYYMMDD | "20180930" |
tktEff |
The first date ticketing is valid for the Category Record 3 provisions | String | YYYYMMDD | "20180930" |
tktDisc |
The last date ticketing is valid for the Category Record 3 provisions | String | YYYYMMDD | "20180930" |
rsvEff |
The first date reservations can be made for the Category Record 3 provisions | String | YYYYMMDD | "20180930" |
rsvDisc |
The last date reservations can be made for the Category Record 3 provisions | String | YYYYMMDD | "20180930" |
986 First Carrier Flight Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
firstCxrFlt986Items |
Wrapper for 986 table creation | Collection of key-value pairs | { } |
|
marketingCarrier |
The carrier that markets (sells) the flight | String (max 2-character) | valid Iata code or alliance code | "XX" |
operatingCarrier |
The carrier that operatingthe flight | String (max 2-character) | valid Iata code or alliance code | "ZZ" |
flight1 |
The first flight number | String (max 4-character) | "0000-9999" 4 byte number |
"1234" |
flight2 |
The second flight number | String (max 4-character) | "0000-9999" 4 byte number |
"1234" |
986 Second Carrier Flight Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
secondCxrFlt986Items |
Wrapper for 986 table creation | Collection of key-value pairs | { } |
|
marketingCarrier |
The carrier that markets (sells) the flight | String (max 2-character) | valid Iata code or alliance code | "XX" |
operatingCarrier |
The carrier that operating the flight | String (max 2-character) | valid Iata code or alliance code | "ZZ" |
flight1 |
The first flight number | String (max 4-character) | "0000-9999" 4 byte number |
"1234" |
flight2 |
The second flight number | String (max 4-character) | "0000-9999" 4 byte number |
"5678" |
Loc 1 995 Geographic Specification Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
loc1GeoSpec995 |
Wrapper for 995 Subdomain | Collection of key-value pairs | { } |
|
type |
Indicates the type of geographic specified for the location or TSI for the Category Record 3 provisions | String (max 1-character) | "A" = Area; "Z" = Iata Zone ; "S" = State ;"C" = City ;"P" = Airport ;"N" = Nation |
|
loc1 |
The first specified location valid for the Category Record 3 provisions | String max 5-(character) | "1" = one digit numeric Area designator; "210" = 3 digit numeric assigned Iata Zone ; "FL US" = 5 digit including a space ;"NYC" = 3 digit alpha City code ;"EWR" = 3 digit alpha Airport code ;"US" = 2 digit alpha Iata Nation/Country code |
|
loc2 |
The last specified location valid for the Category Record 3 provisions | String max 5-character) | "1" = one digit numeric Area designator; "210" = 3 digit numeric assigned Iata Zone ; "FL US" = 5 digit including a space ;"NYC" = 3 digit alpha City code ;"EWR" = 3 digit alpha Airport code ;"US" = 2 digit alpha Iata Nation/Country code |
|
tsi |
Travel Segment Indicator valid for the Record 3 provisions | String max 2 -(character) | "03" = 2 digit numeric TSI as defined |
Loc 2 995 Geographic Specification Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
loc2GeoSpec995 |
Wrapper for 995 Subdomain | Collection of key-value pairs | { } |
|
type |
Indicates the type of geographic specified for the location or TSI for the Category Record 3 provisions | String (max 1-character) | "A" = Area; "Z" = Iata Zone ; "S" = State ;"C" = City ;"P" = Airport ;"N" = Nation |
|
loc1 |
The first specified location valid for the Category Record 3 provisions | String max 5-(character) | "1" = one digit numeric Area designator; "210" = 3 digit numeric assigned Iata Zone ; "FL US" = 5 digit including a space ;"NYC" = 3 digit alpha City code ;"EWR" = 3 digit alpha Airport code ;"US" = 2 digit alpha Iata Nation/Country code |
|
loc2 |
The last specified location valid for the Category Record 3 provisions | String max 5-character) | "1" = one digit numeric Area designator; "210" = 3 digit numeric assigned Iata Zone ; "FL US" = 5 digit including a space ;"NYC" = 3 digit alpha City code ;"EWR" = 3 digit alpha Airport code ;"US" = 2 digit alpha Iata Nation/Country code |
|
tsi |
Travel Segment Indicator valid for the Record 3 provisions | String max 2 -(character) | "03" = 2 digit numeric TSI as defined |
Via 995 Geographic Specification Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
viaGeoSpec995 |
Wrapper for 995 Subdomain | Collection of key-value pairs | { } |
|
type |
Indicates the type of geographic specified for the location or TSI for the Category Record 3 provisions | String (max 1-character) | "A" = Area; "Z" = Iata Zone ; "S" = State ;"C" = City ;"P" = Airport ;"N" = Nation |
|
loc1 |
The first specified location valid for the Category Record 3 provisions | String max 5-(character) | "1" = one digit numeric Area designator; "210" = 3 digit numeric assigned Iata Zone ; "FL US" = 5 digit including a space ;"NYC" = 3 digit alpha City code ;"EWR" = 3 digit alpha Airport code ;"US" = 2 digit alpha Iata Nation/Country code |
|
loc2 |
The last specified location valid for the Category Record 3 provisions | String max 5-character) | "1" = one digit numeric Area designator; "210" = 3 digit numeric assigned Iata Zone ; "FL US" = 5 digit including a space ;"NYC" = 3 digit alpha City code ;"EWR" = 3 digit alpha Airport code ;"US" = 2 digit alpha Iata Nation/Country code |
|
tsi |
Travel Segment Indicator valid for the Record 3 provisions | String max 2 -(character) | "03" = 2 digit numeric TSI as defined |
996 Note Text
Field name | Description | Type | Format | Example |
---|---|---|---|---|
noteTxt996 |
Wrapper for 996 Table | Collection of key-value pairs | { } |
|
txtLns |
Collection of lines of free-form text specified in the request | Array of collections of key-value pairs | [ { "lnNum": "1", "txt": "THIS IS SAMPLE NOTE TEXT" }, ... ] |
|
lnNum |
Line number indicating the placement of the associated txt field |
String | # | "1" |
txt |
The text to be printed at the corresponding lnNum (line number) |
String | Free-form text | "THIS IS SAMPLE NOTE TEXT" |
General Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
tblNum |
Indicates an existing 900 series table in a request or generated in a response when data has been created | String | ##### | "4035046" |
Response
Responses from the Flight Application (Category 4) Rules Web Service use the same parameters as requests, outlined above. Responses can also include msg
and msgs
, which are used to communicate error messages.
Example Requests and Responses
Simple Category Request without Carrier Flight Tables
(display only table numbers in response)
{
"flightApplication04": {
"flightApplCd": "1"
"flight1": "1234",
"carrier1": "XX",
"flt1ToFlt2RI": "1",
"flight2": "5678",
"carrier2": "XX"
}
}
{
"flightApplication": {
"tblNum": "4035046"
}
}
Simple Category Request with Supporting Table 994
(display table numbers in response)
{
"flightApplication04": {
"fltApplCd": "1",
"flight1": "Any",
"carrier1": "XX",
"ovrrdDt994": {
"rsvEff": "20200315"
}
}
}
{
"flightApplication04": {
"tblNum": "99000129",
"ovrrdDt994": {
"tblNum": "99002126"
}
}
}
Request Providing 986 Fields
(display only table numbers in response)
{
"flightApplication04": {
"fltApplCd": "1",
"firstCxrFlt986": {
"firstCxrFlt986Items":[
{"marketingCarrier": "XX",
"operatingCarrier": "ZZ",
"flight1":"1500,"
"flight2":"1750"
},
{"marketingCarrier": "XX",
"operatingCarrier": "YY",
"flight1":"1500,"
"flight2":"1750"
}
],
"flt1ToFlt2RI": "1",
"flight2": "5678",
"carrier2": "DD"
"loc1mGeoSpec995": {
"type": "P",
"loc1": "IAD"
},
"loc2GeoSpec995": {
"type": "P",
"loc1": "LHR"
},
"trvlLocAppl": "1",
"trvlLocVia": "B",
"ovrrdDt994": {
"tvlEff": "20200730",
"tvlDisc": "20200831",
"tktEff": "20200730",
"tktDisc": "20200831",
"rsvEff": "20200730",
"rsvDisc": "20200831"
},
"noteTxt996": {
"txtLns": [
{
"lnNum": "1",
"txt": "THIS IS SAMPLE NOTE TEXT"
},
{
"lnNum": "2",
"txt": " INDENTATION AND LINE BREAKS"
},
{
"lnNum": "3",
"txt": " IN YOUR REQUEST AND RESPONSE."
},
{
"lnNum": "4",
"txt": "WE HOPE THAT YOU ARE ENJOYING OUR DEMO.."
}
]
}
}
}
{
"flightApplication04": {
"tblNum": "99000129",
"loc1GeoSpec995": {
"tblNum": "99000770"
},
"loc2GeoSpec995": {
"tblNum": "99000771"
},
"ovrrdDt994": {
"tblNum": "99002126"
},
"noteTxt996": {
"tblNum": "99051363"
}
}
}
Simple Category Request Using Data and Existing Table Number
(display table number only in response)
"flightApplication04": {
"fltApplCd": "1",
"flight1": "7000",
"carrier1": "XX",
"ovrrdDt994": {
"tblNum": "99002126"
}
}
}
{
"flightApplication04": {
"tblNum": "99000129",
"ovrrdDt994": {
"tblNum": "99002126"
}
}
}
}