{"openapi":"3.1.0","info":{"title":"The Garcia Ubud — Room availability","version":"1.0.0","description":"Live room prices and availability for The Garcia Ubud on specific dates. Read-only: to book, send the guest to booking_url."},"servers":[{"url":"https://booking.thegarciaubud.com"}],"paths":{"/api/ai/availability":{"get":{"operationId":"checkAvailability","summary":"Get live room prices for specific dates","description":"Returns every room type (sold-out ones flagged) with its rate plans: per-night price excl./incl. taxes, total for the whole stay, breakfast, cancellation and payment terms, nightly prices and a bookingUrl. Use YYYY-MM-DD dates in the hotel's local time zone (Asia/Brunei).","parameters":[{"name":"checkin","in":"query","required":true,"description":"Check-in date, YYYY-MM-DD (hotel time zone Asia/Brunei). Not in the past.","schema":{"type":"string","format":"date"}},{"name":"checkout","in":"query","required":true,"description":"Check-out date, YYYY-MM-DD, after checkin, max 30 nights.","schema":{"type":"string","format":"date"}},{"name":"adults","in":"query","required":false,"description":"Number of adults (default 2).","schema":{"type":"integer","minimum":1,"maximum":10,"default":2}},{"name":"children","in":"query","required":false,"description":"Number of children (default 0). Requires children_ages.","schema":{"type":"integer","minimum":0,"maximum":6,"default":0}},{"name":"children_ages","in":"query","required":false,"description":"Ages of the children (0-17), comma separated, one per child, e.g. 4,9.","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Language of booking_url pages.","schema":{"type":"string","enum":["en","ja-jp","ru","zh-cn","it","id","nl","ko-kr"],"default":"en"}},{"name":"promocode","in":"query","required":false,"description":"Optional promo code.","schema":{"type":"string"}}],"responses":{"200":{"description":"Room types and rate plans for the stay. totalStayInclusive covers all nights and guests.","content":{"application/json":{"schema":{"type":"object","required":["hotel","stay","currency","prices_include_taxes_and_fees","pricing_type","retrieved_at","availability_status","rooms","booking_url"],"properties":{"hotel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"website":{"type":"string"},"timezone":{"type":"string","description":"IANA time zone of the hotel, e.g. Asia/Makassar"}}},"stay":{"type":"object","required":["checkin","checkout","nights","adults","children"],"properties":{"checkin":{"type":"string","format":"date"},"checkout":{"type":"string","format":"date"},"nights":{"type":"integer"},"adults":{"type":"integer"},"children":{"type":"integer"},"children_ages":{"type":"array","items":{"type":"integer","minimum":0,"maximum":17}},"timezone":{"type":"string"}}},"currency":{"type":"string"},"prices_include_taxes_and_fees":{"type":"boolean"},"price_note":{"type":"string"},"pricing_type":{"type":"string","enum":["live"],"description":"Prices come live from the hotel's booking engine"},"retrieved_at":{"type":"string","format":"date-time","description":"When prices were retrieved from the booking engine (UTC)"},"retrieved_at_local":{"type":"string","description":"Same moment in the hotel's local time"},"expires_at":{"type":"string","format":"date-time","description":"retrieved_at + quote_ttl_seconds (UTC). After this moment the quote is stale: fetch again instead of quoting it. Informational; the booking engine always recalculates the price."},"expires_at_local":{"type":"string","description":"expires_at in the hotel's local time"},"quote_ttl_seconds":{"type":"integer","description":"How long the quote is considered fresh, in seconds"},"hotel_timezone":{"type":"string"},"availability_status":{"type":"string","enum":["available","sold_out","unverified"],"description":"sold_out = search succeeded with no rooms; unverified = rates exist but failed price validation (do not quote)"},"request_id":{"type":"string","description":"Correlation id (also in X-Request-Id header)"},"presentation":{"type":"object","description":"Suggested ready-to-copy presentation (optional to follow). One card per available room type with its cheapest bookable rate, sorted by price. Copy price_label exactly; do not recalculate.","properties":{"suggested_layout":{"type":"string","enum":["room_cards","message"]},"title":{"type":"string"},"subtitle":{"type":"string"},"sort":{"type":"string"},"room_cards":{"type":"array","items":{"type":"object","properties":{"room":{"type":"string"},"rate_plan":{"type":"string"},"line":{"type":"string"},"price_label":{"type":"string","description":"Whole-stay total, formatted, e.g. IDR 2,462,400"},"price_caption":{"type":"string"},"per_night_label":{"type":["string","null"]},"strikethrough_label":{"type":["string","null"]},"discount_label":{"type":["string","null"]},"rooms_left_label":{"type":["string","null"]},"more_rate_plans":{"type":"integer"},"image":{"type":["string","null"]},"cta_label":{"type":"string"},"cta_url":{"type":"string"}}}},"sold_out_rooms":{"type":"array","items":{"type":"string"}},"message":{"type":["string","null"]},"footer":{"type":"string"},"all_rooms_cta":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}}},"do_not":{"type":"array","items":{"type":"string"}}}},"soldOutAll":{"type":"boolean"},"noRooms":{"type":"boolean"},"rooms_available":{"type":"integer"},"rooms":{"type":"array","items":{"type":"object","required":["roomTypeId","roomType","status","soldOut","bookingUrl","ratePlans"],"properties":{"roomTypeId":{"type":"string"},"roomType":{"type":"string","description":"Room type name"},"status":{"type":"string","enum":["available","sold_out","unverified"]},"soldOut":{"type":"boolean"},"cheapestPriceInclusive":{"type":["number","null"],"description":"Cheapest rate per night incl. taxes; null if sold out"},"soldOutLastPrice":{"type":["number","null"],"description":"Amount in `currency`"},"image":{"type":["string","null"]},"images":{"type":"array","items":{"type":"string"},"maxItems":3,"description":"Official room photos (up to 3), exactly as in the booking page room carousel (falls back to image when the carousel is empty)"},"bedType":{"type":["string","null"],"description":"Bed configuration as shown on the booking page, e.g. \"1 twin beds or 1 king bed\""},"maxGuests":{"type":["integer","null"],"minimum":1,"description":"Maximum number of persons in the room, as shown on the booking page. Informational only: not an occupancy eligibility rule (only ratePlans returned for the requested guests are bookable)."},"roomSize":{"type":["string","null"],"description":"Room size as shown on the booking page, e.g. \"36 m²\""},"view":{"type":["string","null"],"description":"Room view, e.g. \"Garden View\""},"features":{"type":"array","items":{"type":"string"},"description":"Main room features (up to 5), as shown on the booking page"},"bookingUrl":{"type":"string","description":"Website page with dates and guests filled in, filtered to this room (no rate selected). Prefer ratePlans[].bookingUrl."},"longerStayOffers":{"type":"array","description":"Promotions for this room that require a longer minimum stay than requested. NOT bookable for the requested stay; never quote as its price.","items":{"type":"object","properties":{"offerId":{"type":"string"},"name":{"type":"string"},"minNights":{"type":"integer"},"applicableToRequestedStay":{"type":"boolean","const":false},"reason":{"type":"string"},"exampleStay":{"type":"object","properties":{"checkin":{"type":"string"},"checkout":{"type":"string"},"nights":{"type":"integer"}}},"indicativeTotalForMinNights":{"type":"number","description":"Indicative total for minNights starting exampleStay.checkin"},"indicativeAveragePerNight":{"type":"number","description":"Amount in `currency`"},"discountPercent":{"type":["integer","null"]},"bookingUrl":{"type":["string","null"]}}}},"ratePlans":{"type":"array","items":{"type":"object","properties":{"ratePlanId":{"type":"string"},"bookingUrl":{"type":"string","description":"Booking page with dates and guests filled in and this rate plan already added to the cart (1 room). Preferred link for the guest."},"ratePlanName":{"type":"string"},"supplierId":{"type":"string"},"supplier":{"type":"string"},"maxOccupancy":{"type":["integer","null"]},"roomsLeft":{"type":"integer"},"breakfastIncluded":{"type":"boolean"},"mealText":{"type":["string","null"]},"freeCancellation":{"type":"boolean"},"refundable":{"type":"boolean"},"cancellationPolicy":{"type":"string","enum":["free_cancellation","non_refundable"]},"cancellationText":{"type":["string","null"]},"reschedulable":{"type":"boolean","description":"True when the booking page shows the rate as reschedulable (reschedule-only policy, or a 'Reschedulable' policy label). Independent of freeCancellation."},"policyLabels":{"type":"array","items":{"type":"string"},"description":"Cancellation/reschedule policy labels exactly as shown on the booking page (English)"},"payLater":{"type":"boolean"},"payAtHotel":{"type":"boolean"},"paymentText":{"type":"string"},"paymentOptions":{"type":"array","items":{"type":"string"}},"genius":{"type":"boolean"},"price":{"type":["number","null"],"description":"Average per night excl. taxes & service; null when the hotel only provides tax-inclusive prices"},"taxes":{"type":["number","null"],"description":"Average taxes & service per night; null when not provided separately"},"priceInclusive":{"type":"number","description":"Per night incl. taxes & service"},"beforeDiscountPrice":{"type":["number","null"],"description":"Per night before discount"},"beforeDiscountTotalInclusive":{"type":["number","null"],"description":"Whole-stay total before discount (only when taxes are included)"},"discountPercent":{"type":["integer","null"]},"totalStayInclusive":{"type":"number","description":"Whole stay incl. taxes & service"},"nightlyPrices":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"price":{"type":"number","description":"Amount in `currency`"}}}},"benefits":{"type":["string","null"]}}}}}}},"excluded_rate_plans":{"type":"array","description":"Rate plans rejected by price validation; never quote these","items":{"type":"object","properties":{"roomTypeId":{"type":"string"},"ratePlanId":{"type":"string"},"reason":{"type":"string"}}}},"booking_url":{"type":"string"},"how_to_book":{"type":"string"},"generated_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid input (incl. hotel_not_on_this_site, invalid_promocode); error.message explains what to fix (dates are never silently changed)."},"404":{"description":"unknown_hotel: hotel code not known to this booking engine."},"429":{"description":"Rate limited (30 requests per minute)."},"503":{"description":"upstream_unavailable / upstream_incomplete: live availability could not be verified; do not quote prices and do not report sold out. See Retry-After."}}}}}}