...
Info |
---|
Do Notice the "Parent Variable" is the length max length of the variable loop start from 1 until the number of the "Parent Variable" replacement of the |
Variable Name | Mandatory | Variable Type | Example | Parent Variable | Explain |
---|---|---|---|---|---|
dateOfSales | Yes | Date(YYYY-mm-dd) | 2020-10-17 | - | Date of the ticket sales, it'll also be use as ticket valid on date |
packageID | No | Varchar(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. |
noPax | Yes | Num(9) | 10 | - | Number of pax / guests multiple with selected package and / or selected individual attraction' session |
guestName | Yes | Varchar(255) | John Smith | - | Guest name who made the ticket sales via API, the full name required |
guestContactNumber | No | Varchar(255) | +63 1234 56789 | - | Guest contact number, prefer inclusive of international prefix |
guestEmailAddress | Yes | Varchar(255) | john@smith.com | - | Guest email address to match a booking info |
selectIndvAttr | Yes | Enum(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" |
selectPckgAttr | Yes | Enum(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 |
numAttrIndvSelected | Yes | Num(9) | 3 | - | Cannot be blank, at least 0 even nothing been selected for individual attraction, this is the total of attraction(s) been selected |
numAttrPckgSelected | Yes | Num(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} | No | Varchar(255) | ABC123 | numAttrIndvSelected | Selected attraction (BDI ID / Attraction ID / Item ID), loop start from 1 until parent variable x, replacing the number of Example: |
attrSelectedPckg_{x0} | No | Varchar(255) | ABC123 | numAttrPckgSelected | 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 Example: |
attrPriceIndv_{x0} | No | Double(10.2) | 1234.56 | numAttrIndvSelected | Price / Amount referring to [ G_IND_Attractions ] Get Individual Attractions Price, XML node of Example: |
attrPricePckg_{x0} | No | Double(10.2) | 0.00 |
| Price / Amount referring to [ G_PKG_Details ] Get Package Details, XML node of Example: |
numAttrSessIndvSelected_{x0} | No | Num(9) | 2 | numAttrIndvSelected | Number of the session selected for the selected individual attractions if non-selected for the attractions, it should be "0". The number cannot be more than available sessions for the attraction from [ G_IND_Attractions ] Get Individual Attractions Price. Loop start from 1 until maximum number of parent variable of Example: |
numAttrSessPckgSelected_{x0} | No | Num(9) | 1 | numAttrPckgSelected | Number of the session selected for the selected individual attractions if non-selected for the attractions, it should be "0". The number cannot be more one of the available sessions for the attraction from [ G_PKG_Details ] Get Package Details. Loop start from 1 until maximum number of parent variable of And please be note for package session ARE maximum ONLY to have 1 session per attratcion as the package are grouping the total price. Example: |
selectedIndvSessionID_{x0}_{x1} | No | Varchar(255) | ABC123 | numAttrIndvSelected | This variable use for selected sessionID/plamBoardID getting from [ G_IND_Attractions ] Get Individual Attractions Price, and this variable will be 2 level loop, which first from parent of maximum parent variable The looping from both level are start from 1 until the parent variable as max length Example: |
attraction is 3 and the second attraction have 2 sessions selected, One session with ID AC12, and second session with ID EF34 | |||||
selectedPckgSessionID_{x0}_{x1} | No | Varchar(255) | ABC123 |
| This variable for selected sessionID/plamBoardID getting from [ G_PKG_Details ] Get Package Details, and this variable also have 2 level of looping. However for package selected session ID it'll be ALWAYS ONLY 1 (ONE) session as above mentioned. The looping from both level are start from 1 until the parent variable as max length Example: |
Sample Request with JS
Code Block | ||||
---|---|---|---|---|
| ||||
$(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', guestName:'John Smith', guestContactNumber:'+63123456789', guestEmailAddress:'john@smith.com', 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:'612.34', attrPriceIndv_2:'1200.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',, numAttrSessIndvSelected_1:'1', numAttrSessIndvSelected_2:'2', numAttrSessIndvSelected_3:'1', numAttrSessPckgSelected_1:'1', numAttrSessPckgSelected_2:'1', numAttrSessPckgSelected_3:'1', numAttrSessPckgSelected_4:'1', numAttrSessPckgSelected_5:'1', numAttrSessPckgSelected_6:'1', selectedIndvSessionID_2_1:'HBB32956', selectedIndvSessionID_3_1:'CB31521', selectedIndvSessionID_3_2:'HCC33160', selectedIndvSessionID_5_1:'HCC33521', selectedPckgSessionID_1_1:'CB32096', selectedPckgSessionID_2_1:'CB31738', selectedPckgSessionID_3_1:'HBB32510', selectedPckgSessionID_4_1:'CB31335', selectedPckgSessionID_5_1:'CB31366', selectedPckgSessionID_6_1:'CB32127' }, success:function(response){ console.log(response); } }) }); |
Sample request with CURL
Code Block |
---|
curl -d "accessID=Bed1C5Wa&accessKey=R3fX3DMSzf7QJ&moduleCode=TicketSales&command=P_TKT_NewSales&dateOfSales=2020-10-17&noPax=1&guestName=John Smith&guestContactNumber=+63123456789&guestEmailAddress=john@smith.com&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=612.34&attrPriceIndv_2=1200.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,&numAttrSessIndvSelected_1=1&numAttrSessIndvSelected_2=2&numAttrSessIndvSelected_3=1&numAttrSessPckgSelected_1=1&numAttrSessPckgSelected_2=1&numAttrSessPckgSelected_3=1&numAttrSessPckgSelected_4=1&numAttrSessPckgSelected_5=1&numAttrSessPckgSelected_6=1&selectedIndvSessionID_2_1=HBB32956&selectedIndvSessionID_3_1=CB31521&selectedIndvSessionID_3_2=HCC33160&selectedIndvSessionID_5_1=HCC33521&selectedPckgSessionID_1_1=CB32096&selectedPckgSessionID_2_1=CB31738&selectedPckgSessionID_3_1=HBB32510&selectedPckgSessionID_4_1=CB31335&selectedPckgSessionID_5_1=CB31366&selectedPckgSessionID_6_1=CB32127" -X POST https://api.ehors.com |
Respond XML Sample
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="utf-8"?>
<SCRIPT_RESULT>
<RESULT>
<ATTRACTION_ITEMS_DETAILS BDIID="CB55" packageID="" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668752" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="BB600" packageID="" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668753" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="BB600" packageID="" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668754" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="CB71" packageID="" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668755" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="CB13" packageID="BB5547" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668756" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="CB11" packageID="BB5547" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668757" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="BB15" packageID="BB5547" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668758" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="BB10" packageID="BB5547" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668759" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="BB17" packageID="BB5547" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668760" posGuestID=""/>
<ATTRACTION_ITEMS_DETAILS BDIID="BB12" packageID="BB5547" guestFolioID="HAB461171" revenuePropertyID="2" reservationBDISessionID="HAB668761" posGuestID=""/>
<ATTRACTION_ITEMS reservationID="HAB181155" guestFolioID="HAB461171" reservationDetailID="HAB246206" tempWristbandNo="605434177_52425a43" posGuestID="" revenuePropertyID="2" seqNo=""/>
</RESULT>
<SCRIPT_STATUS>SUCCESS</SCRIPT_STATUS>
</SCRIPT_RESULT>
|
XML Node Explain
Node | Importance | Explain |
---|---|---|
#ATTRACTION_ITEMS_DETAILS | Low | Each node explain the session reserved in EHORS system number of node should equal to total number of sessions selected for both package and/or individual. |
#ATTRACTION_ITEMS_DETAILS@BDIID | Low | Unique BDI ID mapped back to attraction selected, if 2 sessions selected for 1 attraction. I'l have 2 nodes with same BDIID |
#ATTRACTION_ITEMS_DETAILS@packageID | Low | Can be blank if its individual attraction, if isn't blank this node is for selected package |
#ATTRACTION_ITEMS_DETAILS@guestFolioID | Low | EHORS is an ERP system whereas each and every module follows the same hierarchy and system flow, therefore certain fields do not require a further explanation and are just needed to support to flow of EHORS. Can be ignore. |
#ATTRACTION_ITEMS_DETAILS@revenuePropertyID | Low | EHORS is an ERP system whereas each and every module follows the same hierarchy and system flow, therefore certain fields do not require a further explanation and are just needed to support to flow of EHORS. Can be ignore. |
#ATTRACTION_ITEMS_DETAILS@reservationBDISessionID | Low | EHORS is an ERP system whereas each and every module follows the same hierarchy and system flow, therefore certain fields do not require a further explanation and are just needed to support to flow of EHORS. Can be ignore. |
#ATTRACTION_ITEMS_DETAILS@posGuestID | Low | EHORS is an ERP system whereas each and every module follows the same hierarchy and system flow, therefore certain fields do not require a further explanation and are just needed to support to flow of EHORS. Can be ignore. |
#ATTRACTION_ITEMS | High | This node will give a booking details of the ticket sales like booking number, if successfully reserve in EHORS |
#ATTRACTION_ITEMS@reservationID | High | Unique ID from EHORS system when the booking are book in system but yet to confirm until payment information receive, thus this variable is crucial to be send and use on next command |
#ATTRACTION_ITEMS@guestFolioID | High | Unique ID from EHORS similar to reservation ID, but one reservation ID can contain many guest folio ID, unlike #ATTRACTION_ITEMS_DETAILS, this node are need for later command to confirm the booking |
#ATTRACTION_ITEMS@reservationDetailID | High | This is a mapping ID generated by EHORS similar usage like guest folio ID, this ID use to map related information of the booked and selected details. |
#ATTRACTION_ITEMS@tempWristbandNo | Low | Temporary wristband number / ticket ID created by EHORS and only needed by EHORS ticket sales back end program, can be ignore. |
#ATTRACTION_ITEMS@posGuestID | Low | Will be always empty, can be ignored |
#ATTRACTION_ITEMS@revenuePropertyID | Low | EHORS is an ERP system whereas each and every module follows the same hierarchy and system flow, therefore certain fields do not require a further explanation and are just needed to support to flow of EHORS. Can be ignore. |
#ATTRACTION_ITEMS@seqNo | Low | Will be always empty, can be ignored |