NexSDK
    Preparing search index...

    Interface RoomAvailabilityResponse

    Whether a room can be sold for these dates, and under what stay rules.

    is_available is about INVENTORY only — no booking, block or blackout stands in the way. It deliberately does not fold in the stay rules below: a stay that breaks a minimum is not an unavailable room, it is a differently-shaped stay, and a client that conflates the two tells the guest to pick other dates when it should tell them to stay longer. Check stay_rules_met alongside it before offering to book.

    The stay fields resolve the per-date restrictions (migration 0039) for exactly the window asked about, through the same resolve_stay_window that create_booking enforces — so a guest is never quoted a stay the API will then refuse. Before this, no public read carried them at all: they were set by hosts, published to the OTAs, and invisible to our own booking flow.

    An unconfigured property answers min_stay: 1, max_stay: null — one night, unconstrained.

    interface RoomAvailabilityResponse {
        check_in_date: string;
        check_out_date: string;
        closed_to_arrival: boolean;
        closed_to_departure: boolean;
        is_available: boolean;
        max_stay: RoomAvailabilityResponseMaxStay;
        min_stay: number;
        property_id: string;
        room_id: string;
        stay_rules_met: boolean;
    }
    Index

    Properties

    check_in_date: string
    check_out_date: string
    closed_to_arrival: boolean
    closed_to_departure: boolean
    is_available: boolean
    max_stay: RoomAvailabilityResponseMaxStay
    min_stay: number
    property_id: string
    room_id: string
    stay_rules_met: boolean