Minimum Stay (Category 6) Rules Web Service
Minimum Stay (Category 6) Rules API is used to restrict a fare to a minimum stay requirement. 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 Minimum Stay (Category 6) 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 6 Parameters
Field name | Description | Type | Format | Example |
---|---|---|---|---|
minimumStay06 |
Wrapper for Category 6 domain | Collection of key-value pairs | { } |
|
dayOfWeekItems |
The first date or the first date in a for a range of dates travel is permitted | String | "1" = Monday; "2"= Tuesday; "3"= Wednesday; "4"= Thursday; "5"= Friday; "6"= Saturday; "7"= Sunday | "1"` |
|
returnTimeOfDay |
The time of day when return travel may commence | String | 24 hour clock | "0900" |
dayOfWeekCd |
A code specifying that minimum stay is expressed in the day of the week | String (max 3-character) | "Mon" = Monday; "Tue" = Tuesday; "Wed" = Wednesday; "Thu" = Thursday; "Fri" = Friday; "Sat" = Saturday; "Sun" = Sunday |
"Wed" |
dayOfWeekNo |
A number specifying the occurrence of the day of the week | String (max 1-character) | "1" = First; "2" = Second; "3" = Third; "4" = Fourth; "5" = Fifth; "6" = Sixth |
"2" |
minStayDuration |
A number specifying the number of units in the minimum stay | Number (max 3-character) | "100" |
|
minStayUnitOfTm |
A code indicating the unit by which the minimum stay is measured | String (max 3-character) | "M" = Months; "H" = Hours; "D" = Days; "N" = Minutes |
"N" |
minStayDt |
A date specifying the date for the minimum stay requirement | String | YYYYMMDD | "20180930" |
minStayCd |
An indicator specifying that the earlier or later of the minimum stay calculated versus minimum stay date must be used | String (max 1-character) | "E" = Earlier; "L" = Later |
"E" |
waiverCd |
An indicator specifying that the stay may be shortened until not earlier than the prior day or a specified date or time on which service is provided | String (max 1-character) | "1" |
"1" |
waiverCondtDt |
A date indicating the minimum stay may be waived to a specific date | String | YYYYMMDD | "20180930" |
waiverDayCd |
An indicator specifying that the earlier or later of the waiver date versus calculated waiver must be used | String (max 1-character) | "E" = Earlier; "L" = Later |
"E" |
waiverCondDur |
A number specifying the number of days or months in the waiver condition | Number (max 3-character) | "100" |
|
waiverUnitOfWork |
A code indicating the unit by which the waiver is measured | String (max 3-character) | "M" = Months; "D" = Days |
"M" |
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" |
From 995 Geographic Specification Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
FromGeoSpec995 |
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 |
To 995 Geographic Specification Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
ToGeoSpec995 |
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 |
---|---|---|---|---|
rtnTblNumsOnly |
Indicates whether to display the created table numbers and the data values specified in the Request. When set to "Y" (True), ONLY the table numbers will display in the Response. Default is "N" (False). |
String (max 1-character) | "Y" = True; "N" = False |
"N" |
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 Minimum Stay (Category 6) 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
(display only table numbers in response)
{
"rtnTblNumsOnly":"Y",
"minimumStay06": {
"dayOfWeekCd`": "MON",
"dayOfWeekItems": "1",
"fromGeoSpec995": {
"tsi": "01"
},
"toGeoSpec995": {
"tsi": "05"
}
}
}
{
"rtnTblNumsOnly": "Y",
"minimumStay06": {
"tblNum": "4035046",
"fromGeoSpec995": {
"tblNum": "99000770"
},
"toGeoSpec995": {
"tblNum": "99000771"
}
}
}
Simple Category Request with Supporting Table 994
(display table numbers in response)
{
"rtnTblNumsOnly": "Y",
"minimumStay06`": {
"dayOfWeekCd`": "MON",
"dayOfWeekItems": "1",
"fromGeoSpec995": {
"tsi": "01"
},
"toGeoSpec995": {
"tsi": "05"
},
"ovrrdDt994": {
"rsvEff": "20200101"
}
}
}
{
"rtnTblNumsOnly": "Y",
"minimumStay06": {
"tblNum": "99000129",
"fromGeoSpec995": {
"tblNum": "99000770"
},
"toGeoSpec995": {
"tblNum": "99000771"
},
"ovrrdDt994": {
"tblNum": "99002126"
}
}
}
Full Category Request
(display only table numbers in response)
{
"rtnTblNumsOnly": "y",
"minimumStay06": {
"dayOfWeekItems": [1,3],
"returnTimeOfDay": "1400",
"dayOfWeekCd": " MON",
"dayOfWeekNo": "1",
"minStayDuration": "014",
"minStayUnitOfTm": "D",
"fromGeoSpec995": {
"tsi": "01",
"type": "P",
"loc1": "IAD",
"loc2": "CDG"
},
"toGeoSpec995": {
"tsi": "01",
"type": "P",
"loc1": "CDG",
"loc2": "IAD"
},
"minStayDt": "20190730",
"minStayCd": "L",
"waiverCd": "2",
"waiverCondDt": "20190730",
"waiverDayCd": "L",
"waiverCondDur": "014",
"waiverUnitOfWork": "D",
"ovrrdDt994": {
"tvlEff": "20190730",
"tvlDisc": "20190831",
"tktEff": "20190730",
"tktDisc": "20190831",
"rsvEff": "20190730",
"rsvDisc": "20190831"
},
"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.."
}
]
}
}
}
{
"rtnTblNumsOnly": "Y",
"minimumStay06": {
"tblNum": "99000129",
"fromGeoSpec995": {
"tblNum": "99000770"
},
"toGeoSpec995": {
"tblNum": "99000771"
},
"ovrrdDt994": {
"tblNum": "99002126"
},
"noteTxt996": {
"tblNum": "99051363"
}
}
}
Simple Category Request Using Data and Existing Table Number
(display table number only in response)
"rtnTblNumsOnly":"Y",
"minimumStay06": {
"dayOfWeekCd`": "MON",
"dayOfWeekItems": "1",
"fromGeoSpec995": {
"tsi": "01"
},
"toGeoSpec995": {
"tsi": "05"
},
"ovrrdDt994": {
"tblNum": "99002126"
}
}
}
{
"rtnTblNumsOnly": "Y",
"minimumStay06": {
"tblNum": "99000129",
"fromGeoSpec995": {
"tblNum": "99000770"
},
"toGeoSpec995": {
"tblNum": "99000771"
},
"ovrrdDt994": {
"tblNum": "99002126"
}
}
}
}