Eligibility (Category 1) Rules Web Service

Eligibility (Category 1) Rules API is used to further define the identification requirement, age range, locality, or other restrictions (if such conditions exist) of a specific passenger type for whom the fare applies.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 Eligibility (Category 1) 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 1 Parameters

Field name Description Type Format Example
eligibility01 Wrapper for Category 1 domain Collection of key-value pairs   { }
psgrType A code that identifies the passenger type code. String max 3 alpha character "ADT"
idReqd An indicator that specifies if the identification of passenger type status is required at ticketing String (max 1 alpha character) "X" = Required "X"
psgrAppl Indicates a positive or negative application of the psgrType field. String (max 1 alpha character) "N" = Must not be "N"
psgrStatus Indicates the location requirements of the psgrType String (max 1 character) "N" = Nationality; "R" = Residence; "E" = Employee "N"
loc1 A geographic location for the passenger type specified up to 5 bytes Alphanumeric "["MAD"]
minAge Minimum age of the passenger type. 2 bytes Numeric "02"
maxAge Maximum age of the passenger type. 2 bytes Numeric "99"
psgrOccurrenceFirst The first occurrence of the passengers flying together (of the specified passenger type) who may qualify for the fare. 3 bytes Numeric "001"
psgrOccurrenceLast The last occurrence of the passengers flying together (of the specified passenger type) who may qualify for the fare. 3 bytes Numeric "999"
accountCode An account code that is assigned by the carrier determines the account type. upto 20 bytes Numeric "20"

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. Default is "Y" (True). 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 Eligibility (Category 1) 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

Full Category Request

(display only table numbers in response)

request response
Copy
Copied
{
  "rtnTblNumsOnly":"Y",
  "eligibility01": {
    "psgrType": "ADT",
    "idReqd":"X",
    "psgrAppl" :"N",
    "psgrStatus":"N" ,
    "loc1"  : "MAD",
	"minAge" : "02",
	"maxAge" : "40",
	"psgrOccurrenceFirst" : "001",
	"psgrOccurrenceLast" : "999",
	"accountCode" : "b56n001"
		}
}
Copy
Copied
{
  "rtnTblNumsOnly" : "Y",
   "eligibility01" : {
      "tblNum" : "295121"
   }
}

Full Category Request

(display only table numbers in response)

request response
Copy
Copied
{
  "rtnTblNumsOnly":"Y",
  "eligibility01": {
    "psgrType": "ADT",
    "idReqd":"X",
    "psgrAppl" :"N",
    "psgrStatus":"N" ,
    "loc1"  : "MAD",
	"minAge" : "02",
	"maxAge" : "40",
	"psgrOccurrenceFirst" : "001",
	"psgrOccurrenceLast" : "999",
	"accountCode" : "b56n001",	
    "ovrrdDt994": {
      "rsvEff": "20180101",
      "rsvDisc": "20180731",  
      "tktDisc": "20180731",
      "tvlEff": "20180201",
      "tvlDisc": "20181030"
    },
    "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.."}]
    }
   }
}
Copy
Copied
{
   "rtnTblNumsOnly" : "Y",
   "eligibility01" : {
      "tblNum" : "295123",
      "ovrrdDt994" : {
         "tblNum" : "86223"
      },
      "noteTxt996" : {
         "tblNum" : "8291353"
      }
   }
}

Full Category Request Using Data and Existing Table Number

(display table number in response)

request response
Copy
Copied
{
  "rtnTblNumsOnly":"Y",
   "eligibility01": {
    "psgrType": "ADT",
    "idReqd":"X",
    "psgrAppl" :"N",
    "psgrStatus":"N",
    "loc1"  : "MAD",
	"minAge" : "02",
	"maxAge" : "40",
	"psgrOccurrenceFirst" : "001",
	"psgrOccurrenceLast" : "999",
	"accountCode" : "b56n001",	
    "ovrrdDt994": {
      "tblNum": "12345678",
    }
  }
}
Copy
Copied
{
  "rtnTblNumsOnly": "Y",
  "eligibility01": {
  "tblNum": "4034902",
     "ovrrdDt994": {
      "tblNum": "12345678",
    }
  }
}