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

Try the Hotel API Demo to explore the flow. See Open API for full request and response fields.