ResytechResytech Docs

Installation & Setup

Install resytech.js via script tag 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://js.resytech.com/latest/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, data-resytech-equipment-id, or data-resytech-equipment attributes

Script Tag Data Attributes

AttributeRequiredDescription
data-resytech-location-idYesYour Resytech location UUID (see below)
data-resytech-base-urlYesBase URL of your booking platform (e.g. https://booking.yourdomain.com)
data-resytech-debugNoSet to "true" to enable console logging
data-resytech-ota-codeNoOTA attribution code, when embedding as an authorized partner. See OTA Partner Integration

Finding Your Location ID

To find your location UUID, log into the Resytech Dashboard, click your name in the top right corner, then go to Location Settings. Your location ID is displayed in the page header.

CDN

Load directly from the Resytech CDN. Choose a versioning strategy that fits your needs:

<!-- Pinned to exact version (recommended for production) -->
<script src="https://js.resytech.com/1.0.0/resytech.js"></script>

<!-- Major version — always gets the latest v1.x release (non-breaking updates only) -->
<script src="https://js.resytech.com/1/resytech.js"></script>

<!-- Latest — always the newest release -->
<script src="https://js.resytech.com/latest/resytech.js"></script>

Versioning Options

URL PatternExampleUpdatesBest For
/{major}.{minor}.{patch}/resytech.js/1.0.0/resytech.jsNever changesProduction sites that want full control over upgrades
/{major}/resytech.js/1/resytech.jsBug fixes and new features within the major versionProduction sites that want automatic non-breaking updates
/latest/resytech.js/latest/resytech.jsEvery release including major versionsDevelopment and testing only

The /latest URL can include breaking changes when a new major version is released. Use a pinned version or major version URL for production sites.

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