{"openapi":"3.1.0","info":{"title":"Hotel Bookings API","version":"0.1.0","description":"Search, quote, book and cancel hotel rooms. Every operation is also an MCP tool at /mcp."},"servers":[{"url":"https://hotels.coticsy.com"}],"security":[{},{"apiKey":[]}],"paths":{"/v1/tools/search_hotels":{"post":{"operationId":"search_hotels","summary":"Search hotels","description":"Find hotels in a city for given dates and guests. Returns hotels with the cheapest total price for the stay, star rating and whether a refundable rate exists. Next: check_availability for the hotel the user likes.","tags":["discover"],"x-mcp-tool":"search_hotels","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchHotelsInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchHotelsOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/tools/check_availability":{"post":{"operationId":"check_availability","summary":"Check room availability","description":"List the bookable rooms of one hotel for given dates and guests: room name, meals, total and nightly price, and cancellation terms. Each room has an offerId for get_quote.","tags":["discover"],"x-mcp-tool":"check_availability","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAvailabilityInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAvailabilityOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/tools/get_quote":{"post":{"operationId":"get_quote","summary":"Get a price quote","description":"Lock the final price of one room offer with the hotel supplier before booking. Tell the user the total, what is included and the cancellation terms, and say if priceChanged is true. A quote expires (see expiresAt).","tags":["booking"],"x-mcp-tool":"get_quote","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetQuoteInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetQuoteOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/tools/book_hotel":{"post":{"operationId":"book_hotel","summary":"Book a hotel","description":"Create a booking from a quote for the named guest. Only call after the user has confirmed the hotel, dates, total price and cancellation terms. Returns status pending_payment and a checkoutUrl: give the user that link to pay securely. Card details are never sent through the assistant. The booking becomes confirmed after payment; check with get_booking.","tags":["booking"],"x-mcp-tool":"book_hotel","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookHotelInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookHotelOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/tools/get_booking":{"post":{"operationId":"get_booking","summary":"Look up a booking","description":"Get the current status and details of a booking by its reference and the holder's email.","tags":["booking"],"x-mcp-tool":"get_booking","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBookingInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBookingOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/tools/cancel_booking":{"post":{"operationId":"cancel_booking","summary":"Cancel a booking","description":"Cancel a booking. Before calling, tell the user the cancellation terms (free or not, and any refund) and get an explicit yes. Cannot be undone. Unpaid bookings are simply released.","tags":["booking"],"x-mcp-tool":"cancel_booking","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBookingInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBookingOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/hotels":{"get":{"operationId":"searchHotelsGet","summary":"Search hotels","tags":["discover"],"parameters":[{"name":"city","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":80,"description":"City name, e.g. Miami"},"description":"City name, e.g. Miami"},{"name":"countryCode","in":"query","required":true,"schema":{"description":"ISO 3166-1 alpha-2 country code, e.g. US, GB, FR","type":"string","minLength":2,"maxLength":2},"description":"ISO 3166-1 alpha-2 country code, e.g. US, GB, FR"},{"name":"checkin","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Check-in date, YYYY-MM-DD"},"description":"Check-in date, YYYY-MM-DD"},{"name":"checkout","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Check-out date, YYYY-MM-DD, after check-in"},"description":"Check-out date, YYYY-MM-DD, after check-in"},{"name":"adults","in":"query","required":false,"schema":{"default":2,"description":"Adults in the room","type":"integer","minimum":1,"maximum":8},"description":"Adults in the room"},{"name":"childrenAges","in":"query","required":false,"schema":{"default":[],"description":"Age of each child, e.g. [4, 9]. Empty when no children.","maxItems":6,"type":"array","items":{"type":"integer","minimum":0,"maximum":17}},"style":"form","explode":false,"description":"Age of each child, e.g. [4, 9]. Empty when no children."},{"name":"currency","in":"query","required":false,"schema":{"description":"ISO 4217 currency code, e.g. USD","type":"string","minLength":3,"maxLength":3},"description":"ISO 4217 currency code, e.g. USD"},{"name":"maxPricePerNight","in":"query","required":false,"schema":{"description":"Only hotels whose cheapest room is at or under this nightly price","type":"number","exclusiveMinimum":0},"description":"Only hotels whose cheapest room is at or under this nightly price"},{"name":"minStars","in":"query","required":false,"schema":{"description":"Minimum star rating","type":"integer","minimum":1,"maximum":5},"description":"Minimum star rating"},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchHotelsOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/hotels/{hotelId}/availability":{"get":{"operationId":"checkAvailabilityGet","summary":"Check room availability","tags":["discover"],"parameters":[{"name":"hotelId","in":"path","required":true,"schema":{"type":"string"}},{"name":"checkin","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Check-in date, YYYY-MM-DD"},"description":"Check-in date, YYYY-MM-DD"},{"name":"checkout","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Check-out date, YYYY-MM-DD, after check-in"},"description":"Check-out date, YYYY-MM-DD, after check-in"},{"name":"adults","in":"query","required":false,"schema":{"default":2,"description":"Adults in the room","type":"integer","minimum":1,"maximum":8},"description":"Adults in the room"},{"name":"childrenAges","in":"query","required":false,"schema":{"default":[],"description":"Age of each child, e.g. [4, 9]. Empty when no children.","maxItems":6,"type":"array","items":{"type":"integer","minimum":0,"maximum":17}},"style":"form","explode":false,"description":"Age of each child, e.g. [4, 9]. Empty when no children."},{"name":"currency","in":"query","required":false,"schema":{"description":"ISO 4217 currency code, e.g. USD","type":"string","minLength":3,"maxLength":3},"description":"ISO 4217 currency code, e.g. USD"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckAvailabilityOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/quotes":{"post":{"operationId":"createQuote","summary":"Get a price quote","tags":["booking"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetQuoteInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetQuoteOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/bookings":{"post":{"operationId":"createBooking","summary":"Book a hotel","tags":["booking"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookHotelInput"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookHotelOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/bookings/{bookingId}":{"get":{"operationId":"getBookingGet","summary":"Look up a booking","tags":["booking"],"parameters":[{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","format":"email","description":"The holder's email given at booking"},"description":"The holder's email given at booking"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBookingOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/bookings/{bookingId}/cancel":{"post":{"operationId":"cancelBookingPost","summary":"Cancel a booking","tags":["booking"],"parameters":[{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBookingOutput"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}}},"components":{"schemas":{"SearchHotelsInput":{"type":"object","properties":{"city":{"type":"string","minLength":2,"maxLength":80,"description":"City name, e.g. Miami"},"countryCode":{"description":"ISO 3166-1 alpha-2 country code, e.g. US, GB, FR","type":"string","minLength":2,"maxLength":2},"checkin":{"type":"string","format":"date","description":"Check-in date, YYYY-MM-DD"},"checkout":{"type":"string","format":"date","description":"Check-out date, YYYY-MM-DD, after check-in"},"adults":{"default":2,"description":"Adults in the room","type":"integer","minimum":1,"maximum":8},"childrenAges":{"default":[],"description":"Age of each child, e.g. [4, 9]. Empty when no children.","maxItems":6,"type":"array","items":{"type":"integer","minimum":0,"maximum":17}},"currency":{"description":"ISO 4217 currency code, e.g. USD","type":"string","minLength":3,"maxLength":3},"maxPricePerNight":{"description":"Only hotels whose cheapest room is at or under this nightly price","type":"number","exclusiveMinimum":0},"minStars":{"description":"Minimum star rating","type":"integer","minimum":1,"maximum":5},"limit":{"default":10,"type":"integer","minimum":1,"maximum":30}},"required":["city","countryCode","checkin","checkout"]},"SearchHotelsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"hotelId":{"type":"string","description":"Pass to check_availability"},"name":{"type":"string"},"stars":{"type":["number","null"]},"guestRating":{"description":"Average guest rating out of 10, when known","type":["number","null"]},"address":{"type":["string","null"]},"city":{"type":"string"},"countryCode":{"type":"string"},"mainPhoto":{"type":["string","null"]},"lowestPrice":{"type":"object","properties":{"total":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false,"description":"Cheapest total for the whole stay, taxes included where the supplier includes them"},"perNight":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false}},"required":["total","perNight"],"additionalProperties":false},"refundableAvailable":{"description":"true: a refundable rate exists. false: none. null: unknown from search alone; check_availability shows each room's terms","type":["boolean","null"]}},"required":["hotelId","name","stars","guestRating","address","city","countryCode","mainPhoto","lowestPrice","refundableAvailable"],"additionalProperties":false}},"nights":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"},"nextStep":{"type":"string"}},"required":["items","nights","currency","nextStep"],"additionalProperties":false},"CheckAvailabilityInput":{"type":"object","properties":{"hotelId":{"type":"string","minLength":1},"checkin":{"type":"string","format":"date","description":"Check-in date, YYYY-MM-DD"},"checkout":{"type":"string","format":"date","description":"Check-out date, YYYY-MM-DD, after check-in"},"adults":{"default":2,"description":"Adults in the room","type":"integer","minimum":1,"maximum":8},"childrenAges":{"default":[],"description":"Age of each child, e.g. [4, 9]. Empty when no children.","maxItems":6,"type":"array","items":{"type":"integer","minimum":0,"maximum":17}},"currency":{"description":"ISO 4217 currency code, e.g. USD","type":"string","minLength":3,"maxLength":3}},"required":["hotelId","checkin","checkout"]},"CheckAvailabilityOutput":{"type":"object","properties":{"hotel":{"type":"object","properties":{"hotelId":{"type":"string"},"name":{"type":"string"},"stars":{"type":["number","null"]},"guestRating":{"type":["number","null"]},"address":{"type":["string","null"]},"city":{"type":"string"},"countryCode":{"type":"string"},"description":{"type":["string","null"]},"amenities":{"type":"array","items":{"type":"string"}},"photos":{"type":"array","items":{"type":"string"}},"checkinTime":{"type":["string","null"]},"checkoutTime":{"type":["string","null"]}},"required":["hotelId","name","stars","guestRating","address","city","countryCode","description","amenities","photos","checkinTime","checkoutTime"],"additionalProperties":false},"offers":{"type":"array","items":{"type":"object","properties":{"offerId":{"type":"string","description":"Pass to get_quote to lock this price"},"roomName":{"type":"string"},"boardName":{"type":"string","description":"Meals included, e.g. Room only, Breakfast included"},"maxOccupancy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"price":{"type":"object","properties":{"total":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false},"perNight":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false}},"required":["total","perNight"],"additionalProperties":false},"payAtHotel":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"e.g. Resort fee, City tax"},"amount":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["description","amount","currency"],"additionalProperties":false},"description":"Mandatory fees paid at the hotel on top of the price (e.g. resort fee). Always tell the user about these before booking. Empty when none."},"refundable":{"type":"boolean"},"freeCancellationUntil":{"description":"ISO date-time until which cancelling is free; null when not refundable","type":["string","null"]},"cancellationSummary":{"type":"string","description":"One sentence to show the user, e.g. 'Free cancellation until 12 Mar 2027, 23:59 UTC'"}},"required":["offerId","roomName","boardName","maxOccupancy","price","payAtHotel","refundable","freeCancellationUntil","cancellationSummary"],"additionalProperties":false},"description":"Bookable rooms, cheapest first"},"nights":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextStep":{"type":"string"}},"required":["hotel","offers","nights","nextStep"],"additionalProperties":false},"GetQuoteInput":{"type":"object","properties":{"offerId":{"type":"string","minLength":1,"description":"offerId from check_availability"}},"required":["offerId"]},"GetQuoteOutput":{"type":"object","properties":{"quoteId":{"type":"string","pattern":"^qt_[A-Za-z0-9]{10,40}$","description":"Quote id from get_quote"},"hotel":{"type":"object","properties":{"hotelId":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]}},"required":["hotelId","name","address"],"additionalProperties":false},"roomName":{"type":"string"},"boardName":{"type":"string"},"checkin":{"type":"string","format":"date","description":"Date as YYYY-MM-DD"},"checkout":{"type":"string","format":"date","description":"Date as YYYY-MM-DD"},"nights":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adults":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"childrenAges":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"price":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false,"description":"Final total the guest pays"},"priceChanged":{"type":"boolean","description":"True when the supplier's price differs from the offer shown earlier; tell the user"},"previousPrice":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"payAtHotel":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"e.g. Resort fee, City tax"},"amount":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["description","amount","currency"],"additionalProperties":false},"description":"Mandatory fees paid at the hotel on top of the price (e.g. resort fee). Always tell the user about these before booking. Empty when none."},"refundable":{"type":"boolean"},"freeCancellationUntil":{"description":"ISO date-time until which cancelling is free; null when not refundable","type":["string","null"]},"cancellationSummary":{"type":"string","description":"One sentence to show the user, e.g. 'Free cancellation until 12 Mar 2027, 23:59 UTC'"},"expiresAt":{"type":"string","description":"Book before this time or get a new quote"},"nextStep":{"type":"string"}},"required":["quoteId","hotel","roomName","boardName","checkin","checkout","nights","adults","childrenAges","price","priceChanged","previousPrice","payAtHotel","refundable","freeCancellationUntil","cancellationSummary","expiresAt","nextStep"],"additionalProperties":false},"BookHotelInput":{"type":"object","properties":{"quoteId":{"type":"string","pattern":"^qt_[A-Za-z0-9]{10,40}$","description":"Quote id from get_quote"},"holder":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":60},"lastName":{"type":"string","minLength":1,"maxLength":60},"email":{"type":"string","maxLength":200,"format":"email","description":"Where the confirmation is sent; also needed to look up or cancel the booking"},"phone":{"type":"string","maxLength":30}},"required":["firstName","lastName","email"],"description":"The person the room is booked under; must be present at check-in"},"specialRequests":{"description":"Passed to the hotel; not guaranteed","type":"string","maxLength":500}},"required":["quoteId","holder"]},"BookHotelOutput":{"type":"object","properties":{"bookingId":{"type":"string","pattern":"^bk_[A-Za-z0-9]{10,40}$","description":"Booking reference, e.g. bk_7Q2X9M4KT8"},"status":{"type":"string","enum":["pending_payment","confirmed","cancelled","expired","failed"]},"hotel":{"type":"object","properties":{"hotelId":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]}},"required":["hotelId","name","address"],"additionalProperties":false},"roomName":{"type":"string"},"boardName":{"type":"string"},"checkin":{"type":"string","format":"date","description":"Date as YYYY-MM-DD"},"checkout":{"type":"string","format":"date","description":"Date as YYYY-MM-DD"},"nights":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adults":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"childrenAges":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"holder":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":60},"lastName":{"type":"string","minLength":1,"maxLength":60},"email":{"type":"string","maxLength":200,"format":"email","description":"Where the confirmation is sent; also needed to look up or cancel the booking"},"phone":{"type":"string","maxLength":30}},"required":["firstName","lastName","email"],"additionalProperties":false},"price":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false},"payAtHotel":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"e.g. Resort fee, City tax"},"amount":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["description","amount","currency"],"additionalProperties":false},"description":"Mandatory fees paid at the hotel on top of the price (e.g. resort fee). Always tell the user about these before booking. Empty when none."},"refundable":{"type":"boolean"},"freeCancellationUntil":{"description":"ISO date-time until which cancelling is free; null when not refundable","type":["string","null"]},"cancellationSummary":{"type":"string","description":"One sentence to show the user, e.g. 'Free cancellation until 12 Mar 2027, 23:59 UTC'"},"checkoutUrl":{"description":"Secure payment page for the user; only while status is pending_payment","type":["string","null"]},"checkoutExpiresAt":{"type":["string","null"]},"hotelConfirmationCode":{"type":["string","null"]},"refund":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}],"description":"Amount refunded after cancellation"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"nextStep":{"type":"string"}},"required":["bookingId","status","hotel","roomName","boardName","checkin","checkout","nights","adults","childrenAges","holder","price","payAtHotel","refundable","freeCancellationUntil","cancellationSummary","checkoutUrl","checkoutExpiresAt","hotelConfirmationCode","refund","createdAt","updatedAt","nextStep"],"additionalProperties":false},"GetBookingInput":{"type":"object","properties":{"bookingId":{"type":"string","pattern":"^bk_[A-Za-z0-9]{10,40}$","description":"Booking reference, e.g. bk_7Q2X9M4KT8"},"email":{"type":"string","format":"email","description":"The holder's email given at booking"}},"required":["bookingId","email"]},"GetBookingOutput":{"type":"object","properties":{"bookingId":{"type":"string","pattern":"^bk_[A-Za-z0-9]{10,40}$","description":"Booking reference, e.g. bk_7Q2X9M4KT8"},"status":{"type":"string","enum":["pending_payment","confirmed","cancelled","expired","failed"]},"hotel":{"type":"object","properties":{"hotelId":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]}},"required":["hotelId","name","address"],"additionalProperties":false},"roomName":{"type":"string"},"boardName":{"type":"string"},"checkin":{"type":"string","format":"date","description":"Date as YYYY-MM-DD"},"checkout":{"type":"string","format":"date","description":"Date as YYYY-MM-DD"},"nights":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adults":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"childrenAges":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"holder":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":60},"lastName":{"type":"string","minLength":1,"maxLength":60},"email":{"type":"string","maxLength":200,"format":"email","description":"Where the confirmation is sent; also needed to look up or cancel the booking"},"phone":{"type":"string","maxLength":30}},"required":["firstName","lastName","email"],"additionalProperties":false},"price":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false},"payAtHotel":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"e.g. Resort fee, City tax"},"amount":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["description","amount","currency"],"additionalProperties":false},"description":"Mandatory fees paid at the hotel on top of the price (e.g. resort fee). Always tell the user about these before booking. Empty when none."},"refundable":{"type":"boolean"},"freeCancellationUntil":{"description":"ISO date-time until which cancelling is free; null when not refundable","type":["string","null"]},"cancellationSummary":{"type":"string","description":"One sentence to show the user, e.g. 'Free cancellation until 12 Mar 2027, 23:59 UTC'"},"checkoutUrl":{"description":"Secure payment page for the user; only while status is pending_payment","type":["string","null"]},"checkoutExpiresAt":{"type":["string","null"]},"hotelConfirmationCode":{"type":["string","null"]},"refund":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}],"description":"Amount refunded after cancellation"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"nextStep":{"type":"string"}},"required":["bookingId","status","hotel","roomName","boardName","checkin","checkout","nights","adults","childrenAges","holder","price","payAtHotel","refundable","freeCancellationUntil","cancellationSummary","checkoutUrl","checkoutExpiresAt","hotelConfirmationCode","refund","createdAt","updatedAt","nextStep"],"additionalProperties":false},"CancelBookingInput":{"type":"object","properties":{"bookingId":{"type":"string","pattern":"^bk_[A-Za-z0-9]{10,40}$","description":"Booking reference, e.g. bk_7Q2X9M4KT8"},"email":{"type":"string","format":"email","description":"The holder's email given at booking"},"reason":{"type":"string","maxLength":300}},"required":["bookingId","email"]},"CancelBookingOutput":{"type":"object","properties":{"bookingId":{"type":"string","pattern":"^bk_[A-Za-z0-9]{10,40}$","description":"Booking reference, e.g. bk_7Q2X9M4KT8"},"status":{"type":"string","enum":["pending_payment","confirmed","cancelled","expired","failed"]},"hotel":{"type":"object","properties":{"hotelId":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]}},"required":["hotelId","name","address"],"additionalProperties":false},"roomName":{"type":"string"},"boardName":{"type":"string"},"checkin":{"type":"string","format":"date","description":"Date as YYYY-MM-DD"},"checkout":{"type":"string","format":"date","description":"Date as YYYY-MM-DD"},"nights":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adults":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"childrenAges":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"holder":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":60},"lastName":{"type":"string","minLength":1,"maxLength":60},"email":{"type":"string","maxLength":200,"format":"email","description":"Where the confirmation is sent; also needed to look up or cancel the booking"},"phone":{"type":"string","maxLength":30}},"required":["firstName","lastName","email"],"additionalProperties":false},"price":{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false},"payAtHotel":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"e.g. Resort fee, City tax"},"amount":{"type":"number"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["description","amount","currency"],"additionalProperties":false},"description":"Mandatory fees paid at the hotel on top of the price (e.g. resort fee). Always tell the user about these before booking. Empty when none."},"refundable":{"type":"boolean"},"freeCancellationUntil":{"description":"ISO date-time until which cancelling is free; null when not refundable","type":["string","null"]},"cancellationSummary":{"type":"string","description":"One sentence to show the user, e.g. 'Free cancellation until 12 Mar 2027, 23:59 UTC'"},"checkoutUrl":{"description":"Secure payment page for the user; only while status is pending_payment","type":["string","null"]},"checkoutExpiresAt":{"type":["string","null"]},"hotelConfirmationCode":{"type":["string","null"]},"refund":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","description":"Amount in the currency's major unit, e.g. 189.50"},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}],"description":"Amount refunded after cancellation"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"nextStep":{"type":"string"}},"required":["bookingId","status","hotel","roomName","boardName","checkin","checkout","nights","adults","childrenAges","holder","price","payAtHotel","refundable","freeCancellationUntil","cancellationSummary","checkoutUrl","checkoutExpiresAt","hotelConfirmationCode","refund","createdAt","updatedAt","nextStep"],"additionalProperties":false}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Optional partner key: higher rate limits."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Retry-safe key; the same key and body returns the first result."}},"responses":{"Error":{"description":"Error with an agent-readable nextStep","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"nextStep":{"type":"string"},"retryAfterSeconds":{"type":"integer"},"details":{}}}}}}}}}}}