Prejsť na obsah

Widgets

Embeddable widgets

The widget object

Attributes

iduuid

Unique identifier

organization_iduuid
organizations.id

Identifier of the organization this widget is defined in

created_atread-onlytimestamp with time zone

Creation timestamp

updated_atread-onlytimestamp with time zone

Last modification timestamp

autocomplete_date_selectionboolean

Whether to autocomplete the date selection when only one date is available

currencyCurrency | null

Currency of the widget

date_visibilityWidgetDateVisibility

Which dates the calendar shows: all, hide-closed to hide closed dates, hide-unavailable to hide unavailable dates, or the deprecated custom to show selected months

enable_shopping_cartboolean

Whether guests can book multiple units at once

failure_urltext

URL to redirect to when a payment fails. __BOOKING_PAGE__ shows the guest page

fonttext | null

Font of the widget

ftsread-onlytsvector | null

Full text search index

initial_dateWidgetInitialDate

Initial date shown in the calendar

interactionChannelInteraction | null

What happens when a guest picks dates: book to book in the widget, or forward and forward-same-tab to open the listing URL in a new or the same tab

languageLanguage

Language of the widget

redirect_urltext | null

URL to redirect to after submitting a booking

settingsCalendarWidgetSettings | TimelineWidgetSettings | InventoryWidgetSettings | SearchWidgetSettings

Settings of the widget

show_booked_asShowBookedAs

How to show booked dates

show_bookingmood_brandingboolean

Whether to show the Bookingmood branding

show_closed_asShowClosedAs

How to show closed dates

show_complex_pricesboolean

Whether guests can inspect seasonal prices in the calendar

show_pastboolean

Whether to show past dates in the calendar

show_pending_asCalendarEventStatus

How to interpret pending events

show_reviewsboolean

Whether to show reviews

stay_expandedboolean

Whether the date-selection section should stay expanded after selecting dates

titletext

Title of the widget

type"calendar" | "timeline" | "inventory" | "search"

Type of the widget: calendar, timeline, inventory or search

visible_months[boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean] | null

Months that are visible in the calendar. Deprecated

Related resources

Embed related resources in the response with the select parameter, for example select=*,organizations!organization_id(*). Resources related through more than one column need the column as a hint, like table!column(*).

organizations!organization_id(*)object | null
organizations

The organization referenced by organization_id.

bookings(*)array
bookings

The bookings referencing this widget through bookings.widget_id.

widget_listings(*)array
widget_listings

The widget listings referencing this widget through widget_listings.widget_id.

The widget object
JSON
{
  "id": "00000000-0000-0000-0000-000000000000",
  "organization_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2026-10-30T23:39:58.169Z",
  "updated_at": "2026-10-30T23:39:58.169Z",
  "autocomplete_date_selection": false,
  "currency": "USD",
  "date_visibility": "all",
  "enable_shopping_cart": false,
  "failure_url": "__BOOKING_PAGE__",
  "font": "",
  "initial_date": "today",
  "interaction": "book",
  "language": "en-US",
  "redirect_url": "https://example.com",
  "settings": {},
  "show_booked_as": "unavailable",
  "show_bookingmood_branding": true,
  "show_closed_as": "unavailable",
  "show_complex_prices": true,
  "show_past": false,
  "show_pending_as": "TENTATIVE",
  "show_reviews": false,
  "stay_expanded": false,
  "title": "Summer cottage",
  "type": "calendar",
  "visible_months": [
    false
  ]
}
Including related resources
curl -X GET "https://api.bookingmood.com/v1/widgets?limit=10&select=*,organizations!organization_id(*),bookings(*)" \
  -H "Authorization: Bearer YOUR_API_KEY"

List widgets

Filters

idFilter<uuid>

Unique identifier

organization_idFilter<uuid>
organizations.id

Identifier of the organization this widget is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

autocomplete_date_selectionFilter<boolean>

Whether to autocomplete the date selection when only one date is available

currencyFilter<Currency | null>

Currency of the widget

date_visibilityFilter<WidgetDateVisibility>

