Seat Preevue developer docs

The hosted view (iframe)

Our page in your <iframe>: see the quickstart for the URL. This page covers the details.

The URL

https://assets.seatpreevue.com/embed/v1/?key=pk_live_…&venue=your-venue#{seatKey}

Your domains and your policy

Send us every domain whose pages frame the view. A page on any other domain gets a refused frame. Your policy's frame-src (or child-src) must allow https://assets.seatpreevue.com (CSP).

What visitors see

The view fills the frame. While loading, "Loading the view…"; then the messages if there's no view or a problem. Opened on its own, outside your page, the URL shows only a line of text.

Messages from the frame (optional)

The frame tells your page what happened with postMessage. Every message is an object with seatpreevue: 1 and a type:

type Other fields Means
ready version The view is set up and accepts show
load seat (as you asked), key (the seat shown) A seat's view is showing
unavailable seat, code No view for this seat
error seat (if any), code (invalid_key, origin_not_allowed, network, …) Couldn't load
close seat, reason (replace when another seat's view replaced it) A view was closed

Messages carry no URLs and nothing personal. Always check where one came from:

const SEATPREEVUE = 'https://assets.seatpreevue.com';
window.addEventListener('message', (e) => {
  if (e.origin !== SEATPREEVUE || e.source !== frame.contentWindow) return;
  const m = e.data;
  if (!m || m.seatpreevue !== 1) return;
  if (m.type === 'unavailable') hideSeatView(m.seat);
});

To change seat from your page, send show after ready:

frame.contentWindow.postMessage({ seatpreevue: 1, type: 'show', seat: 'stalls-n-23' }, SEATPREEVUE);

The frame only listens to, and only sends to, the page directly around it, which it learns from the browser. In Firefox that comes from the referrer: if your pages send no referrer, add referrerpolicy="origin" to the <iframe>, or no messages are exchanged there (views still show).

Troubleshooting

What you see Likely cause
A blank or refused frame The framing page's domain isn't registered with the key, or frame-src doesn't allow our host; a new key or domain can take a few minutes
"This seat view isn’t set up." No key, or the key isn't pasted whole
"This seat view isn’t available here." The key was refused (for example, revoked)