{"openapi":"3.1.0","info":{"title":"SiteMinder Book Direct API (Bowmark)","version":"e833508f87ff","description":"Guest booking widget for SiteMinder partner hotels — check availability, rates and start bookings.\n\nEvery function Bowmark has for SiteMinder Book Direct (direct-book.com) as one HTTP call. Each runs on Bowmark's infrastructure with the same billing, rules and response envelope as `POST /v1/run`. The whole API: https://api.bowmark.ai/openapi.json. Guide: https://bowmark.ai/docs/api.","contact":{"email":"support@bowmark.ai","url":"https://bowmark.ai/docs/api"}},"servers":[{"url":"https://api.bowmark.ai"}],"security":[{"bearer":[]},{"apiKeyHeader":[]}],"paths":{"/v1/sites/direct_book/findProperty":{"post":{"operationId":"findProperty","summary":"Finds a SiteMinder Book Direct hotel from its booking link, a bare channel code, or the hotel's own website (which links its booking engine), and returns the channelCode every other direct_book functi","description":"Finds a SiteMinder Book Direct hotel from its booking link, a bare channel code, or the hotel's own website (which links its booking engine), and returns the channelCode every other direct_book function takes, the numeric property id, name and website.\n\nCalls `bowmark.providers.direct_book.findProperty`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookPropertyRef>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/FindPropertyArgs","description":"TypeScript: `FindPropertyArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/getProperty":{"post":{"operationId":"getProperty","summary":"Returns one hotel's profile: description, star rating, address with coordinates and directions, phone and email, amenities, parking and photos.","description":"Returns one hotel's profile: description, star rating, address with coordinates and directions, phone and email, amenities, parking and photos.\n\nCalls `bowmark.providers.direct_book.getProperty`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookProperty>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/PropertyArgs","description":"TypeScript: `PropertyArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/getPolicies":{"post":{"operationId":"getPolicies","summary":"Returns a hotel's booking policies as plain text — cancellation, deposit, check-in and check-out, child and pet terms, as the hotel wrote them — plus any taxes it adds and a link to its policies page.","description":"Returns a hotel's booking policies as plain text — cancellation, deposit, check-in and check-out, child and pet terms, as the hotel wrote them — plus any taxes it adds and a link to its policies page.\n\nCalls `bowmark.providers.direct_book.getPolicies`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookPolicies>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/PropertyArgs","description":"TypeScript: `PropertyArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/listRoomTypes":{"post":{"operationId":"listRoomTypes","summary":"Lists a hotel's room types with ids, names, category, beds, size, occupancy, amenities, photos and the rate plans sold on each, optionally only those bookable for given dates.","description":"Lists a hotel's room types with ids, names, category, beds, size, occupancy, amenities, photos and the rate plans sold on each, optionally only those bookable for given dates.\n\nCalls `bowmark.providers.direct_book.listRoomTypes`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookRoomTypeList>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListRoomTypesArgs","description":"TypeScript: `ListRoomTypesArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/checkAvailability":{"post":{"operationId":"checkAvailability","summary":"Checks which room types a hotel has free for a check-in and check-out date and party size, with the lowest total price for each — roomTypeId matches listRoomTypes — optionally in another currency or w","description":"Checks which room types a hotel has free for a check-in and check-out date and party size, with the lowest total price for each — roomTypeId matches listRoomTypes — optionally in another currency or with a promo code.\n\nCalls `bowmark.providers.direct_book.checkAvailability`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookAvailability>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/CheckAvailabilityArgs","description":"TypeScript: `CheckAvailabilityArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/getRoomRates":{"post":{"operationId":"getRoomRates","summary":"Prices every rate plan sold on one room type for given dates and party — name, description, meals, occupancy limits, cancellation and deposit policy, rooms left, total and nightly breakdown — so a cal","description":"Prices every rate plan sold on one room type for given dates and party — name, description, meals, occupancy limits, cancellation and deposit policy, rooms left, total and nightly breakdown — so a caller can choose the roomRateId to book.\n\nCalls `bowmark.providers.direct_book.getRoomRates`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookRoomRates>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetRoomRatesArgs","description":"TypeScript: `GetRoomRatesArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/checkPromoCode":{"post":{"operationId":"checkPromoCode","summary":"Checks whether a hotel accepts a promo code — valid or not, its headline and description, the stay dates it covers, and whether it applies to a given check-in and check-out.","description":"Checks whether a hotel accepts a promo code — valid or not, its headline and description, the stay dates it covers, and whether it applies to a given check-in and check-out. Pass the code to checkAvailability or getRoomRates as promocode to see the discounted price.\n\nCalls `bowmark.providers.direct_book.checkPromoCode`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookPromoCheck>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/CheckPromoCodeArgs","description":"TypeScript: `CheckPromoCodeArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/listExtras":{"post":{"operationId":"listExtras","summary":"Lists the add-ons a hotel sells with a stay — breakfast, parking, an extra bed, a pet fee — with how each is charged, adult and child prices, whether it is mandatory, and the roomRateIds it can be add","description":"Lists the add-ons a hotel sells with a stay — breakfast, parking, an extra bed, a pet fee — with how each is charged, adult and child prices, whether it is mandatory, and the roomRateIds it can be added to. Empty when the hotel sells none.\n\nCalls `bowmark.providers.direct_book.listExtras`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookExtras>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListExtrasArgs","description":"TypeScript: `ListExtrasArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/getReservation":{"post":{"operationId":"getReservation","summary":"Reads a guest's existing booking from the reservation code in their confirmation email — dates, rooms and rates, guest name, totals, deposit and balance due, policies, and whether the guest may cancel","description":"Reads a guest's existing booking from the reservation code in their confirmation email — dates, rooms and rates, guest name, totals, deposit and balance due, policies, and whether the guest may cancel online.\n\nCalls `bowmark.providers.direct_book.getReservation`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookReservation>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetReservationArgs","description":"TypeScript: `GetReservationArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/initiateBooking":{"post":{"operationId":"initiateBooking","summary":"Starts a booking for one rate on given dates and party: validates the cart with the hotel and returns the priced cart (total, deposit, nights) and the checkout link the guest finishes on, as `checkout","description":"Starts a booking for one rate on given dates and party: validates the cart with the hotel and returns the priced cart (total, deposit, nights) and the checkout link the guest finishes on, as `checkout`: a handoff URL that carries the dates, party and rate (or `unavailable` with the hotel's reason). Never sends guest or card details and books nothing.\n\nCalls `bowmark.providers.direct_book.initiateBooking`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookBookingStart>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/InitiateBookingArgs","description":"TypeScript: `InitiateBookingArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/cancelReservation":{"post":{"operationId":"cancelReservation","summary":"Cancels a guest's booking by its reservation code from the confirmation email — globally unique, so no property is needed.","description":"Cancels a guest's booking by its reservation code from the confirmation email — globally unique, so no property is needed. Returns the updated booking, including whether the hotel still allows the guest to cancel it and any refusal the hotel attaches (e.g. a non-refundable rate past its cutoff).\n\nCalls `bowmark.providers.direct_book.cancelReservation`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookCancelledReservation>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/CancelReservationArgs","description":"TypeScript: `CancelReservationArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/direct_book/sendEnquiry":{"post":{"operationId":"sendEnquiry","summary":"Sends a question to a hotel through its booking page's contact form.","description":"Sends a question to a hotel through its booking page's contact form. The site guards this form with an invisible reCAPTCHA v3 check this provider cannot pass, so it returns the site's own refusal (status/message) rather than a delivered enquiry — reached and refused, not a working send yet.\n\nCalls `bowmark.providers.direct_book.sendEnquiry`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<DirectBookEnquiryResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SendEnquiryArgs","description":"TypeScript: `SendEnquiryArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your Bowmark API key."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Bowmark-Key"}},"responses":{"NotFound":{"description":"No such site or function.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}},"schemas":{"RunEnvelope":{"type":"object","description":"What a run returns. `status` says whether the SCRIPT succeeded. A script that threw or paused for a login is still HTTP 200. Branch on `status`, not on the HTTP code.","required":["ok","status","result","logs","error","ms"],"properties":{"runId":{"type":"string","description":"Stable id for this run. Quote it in a support or `report` message."},"ok":{"type":"boolean","description":"False only when the run produced nothing usable."},"status":{"type":"string","enum":["ok","error","partial","needs_user"],"description":"`partial`: the result is real but some calls failed (see `incomplete`); `ok` stays true. `needs_user`: a person must sign in to a site first. Relay `meta.handoff.url` to them, then run again."},"egress":{"type":"string","enum":["default","link"],"description":"The egress the run was given, present only when the request asked for one. `link`: every request went through the caller's own Chrome (Bowmark Buddy)."},"result":{"description":"Whatever the script `return`ed. Any JSON value."},"logs":{"type":"array","items":{"type":"string"},"description":"Lines the script wrote with `log(...)`."},"error":{"type":["string","null"],"description":"Why the run failed, in plain words. Null on success."},"ms":{"type":"integer","description":"How long the script itself ran, in milliseconds."},"queuedMs":{"type":"integer","description":"How long the run waited for a worker before starting. Present only when it was a second or more."},"needs":{"type":"array","description":"The sign-ins this script is waiting on. Present when `status` is `needs_user`.","items":{"type":"object","required":["capability","provider","providerTitle","kind"],"properties":{"capability":{"type":"string"},"provider":{"type":"string"},"providerTitle":{"type":"string","description":"The site's name, to show a person."},"kind":{"type":"string"}}}},"incomplete":{"type":"object","description":"Present only when `status` is `partial`: which calls did not answer.","properties":{"summary":{"type":"string"},"totalCalls":{"type":"integer"}},"additionalProperties":true},"emptyHanded":{"type":"object","description":"Present when the script returned nothing while its calls returned rows, usually a filter that matched none of the site's own labels. Lists the label values the calls actually returned.","additionalProperties":true},"notes":{"type":"array","description":"Caveats a call attached to a complete answer. Never changes `status`.","items":{"type":"object","properties":{"path":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}}}},"meta":{"type":"object","properties":{"handoff":{"type":"object","description":"A single-use sign-in link for a person to open. Expires at `expiresAt`.","properties":{"ref":{"type":"string"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},"concurrency":{"type":"object","description":"On a 429: how many runs are in flight and when to retry.","properties":{"limit":{"type":"integer"},"inFlight":{"type":"integer"},"retryAfterSeconds":{"type":"integer"}}}},"additionalProperties":true},"notice":{"type":"object","description":"Set when the account owner has not accepted the current Terms. Relay it to them.","additionalProperties":true}}},"CancelReservationArgs":{"type":"object","properties":{"reservationCode":{"type":"string"}},"required":["reservationCode"],"additionalProperties":true},"CheckAvailabilityArgs":{"type":"object","properties":{"property":{"type":"string"},"checkIn":{"type":"string"},"checkOut":{"type":"string"},"adults":{"type":"number"},"children":{"type":"number"},"infants":{"type":"number"},"currencyTo":{"type":"string"},"promocode":{"type":"string"}},"required":["property","checkIn","checkOut","adults"],"additionalProperties":true},"CheckPromoCodeArgs":{"type":"object","properties":{"property":{"type":"string"},"promocode":{"type":"string"},"checkIn":{"type":"string"},"checkOut":{"type":"string"}},"required":["property","promocode"],"additionalProperties":true},"FindPropertyArgs":{"type":"object","properties":{"property":{"type":"string"}},"required":["property"],"additionalProperties":true},"GetReservationArgs":{"type":"object","properties":{"property":{"type":"string"},"reservationCode":{"type":"string"}},"required":["property","reservationCode"],"additionalProperties":true},"GetRoomRatesArgs":{"type":"object","properties":{"property":{"type":"string"},"checkIn":{"type":"string"},"checkOut":{"type":"string"},"adults":{"type":"number"},"children":{"type":"number"},"infants":{"type":"number"},"currencyTo":{"type":"string"},"promocode":{"type":"string"},"roomTypeId":{"type":"string"}},"required":["property","checkIn","checkOut","adults","roomTypeId"],"additionalProperties":true},"InitiateBookingArgs":{"type":"object","properties":{"property":{"type":"string"},"roomRateId":{"type":"string"},"checkIn":{"type":"string"},"checkOut":{"type":"string"},"adults":{"type":"number"},"children":{"type":"number"},"infants":{"type":"number"},"currencyTo":{"type":"string"},"promocode":{"type":"string"}},"required":["property","roomRateId","checkIn","checkOut","adults"],"additionalProperties":true},"ListExtrasArgs":{"type":"object","properties":{"property":{"type":"string"},"checkIn":{"type":"string"},"checkOut":{"type":"string"},"currency":{"type":"string"}},"required":["property","checkIn","checkOut"],"additionalProperties":true},"ListRoomTypesArgs":{"type":"object","properties":{"property":{"type":"string"},"checkIn":{"type":"string"},"checkOut":{"type":"string"}},"required":["property"],"additionalProperties":true},"PropertyArgs":{"type":"object","properties":{"property":{"type":"string"}},"required":["property"],"additionalProperties":true},"SendEnquiryArgs":{"type":"object","properties":{"property":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"message":{"type":"string"},"phone":{"type":"string"}},"required":["property","name","email","message"],"additionalProperties":true}}}}