Which dates the calendar shows: all, hide-closed to hide closed dates, hide-unavailable to hide unavailable dates, or the deprecated custom to show selected months

enable_shopping_cartFilter<boolean>

Whether guests can book multiple units at once

failure_urlFilter<text>

URL to redirect to when a payment fails. __BOOKING_PAGE__ shows the guest page

fontFilter<text | null>

Font of the widget

ftsFilter<tsvector | null>

Full text search index

initial_dateFilter<WidgetInitialDate>

Initial date shown in the calendar

interactionFilter<ChannelInteraction | null>

What happens when a guest picks dates: book to book in the widget, or forward and forward-same-tab to open the listing URL in a new or the same tab

languageFilter<Language>

Language of the widget

redirect_urlFilter<text | null>

URL to redirect to after submitting a booking

settingsFilter<CalendarWidgetSettings | TimelineWidgetSettings | InventoryWidgetSettings | SearchWidgetSettings>

Settings of the widget

show_booked_asFilter<ShowBookedAs>

How to show booked dates

show_bookingmood_brandingFilter<boolean>

Whether to show the Bookingmood branding

show_closed_asFilter<ShowClosedAs>

How to show closed dates

show_complex_pricesFilter<boolean>

Whether guests can inspect seasonal prices in the calendar

show_pastFilter<boolean>

Whether to show past dates in the calendar

show_pending_asFilter<CalendarEventStatus>

How to interpret pending events

show_reviewsFilter<boolean>

Whether to show reviews

stay_expandedFilter<boolean>

Whether the date-selection section should stay expanded after selecting dates

titleFilter<text>

Title of the widget

typeFilter<"calendar" | "timeline" | "inventory" | "search">

Type of the widget: calendar, timeline, inventory or search

visible_monthsFilter<[boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean] | null>

Months that are visible in the calendar. Deprecated

Responses

200

A list of widgets with the selected columns

206

Partial Content

400

The request is malformed, for example an unknown column or an invalid filter.

401

The API key is missing or invalid.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
GET /widgets
curl -X GET "https://api.bookingmood.com/v1/widgets?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T23:39:58.169Z",
    "updated_at": "2026-10-30T23:39:58.169Z",
    "autocomplete_date_selection": false,
    "currency": "USD",
    "date_visibility": "all",
    "enable_shopping_cart": false,
    "failure_url": "__BOOKING_PAGE__",
    "font": "",
    "initial_date": "today",
    "interaction": "book",
    "language": "en-US",
    "redirect_url": "https://example.com",
    "settings": {},
    "show_booked_as": "unavailable",
    "show_bookingmood_branding": true,
    "show_closed_as": "unavailable",
    "show_complex_prices": true,
    "show_past": false,
    "show_pending_as": "TENTATIVE",
    "show_reviews": false,
    "stay_expanded": false,
    "title": "Summer cottage",
    "type": "calendar",
    "visible_months": [
      false
    ]
  }
]

Create widgets

Body

Partial<Widget> | Array<Partial<Widget>>

Read-only attributes are set by the database and can't be written.

Responses

201

The newly created widgets with the selected columns

400

The request is malformed, for example an unknown column, an invalid filter or an invalid body.

401

The API key is missing or invalid.

403

The API key has no permission for this change, for example when writing rows of another organization.

409

The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
POST /widgets
curl -X POST "https://api.bookingmood.com/v1/widgets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "autocomplete_date_selection": false,
    "date_visibility": "all",
    "enable_shopping_cart": false,
    "failure_url": "__BOOKING_PAGE__",
    "initial_date": "today",
    "language": "en-US",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "settings": {},
    "show_booked_as": "unavailable",
    "show_bookingmood_branding": true,
    "show_closed_as": "unavailable",
    "show_complex_prices": true,
    "show_past": false,
    "show_pending_as": "TENTATIVE",
    "show_reviews": false,
    "stay_expanded": false,
    "title": "Summer cottage",
    "type": "calendar"
  }'
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T23:39:58.169Z",
    "updated_at": "2026-10-30T23:39:58.169Z",
    "autocomplete_date_selection": false,
    "currency": "USD",
    "date_visibility": "all",
    "enable_shopping_cart": false,
    "failure_url": "__BOOKING_PAGE__",
    "font": "",
    "initial_date": "today",
    "interaction": "book",
    "language": "en-US",
    "redirect_url": "https://example.com",
    "settings": {},
    "show_booked_as": "unavailable",
    "show_bookingmood_branding": true,
    "show_closed_as": "unavailable",
    "show_complex_prices": true,
    "show_past": false,
    "show_pending_as": "TENTATIVE",
    "show_reviews": false,
    "stay_expanded": false,
    "title": "Summer cottage",
    "type": "calendar",
    "visible_months": [
      false
    ]
  }
]

