Sales Restriction (Category 15) Rules Web Service
The Sales Restrictions (Category 15) Rules API is used to provide the first ticketing,last ticketing date, and reservation dates. 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 Sales Restriction (Category 15) 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 15 Parameters
Field name | Description | Type | Format | Example |
---|---|---|---|---|
salesRstrxn15 |
Wrapper for Category 15 domain | Collection of key-value pairs | { } |
|
rsvEff |
The first date reservations can be made under the Category Record 3 provisions | String | YYYYMMDD | "20180930" |
rsvDisc |
The last date reservations can be made under 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" |
countryRstrxn |
A code indicating that sales are restricted to country of origin, country of destination or both | String | "O" = Country of Origin;"D" = Country of Destination; "B" = Country of Origin and Destination; |
"O" |
residentRstrxn |
A code indicating that sales are restricted to the type specified | String | "P" = Permanent Resident;"C" = Citizen; "N" = Non-Resident; |
"N" |
sellTktRstrxn |
An indicator specifying that the fare may be sold by the publishing/owning carrier or a CRS that is specified in the following field | String | "X" = Sell and Ticket;"B" = Sell By;"T" = Ticket On; "G" = Ticket On Owning Carrier Sell By GDS; "D" = Ticket On – Exclude Owning Carrier;"E" = Sell and Ticket – Exclude Owning Carrier for Ticket |
"T" |
sellTktOwnCxrGds |
A up to 3-position field identifying the carrier code of the other carrier who may sell the fare | String | "XX" |
|
segmentOwnCxr |
A valid CRS code of the CRS who may sell the fare | String | "N" = On This Ticket;"F" = On This Ticket At This Fare; |
"F" |
tvlAgentRstrxn |
An indicator that specifies that the ticket may not be sold by travel agencies or may only be sold by travel agencies | String | "N" = Not Sell Fares;"Y" = Exclusively Sell Fares; |
"N" |
cash |
A code indicating that Cash is the form of payment that is or is not accepted for a ticket | String | "Y" = Yes;"N" = No; |
"N" |
check |
A code indicating that Check is the form of payment that is or is not accepted for a ticket | String | "Y" = Yes;"N" = No; |
"N" |
creditCard |
A code indicating that Credit Card is the form of payment that is or is not accepted for a ticket | String | "Y" = Yes;"N" = No; |
"N" |
gtr |
A code indicating that GTR is the form of payment that is or is not accepted for a ticket | String | "Y" = Yes;"N" = No; |
"Y" |
currCountryRstrxn |
A code indicating that the sale is only permitted in the currency of the country ofi origin, country of destination, or either | String | "O" = Country of Origin;"D" = Country of Destination; "E" = Either; |
"O" |
cur |
The specific currency code that the sale is only permitted in | String | Valid Currency Code | "USD" |
mail |
A code indicating whether or not Mail as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
pta |
A code indicating whether or not PTA as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
ptaTkt |
A code indicating whether or not PTA –TKT as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
autoTktMachine |
A code indicating whether or not Automatic Ticketing Machine as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
selfTkt |
A code indicating whether or not Self as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
satoCato |
A code indicating whether or not SATO/CATO as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
electronicTkt |
A code indicating whether or not ET (Electronic Ticketing) as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
siti |
A code indicating whether or not SITI (Sale and Ticketing in Country of Origin) as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
sito |
A code indicating whether or not SITO (Sale in country of origin and Ticketing Outside Country of Origin) as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
soti |
A code indicating whether or not SOTI (Sale outside country of origin and Ticketing Inside Country of Origin) as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
soto |
A code indicating whether or not SOTO (Sale outside country of origin and Ticketing Outside Country of Origin) as a method of ticket issuance is allowed | String | "Y" = Yes;"N" = No; "R" = Required |
"N" |
famGrpTkt |
An indicator that specifies that family/group tickets must be issued at the same time | String | "Y" = Yes;"N" = No; |
"N" |
extendValidity |
An indicator that specifies that the extension of ticket validity is allowed | String | "Y" = Yes;"N" = No; |
"N" |
Security Recurring Fields
Field name | Description | Type | Format | Example |
---|---|---|---|---|
locItems |
Wrapper for security recurring fields | Collection of key-value pairs | { } |
|
notPermitted |
An Indicator that specifies that the following fields are negative or positive | String | "N" = Not Permitted |
"N" |
type |
A code indicating the type of geographic specifications from which tickets may or may not be sold. | String | "T" = PseudoCode/Travel Agency Code; "I" = IATA Travel Agency Number; "H" = Home IATA Agency Number ; "U" = Home Travel Agency Code; "X" = Department/Identifier V = CRS/Carrier Department Code; "A" = area; "Z" = zone; "N" = nation ; "S" = state ; "C" = city; "P" = airport; |
"S" |
location1 |
A geographic location or agency/pseudo city | String | "US" |
|
location2 |
A geographic location or agency/pseudo city | String | "GB" |
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" |
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 and is the default. "N"(False) means show values in request. | 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 Sales Restriction (Category 15) 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",
"salesRstrxn15": {
"tktDisc": "20180930"
}
}
{
"rtnTblNumsOnly": "Y",
"salesRstrxn15": {
"tblNum": "4035046"
}
}
Simple Category Request with Supporting Table 994
(display table numbers and values in response)
{
"rtnTblNumsOnly":"Y",
"salesRstrxn15": {
"tktDisc": "20180930",
"ovrrdDt994": {
"rsvEff": "20180101"
}
}
}
{
"rtnTblNumsOnly": "Y",
"salesRstrxn15": {
"tblNum": "4034902",
"ovrrdDt994": {
"tblNum": "58696",
"rsvEff": "20180101"
}
}
}
Full Category Request with Security Fields
(display only table numbers in response)
{
"salesRstrxn15": {
"tktEff": "20180201",
"tktDisc": "20180930",
“rsvEff”: “20180201”
"rsvDisc": "20180930",
“cash”: “Y”,
“credit” : “Y”,
"sellTktRstrxn": "B",
"sellTktOwnCxrGds": "OWN",
"location": {
"locCodeItems": [
{
"notPermitted": " ",
"type": "C",
"location1": "YAG ",
"location2": "NYC "
}
]
"ovrrdDt994": {
"rsvEff": "20180101",
"rsvDisc": "20180731",
"tktDisc": "20180731",
"tvlEff": "20180201",
"tvlDisc": "20180930"
},
"noteTxt996": {
"txtLns":
[{"lnNum":"1","txt": "THIS IS SAMPLE NOTE
TEXT TO ILLUSTRATE"}
,{"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",
"salesRstrxn15": {
"tblNum": "4035073",
"ovrrdDt994": {
"tblNum": "58746"
},
"geoSpec995": {
"tblNum": "274619"
},
"noteTxt996": {
"tblNum": "8187666"
}
}
}
Simple Category Request
(display request values in response)
{
"rtnTblNumsOnly":"Y",
"salesRstrxn15": {
"tktDisc": "20180930"
}
}
{
"rtnTblNumsOnly": "Y",
"tktDisc": {
"tblNum": "4035046",
"tvlDtExp": "20180930"
}
}
Simple Category Request Using Data and Existing Table Number
(display table number and values in response)
Category 15 and Table 994 using field names and existing table number; redisplay request and table numbers.
{
"rtnTblNumsOnly":"N",
"salesRstrxn15": {
"tktDisc": "20180930",
"ovrrdDt994": {
"tblNum": "12345678",
}
}
}
{
"rtnTblNumsOnly": "N",
"salesRstrxn15": {
"tblNum": "4034902",
"tktDisc": "20180930",
"ovrrdDt994": {
"tblNum": "12345678",
}
}
}