Seat Preevue developer docs

Venue data

How we describe your venues, so a seat on your booking page finds its view. We set your venues up and keep them up to date; this page explains what we hold, what we need from you, and how to check a seat yourself. The record's full schema is VenueRecord in the API reference.

What a venue is

A venue is one auditorium or space: a main house and its studio are two venues. Each has an id such as ven_XXXXXXXXXXXXXXXX, belongs to one partner, and holds:

Part What it is
Imagery sets The views for the venue, one set per layout of the room (default, and for example cabaret or with-surtitles). A set is published once and never changed; new photography is a new set.
Aliases The names your ticketing platform or page uses for the venue, so a session can find it.
Layout rules How the right set is chosen for a performance, from facts your platform knows.
Plan maps For platforms that name seats by id (Spektrix's Seat Picker): each seating plan's areas.
Seat-key rules How a seat's section, row and number become the name of its view, its seat key.
Named views Views that aren't a seat, such as a bench or a standing area.

Your secret key can read your venue records (GET /manage/venues), and test them (below). Changes usually go through us: tell us what's changed, and we update the record.

Aliases: how your page finds its venue

Your page or script sends a context when it starts a session: the platform it's on and a venueRef, the name the platform uses for the venue. We look venueRef up among your venue's aliases, only ever within the venues your key may use. A venue id (ven_…) is also accepted as venueRef, on any platform.

There are two kinds of alias:

The alias types tried, in order, for each platform:

platform Tried in order
spektrix spektrixVenue, spektrixClient, legacyKey
tessitura tessituraVenue, origin, legacyKey
syos origin, legacyKey
criterion criterionFacility, legacyKey
tixly tixlyVenue, legacyKey
lineup, atg, atlas, other other, legacyKey
none (the older initSeatPreevue script) legacyKey, legacyBaseUrl, origin

An alias can also pin an imagery set: one name for "the main house in cabaret layout", say. A venueRef that matches nothing is 404 venue_not_found; an alias another venue already holds is 409 alias_conflict (see Errors).

Layouts: which imagery set a performance gets

Many rooms have more than one layout (a cabaret night, a thrust stage, surtitles). Each layout is an imagery set of the same venue, so the same seat name can show a different view in each. For each session the set is chosen in this order:

  1. context.imagerySet, if your page names a set;
  2. the set an alias pins;
  3. the seating plan's set (below);
  4. the venue's layout rules;
  5. otherwise default.

Layout rules decide from facts your platform knows, so a new layout is a change to your venue's data, never a script release. The ready-made scripts collect the facts their platform exposes: event attributes, sections, visible labels, zones, the seat map's mapId, and a productionId. A rule's conditions must all hold (an attribute equals a value; the sections include a list; labels or sections match a pattern; a zone; a map; a production), and the first rule that matches wins.

Some facts cost a request to collect, so they're asked for only when a rule needs them: the session answers layout: { status: "pending", needs: [...] } with the default set meanwhile, the script collects what's listed and extends the session, and the view switches if the answer changes. A fact the script couldn't get is reported as unavailable, and rules that need it are skipped.

Seating plans and area maps

Spektrix's new Seat Picker names seats by id rather than by name. For each seat it passes seatInfo, seven fields: venueId, planId, areaId, seatId, rowName, seatNo and seatName. The ids are 33 characters: digits, then A, then capital letters (1234AXXXX…).

Every seating plan has its own area and seat ids. A plan copied from another, even on the same venue, shares none with it. So a venue holds a map per plan under maps, keyed by the plan's planId:

"maps": {
  "1234AXXXX…": {
    "label": "Main house",
    "imagerySet": "default",
    "areaRefs": {
      "5678AXXXX…": { "section": "Stalls" },
      "9012AXXXX…": { "section": "Dress Circle" }
    },
    "seatRefs": {}
  }
}

Seat keys

A seat key is the name of one seat's view within an imagery set, such as dress-circle-e-20. Your page sends what it knows about the seat as tokens (section, row, seat, area, label, suffix and others; on the Seat Picker, areaRef and seatRef as well), and the venue's seat-key rules turn them into a key:

  1. A seatRef listed for the seat is tried first; an areaRef is looked up in the plan's map, then the venue's.
  2. Each token is normalised (by default lowercased, with anything not a letter or digit becoming -), and characters such as a leading * can be trimmed.
  3. Section names can be aliased (Grand Circle Boxes → boxes), and sections, rows, seats or whole keys remapped.
  4. The venue's templates are tried in order, such as {section}-{row}-{seat}, then {row}-{seat}; a template whose tokens are missing is skipped.
  5. The first candidate the set's manifest lists wins. No match means "no view for this seat", never a broken viewer.
Tokens in Venue's rules Seat key
section "Dress Circle", row "E", seat "20" template {section}-{row}-{seat} dress-circle-e-20
area "*Dress Circle", row "A", seat "1", suffix "restricted" trim *, remove spaces from areas; {area}-{row}-{seat}-{suffix} first dresscircle-a-1-restricted
section "Stalls", row "C", seat "5" every section aliased to studio studio-c-5
label "MEZ-BB101" template {label} mez-bb101

SeatPreevue.resolveSeatKey(tokens) gives the same answer in a page (Quickstart: core).

Unmapped plans and areas: what visitors see

Case What visitors see
A plan we haven't mapped (the venue has plan maps, and this plan isn't one of them) With our script in your page header, the Seat Picker's "Check the view from seat" button stays hidden for that plan. Without it, a click gets the venue's default set, which may not match the plan. The session says planServed: false.
An area we haven't mapped (in neither the plan's map nor the venue's) "No view for this seat yet." The seat's result says unmapped: "area".
A seat with no view in the set "No view for this seat yet."
A space with no views at all "Seat views aren't available for this space."

We're told about unmapped plans and areas each day, and map them. A new or copied seating plan is the usual cause, so tell us before it goes on sale. If a venue's button must stay visible meanwhile, we can switch page-start off for the venue: the button then shows on every seat, as with the Seat Picker's setting alone (Spektrix).

What to send us

Never send keys, customer data or passwords. A seat's ids are fine: they name a seat, not a person.

Checking a mapping

With your secret key, POST /manage/venues/{venueId}/seat-keys/test runs a venue's layout and seat-key rules on up to 200 seats, without a session. Send the context your page would send and the seats as tokens, keys or named views (API reference):

curl -X POST "https://connect.seatpreevue.com/v1/manage/venues/ven_XXXXXXXXXXXXXXXX/seat-keys/test" \
  -H "Authorization: Bearer sk_live_…" -H "Content-Type: application/json" \
  -d '{
    "context": { "platform": "spektrix", "mapId": "1234AXXXX…" },
    "seats": [
      { "tokens": { "areaRef": "5678AXXXX…", "row": "E", "seat": "20" } },
      { "tokens": { "section": "Dress Circle", "row": "E", "seat": "20" } }
    ]
  }'
{
  "venueId": "ven_XXXXXXXXXXXXXXXX",
  "imagerySet": "default",
  "layout": { "status": "resolved" },
  "manifest": true,
  "results": [
    { "matched": true, "key": "stalls-e-20", "candidates": ["stalls-e-20", "e-20"] },
    { "matched": true, "key": "dress-circle-e-20", "candidates": ["dress-circle-e-20", "e-20"] }
  ]
}

Reading the answer:

The same check runs when we set a venue up, against the example seats you send.