Hosted Package

JavaScript API

Call Hosted Package methods after the script loads and send custom analytics events.

Call Hosted Package methods after the script loads and send custom analytics events. First, complete the installation.

JavaScript API

Use window.Tiquo.ready when you want to call the API after the script loads.

<script>
  window.Tiquo.ready(function (tiquo) {
    tiquo.track("booking_started", {
      eventName: "Booking Started",
      eventProperties: {
        source: "homepage"
      }
    });
  });
</script>

Available methods:

</>Interactive example

Hosted Package JavaScript API

Inspect every public method, grouped by authentication, customer data, catalogs, embeds, analytics, rendering, and consent.

Hover, tap, or focus an element to inspect its data attributes.

window.Tiquo

Complete public method set

Every available JavaScript method

27 fields

Run after load

Tiquo.ready(callback)

Track an event

Tiquo.track(eventType, options)

Identify a customer

Tiquo.identify(options)

Send a one-time code

Tiquo.sendOTP(email)

Verify a one-time code

Tiquo.verifyOTP(email, code)

Get the current customer

Tiquo.getUser()

Log out

Tiquo.logout()

Get orders

Tiquo.getOrders(options)

Get bookings

Tiquo.getBookings(options)

Cancel a booking

Tiquo.cancelBooking(bookingId)

Get reschedule options

Tiquo.getBookingRescheduleOptions(bookingId, options)

Reschedule a booking

Tiquo.rescheduleBooking(bookingId, data)

Get memberships

Tiquo.getMemberships()

Get upcoming bookings

Tiquo.getUpcomingBookings(options)

Get business policies

Tiquo.getPolicies()

Get one business policy

Tiquo.getPolicy(id)

Get flow services

Tiquo.getFlowServices(bookingConfigId)

Get calendar availability

Tiquo.getFlowAvailability(bookingConfigId, options)

Get one flow service

Tiquo.getFlowService(bookingConfigId, serviceId)

Get an iframe token

Tiquo.getIframeToken(customerFlowId, handoffVersion)

Embed a customer flow

Tiquo.embedCustomerFlow(flowUrl, container, options)

Embed a service booking

Tiquo.embedServiceBooking(bookingConfigId, serviceId, container, options)

Embed a membership

Tiquo.embedMembership(planId, container, options)

Render bound elements

Tiquo.render()

Watch authentication

Tiquo.onAuthStateChange(callback)

Set consent

Tiquo.setConsent(mode)

Get consent

Tiquo.getConsent()

Call methods inside Tiquo.ready when they depend on the Hosted Package being loaded.

The Hosted Package does not expose raw access or refresh token getters. For automatic submission and bubbling form events, use HTML form bindings. Calling a method directly leaves form feedback to your own code.

Guest invitations and passes

After customer sign-in, use the invitation helpers to build a guest-registration experience:

const { guestFlows } = await window.Tiquo.getGuestFlows();
const flow = await window.Tiquo.getGuestFlow('GUEST_FLOW_ID');
const { guestPasses } = await window.Tiquo.getGuestPasses();
const invitation = await window.Tiquo.getGuestInvitation(invitationToken);
// The signed-in guest accepts the invitation.
const accepted = await window.Tiquo.acceptGuestInvitation(invitationToken);

createGuestInvitations(input) accepts flowId, visitDate, optional locationId, and guests containing one UUID v4 token and guestFirstName per guest. Retain tokens when retrying an unchanged pending invitation. Share the returned inviteUrl and shareText.

Use requiresGuestPass to select the allowance: availableGuestPassQuantity for a limited flow, or maxGuestsPerSubmission otherwise. In limited mode, creating an invitation reserves a Guest Pass; staff registration consumes it.

getGuestFlows() is cached for the session. Creating or accepting an invitation refreshes it; otherwise use getGuestFlow(flowId) or getGuestFlows({ refresh: true }) for fresh data.

getGuestPasses() lists invitations, one per guest and visit. For how many Guest Passes or Access Passes the customer has left, use getPassBalances().

See Custom Guest Invitations for the end-to-end walkthrough (the method names are the same in both packages), Render Guest Pass invitations and Pass balances for the HTML attributes, and Guest Invitations and Passes for fields, errors, and retry rules.

On this page