Delete widgets

Filters

Without filters, this request deletes all widgets you have access to. Always filter on at least one column, e.g. id=eq.{id}.

idFilter<uuid>

Unique identifier

organization_idFilter<uuid>
organizations.id

Identifier of the organization this widget is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

autocomplete_date_selectionFilter<boolean>

Whether to autocomplete the date selection when only one date is available

currencyFilter<Currency | null>

Currency of the widget

date_visibilityFilter<WidgetDateVisibility>

Which dates the calendar shows: all, hide-closed to hide closed dates, hide-unavailable to hide unavailable dates, or the deprecated custom to show selected months

enable_shopping_cartFilter<boolean>

Whether guests can book multiple units at once

failure_urlFilter<text>

URL to redirect to when a payment fails. __BOOKING_PAGE__ shows the guest page

fontFilter<text | null>

Font of the widget

ftsFilter<tsvector | null>

Full text search index

initial_dateFilter<WidgetInitialDate>

Initial date shown in the calendar

interactionFilter<ChannelInteraction | null>

What happens when a guest picks dates: book to book in the widget, or forward and forward-same-tab to open the listing URL in a new or the same tab

languageFilter<Language>

Language of the widget

redirect_urlFilter<text | null>

URL to redirect to after submitting a booking

settingsFilter<CalendarWidgetSettings | TimelineWidgetSettings | InventoryWidgetSettings | SearchWidgetSettings>

Settings of the widget

show_booked_asFilter<ShowBookedAs>

How to show booked dates

show_bookingmood_brandingFilter<boolean>

Whether to show the Bookingmood branding

show_closed_asFilter<ShowClosedAs>

How to show closed dates

show_complex_pricesFilter<boolean>

Whether guests can inspect seasonal prices in the calendar

show_pastFilter<boolean>

Whether to show past dates in the calendar

show_pending_asFilter<CalendarEventStatus>

How to interpret pending events

show_reviewsFilter<boolean>

Whether to show reviews

stay_expandedFilter<boolean>

Whether the date-selection section should stay expanded after selecting dates

titleFilter<text>

Title of the widget

typeFilter<"calendar" | "timeline" | "inventory" | "search">

Type of the widget: calendar, timeline, inventory or search

visible_monthsFilter<[boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean] | null>

Months that are visible in the calendar. Deprecated

Responses

200

The deleted widgets with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.

400

The request is malformed, for example an unknown column or an invalid filter.

401

The API key is missing or invalid.

403

The API key has no permission for this change, for example when writing rows of another organization.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
DELETE /widgets
curl -X DELETE "https://api.bookingmood.com/v1/widgets?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T23:39:58.169Z",
    "updated_at": "2026-10-30T23:39:58.169Z",
    "autocomplete_date_selection": false,
    "currency": "USD",
    "date_visibility": "all",
    "enable_shopping_cart": false,
    "failure_url": "__BOOKING_PAGE__",
    "font": "",
    "initial_date": "today",
    "interaction": "book",
    "language": "en-US",
    "redirect_url": "https://example.com",
    "settings": {},
    "show_booked_as": "unavailable",
    "show_bookingmood_branding": true,
    "show_closed_as": "unavailable",
    "show_complex_prices": true,
    "show_past": false,
    "show_pending_as": "TENTATIVE",
    "show_reviews": false,
    "stay_expanded": false,
    "title": "Summer cottage",
    "type": "calendar",
    "visible_months": [
      false
    ]
  }
]

