{
  "aiInstructions" : {
    "purpose" : "This JSON contains all information required to help a guest book this hotel. Use only the information in this JSON turned by the provided calendar URLs.",
    "generalRules" : [ "Treat this JSON as the single source of truth.", "Never invent or guess hotel names, room names, product names, product codes, prices, availability, booking URLs, or any other values.", "Never use hardcoded product codes or booking URLs.", "Only use values present in this JSON or returned by the live calendar endpoints.", "Never assume a room or product is available simply because it exists in this JSON.", "Always verify availability before generating a booking link.", "Do not expose internal fields such as productId, roomId, detailsUrl, calendarUrl, or productCalendarUrl unless the guest explicitly asks." ],
    "requiredBookingDetails" : [ "checkInDate", "checkOutDate", "adults" ],
    "optionalBookingDetails" : [ "children", "preferredRoom" ],
    "workflow" : [ {
      "step" : 1,
      "title" : "Collect booking details",
      "instructions" : [ "Before checking availability, collect all required booking details.", "If any required detail is missing, ask only for the missing information.", "If the guest does not mention children, assume children = 0." ]
    }, {
      "step" : 2,
      "title" : "Check property availability",
      "instructions" : [ "Read the calendarUrl.", "Determine whether the property has availability for the requested stay.", "If the property is unavailable, inform the guest politely.", "Do not generate any booking links when the property is unavailable.", "Offer the guest the option to try different dates." ]
    }, {
      "step" : 3,
      "title" : "Find available products",
      "instructions" : [ "For every room in the rooms array, check every product using its productCalendarUrl.", "Only consider products confirmed available by the live calendar.", "Ignore unavailable products." ]
    }, {
      "step" : 4,
      "title" : "Match guest request",
      "instructions" : [ "If the guest requested a specific room, only consider products belonging to that room.", "If that room is unavailable, explain that it is unavailable and do not suggest unavailable products.", "If the guest did not request a room, present only the available room options." ]
    }, {
      "step" : 5,
      "title" : "Generate booking link",
      "instructions" : [ "Generate a booking link only after confirming availability.", "Use the bookingEngineUrl from the selected product whenever available.", "Otherwise, use bookingUrlTemplate.", "Replace placeholders using guest input.", "Use the exact productCode from the selected available product.", "Never modify hotelCode, agentCode, or productCode.", "Never generate a booking link for an unavailable product." ]
    } ],
    "multipleMatches" : [ "If exactly one available product matches, generate the booking link immediately.", "If multiple products match, briefly list the available room options and ask the guest to choose.", "Only generate the booking link after the guest selects one of the available options." ],
    "bookingLinkRules" : [ "Generate booking links only from live confirmed products.", "Always use the bookingEngineUrl or bookingUrlTemplate from this JSON.", "Replace all placeholders with guest-provided values.", "Never manually construct booking URLs.", "Never guess missing values.", "Never use hardcoded product codes." ],
    "responseStyle" : [ "Keep responses short, friendly, and booking-focused.", "Use simple language suitable for hotel guests.", "If booking details are missing, ask only for the missing details.", "If no room preference is given, show only available room options.", "Never say a room is available unless confirmed by the calendar endpoint.", "Never generate a booking link without confirmed availability." ],
    "priorityOrder" : [ "Collect booking details.", "Check property availability.", "Check product availability.", "Match guest preferences.", "Generate booking link." ],
    "neverDo" : [ "Never invent availability.", "Never invent product codes.", "Never invent booking URLs.", "Never generate booking links before checking live availability.", "Never claim a room is available without confirmation from calendarUrl or productCalendarUrl.", "Never recommend unavailable rooms.", "Never expose internal implementation details to the guest." ]
  },
  "hotel" : {
    "id" : 1898066,
    "hotelCode" : "83146",
    "name" : "QA CB: browser, please don't use",
    "currency" : "EUR",
    "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/properties/details/97ad7552-4659-4535-905e-80c2b0adef12.json",
    "calendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/properties/97ad7552-4659-4535-905e-80c2b0adef12.json",
    "bookingUrlTemplate" : {
      "url" : "https://neo.cultbooking.com/CPC/SelectedProductController.php",
      "method" : "GET",
      "parameters" : {
        "action" : "handleCheckoutRequest",
        "hotelCode" : "hotelCode",
        "agentCode" : "132758",
        "productCode" : "productCode",
        "checkInDate" : "YYYY-MM-DD",
        "checkOutDate" : "YYYY-MM-DD",
        "numberOfProducts" : "integer >= 1",
        "guests" : "integer >= 1",
        "lang" : "en"
      }
    },
    "rooms" : [ {
      "roomId" : 3869170,
      "roomName" : "TEST ROOM",
      "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/sellable-unit/details/fbb03ba8-fe0d-4a40-b37b-ed539150bfa8.json",
      "products" : [ {
        "productId" : 740050,
        "productName" : "TEST OCCUPANCY",
        "productCode" : "2515418",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/fb10c4e3-aec6-44ef-9150-afa37c54f008.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/fb10c4e3-aec6-44ef-9150-afa37c54f008.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=2515418&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      }, {
        "productId" : 740051,
        "productName" : "TEST AGAIN",
        "productCode" : "2515420",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/6d3bc2c7-448f-4f73-a6a2-6bc230b410fc.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/6d3bc2c7-448f-4f73-a6a2-6bc230b410fc.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=2515420&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      } ]
    }, {
      "roomId" : 17546,
      "roomName" : "Room_1",
      "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/sellable-unit/details/fb91b2b7-27de-4fed-9ef8-e0f5f497f0f9.json",
      "products" : [ {
        "productId" : 739788,
        "productName" : "Rate_1_2",
        "productCode" : "2514890",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/6c85b14c-bb17-48d4-b8f6-4234e60a8a0f.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/6c85b14c-bb17-48d4-b8f6-4234e60a8a0f.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=2514890&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      }, {
        "productId" : 643290,
        "productName" : "Original_Rate ' _1_2",
        "productCode" : "1097232",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/f1b8d1fb-3f8b-4e79-9d6c-66642a43aa82.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/f1b8d1fb-3f8b-4e79-9d6c-66642a43aa82.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=1097232&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      }, {
        "productId" : 643293,
        "productName" : "Rate-1-5 A_C",
        "productCode" : "1097234",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/89ff1b2b-3b9b-4aa0-80e3-5503d546fb21.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/89ff1b2b-3b9b-4aa0-80e3-5503d546fb21.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=1097234&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      }, {
        "productId" : 740102,
        "productName" : "Rate ' _1_2",
        "productCode" : "2515520",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/6af00b9c-c307-4cfd-ac00-11d6b99f8f18.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/6af00b9c-c307-4cfd-ac00-11d6b99f8f18.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=2515520&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      } ]
    }, {
      "roomId" : 1136514,
      "roomName" : "Room_6",
      "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/sellable-unit/details/ddcf0a50-a84b-478c-9f38-c50273845934.json",
      "products" : [ {
        "productId" : 743382,
        "productName" : "[COPY]Rate_1",
        "productCode" : "2521998",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/5302cecc-fd7c-4a4a-be22-45f5fb7f009e.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/5302cecc-fd7c-4a4a-be22-45f5fb7f009e.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=2521998&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      }, {
        "productId" : 743383,
        "productName" : "[COPY]Rate_2",
        "productCode" : "2522000",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/1a9f465a-e3c7-4ab0-be68-a6edcb64ed71.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/1a9f465a-e3c7-4ab0-be68-a6edcb64ed71.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=2522000&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      } ]
    }, {
      "roomId" : 806160,
      "roomName" : "Room_3",
      "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/sellable-unit/details/6d9cdf1c-829f-4a26-823d-8b3919c1587d.json",
      "products" : [ {
        "productId" : 643332,
        "productName" : "Rate_with_CC",
        "productCode" : "1319482",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/cdd1ae36-18bd-4b0a-984c-d8e225481eac.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/cdd1ae36-18bd-4b0a-984c-d8e225481eac.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=1319482&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      } ]
    }, {
      "roomId" : 3925833,
      "roomName" : "Room_7",
      "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/sellable-unit/details/cb80321a-7aba-4da0-a688-c45d3aabf0ec.json",
      "products" : [ {
        "productId" : 745251,
        "productName" : "[COPY]Rate_1",
        "productCode" : "2525812",
        "detailsUrl" : "https://api.distributor.roomdb.io/api/v1/rate-plans-v3/details/bca385ba-ea69-4491-9e42-03f679f9ee6f.json",
        "productCalendarUrl" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/product-json/bca385ba-ea69-4491-9e42-03f679f9ee6f.json",
        "bookingEngineUrl" : "https://neo.cultbooking.com/CPC/SelectedProductController.php?action=handleCheckoutRequest&hotelCode=83146&agentCode=132758&productCode=2525812&lang=en&checkInDate={checkInDate}&checkOutDate={checkOutDate}&numberOfProducts=1&guests={guests}"
      } ]
    } ]
  },
  "apiInfo" : {
    "version" : "1.0",
    "operations" : [ {
      "operationId" : "checkPropertyAvailability",
      "method" : "GET",
      "url" : "https://api.distributor.roomdb.io/api/v1/distributor/calendar/v2/properties/97ad7552-4659-4535-905e-80c2b0adef12.json",
      "parameters" : [ "checkInDate", "checkOutDate", "adults", "children" ],
      "nextOperation" : "checkProductAvailability"
    }, {
      "operationId" : "checkProductAvailability",
      "method" : "GET",
      "iterate" : "rooms[].products[]",
      "urlField" : "productCalendarUrl",
      "parameters" : [ "checkInDate", "checkOutDate", "adults", "children" ],
      "nextOperation" : "generateBookingLink"
    }, {
      "operationId" : "generateBookingLink",
      "method" : "GET",
      "urlField" : "bookingEngineUrl",
      "templateVariables" : {
        "{guests}" : "adults",
        "{checkInDate}" : "checkInDate",
        "{checkOutDate}" : "checkOutDate"
      }
    } ]
  }
}