Hotel booking flow
The channel client displays hotels, rates, and orders. The channel server signs requests and calls YSystem Open API. All endpoints below use POST; the environment host and version prefix are omitted.
sequenceDiagram
accTitle: Hotel booking flow
accDescr: The channel client uses the channel server to search hotels, retrieve rates and rules, submit a booking, and check its status.
autonumber
box rgb(235, 247, 243) Channel
participant C as Channel client
participant S as Channel server
end
box rgb(255, 246, 229) YSystem
participant Y as YSystem server
end
C->>S: Search hotels (destination, dates, guests)
S->>Y: /hotel/search
Y-->>S: Hotel list
S-->>C: Display hotels
C->>S: Select a hotel and request rates
S->>Y: /hotel/rates
Y-->>S: Room types and rate plans
S-->>C: Display available plans
C->>S: Select a plan and request price details and rules
S->>Y: /hotel/rateRule
Y-->>S: Latest price details and booking rules
S-->>C: Display price, payment and cancellation policies
C->>S: Accept terms and submit guest and booking details
S->>Y: /hotel/book
Y-->>S: Order or business error
S-->>C: Display order status or failure reason
opt Order is awaiting confirmation
S->>Y: /order/search
Y-->>S: Latest order and booking result
S-->>C: Update booking status
end
Integration notes
- Call
/hotel/rateRulebefore booking and show the latest price and rules to the user. Prices from hotel or rate lists should not be treated as final. - Payment requirements depend on the rate plan and channel configuration. Provide booking and payment details according to the relevant API reference.
- Receiving an order does not mean the booking is confirmed. Check the order status and booking result, and call
/order/searchfor updates. - Hotel and rate queries can return results in batches; see Async tasks. The channel server handles all requests using Request authentication and signing.
Try the Hotel API Demo to explore the flow. See Open API for full request and response fields.