Update widgets

Filters

Without filters, this request updates all widgets you have access to. Always filter on at least one column, e.g. id=eq.{id}.

idFilter<uuid>

Unique identifier

organization_idFilter<uuid>
organizations.id

Identifier of the organization this widget is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

autocomplete_date_selectionFilter<boolean>

Whether to autocomplete the date selection when only one date is available

currencyFilter<Currency | null>

Currency of the widget

date_visibilityFilter<WidgetDateVisibility>

Which dates the calendar shows: all, hide-closed to hide closed dates, hide-unavailable to hide unavailable dates, or the deprecated custom to show selected months

enable_shopping_cartFilter<boolean>

Whether guests can book multiple units at once

failure_urlFilter<text>

URL to redirect to when a payment fails. __BOOKING_PAGE__ shows the guest page

fontFilter<text | null>

Font of the widget

ftsFilter<tsvector | null>

Full text search index

initial_dateFilter<WidgetInitialDate>

Initial date shown in the calendar

interactionFilter<ChannelInteraction | null>

What happens when a guest picks dates: book to book in the widget, or forward and forward-same-tab to open the listing URL in a new or the same tab

languageFilter<Language>

Language of the widget

redirect_urlFilter<text | null>

URL to redirect to after submitting a booking

settingsFilter<CalendarWidgetSettings | TimelineWidgetSettings | InventoryWidgetSettings | SearchWidgetSettings>

Settings of the widget

show_booked_asFilter<ShowBookedAs>

How to show booked dates

show_bookingmood_brandingFilter<boolean>

Whether to show the Bookingmood branding

show_closed_asFilter<ShowClosedAs>

How to show closed dates

show_complex_pricesFilter<boolean>

Whether guests can inspect seasonal prices in the calendar

show_pastFilter<boolean>

Whether to show past dates in the calendar

show_pending_asFilter<CalendarEventStatus>

How to interpret pending events

show_reviewsFilter<boolean>

Whether to show reviews

stay_expandedFilter<boolean>

Whether the date-selection section should stay expanded after selecting dates

titleFilter<text>

Title of the widget

typeFilter<"calendar" | "timeline" | "inventory" | "search">

Type of the widget: calendar, timeline, inventory or search

visible_monthsFilter<[boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean] | null>

Months that are visible in the calendar. Deprecated

Body

Partial<Widget>

Read-only attributes are set by the database and can't be written.

Responses

200

The updated widgets with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.

400

The request is malformed, for example an unknown column, an invalid filter or an invalid body.

401

The API key is missing or invalid.

403

The API key has no permission for this change, for example when writing rows of another organization.

409

The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
PATCH /widgets
curl -X PATCH "https://api.bookingmood.com/v1/widgets?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "autocomplete_date_selection": false
  }'
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T23:39:58.169Z",
    "updated_at": "2026-10-30T23:39:58.169Z",
    "autocomplete_date_selection": false,
    "currency": "USD",
    "date_visibility": "all",
    "enable_shopping_cart": false,
    "failure_url": "__BOOKING_PAGE__",
    "font": "",
    "initial_date": "today",
    "interaction": "book",
    "language": "en-US",
    "redirect_url": "https://example.com",
    "settings": {},
    "show_booked_as": "unavailable",
    "show_bookingmood_branding": true,
    "show_closed_as": "unavailable",
    "show_complex_prices": true,
    "show_past": false,
    "show_pending_as": "TENTATIVE",
    "show_reviews": false,
    "stay_expanded": false,
    "title": "Summer cottage",
    "type": "calendar",
    "visible_months": [
      false
    ]
  }
]

Prevezmite kontrolu nad svojimi rezerváciami. Vybudujte si vlastné podnikanie.

Pridajte sa k 1200+ nezávislým prevádzkovateľom rekreačných ubytovaní, ktorí využívajú Bookingmood na zvýšenie počtu priamych rezervácií a budovanie pevnejších vzťahov s hosťami.

Začnite svoju bezplatnú 14-dňovú skúšobnú verziu