Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Variable Name

Mandatory

Variable Type

Example

Parent Variable

Explain

dateOfSalesYesDate(YYYY-mm-dd)2020-10-17-Date of the ticket sales, it'll also be use as ticket valid on date
packageIDNoVarchar(255)ABC123-Package ID retrieve from [ G_ATT_Package ] Get Available Attraction Package, If package are selected ( selectedPckgAttr == "1" ) this variable are mandatory, else can be '' (Blank) or not set.
noPaxYesNum(9)10-Number of pax / guests multiple with selected package and / or selected individual attraction' session
selectIndvAttrYesEnum(0,1)1-"0" mean not being selected or no individual attraction / sessions selected
"1" mean have individual attractions / sessions selected more than 0, at least 1 should trigger and set to "1"
selectPckgAttrYesEnum(0,1)1-"0" mean no package selected or chosen to book
"1" mean at most only 1 package been chosen or used, ONLY 1 (one) package can be set to use here
numAttrIndvSelectedYesNum(9)3-Cannot be blank, at least 0 even nothing been selected for individual attraction, this is the total of attraction(s) been selected
numAttrPckgSelectedYesNum(9)6-Cannot be blank, at least 0 even nothing been selected for selected package, this is the total attraction in the package
attrSelectedIndv_{x0}NoVarchar(255)ABC123numAttrIndvSelected (x0)

Selected attraction (BDI ID / Attraction ID / Item ID), loop start from 1 until parent variable x, replacing the number of {x0} start from 1 until maximum number of the parent variable.

Example: 
numAttrIndvSelected = 3
attrSelectedIndv_1 = "ABC123", attrSelectedIndv_2 = "EFG123", attrSelectedIndv_3 = "HIJ123"

attrSelectedPckg_{x0}NoVarchar(255)ABC123numAttrPckgSelected (x0)

All package' attractions within selected package referring to [ G_PKG_Details ] Get Package Details, loop start from 1 until parent variable x, replacing the number of {x0} start from 1 until maximum number of the parent variable.

Example: 
numAttrPckgSelected = 6
attrSelectedPckg_1 = "ABC123", attrSelectedPckg_2 = "EFG123", attrSelectedPckg_3 = "HIJ123", attrSelectedPckg_4 = "KLM123", attrSelectedPckg_5 = "NOP123", attrSelectedPckg_6 = "QRS123"

attrPriceIndv_{x0}NoDouble(10.2)1234.56numAttrIndvSelected (x0)

Price / Amount referring to [ G_IND_Attractions ] Get Individual Attractions Price, XML node of #ATTRACTION_ITEMS@itemPrice

_1 of the 

of the attraction price, loop start from 1 until parent variable x, replacing the number of {x0} start from 1 until maximum number of the parent variable and MUST match the attraction like attrSelectedIndv_2 have price 400.00, then attrPriceIndv_2 = "400.00"

Example: 
numAttrIndvSelected = 3
attrPriceIndv_1 = "612.34", attrPriceIndv_2 = "1200.00", attrPriceIndv_3 = "0.00"

attrPricePckg_{x0}NoDouble(10.2)0.00numAttrPckgSelected (x0)

Price / Amount referring to [ G_PKG_Details ] Get Package Details, XML node of #ATTRACTION_ITEMS@itemPrice_1 of the package attraction price, loop start from 1 until parent variable x, replacing the number of {x0} start from 1 until maximum number of the parent variable and MUST match the attraction like attrSelectedPckg_2 have price 60.00, then attrPricePckg_2 = "60.00"

Example: 
numAttrPckgSelected = 6
attrPricePckg_1 = "60.00", attrPricePckg_2 = "60.00", attrPricePckg_3 = "100.00", attrPricePckg_4 = "160.00", attrPricePckg_5 = "60.00", attrPricePckg_6 = "100.00"

numAttrSessIndvSelected_{x0}NoNum(9)2numAttrIndvSelected (x0)
numAttrSessPckgSelected_{x0}NoNum(9)1numAttrPckgSelected (x0)
selectedIndvSessionID_{x0}_{x1}NoVarchar(255)ABC123numAttrIndvSelected (x0)
numAttrSessIndvSelected_{x0} (x1)

selectedPckgSessionID_{x0}_{x1}NoVarchar(255)ABC123

numAttrPckgSelected {x0}
numAttrSessPckgSelected_{x0} (x1)


...

Code Block
languagejs
linenumberstrue
$(document).ready(function(){
	$.ajax({
		url:"https://api.ehors.com",
		method:'POST',
		dataType:'text',
		data:{
			accessID:'Bed1C5Wa',
			accessKey:'R3fX3DMSzf7QJ',
			moduleCode:'TicketSales',
			command:'P_TKT_NewSales',
			dateOfSales:'2020-10-17',
			noPax:'1',
			packageID:'BB5547',
			selectIndvAttr:'1',
			selectPckgAttr:'1',
			numAttrIndvSelected:'3',
			numAttrPckgSelected:'6',
			attrSelectedIndv_1:'CB55',
			attrSelectedIndv_2:'BB600',
			attrSelectedIndv_3:'CB71',
			attrSelectedPckg_1:'CB13',
			attrSelectedPckg_2:'CB11',
			attrSelectedPckg_3:'BB15',
			attrSelectedPckg_4:'BB10',
			attrSelectedPckg_5:'BB17',
			attrSelectedPckg_6:'BB12',
			attrPriceIndv_1:'0612.0034',
			attrPriceIndv_2:'01200.00',
			attrPriceIndv_3:'0.00',
			attrPricePckg_1:'60.00',
			attrPricePckg_2:'60.00',
			attrPricePckg_3:'100.00',
			attrPricePckg_4:'160.00',
			attrPricePckg_5:'60.00',
			attrPricePckg_6:'100.00',,
			selectedIndvSessionID_2numAttrSessIndvSelected_1:'HBB329561',
			selectedIndvSessionIDnumAttrSessIndvSelected_3_12:'CB315212',
			selectedIndvSessionIDnumAttrSessIndvSelected_3_2:'HCC331601',
			selectedIndvSessionID_5numAttrSessPckgSelected_1:'HCC335211',
			selectedPckgSessionIDnumAttrSessPckgSelected_1_12:'CB320961',
			selectedPckgSessionIDnumAttrSessPckgSelected_2_13:'CB317381',
			selectedPckgSessionIDnumAttrSessPckgSelected_3_14:'HBB325101',
			selectedPckgSessionIDnumAttrSessPckgSelected_4_15:'CB313351',
			selectedPckgSessionIDnumAttrSessPckgSelected_5_16:'CB313661',
			selectedPckgSessionIDselectedIndvSessionID_62_1:'CB32127HBB32956',
			numAttrSessIndvSelectedselectedIndvSessionID_3_1:'1CB31521',
			numAttrSessIndvSelectedselectedIndvSessionID_3_2:'2HCC33160',
			numAttrSessIndvSelectedselectedIndvSessionID_5_31:'1HCC33521',
			numAttrSessPckgSelectedselectedPckgSessionID_1_1:'1CB32096',
			numAttrSessPckgSelectedselectedPckgSessionID_2_1:'1CB31738',
			numAttrSessPckgSelectedselectedPckgSessionID_3_1:'1HBB32510',
			numAttrSessPckgSelectedselectedPckgSessionID_4_1:'1CB31335',
			numAttrSessPckgSelectedselectedPckgSessionID_5_1:'1CB31366',
			numAttrSessPckgSelectedselectedPckgSessionID_6_1:'1CB32127'
		},
		success:function(response){
			console.log(response);
		}
	})
});

...