otelz.CM.OTAV2

<back to all web services

OTA_HotelBookingRuleRQ

OTA_HotelBookingRuleRQ is used to retrieve a list of rules.

The following routes are available for this service:
POST/api/ota_hotelbookingrulerq/
OTA_HotelBookingRuleRQ Parameters:
NameParameterData TypeRequiredDescription
HotelBookingRuleRequestsbodyList<HotelBookingRuleRequest>No
HotelbodyHotelSimpleNo
OtelzBaseRequest Parameters:
NameParameterData TypeRequiredDescription
LangquerystringNoDesired language of the response. Currently just 'tr' is supported.

Allowable Values

  • tr
ConversationTimequerystringNoTimestamp of the request message.

Allowable Values

  • 2019-07-17T07:40:05.068Z
ConversationIdquerystringNoA reference for additional message identification, assigned by the requesting host system.It will be echoed in the correlating response when provided in the request.

Allowable Values

  • 41433c0b-77ea-40e5-8368-d79f15afc01e
HotelBookingRuleRequest Parameters:
NameParameterData TypeRequiredDescription
FromformstringNo

Allowable Values

  • 2019-07-22
ToformstringNo

Allowable Values

  • 2019-07-22
RoomTypeCandidatesformList<RoomTypeCandidate>No
MealPlanCandidatesformList<MealPlanCandidate>No
RoomTypeCandidate Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo

Allowable Values

  • 15344
MealPlanCandidate Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo

Allowable Values

  • 3
HotelSimple Parameters:
NameParameterData TypeRequiredDescription
IdquerystringNoHotel identifier

Allowable Values

  • 6361
OTA_HotelBookingRuleRS Parameters:
NameParameterData TypeRequiredDescription
RuleMessagesformList<RuleMessageForRuleGet>No
OtelzBaseResponse Parameters:
NameParameterData TypeRequiredDescription
SuccessformstringNo
ErrorsformList<Error>No
WarningsformList<Warning>No
ConversationIdformstringNo
ConversationTimeformstringNo
ConfirmedTimeformstringNo
Error Parameters:
NameParameterData TypeRequiredDescription
TypeformstringNo
CodeformstringNo
TextformstringNo
Warning Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
TextformstringNo
RuleMessageForRuleGet Parameters:
NameParameterData TypeRequiredDescription
DateformstringNo
RoomTypesformList<RoomTypeForRuleGet>No
RoomTypeForRuleGet Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
NameformstringNo
StatusformstringNo
ClosedformboolNo
MealPlansformList<MealPlanForRuleGet>No
MealPlanForRuleGet Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo

Allowable Values

  • 3
CodeformstringNo

Allowable Values

  • BB
NameformstringNo

Allowable Values

  • Bed and Breakfast
ClosedformboolNo

Allowable Values

  • false
BookingOffsetformint?No

Allowable Values

  • 1
RuleformRuleNo
Rule Parameters:
NameParameterData TypeRequiredDescription
MinLOSqueryint?NoDetermines the minimum stay based on the day.If you choose 3 for a date, bookings with that date will be accepted if at least 3 nights.

Allowable Values

  • 1
MaxLOSqueryint?NoDetermines the minimum stay based on the day. If you select 3 for a date, bookings with that date will be accepted for a maximum of 3 nights.

Allowable Values

  • 3
MinSAqueryint?NoDetermines minimum stay based on check-in day. If you select 3 for a date, bookings with the date of arrival at least 3 nights will be accepted.

Allowable Values

  • 3
MaxSAqueryint?NoDetermines maximum stay based on departure day. If you select 3 for a date, bookings on the date of departure will be accepted for a maximum of 3 nights.

Allowable Values

  • 3
CtaquerystringNoReservations are not permitted on the day of check-in for rooms or hostels that you choose to be closed.

Allowable Values

  • true
  • false
CtdquerystringNoReservations are not permitted on the day of departure for the rooms or hostels that you have selected as closed.

Allowable Values

  • true
  • false

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/ota_hotelbookingrulerq/ HTTP/1.1 
Host: cm-integration.otelz.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"HotelBookingRuleRequests":[{"From":"String","To":"String","RoomTypes":[{"Id":"String"}],"MealPlans":[{"Id":"String"}]}],"Hotel":{"Id":"String"},"Lang":"String","ConversationTime":"String","ConversationId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"RuleMessages":[{"Date":"String","RoomTypes":[{"Id":"String","Name":"String","Status":"String","Closed":false,"MealPlans":[{"Id":"String","Code":"String","Name":"String","Closed":false,"BookingOffset":0,"Rule":{"MinLOS":0,"MaxLOS":0,"MinSA":0,"MaxSA":0,"Cta":"String","Ctd":"String"}}]}]}],"Success":"String","Errors":[{"Type":"String","Code":"String","Text":"String"}],"Warnings":[{"Code":"String","Text":"String"}],"ConversationId":"String","ConversationTime":"String","ConfirmedTime":"String"}