POST/ Hotel Extra
This API is used to get Hotel Extras for selected hotel with applicable discount
HOW TO USE?
-----------------------------
HEADERS TO USE FOR REQUEST
|
Parameter |
Value |
|
Content-Type |
application/json |
|
APIKEY |
|
|
TENANTCODE |
|
BODY PARAMETERS
|
Name |
Type |
M- Mandatory O- Optional |
Description |
Example |
|
ArrivalDate |
Datetime |
M |
Date of Arrival , in format “yyyy-MM-dd” |
Any date greater than current date + 7 days |
|
ReturnDate |
Datetime |
M |
Date of Return, in format “yyyy-MM-dd” |
Should not be less than Arrival Date |
|
HotelID |
String |
M |
Selected Hotels ID |
Code Provided Separately |
|
RoomID |
Array |
M |
Selected Rooms ID |
Array of object from description. |
|
TenantCode |
String |
M |
Provided Tenant Code |
PRO10 |
|
DiscountID |
Int[] |
O |
Discount ID Useful to find Meal Offers on Hotel Extras |
[1,2] (if Don't want Send Empty []) |
|
AgecategoryWiseNoOfPersonsInSearch |
|
|
|
1 |
|
.AgeCategoryCode |
String |
M |
Persons Age Category Code by their Ages. |
|
|
.PersonCount |
Int |
M |
Person Count For Related Age Category Code |
|
|
RoomCount |
String |
M |
Send Room Count From Hotel Listing (Calculate From Object PassengerAllotment), Required For Per Room Extra Price Calculation. |
|
|
RatePlanObj |
|
|
|
|
|
.RatePlanCategory |
String |
M |
Refer From Hotel Listing |
|
|
.RatePlanCode |
String |
M |
||
|
.MealPlanCode |
String |
M |
||
|
.MealPlanCode |
String |
M |
||
|
.RoomTypeCode |
String |
M |
||
|
.PropertyCode |
String |
M |
||
|
PassengerAllotment |
|
|
|
|
|
.RoomAllotment |
|
M |
|
|
|
..AgeCategoryCode |
String |
M |
Persons Age Category Code by their Ages. |
|
|
..PersonCount |
Int |
M |
Person Count For Related Age Category Code As Per Room. |
|
NOTE : Pass HotelID, RoomID and DiscountID got from Hotel Listing and Pass 0 if DiscountID is not in hotel listing.
UAT URL: https://uat.breakaway.ie/api/BookingHotelExtra/GetHotelExtra
RESPONSE PARAMETERS
|
NAME |
Type |
Description |
Example |
|
Result |
boolean |
|
|
|
ResultMessage |
string |
|
|
|
Object |
|
|
|
|
.HotelExtraCategoryID |
int |
Contains Hotel Extra Category ID |
2 |
|
.HotelExtraCategoryName |
string |
Contains Hotel Extra Category Name |
Breakfast |
|
.CategoryIconFileName |
string |
Contains Category Icon File Name |
Breakfast |
|
.CategoryIconFilePath |
string |
Contains Category Icon File Path |
images\icon\Hotel extra\breakfast.png |
|
.ObjBookingHotelExtra |
|
Contains Hotel Extra List as per Related Category |
|
|
..BookingDays |
|
Contains Booking Day and Date List between Arrival and Return Date |
|
|
...BookingDay |
string |
Contains Booking Day of Week |
Tuesday |
|
...BookingDate |
DateTime |
Contains Booking Date |
2017-07-18T00:00:00 |
|
...BestPrice |
decimal |
Contains Best Price |
30 |
|
..HotelExtraID |
int |
Contains Hotel Extra ID |
5 |
|
..HotelExtraName |
string |
Contains Hotel Extra Name |
CBDND Character Breakfast 2nd Seating 09.30 Disney |
|
.. ServiceInventryCode |
string |
It is a Add-On Code to be used to get & Validate Pricing for that Addon |
Ex. BKFDSFTPXJEE2X9_BKFDSFTPX_1 |
|
..IconFileName |
string |
Contains Hotel Extra Icon File Name |
icon.png |
|
..IconFilePath |
string |
Contains Hotel Extra Icon File Path |
Documents/Common/H otelExtra/HotelExtraIco n_cake_202017_07_03_ 05_06_56_PM.png |
|
..DisplayInBooking |
boolean |
Ignore This Parameter |
|
|
..HotelExtraNote |
string |
Contains Note related to Hotel Extra |
Description Note |
|
..HotelExtraDescription |
string |
Contains Details Description about hotel extra. |
Extra Description in Detail |
|
..IncludeExtraOption |
string |
P = PerPerson, B = PerBooking, R = PerRoom |
P/B/R |
|
..BannerFileName |
string |
Contains Extra Banner File Name |
banner.png |
|
..BannerFilePath |
string |
Contains Extra Banner File Path |
Documents/Common/H otelExtra/Banner_2017 _03_14_01_35_59_PM. png |
|
..SeatingPlanFileName |
string |
Contains Seating Plan File Name For Extras like Wild West Show. |
SeatingPlan.png |
|
..SeatingPlanFilePath |
string |
Contains Seating Plan File Path For Extras like Wild West Show. |
Documents/Common/H otelExtra/HotelExtraSea tingPlan_cool hd_wallpapers1080p (5)2017_06_23_02_53_ |
|
..IsAllowedOnArrivalDate |
DateTime |
Ignore This Parameter |
|
|
..IsAllowedOnDepartureDate |
DateTime |
Ignore This Parameter |
|
|
..Sequence |
int |
Contains Extra Listing Display Sequence Number |
32 |
|
..CloseOutStartDate |
DateTime |
Ignore This Parameter |
2017-06-01T00:00:00 |
|
..CloseOutEndDate |
DateTime |
Ignore This Parameter |
2017-07-31T00:00:00 |
|
..ObjPricingPeriod |
Obj |
Contains Listing of Pricing Periods for Extra Between Arrival and Return Date |
|
|
...ExtraPricingPeriodID |
int |
Contains Pricing Period ID |
|
|
...PricingPeriodStartDate |
DateTime |
Ignore This Parameter |
2017-06-01T00:00:00 |
|
...PricingPeriodEndDate |
DateTime |
Ignore This Parameter |
2017-06-31T00:00:00 |
|
...IsFullDuration |
Boolean |
Contains Is Applied to Full Booking Duration With Flags Checking IsAllowedOnArrivalDate/ IsAllowedOnDepartureDate/ Should not be in Closeout Dates |
true/false |
|
...IsCompulsory |
Boolean |
Contains Is Extra is Compulsory between Selected Arrival and Return Dates |
true/false |
|
...IsDateCompulsory |
Boolean |
Contains Is Extra is Compulsory for Some Dates between Selected Arrival and Return Dates |
true/false |
|
...ObjDateCompulsory |
Obj |
|
|
|
....DateCompulsoryStartDate |
DateTime |
Contains Date Compulsory Start Date |
2017-07-18T00:00:00 |
|
....DateCompulsoryEndDate |
DateTime |
Contains Date Compulsory End Date |
2017-07-21T00:00:00 |
|
...PerBookingActualPrice |
decimal |
Per Booking Price |
|
|
...ObjAllotmentPerDay |
string |
O/X/R |
|
|
...objAgePrice |
Obj |
|
|
|
....ActualPrice |
decimal |
Age Category Wise Per Person Price |
|
|
....ArrNoOfPersons |
int[] |
Number Array Up to Person Count |
|
|
....NoOfPersons |
int |
No Of Persons Of that Age Category |
|
|
....Sequence |
int |
Sequence of the Age Catgeories |
|
|
....AgeCategoryCode |
string |
Age Category Code |
|
|
....AgeCategoryName |
string |
Age Category Name |
|
|
....AgeCategoryAlias |
string |
Age Category Name Alias |
|
|
....AgeCategoryIconPath |
string |
Age Category Icon Path |
|
|
....AgeCategoryGroupCode |
string |
Age Category Group Code |
|
|
....StartAgeLimit |
int |
Starting Age For the Age Category |
|
|
..ObjExtraInfo |
arrayObj |
|
|
|
...ExtraInfoEffectiveDate |
datetime |
Extra Information Document Effective From Date |
|
|
...ExtraInfoDocumentName |
string |
Extra Information Document Name |
|
|
...ExtraInfoDocumentPath |
string |
Extra Information Document Path |
|
|
..DependentExtras |
int[] |
Extras Dependent on this Extra |
|
|
..IsCompulsoryForParty |
Boolean |
In that Case Extra is Applicable to full Party |
|
|
..IsSinglePriceForFullDuration |
Boolean |
In that Case Extra Is Applicable for Full Duration. |
|
|
..ArrivalDateDeterminesPrice |
Boolean |
If flag is true then price for other Days is same as arrival Date if Arrival Date has Price. |
|
|
IsTimeout |
boolean |
Is Request Timed Out |
|
|
ErrorCode |
string |
Error Code |
|
ERROR CODES
|
HTTP Status |
Type |
|
500 |
INTERNAL_SERVER_ERROR |
Mandatory Business Validations and Price Calculation in Booking for Listed Hotel Extras:
1.For Extra Pricing, use object “BookingDays” Which Contains Best Price for Extra. Pricing for Extra per Person Pricing based on Object AgecategoryWiseNoOfPersonsInSearch from Input. The Days which are having price zero are not allowed to book calculated based on flags and allotment(availability).
2.IsCompulsoryForParty– If this flag is true then if Extra is selected for any date then we cannot change the person count for this extra. Then extra price will be as per above list item. I.e. from BookingDays property.
3.IsCompulsoryForParty - if this flag is false then Extra price is depends on IncludeExtraOption property.
When IncludeExtraOption value is –>
o“P” then Price Calculation will be Per Person. Age Category wise prices are at ObjPricingPeriod-> objAgePrice.
o“B” then Price = ObjPricingPeriod ->PerBookingActualPrice .
o“R” then Price = ObjPricingPeriod -> PerBookingActualPrice * No. of Rooms.
o“A” then Price = BookingDays. BestPrice
Note: No. of Rooms as per hotel listing passenger allotment.
Note: This extra is always compulsory for full party. So no need to recalculate price and do not update party size for this extra.
4.IsFullDuration – If this is true then if Extra is selected for one date then it has to automatically select for other Booking Dates where having BestPrice by checking this condition and if removed for one date then remove for all dates.
5.IsCompulsory – Extra is compulsory for all Booking dates and has to be selected on load and user will not able to remove that Extras which are having IsCompulsory = true
6.IsDateCompulsory – if IsDateCompulsory = true along with IsCompulsory = true then extra will be compulsory for Dates from ObjDateCompulsory list with DateCompulsoryStartDate and DateCompulsoryEndDate and has to be selected on load and user will not able to remove that Extras.
7.DependentExtras – Extras, which are dependent on each other, will be listed along with extra in array and User can select only one extra from these extras. If both are available in list remove one give an alert.
8.IsSinglePriceForFullDuration – If extra, having this flag then extra should be selected on Arrival Date only. (not for any other Day.)
9.ArrivalDateDeterminesPrice – If this flag is true then Arrival Dates Price is applicable for all remaining days based on allotment.
If Extra has ‘IsPromotionalDiscountApplicable’ flag true for Selected Date then promotional Discount is apply on Extra
How to calculate Promotional discount if IsCompulsoryForParty is true.
Note-Amount can be in %(P) or EUR(V) depends on price Option.
Here,
ExtraPriceForSelectedDate=Extra Price for selected date with selected person.
PersonCount=Person count for selected extra on selected date.
oPriceOption is 'P' and PromotionTypeCode is 'PB' then
Discount Price= (Amount / 100) * ExtraPriceForSelectedDate.
oPriceOption is 'P' and PromotionTypeCode is 'PP' then
Discount Price= (Amount * PersonCount / 100) * ExtraPriceForSelectedDate;
oPriceOption is 'P' and PromotionTypeCode is 'EX' then
In this case promotional discount is apply only when TotalPackagePrice exceed the ExceedAmount
Discount Price= (Amount / 100) * ExtraPriceForSelectedDate.
oPriceOption is 'V' and PromotionTypeCode is 'PB' then
Discount Price= Amount;
oPriceOption is 'V' and PromotionTypeCode is 'PP' then
Discount Price= Amount * PersonCount.
oPriceOption is 'v' and PromotionTypeCode is 'EX' then
In this case promotional discount is apply only when TotalPackagePrice exceed the ExceedAmount
Discount Price= Amount.
SAMPLE REQUEST
{
"ArrivalDate": "2018-06-20",
"ReturnDate": "2018-06-25",
"TenantCode": "CODE",
"PromoCode": "",
"HotelID": 1,
"RoomID": 1,
"DiscountID": "",
"RoomCount": 1,
"RatePlanObj": {
"RatePlanCategory": "ROOM_TICKET_GEN",
"RatePlanCode": "RSTDNBTC0JEETGX",
"MealPlanCode": "NOM",
"RoomTypeCode": "HTLD3TRO4",
"PropertyCode": "49629"
},
"AgecategoryWiseNoOfPersonsInSearch": [
{
"AgeCategoryCode": "AD",
"PersonCount": 2
},
{
"AgeCategoryCode": "CH1218",
"PersonCount": 0
},
{
"AgeCategoryCode": "CH711",
"PersonCount": 0
},
{
"AgeCategoryCode": "CH36",
"PersonCount": 0
},
{
"AgeCategoryCode": "CH03",
"PersonCount": 0
}
],
"PassengerAllotment": [
{
"RoomAllotment": [
{
"AgeCategoryCode": "AD",
"PersonCount": 2
},
{
"AgeCategoryCode": "CH1218",
"PersonCount": 0
},
{
"AgeCategoryCode": "CH711",
"PersonCount": 0
},
{
"AgeCategoryCode": "CH36",
"PersonCount": 0
},
{
"AgeCategoryCode": "CH03",
"PersonCount": 0
}
]
}
]
}
SAMPLE RESPONSE
{
"Result": true,
"ResultMessage": null,
"Object": [
{
"HotelExtraCategoryID": 2,
"HotelExtraCategoryName": "Breakfast",
"CategoryIconFileName": "Breakfast",
"CategoryIconFilePath": "http://localhost:2116/images\\icon\\Hotel_extra\\breakfast.png",
"ObjBookingHotelExtra": [
{
"BookingDays": [
{
"BookingDay": "Wednesday",
"BookingDate": "2018-02-07T00:00:00",
"BestPrice": 32.00,
"IsHavingPriceZero": false
},
{
"BookingDay": "Thursday",
"BookingDate": "2018-02-08T00:00:00",
"BestPrice": 32.00,
"IsHavingPriceZero": false
},
{
"BookingDay": "Friday",
"BookingDate": "2018-02-09T00:00:00",
"BestPrice": 32.00,
"IsHavingPriceZero": false
},
{
"BookingDay": "Saturday",
"BookingDate": "2018-02-10T00:00:00",
"BestPrice": 32.00,
"IsHavingPriceZero": false
}
],
"HotelExtraID": 81,
"HotelExtraName": "Buffet Breakfast at your Hotel",
"ServiceInventryCode": "BKFDSFTPXJEE2X9_BKFDSFTPX_1",
"ExtraSubtotal": 0.0,
"IconFileName": null,
"IconFilePath": null,
"DisplayInBooking": true,
"HotelExtraNote": null,
"HotelExtraDescription": "Enjoy a scrumptious breakfast feast at the breakfast......",
"IncludeExtraOption": "P",
"RoomCount": 0,
"BannerFileName": "La Cantina Santa Fe Restaurant 400x200.jpg",
"BannerFilePath": "http://localhost:2116/Documents/Common/HotelExtra/Hot.._57_03_AM.jpg",
"SeatingPlanFileName": null,
"SeatingPlanFilePath": null,
"IsAllowedOnArrivalDate": false,
"IsAllowedOnDepartureDate": true,
"IsAlwaysAvailable": true,
"IsCompulsoryForParty": false,
"IsSinglePriceForFullDuration": false,
"ArrivalDateDeterminesPrice": false,
"Sequence": 1,
"ExtraDisableDelete": false,
"IsUnavailableForAllDays": false,
"CloseOutStartDate": null,
"CloseOutEndDate": null,
"ObjPricingPeriod": [
{
"ExtraPricingPeriodID": 86,
"PricingPeriodStartDate": "2017-03-29T00:00:00",
"PricingPeriodEndDate": "2018-03-20T00:00:00",
"IsFullDuration": true,
"IsCompulsory": false,
"IsDateCompulsory": false,
"IsCompulsoryForParty": false,
"PerBookingActualPrice": 0.0,
"ObjAllotmentPerDay": [
{
"AllotmentDay": "2018-02-07T00:00:00",
"AllotmentCode": "O"
},
{
"AllotmentDay": "2018-02-08T00:00:00",
"AllotmentCode": "O"
},
{
"AllotmentDay": "2018-02-09T00:00:00",
"AllotmentCode": "O"
},
{
"AllotmentDay": "2018-02-10T00:00:00",
"AllotmentCode": "O"
}
],
"ObjDateCompulsory": [ ],
"objAgePrice": [
{
"ActualPrice": 16.00,
"ArrNoOfPersons": [ 0, 1, 2 ],
"NoOfPersons": 2,
"Sequence": 1,
"AgeCategoryCode": "AD",
"AgeCategoryName": "Adults (18+ yrs)",
"AgeCategoryAlias": "Adult",
"AgeCategoryIconPath": null,
"AgeCategoryGroupCode": "AD",
"StartAgeLimit": 18,
"EndAgeLimit": 120
},
{
"ActualPrice": 16.00,
"ArrNoOfPersons": [ 0 ],
"NoOfPersons": 0,
"Sequence": 2,
"AgeCategoryCode": "CH1218",
"AgeCategoryName": "Adults (12-17 yrs)",
"AgeCategoryAlias": "Adult",
"AgeCategoryIconPath": null,
"AgeCategoryGroupCode": "AD",
"StartAgeLimit": 12,
"EndAgeLimit": 17
},
{
"ActualPrice": 14.00,
"ArrNoOfPersons": [ 0 ],
"NoOfPersons": 0,
"Sequence": 3,
"AgeCategoryCode": "CH711",
"AgeCategoryName": "Children (7-11 yrs)",
"AgeCategoryAlias": "Youth",
"AgeCategoryIconPath": null,
"AgeCategoryGroupCode": "CH",
"StartAgeLimit": 7,
"EndAgeLimit": 11
},
{
"ActualPrice": 14.00,
"ArrNoOfPersons": [ 0 ],
"NoOfPersons": 0,
"Sequence": 4,
"AgeCategoryCode": "CH36",
"AgeCategoryName": "Children (3-6 yrs)",
"AgeCategoryAlias": "Child",
"AgeCategoryIconPath": null,
"AgeCategoryGroupCode": "CH",
"StartAgeLimit": 3,
"EndAgeLimit": 6
},
{
"ActualPrice": 0.00,
"ArrNoOfPersons": [ 0 ],
"NoOfPersons": 0,
"Sequence": 5,
"AgeCategoryCode": "CH03",
"AgeCategoryName": "Infants (0-2 yrs)",
"AgeCategoryAlias": "Infant",
"AgeCategoryIconPath": null,
"AgeCategoryGroupCode": "IN",
"StartAgeLimit": 0,
"EndAgeLimit": 2
}
]
}
],
"ObjExtraInfo": [ ],
"DependentExtras": [ null ]
}
]
}
],
"IsTimeout": false,
"HttpResponseCode": 200,
"ErrorCode": null
}
Created with the Personal Edition of HelpNDoc: Easily create EPub books