Seat Preevue developer docs

Criterion

For the developers of a Criterion booking site. Your page knows the facility, the production and the seat the visitor chose; one script gives it a small API to show that seat's view.

1. The script tag

<script src="https://assets.seatpreevue.com/sdk/v1/seatpreevue-criterion.js?facilityId=1234&amp;productionId=5678"></script>

The IDs can also come from an object the page sets before the script loads (window.SeatPreevueCriterion = { facilityId, productionId }), or later from configure().

2. The API

The script defines window.SeatPreevueCriterion as soon as it loads:

Call Does
configure({ facilityId, productionId }) Sets the page's facts; the next view uses them (a single-page app moving to another production). null or '' clears one
show(seatCode) Opens our view for an application seat code, in a window over your page. Resolves once it's open; never rejects
previewUrl(seatCode) A signed preview image URL for the seat, or undefined when there's none (for a thumbnail)
close() Closes the view, if open
seatElement.addEventListener('click', () => SeatPreevueCriterion.show(seat.code));

Seat codes are sent as you have them; we map them to our seats on our side.

3. Register your domain

Send us the address of a seat-selection page on your live site (and any staging site).

4. Messages and CSP

See Errors and messages and CSP (Mode A, with 'unsafe-inline' in style-src). Nothing here throws into your page.