Integration guide

Bookyt JavaScript Widget

Embed Bookyt on any website with one JavaScript file. The loader creates the container and responsive iframe automatically, so no additional widget HTML or CSS is required.

Quick start

Replace YOUR_ACCOUNT with the account portion of your Bookyt subdomain and place the script where the widget should appear.

<script
  async
  src="https://widget.bookyt.de/embed.js"
  data-account="YOUR_ACCOUNT"
  data-view="calendar">
</script>

JavaScript-only integration

Use this version if your page builder accepts JavaScript but does not allow you to add a script tag directly.

window.BookytWidget = {
    account: 'YOUR_ACCOUNT',
    view: 'calendar',
    language: 'en'
};

var bookytScript = document.createElement('script');
bookytScript.src = 'https://widget.bookyt.de/embed.js';
bookytScript.async = true;
document.currentScript.after(bookytScript);

Widget options

Attribute Description
data-account Your Bookyt account name. Do not include a URL or access token.
data-view overview, occupancy, calendar, embed, item, categories, news, or locations.
data-language Optional override: de, fr, it, es, en, nl, pt, el, or tr. Omit it to use the automatically detected language.
data-category-id Optional category ID or comma-separated category IDs.
data-station-id Optional station ID or comma-separated station IDs.
data-target Optional CSS selector for an existing element that should contain the widget.

Development environment

For development and testing, replace the loader URL with https://devy-widget.phcom.de/embed.js. Production websites should always use https://widget.bookyt.de/embed.js.

Security

Never place a Bookyt access token in your HTML or JavaScript. Authentication uses one universal token stored only on the widget server. The loader automatically sends the origin of the embedding website, without its path or query string, with every Bookyt request.