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, booking_button, availability, featured, occupancy, occupancy_calendar, calendar, embed, item, categories, news, or locations. |
data-language |
Optional override: de, fr, it, es, en, nl, pt, pl, 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-resource-id |
Optional vehicle ID to fix in the occupancy calendar; its selector is hidden. |
data-target |
Optional CSS selector for an existing element that should contain the widget. |
Compact conversion views
Use booking_button for a direct booking action, availability for a compact live date check, and featured for selected rental categories. Location and category values can be preselected with data-station-id and data-category-id.
<script
async
src="https://widget.bookyt.de/embed.js"
data-account="YOUR_ACCOUNT"
data-view="availability"
data-station-id="1"
data-category-id="4">
</script>
Vehicle occupancy calendar and booking
Use occupancy_calendar (alias belegungskalender) to show a classic month calendar for each vehicle without asking for a rental duration first. Free, occupied and partially occupied days are marked. Visitors can select pickup and return dates and times, then continue to Bookyt booking. Bookyt checks the final availability and rental rules in the booking flow.
<script
async
src="https://widget.bookyt.de/embed.js"
data-account="YOUR_ACCOUNT"
data-view="occupancy_calendar"
data-station-id="1"
data-category-id="4">
</script>
In this occupancy-calendar view, a single explicit data-station-id, data-category-id or data-resource-id fixes that value and hides its selector. The equivalent JavaScript options are stationId, categoryId and resourceId. A selector also hides automatically when only one matching option is available.
Comma-separated location or category IDs retain a choice when more than one option remains. The other selectors adapt dynamically. Hidden values remain active for the calendar and period checks; the selected location, category and period are still handed off to booking. Unlike the resource table occupancy, this view respects category filters.
The calendar shows individual vehicles. The booking frontend receives the selected category and rental interval; the final vehicle assignment is checked in the booking flow. Pickup and return times follow the account configuration.
The occupancy feed covers today through the next year. Dates outside that confirmed window cannot be selected. Reservations without an assigned vehicle are checked by the booking frontend when final availability is verified.
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.