ResytechResytech Docs

Installation & Setup

Install resytech.js via script tag, NPM, or CDN and configure it for your site.

Include the library directly in your HTML. Add data-resytech-* attributes to auto-initialize a ResytechClient instance:

<script
  src="https://static.resytech.com/js/resytech.js"
  data-resytech-location-id="YOUR_LOCATION_ID"
  data-resytech-base-url="https://booking.yourdomain.com"
  data-resytech-debug="true">
</script>

This automatically:

  1. Creates a ResytechClient instance with your configuration
  2. Exposes it as window.resytech
  3. Binds click handlers to any elements with data-resytech-activity-id or data-resytech-equipment-id attributes

Script Tag Data Attributes

AttributeRequiredDescription
data-resytech-location-idYesYour Resytech location UUID
data-resytech-base-urlYesBase URL of your booking platform (e.g. https://booking.yourdomain.com)
data-resytech-debugNoSet to "true" to enable console logging

NPM / ES Modules

Install from NPM:

npm install resytech-client-lib

Import the classes you need:

import { ResytechClient, ResytechApi, ResytechBlogRenderer } from 'resytech-client-lib';

const client = new ResytechClient({
  locationId: 'YOUR_LOCATION_ID',
  baseUrl: 'https://booking.yourdomain.com'
});

CDN

Load directly from the Resytech CDN:

<script src="https://static.resytech.com/js/resytech.js"></script>

If you omit the data-resytech-* attributes on the script tag, no auto-initialization occurs. You can then create instances manually in your own JavaScript.

Global Exports

When loaded via script tag, the library exposes these globals on window:

GlobalTypeDescription
window.ResytechClientClassThe booking widget class
window.ResytechApiClassThe API client class
window.ResytechBlogRendererClassThe blog renderer class
window.resytechInstanceAuto-initialized ResytechClient instance (only when data-resytech-location-id and data-resytech-base-url are set on the script tag)

Manual Initialization

If you prefer not to use auto-initialization, create a client instance yourself:

const client = new ResytechClient({
  locationId: 'YOUR_LOCATION_ID',
  baseUrl: 'https://booking.yourdomain.com',
  theme: {
    primaryColor: '#007bff',
    fontFamily: 'Inter, sans-serif'
  },
  debug: false
});

The ResytechApi client is configured separately:

const api = new ResytechApi({
  baseUrl: 'https://api.bookingui.com/v1',
  cmsBaseUrl: 'https://cms.bookingui.com',
  debug: true,
  timeout: 30000
});

Next Steps

On this page