Seat Preevue developer docs

Create (or extend) a viewing session

POST https://connect.seatpreevue.com/v1/sessions

Operation createSession · Sessions

Authentication: a publishable (pk_live_…) or secret (sk_live_…) key, or no key (authenticated by the page’s Origin, or by the session). See Authentication.

Resolves venues from the key's venues plus the optional context (the facts your page or platform knows), applies each venue's layout rules to choose an imagery set, signs that set, and returns everything the SDK needs. Passing an existing sessionId with a new context adds venues to that session; if the context matches a venue already in it, its layout rules run again with the merged facts, and its entry is replaced. A fact supplied now overrides the same fact listed earlier in unavailableFacts.

Layout rules are evaluated in order, and lazily: when the next rule needs a fact you haven't supplied, the venue comes back with its default set provisionally and layout: { status: pending, needs: [...] }; supply those facts (or list them in unavailableFacts) and extend the session.

The response lists every venue in the session; venues[0] is the one this request's context matched (with no context, the first venue in the session).

No Authorization header is needed from a registered (keyless) origin. With a secret key and no Origin, the session is a server session, and its creating response carries eventsToken. Rate limits: per key, and for publishable and keyless keys also per key and client IP on this operation (default 300 a minute).

Errors: 400 validation_failed (body or context invalid; context.venueRef missing for a key with several venues), 400 set_not_found, 404 venue_not_found (no venue matches), 403 venue_not_allowed, 404 session_not_found (unknown or expired sessionId), 409 conflict (an extend raced another write to the same session; nothing was written: retry), 413 (body over 64 KB).

Parameters

Name In Type Required Description
Origin header string Sent by browsers; required and validated for pk_ keys, keyless sessions and browser sessions' /events. Absent for server sessions (an sk_ key from a backend; see Authentication).

Request body

application/json: CreateSessionRequest

Responses

Status Description Body
201 Session created or extended Session
400 Validation failed (validation_failed), or context.imagerySet names no set of the venue (set_not_found) Problem
401 Missing, unknown or revoked key Problem
403 Origin, venue, scope or key type not permitted Problem
404 Not found Problem
409 Changed concurrently (conflict, 1.12.0) Problem
413 Body too large (validation_failed; 64 KB for /sessions and /seats/resolve) Problem
429 Rate limited Problem

Errors use Problem (application/problem+json): see Errors.