Configuration
The widget is configured through an options object passed to the constructor:
let widget = new window.Sitata.entry(el, {
orgId: "<YOUR ORG ID>",
token: "<YOUR PUBLIC TOKEN>",
lang: "fr",
ui: { inputStyle: "filled" }
});
widget.run();
The first argument, el, is the mount target โ an HTMLElement or a CSS selector string.
Options
| Property | Type | Default | Description |
|---|---|---|---|
| orgId | String | โ | Required. Your organization's identifier. Sent as the Organization header. |
| token | String | โ | Required. Your organization's public authentication token. Sent as Authorization: PUB <token>. |
| apiBase | String | https://www.sitata.com/api/v2 | Override the REST API base URL. |
| lang | String | auto | Force the UI language (two-letter code, e.g. es). Otherwise a ?lang= URL parameter, then the browser language, then English is used. |
| ui.inputStyle | String | "outlined" | The style of the form inputs. One of outlined, filled, or standard. |
Supported languages: Arabic, Danish, German, English, Spanish, Finnish, French, Hungarian, Italian, Japanese, Dutch, Norwegian, Polish, Portuguese, Romanian, Swedish, and Simplified Chinese. Unsupported locales fall back to English.
info
The widget is deliberately simple. The traveller supplies their own trip details through the wizard, so there are no options to pre-populate origin, destination, nationality, or dates, and there are no display-toggle or callback options. If your integration needs any of these, let us know and we can look at adding them.
Events
The widget exposes a single lifecycle event:
| Event | Description |
|---|---|
| sitata:entryReady | Fired on document once the widget bundle has loaded and is ready to be instantiated. Initialize the widget inside a listener for this event. |
Environments
The loader and widget bundle are served from Sitata's own domain:
| Environment | Loader script |
|---|---|
| Production | https://www.sitata.com/widgets/entry.js |
| Staging | https://staging.sitata.com/widgets/entry.staging.js |
Point apiBase at the matching environment if you are testing against staging.