status302

package module
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 26 Imported by: 0

README

status302-go — Go SDK

Official Go client for the Status302 API: real-time ticket market data (catalog, metrics, sales, seat maps) over REST, a realtime WebSocket stream and signed webhooks.

  • One typed method per public operation, with structs and enums generated from the public OpenAPI spec
  • Automatic retries on 429 (honouring Retry-After) and on 5xx/connection errors for idempotent methods; parsed RateLimit headers
  • Pagination iterators (range over ListEventsAll, ListEventsPages, …; cursors and alert nextBefore ids) and typed errors (errors.Is(err, status302.ErrPlanRequired), *APIError with the problem+json body and the response's request id, also appended to the message as (request <id>); quote it to support)
  • Conditional requests: WithIfNoneMatch with ErrNotModified, response ETags, and an opt-in ETag cache
  • Stream client: bearer or ticket auth, reconnects with backoff, since resume per topic, resync notices with a snapshot helper, seq deduplication, JSON or MessagePack frames
  • Webhook signature verification

The module version equals the version of the public API spec it was generated from. Full guide: https://status302.com/docs/sdks/go/.

Install

go get github.com/status403com/status302-go

Go ≥ 1.26. Dependencies: coder/websocket and vmihailenco/msgpack (stream client only).

Quickstart

import "github.com/status403com/status302-go"

client := status302.NewClient(os.Getenv("STATUS302_API_KEY"))

page, err := client.ListEvents(ctx, &status302.ListEventsParams{Country: new("US"), Limit: new(5)})
if err != nil {
	log.Fatal(err)
}
for _, e := range page.Items {
	fmt.Println(e.ID, e.Name, e.StartsAt)
}

metrics, err := client.GetEventMetrics(ctx, page.Items[0].ID)
if err != nil {
	log.Fatal(err)
}
for _, m := range metrics.Items {
	fmt.Println(m.Scope, m.Floor, m.Currency) // money is integer minor units
}

Create an API key in the app under Settings → Developers. Keys look like tx_live_<keyId>_<secret> and are sent as Authorization: Bearer ….

Methods are named after the operation ids (ListEvents, GetEventMetrics, CreateSavedList, …). Path parameters are positional, query parameters go in a <Operation>Params struct (nil for none), and request bodies are pointers to the generated structs. Optional fields are pointers (new(value)); optional fields that may also be null are Nullable[T] (status302.Value(v), status302.Null[T](), unset = omitted), so a PATCH can clear a property. CSV and binary downloads return []byte.

Client options: WithBaseURL (default https://api.status302.com), WithMaxRetries (3), WithMaxRetryAfter (60 s), WithTimeout (30 s per attempt), WithHTTPClient and WithETagCache. Per-call options: WithHeader, WithIfNoneMatch and WithResponseInto(&resp) for the status, headers, ETag and parsed rate limit.

Pagination
for event, err := range client.ListEventsAll(ctx, &status302.ListEventsParams{Country: new("US"), Limit: new(200)}) {
	if err != nil {
		return err
	}
	// …
}

…Pages yields whole pages instead (save NextCursor to resume). Both follow nextCursor until it is null, or nextBefore (as before) for ListAlertRules and ListAlertEvents.

Conditional requests
var first status302.Response
metrics, err := client.GetEventMetrics(ctx, 4102, status302.WithResponseInto(&first)) // first.ETag

_, err = client.GetEventMetrics(ctx, 4102, status302.WithIfNoneMatch(first.ETag))
if errors.Is(err, status302.ErrNotModified) {
	fmt.Println("unchanged")
}

cached := status302.NewClient(key, status302.WithETagCache(status302.NewMemoryETagCache(1000)))

Operations that accept If-None-Match say so in their doc comment; a 304 returns a *NotModifiedError (with the ETag and rate limit state). With WithETagCache the client revalidates every GET by itself and returns the stored body on 304; MemoryETagCache is LRU and concurrency-safe, and any ETagCache (Get/Set) works, e.g. one backed by Redis.

Errors and rate limits
_, err := client.ListMovers(ctx, &status302.ListMoversParams{Window: new(status302.ListMoversWindow24h)})
var apiErr *status302.APIError
switch {
case errors.Is(err, status302.ErrPlanRequired) && errors.As(err, &apiErr):
	fmt.Println("needs plan", apiErr.RequiredPlan())
case errors.Is(err, status302.ErrRateLimited) && errors.As(err, &apiErr):
	fmt.Println("retry in", apiErr.RetryAfter, "quota:", apiErr.RateLimit)
case err != nil:
	return err
}
Sentinel Status
ErrBadRequest 400, 422
ErrAuthentication 401
ErrPlanRequired 402 (RequiredPlan(), CurrentPlan(), Feature(), Limit())
ErrPermission 403 (RequiredScope())
ErrNotFound 404
ErrConflict 409
ErrRateLimited 429 (RetryAfter, RateLimit, Limit())
ErrServer 5xx

Network failures return a *ConnectionError wrapping the cause.

Realtime stream
stream := client.Stream(status302.StreamOptions{})
defer stream.Close()

alerts := stream.Subscribe("alerts", status302.SubscribeOptions{})
seq, err := alerts.Ready(ctx) // head seq, or a *SubscriptionError
for msg, err := range stream.Messages(ctx) {
	if err != nil {
		return err // *StreamClosedError: 4401/4403 are final
	}
	switch m := msg.(type) {
	case *status302.DataMessage:
		var alert status302.AlertEvent
		_ = m.Decode(&alert)
		fmt.Println(m.Seq, alert.Title)
	case *status302.ResyncMessage:
		// The gap could not be replayed: reload the REST snapshot, then continue live.
		snapshot, err := stream.FetchSnapshot(ctx, m)
		_, _ = snapshot, err
	case *status302.ErrorMessage:
		fmt.Println("refused", m.Topic, m.Code)
	}
}

The key needs the stream scope to connect, and each topic the scope of its REST equivalent (event.{id}.kpis → market:read, sales/event.{id}.sales → sales:read, event.{id}.primary → maps:read or market:read, onsales → catalog:read, alerts → alerts:write); without it the subscription fails with a forbidden_topic ErrorMessage. The key is sent on the upgrade request (StreamAuthBearer, default with a key); Auth: status302.StreamAuthTicket with GetTicket connects with single-use tickets instead (same scopes as the key).

Binary encoding (MessagePack)

StreamOptions{Encoding: status302.StreamEncodingMsgpack} asks the server for binary MessagePack frames (encoding=msgpack on the URL) instead of JSON text. Messages and Data payloads decode to the same values as with JSON; the client's own messages stay JSON. Default: JSON.

Webhooks
body, _ := io.ReadAll(r.Body)
event, err := status302.VerifyWebhook(body, r.Header.Get("Status302-Signature"), os.Getenv("STATUS302_WEBHOOK_SECRET"))
if err != nil { // errors.Is(err, status302.ErrWebhookVerification)
	http.Error(w, "invalid signature", http.StatusBadRequest)
	return
}

Verify over the raw body before parsing it; pass several secrets while rotating. SignWebhook(body, secret, time.Now()) signs test deliveries.

Versioning

Releases share the major and minor version of the API spec they were generated from (status302.Version); /v1 changes are additive only, so new fields, operations and enum values arrive in minor releases. See the changelog.

License

MIT

Documentation

Overview

Package status302 is the official Go client for the Status302 API (https://status302.com/docs/): real-time ticket market data over REST, a realtime WebSocket stream and signed webhooks.

Every public operation is a Client method generated from the public OpenAPI spec (operations.go, types.go): path parameters are positional, query parameters go in a <Operation>Params struct and request bodies are pointers to the generated structs. Optional fields are pointers, set with new(value); optional fields that may also be null are Nullable.

client := status302.NewClient(os.Getenv("STATUS302_API_KEY"))
for event, err := range client.ListEventsAll(ctx, &status302.ListEventsParams{Country: new("US")}) {
	if err != nil {
		return err
	}
	fmt.Println(event.ID, event.Name)
}

Errors of the API are *APIError values matching the sentinels ErrNotFound, ErrPlanRequired, ErrRateLimited, … with errors.Is. The client retries 429 answers (after Retry-After) and, for idempotent methods, 5xx answers and connection errors.

Client.Stream opens the realtime stream; VerifyWebhook checks webhook deliveries. Version equals the public API spec version the package was generated from.

Index

Constants

View Source
const (
	// CloseGoingAway: idle timeout or a failed write on the server. Reconnects.
	CloseGoingAway = 1001
	// CloseServiceRestart: the server is restarting. Reconnects and resumes with `since`.
	CloseServiceRestart = 1012
	// CloseSlowConsumer: the connection's send buffer overflowed. Reconnects and resumes with `since`.
	CloseSlowConsumer = 4008
	// CloseUnauthorized: credentials missing, invalid or revoked. Final.
	CloseUnauthorized = 4401
	// CloseForbidden: the plan does not allow streaming, or the API key lacks the `stream` scope. Final.
	CloseForbidden = 4403
	// CloseReconnect: role, org, plan or key scopes changed. Reconnects at once
	// with fresh credentials and resumes.
	CloseReconnect = 4409
	// CloseTooManyConnections: the org's stream connection quota is used up.
	// Reported through StreamOptions.OnError, then retried with backoff.
	CloseTooManyConnections = 4429
)

Close codes the server uses (https://status302.com/docs/stream/#close-codes).

View Source
const DefaultBaseURL = "https://api.status302.com"

DefaultBaseURL is the production API origin.

View Source
const Version = "1.6.0"

Version is the API spec version this SDK was generated from; releases of the module share its major and minor version.

Variables

View Source
var (
	// ErrBadRequest: 400 or 422, the request is malformed or a parameter is invalid.
	ErrBadRequest = errors.New("status302: bad request")
	// ErrAuthentication: 401, missing, malformed, expired or revoked credentials.
	ErrAuthentication = errors.New("status302: authentication failed")
	// ErrPlanRequired: 402, the organization's plan does not include the request.
	ErrPlanRequired = errors.New("status302: plan required")
	// ErrPermission: 403, the key lacks a scope, the client IP is not allowed, or the role is insufficient.
	ErrPermission = errors.New("status302: permission denied")
	// ErrNotFound: 404, the resource does not exist or is not visible to the caller.
	ErrNotFound = errors.New("status302: not found")
	// ErrConflict: 409, the request conflicts with the resource's current state.
	ErrConflict = errors.New("status302: conflict")
	// ErrRateLimited: 429, a quota is exhausted (see APIError.RetryAfter).
	ErrRateLimited = errors.New("status302: rate limited")
	// ErrServer: 5xx, the API failed; retried automatically for idempotent requests.
	ErrServer = errors.New("status302: server error")
	// ErrNotModified is matched by *NotModifiedError (a 304 answer to WithIfNoneMatch).
	ErrNotModified = errors.New("status302: not modified")
)

Sentinels matched by *APIError with errors.Is, by HTTP status:

if errors.Is(err, status302.ErrPlanRequired) { … }

Use errors.As with *APIError for the problem details and response headers.

View Source
var ErrStreamClosed = errors.New("status302: stream is closed")

ErrStreamClosed is returned by Stream.Next once the stream has ended (after Close, or after the final *StreamClosedError was returned), and by Subscription.Ready when the stream ends before the server confirmed.

View Source
var ErrWebhookVerification = errors.New("status302: webhook verification failed")

ErrWebhookVerification is matched by every error of VerifyWebhook: the delivery is not authentic or too old; answer it with a 4xx and do not process it.

Functions

func ParseRetryAfter

func ParseRetryAfter(value string, now time.Time) (time.Duration, bool)

ParseRetryAfter reads a Retry-After value (delta-seconds or an HTTP date, relative to now); false when it is absent or invalid.

func SignWebhook

func SignWebhook(rawBody []byte, secret string, timestamp time.Time) string

SignWebhook computes the `Status302-Signature` header for a body at timestamp (tests and local receivers).

func StreamURL

func StreamURL(baseURL string) string

StreamURL derives the stream endpoint from an API origin: `https://api.status302.com` → `wss://api.status302.com/v1/stream` (`http` → `ws`).

Types

type APIError

type APIError struct {
	StatusCode int
	// Problem is the RFC 9457 body (synthesized from the status when the body is not problem+json).
	Problem Problem
	// Body is the raw response body; the extension members (requiredPlan, …) are read from it.
	Body   []byte
	Header http.Header
	// RateLimit is the rate limit state from the response headers (nil when absent).
	RateLimit *RateLimitInfo
	// RequestID is the response's X-Request-Id ("" when absent).
	RequestID string
	// RetryAfter is the Retry-After header; HasRetryAfter reports whether it was present.
	RetryAfter    time.Duration
	HasRetryAfter bool
}

APIError is a non-2xx answer of the API. Problem holds the problem+json body; the message ends with `(request <id>)` when the response names its request: quote it to support, it matches the server logs.

func (*APIError) CurrentPlan

func (e *APIError) CurrentPlan() string

CurrentPlan is the caller's current plan (402).

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) Feature

func (e *APIError) Feature() string

Feature is the gated capability, e.g. `market_data` (402).

func (*APIError) Is

func (e *APIError) Is(target error) bool

Is matches the sentinel of the error's status (ErrNotFound for 404, …).

func (*APIError) Limit

func (e *APIError) Limit() string

Limit is the exhausted quota of a 429 (`minute`, `day`, `concurrent`, `stream_connections`, …) or, as a decimal string, the exhausted count limit of a 402.

func (*APIError) RequiredPlan

func (e *APIError) RequiredPlan() string

RequiredPlan is the plan that allows the request (402).

func (*APIError) RequiredScope

func (e *APIError) RequiredScope() string

RequiredScope is the scope the API key lacks (403 insufficient-scope).

func (*APIError) Type

func (e *APIError) Type() string

Type is the problem type URI, e.g. `https://status302.com/problems/rate-limited`.

type AddSavedListItemsRequest

type AddSavedListItemsRequest struct {
	EventIDs []int64 `json:"eventIds"`
}

AddSavedListItemsRequest is a schema of the public API.

type AddSavedListItemsResult

type AddSavedListItemsResult struct {
	// Events new to the list (the others were already in it).
	Added int `json:"added"`
	// Events in the list afterwards.
	Total int `json:"total"`
}

AddSavedListItemsResult is a schema of the public API.

type AlertActivityItem

type AlertActivityItem struct {
	Activity AlertActivityKind `json:"activity"`
	// `primary`, `tm_resale` or `secondary:<marketplace>`.
	Market  string  `json:"market"`
	Section string  `json:"section"`
	Row     *string `json:"row,omitempty"`
	// Seat labels (absent for general admission).
	Seats    []string `json:"seats,omitempty"`
	Quantity int      `json:"quantity"`
	// All-in price per ticket in minor units (absent when unpriced).
	PriceMinor *int64 `json:"priceMinor,omitempty"`
	// Face (list) price per ticket in minor units.
	ListMinor *int64  `json:"listMinor,omitempty"`
	Currency  *string `json:"currency,omitempty"`
	// For sales, `inferred_high` or `inferred_low` (`resale.sold` is always `inferred_low`).
	Confidence *string   `json:"confidence,omitempty"`
	At         time.Time `json:"at"`
}

AlertActivityItem: One change an activity firing reports (a section, row and price group of seats).

type AlertActivityKind

type AlertActivityKind string

AlertActivityKind: Market activity an `activity` condition reports, one item per change group (section, row, price). `primary.restock`: primary seats restocked (released or returned, not cart holds coming back). `primary.sale`: an inferred primary sale (seats still gone after the 20-minute hold window). `primary.pulled` (opt in; needs `minQuantity`): Ticketmaster primary seats gone but still inside the hold window, about 20 minutes before they settle as a sale — they may be cart holds that come back. DICE ticket types (one item per type; `section` is the type's name, no seat count, so `minQuantity` does not apply): `primary.type_on_sale` a type going (back) on sale, `primary.type_added` a new type, `primary.waitlist` a waiting list opening, `primary.price_change` a new all-in price or tier (`listMinor`: the previous all-in price). `resale.listed`: listings added on Ticketmaster resale (item market `tm_resale`) or a secondary marketplace (item market `secondary:<marketplace>`). `resale.sold`: a sale on Ticketmaster resale, inferred from its listings, or on a secondary marketplace, confirmed by the marketplace or inferred from its listings.

const (
	AlertActivityKindPrimaryRestock     AlertActivityKind = "primary.restock"
	AlertActivityKindPrimarySale        AlertActivityKind = "primary.sale"
	AlertActivityKindPrimaryPulled      AlertActivityKind = "primary.pulled"
	AlertActivityKindPrimaryTypeOnSale  AlertActivityKind = "primary.type_on_sale"
	AlertActivityKindPrimaryTypeAdded   AlertActivityKind = "primary.type_added"
	AlertActivityKindPrimaryWaitlist    AlertActivityKind = "primary.waitlist"
	AlertActivityKindPrimaryPriceChange AlertActivityKind = "primary.price_change"
	AlertActivityKindResaleListed       AlertActivityKind = "resale.listed"
	AlertActivityKindResaleSold         AlertActivityKind = "resale.sold"
)

Values of AlertActivityKind.

type AlertCatalogFilter

type AlertCatalogFilter struct {
	// ISO 3166-1 alpha-2.
	Country *string `json:"country,omitempty"`
	City    *string `json:"city,omitempty"`
	Segment *string `json:"segment,omitempty"`
	Genre   *string `json:"genre,omitempty"`
	VenueID *int64  `json:"venueId,omitempty"`
	Keyword *string `json:"keyword,omitempty"`
}

AlertCatalogFilter: Upcoming events matching every given field (keyword matches the folded event name).

type AlertCondition

type AlertCondition struct {
	Type AlertConditionType `json:"type"`
	// Market scope of a metric or section condition (default `primary`); secondary scopes need the secondary-marketplaces feature.
	Market   *AlertConditionMarket `json:"market,omitempty"`
	Metric   *AlertMetric          `json:"metric,omitempty"`
	Op       *AlertConditionOp     `json:"op,omitempty"`
	Value    *float64              `json:"value,omitempty"`
	Change   *AlertConditionChange `json:"change,omitempty"`
	MinSeats *int                  `json:"minSeats,omitempty"`
	// Section names (at most 50, each at most 100 characters; more is 400).
	Sections []string `json:"sections,omitempty"`
	// All-in price ceiling in minor units.
	MaxPrice      *int64                 `json:"maxPrice,omitempty"`
	WindowMinutes *int                   `json:"windowMinutes,omitempty"`
	Catalog       *AlertConditionCatalog `json:"catalog,omitempty"`
	// How long before the start an `onsale_reminder` fires (required for it).
	LeadMinutes *AlertConditionLeadMinutes `json:"leadMinutes,omitempty"`
	// An `onsale_reminder` also fires for presale starts.
	IncludePresales *bool `json:"includePresales,omitempty"`
	// The pick a `pick` condition reacts to.
	Kind *AlertConditionKind `json:"kind,omitempty"`
	// Only prediction calls of this category (`pick` with kind `prediction`; absent, both).
	Category *AlertConditionCategory `json:"category,omitempty"`
	// Only prediction calls with at most this risk (`pick` with kind `prediction`).
	MaxRisk    *int                `json:"maxRisk,omitempty"`
	Activities []AlertActivityKind `json:"activities,omitempty"`
	// Only changes of at least this many seats (activity; default 1, required with `primary.pulled`; not applied to DICE ticket types).
	MinQuantity *int `json:"minQuantity,omitempty"`
	// All-in price floor in minor units (activity).
	MinPrice *int64 `json:"minPrice,omitempty"`
	// Which inferred sales count (activity with `primary.sale` or `resale.sold`; default `any`, every sale).
	Confidence *AlertConditionConfidence `json:"confidence,omitempty"`
	// Only changes in these markets (activity; empty or absent: every
	// market). Restocks, primary sales, pulled seats and DICE ticket types are primary-market only.
	// Secondary markets need the secondary-marketplaces feature; without
	// it, a rule without `markets` sees Ticketmaster changes only.
	Markets []WebhookMarket `json:"markets,omitempty"`
}

AlertCondition: What fires the rule. `metric` (event, list, attraction, venue or catalog filter scope): `market` `metric` `op` `value`, evaluated on every metrics recompute of an event in scope (catalog filters: every 5 min); it fires when the comparison becomes true, at most once per cooldown per event. `inventory` (event, list, attraction or venue scope): `change` `restock` (≥ `minSeats` primary seats restocked in one poll) or `sale_burst` (≥ `minSeats` primary seats sold within `windowMinutes`), optionally only in `sections` and at ≤ `maxPrice` all-in. `catalog` (attraction, venue or catalog filter scope): `catalog` `new_event` or `new_onsale` (a new event whose public on-sale is still ahead), or `onsale_reminder` (also list scope): fires `leadMinutes` before each public on-sale start (with `includePresales`, presale start) of a listed event in scope, once per event and start (checked every minute; starts already past never fire). `pick` (attraction, venue or catalog filter scope; the plan's predictions feature): fires once per event when a `kind` `mustcop` or `prediction` call opens on it (predictions: optionally only of `category` and at most `maxRisk`), provided the org sees those picks (published to it); the message carries the not-financial-advice notice. `activity` (any scope): every change of the `activities` kinds that passes the filters — `markets`, `sections`, `minQuantity` seats per change, all-in `minPrice`/`maxPrice` and, for `primary.sale` and marketplace `resale.sold`, `confidence` (`any`: every sale, the default; `high`: only primary sales seen between close polls and marketplace sales confirmed or inferred with high confidence) — is reported, no cooldown; bursts are merged by the rule's `digestSeconds`. A catalog filter scope needs at least one of these filters and a digest window. `section` (event, list, attraction or venue scope): `market` `metric` `op` `value` over each section of the event's section table (`GET /v1/events/{id}/sections`), optionally only for `sections` (section keys or labels, matched case-insensitively; "Section 112" matches `112`), evaluated on every metrics recompute of an event in scope; it fires when the comparison becomes true for a section, at most once per cooldown per event and section (several sections at once: one digest). Price metrics (`floor`, `median`, `chg24h`, `saleAvg24h`) need the plan's map prices, `chg24h` also its % change feature, secondary markets the secondary-marketplaces feature.

type AlertConditionCatalog

type AlertConditionCatalog string

AlertConditionCatalog is a schema of the public API.

const (
	AlertConditionCatalogNewEvent       AlertConditionCatalog = "new_event"
	AlertConditionCatalogNewOnsale      AlertConditionCatalog = "new_onsale"
	AlertConditionCatalogOnsaleReminder AlertConditionCatalog = "onsale_reminder"
)

Values of AlertConditionCatalog.

type AlertConditionCategory

type AlertConditionCategory string

AlertConditionCategory: Only prediction calls of this category (`pick` with kind `prediction`; absent, both).

const (
	AlertConditionCategoryTm   AlertConditionCategory = "tm"
	AlertConditionCategoryDice AlertConditionCategory = "dice"
)

Values of AlertConditionCategory.

type AlertConditionChange

type AlertConditionChange string

AlertConditionChange is a schema of the public API.

const (
	AlertConditionChangeRestock   AlertConditionChange = "restock"
	AlertConditionChangeSaleBurst AlertConditionChange = "sale_burst"
)

Values of AlertConditionChange.

type AlertConditionConfidence

type AlertConditionConfidence string

AlertConditionConfidence: Which inferred sales count (activity with `primary.sale` or `resale.sold`; default `any`, every sale).

const (
	AlertConditionConfidenceHigh AlertConditionConfidence = "high"
	AlertConditionConfidenceAny  AlertConditionConfidence = "any"
)

Values of AlertConditionConfidence.

type AlertConditionKind

type AlertConditionKind string

AlertConditionKind: The pick a `pick` condition reacts to.

const (
	AlertConditionKindMustcop    AlertConditionKind = "mustcop"
	AlertConditionKindPrediction AlertConditionKind = "prediction"
)

Values of AlertConditionKind.

type AlertConditionLeadMinutes

type AlertConditionLeadMinutes int

AlertConditionLeadMinutes: How long before the start an `onsale_reminder` fires (required for it).

const (
	AlertConditionLeadMinutes15   AlertConditionLeadMinutes = 15
	AlertConditionLeadMinutes60   AlertConditionLeadMinutes = 60
	AlertConditionLeadMinutes180  AlertConditionLeadMinutes = 180
	AlertConditionLeadMinutes1440 AlertConditionLeadMinutes = 1440
)

Values of AlertConditionLeadMinutes.

type AlertConditionMarket

type AlertConditionMarket string

AlertConditionMarket: Market scope of a metric or section condition (default `primary`); secondary scopes need the secondary-marketplaces feature.

const (
	AlertConditionMarketPrimary             AlertConditionMarket = "primary"
	AlertConditionMarketTmResale            AlertConditionMarket = "tm_resale"
	AlertConditionMarketSecondaryBest       AlertConditionMarket = "secondary:best"
	AlertConditionMarketSecondaryStubhub    AlertConditionMarket = "secondary:stubhub"
	AlertConditionMarketSecondaryCrowdvolt  AlertConditionMarket = "secondary:crowdvolt"
	AlertConditionMarketSecondaryTickpick   AlertConditionMarket = "secondary:tickpick"
	AlertConditionMarketSecondaryVividseats AlertConditionMarket = "secondary:vividseats"
	AlertConditionMarketSecondaryTicombo    AlertConditionMarket = "secondary:ticombo"
)

Values of AlertConditionMarket.

type AlertConditionOp

type AlertConditionOp string

AlertConditionOp is a schema of the public API.

const (
	AlertConditionOpLte AlertConditionOp = "lte"
	AlertConditionOpGte AlertConditionOp = "gte"
)

Values of AlertConditionOp.

type AlertConditionType

type AlertConditionType string

AlertConditionType is a schema of the public API.

const (
	AlertConditionTypeMetric    AlertConditionType = "metric"
	AlertConditionTypeInventory AlertConditionType = "inventory"
	AlertConditionTypeCatalog   AlertConditionType = "catalog"
	AlertConditionTypeActivity  AlertConditionType = "activity"
	AlertConditionTypeSection   AlertConditionType = "section"
	AlertConditionTypePick      AlertConditionType = "pick"
)

Values of AlertConditionType.

type AlertDelivery

type AlertDelivery struct {
	ID int64 `json:"id"`
	// Null once the channel was deleted.
	ChannelID   *int64              `json:"channelId"`
	ChannelKind ChannelKind         `json:"channelKind"`
	ChannelName string              `json:"channelName"`
	Status      AlertDeliveryStatus `json:"status"`
	Attempts    int                 `json:"attempts"`
	Error       *string             `json:"error"`
	SentAt      *time.Time          `json:"sentAt"`
	UpdatedAt   time.Time           `json:"updatedAt"`
	// When the delivery is sent at the earliest (the end of the rule's digest window).
	DueAt time.Time `json:"dueAt"`
	// The delivery whose message carried this one (merged by the digest window or while the channel was rate-limited).
	CoalescedInto *int64 `json:"coalescedInto"`
}

AlertDelivery is a schema of the public API.

type AlertDeliveryStatus

type AlertDeliveryStatus string

AlertDeliveryStatus is a schema of the public API.

const (
	AlertDeliveryStatusPending  AlertDeliveryStatus = "pending"
	AlertDeliveryStatusSent     AlertDeliveryStatus = "sent"
	AlertDeliveryStatusRetrying AlertDeliveryStatus = "retrying"
	AlertDeliveryStatusFailed   AlertDeliveryStatus = "failed"
	AlertDeliveryStatusSkipped  AlertDeliveryStatus = "skipped"
)

Values of AlertDeliveryStatus.

type AlertDigestSeconds

type AlertDigestSeconds int

AlertDigestSeconds: Digest window: firings of the rule within this many seconds are sent to each channel as one message (0: at once). Defaults to 30 for activity rules and 0 otherwise; catalog-filter activity rules need at least 30. Whatever the window, firings waiting on a rate-limited channel are merged into its next message.

const (
	AlertDigestSeconds0   AlertDigestSeconds = 0
	AlertDigestSeconds30  AlertDigestSeconds = 30
	AlertDigestSeconds60  AlertDigestSeconds = 60
	AlertDigestSeconds300 AlertDigestSeconds = 300
)

Values of AlertDigestSeconds.

type AlertEvent

type AlertEvent struct {
	ID int64 `json:"id"`
	// Null once the rule was deleted.
	RuleID   *int64             `json:"ruleId"`
	RuleName string             `json:"ruleName"`
	Kind     AlertConditionType `json:"kind"`
	Test     bool               `json:"test"`
	FiredAt  time.Time          `json:"firedAt"`
	Title    string             `json:"title"`
	Body     string             `json:"body"`
	// Link into the app (event page, or the rule's history for digests).
	URL string `json:"url"`
	// The event's page at its primary seller (activity firings).
	TicketURL *string `json:"ticketUrl,omitempty"`
	// The seller of `ticketUrl`; absent when it is neither Ticketmaster nor a primary source.
	TicketSource *PrimarySource      `json:"ticketSource,omitempty"`
	Tone         *AlertEventTone     `json:"tone,omitempty"`
	Event        *SaleEventRef       `json:"event,omitempty"`
	Events       []SaleEventRef      `json:"events,omitempty"`
	Fields       []AlertField        `json:"fields"`
	Items        []AlertActivityItem `json:"items,omitempty"`
	// Changes the firing covered (activity; `items` lists the first 50).
	ItemsTotal *int `json:"itemsTotal,omitempty"`
	// Raw values behind the firing (metric, value, threshold, seats, …).
	Data       map[string]any  `json:"data,omitempty"`
	Deliveries []AlertDelivery `json:"deliveries"`
}

AlertEvent: One firing. Also the `data` of the `alerts` stream topic. Digest firings (several events newly matched at once) have no `event` and list them in `events`. Activity firings list what happened in `items` (at most 50; `itemsTotal` counts them all).

type AlertEventPage

type AlertEventPage struct {
	Items      []AlertEvent `json:"items"`
	NextBefore *int64       `json:"nextBefore,omitempty"`
}

AlertEventPage is a schema of the public API.

type AlertEventTone

type AlertEventTone string

AlertEventTone is a schema of the public API.

const (
	AlertEventToneUp   AlertEventTone = "up"
	AlertEventToneDown AlertEventTone = "down"
)

Values of AlertEventTone.

type AlertField

type AlertField struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

AlertField is a schema of the public API.

type AlertMetric

type AlertMetric string

AlertMetric: event_metrics value a metric condition compares (EventMetrics names). Money metrics are in minor units; `chg*`, `depletion24h`, `sellThrough`, `churn24h` and `spread` are fractions (−0.15 = −15 %); `selloutHours` is hours (primary market only); `spread` (the floor over the primary floor, 0.6 = 60 % above) exists on `tm_resale` and secondary markets only; the rest are counts or rates. `chg24h`/`chg72h`/`chg7d` need the plan's % change feature. A `section` condition compares a section-table value instead (SectionRow): `floor`, `median`, `chg24h` (floorChg24h), `tickets`, `sales24h`, `sales72h` or `saleAvg24h`; `tickets` is section-only.

const (
	AlertMetricFloor        AlertMetric = "floor"
	AlertMetricMedian       AlertMetric = "median"
	AlertMetricAvg24h       AlertMetric = "avg24h"
	AlertMetricSaleAvg24h   AlertMetric = "saleAvg24h"
	AlertMetricVolume24h    AlertMetric = "volume24h"
	AlertMetricChg24h       AlertMetric = "chg24h"
	AlertMetricChg72h       AlertMetric = "chg72h"
	AlertMetricChg7d        AlertMetric = "chg7d"
	AlertMetricSales24h     AlertMetric = "sales24h"
	AlertMetricSales72h     AlertMetric = "sales72h"
	AlertMetricInventory    AlertMetric = "inventory"
	AlertMetricVelocity     AlertMetric = "velocity"
	AlertMetricDepletion24h AlertMetric = "depletion24h"
	AlertMetricSellThrough  AlertMetric = "sellThrough"
	AlertMetricMovement     AlertMetric = "movement"
	AlertMetricP25          AlertMetric = "p25"
	AlertMetricSaleAvg7d    AlertMetric = "saleAvg7d"
	AlertMetricSales7d      AlertMetric = "sales7d"
	AlertMetricVolume72h    AlertMetric = "volume72h"
	AlertMetricVolume7d     AlertMetric = "volume7d"
	AlertMetricSelloutHours AlertMetric = "selloutHours"
	AlertMetricChurn24h     AlertMetric = "churn24h"
	AlertMetricSpread       AlertMetric = "spread"
	AlertMetricTickets      AlertMetric = "tickets"
)

Values of AlertMetric.

type AlertPreview

type AlertPreview struct {
	Items []AlertPreviewItem `json:"items"`
	Total int                `json:"total"`
	// What the items cover ("matching now", "restocks in the last 24 hours", …).
	Window string `json:"window"`
}

AlertPreview is a schema of the public API.

type AlertPreviewItem

type AlertPreviewItem struct {
	Event SaleEventRef `json:"event"`
	// The current value, or what happened (restock size, announcement time).
	Detail string     `json:"detail"`
	At     *time.Time `json:"at,omitempty"`
}

AlertPreviewItem is a schema of the public API.

type AlertRule

type AlertRule struct {
	ID        int64          `json:"id"`
	Name      string         `json:"name"`
	Scope     AlertScope     `json:"scope"`
	Condition AlertCondition `json:"condition"`
	// One-line summary of the condition ("Primary floor ≤ $120").
	Description     string             `json:"description"`
	CooldownMinutes int                `json:"cooldownMinutes"`
	DigestSeconds   AlertDigestSeconds `json:"digestSeconds"`
	Channels        []int64            `json:"channels"`
	Enabled         bool               `json:"enabled"`
	// The rule sends nothing until then (`PUT /v1/alerts/rules/{ruleId}/snooze`); absent when not snoozed or the snooze has ended.
	SnoozedUntil *time.Time     `json:"snoozedUntil,omitempty"`
	LastFiredAt  *time.Time     `json:"lastFiredAt,omitempty"`
	FireCount    int64          `json:"fireCount"`
	LastSkip     *AlertRuleSkip `json:"lastSkip,omitempty"`
	CreatedBy    *string        `json:"createdBy,omitempty"`
	CreatedAt    time.Time      `json:"createdAt"`
	UpdatedAt    time.Time      `json:"updatedAt"`
}

AlertRule is a schema of the public API.

type AlertRuleInput

type AlertRuleInput struct {
	Name      string          `json:"name"`
	Scope     AlertScopeInput `json:"scope"`
	Condition AlertCondition  `json:"condition"`
	// Metric and inventory rules (activity and catalog rules ignore it).
	CooldownMinutes *int                `json:"cooldownMinutes,omitempty"`
	DigestSeconds   *AlertDigestSeconds `json:"digestSeconds,omitempty"`
	// Notification channel ids of the org (at most the org's channel cap plus 25, 50 by default; more is 400).
	Channels []int64 `json:"channels,omitempty"`
	Enabled  *bool   `json:"enabled,omitempty"`
}

AlertRuleInput is a schema of the public API.

type AlertRulePage

type AlertRulePage struct {
	Items      []AlertRule    `json:"items"`
	NextBefore *int64         `json:"nextBefore,omitempty"`
	Usage      AlertRuleUsage `json:"usage"`
}

AlertRulePage is a schema of the public API.

type AlertRulePatch

type AlertRulePatch struct {
	Name            *string             `json:"name,omitempty"`
	Scope           *AlertScopeInput    `json:"scope,omitempty"`
	Condition       *AlertCondition     `json:"condition,omitempty"`
	CooldownMinutes *int                `json:"cooldownMinutes,omitempty"`
	DigestSeconds   *AlertDigestSeconds `json:"digestSeconds,omitempty"`
	// Notification channel ids of the org (at most the org's channel cap plus 25, 50 by default; more is 400).
	Channels []int64 `json:"channels,omitempty"`
	Enabled  *bool   `json:"enabled,omitempty"`
}

AlertRulePatch is a schema of the public API.

type AlertRuleSkip

type AlertRuleSkip struct {
	// When the rule matched without firing.
	At     time.Time           `json:"at"`
	Reason AlertRuleSkipReason `json:"reason"`
	// Human explanation ("Your plan doesn't include market data (needs Core).").
	Detail string `json:"detail"`
	// `cooldown`, `snoozed`: when the cooldown or snooze ends.
	Until *time.Time `json:"until,omitempty"`
	// `plan`: the gated capability, as in PlanRequiredProblem (`market_data`, `alert_rules`, …).
	Feature      *string `json:"feature,omitempty"`
	RequiredPlan *PlanID `json:"requiredPlan,omitempty"`
}

AlertRuleSkip: Why the rule last matched without firing; absent once it has fired since, and after its scope or condition changes. `snoozed`: the rule is snoozed. `plan`: the org's current plan doesn't allow the rule (a feature it lacks, or the rule is beyond the plan's rule count; dropped as soon as the plan allows it again). `cooldown`: it already fired for that event less than its cooldown ago. `at` is refreshed at most every 5 minutes while the reason stays the same.

type AlertRuleSkipReason

type AlertRuleSkipReason string

AlertRuleSkipReason is a schema of the public API.

const (
	AlertRuleSkipReasonPlan     AlertRuleSkipReason = "plan"
	AlertRuleSkipReasonCooldown AlertRuleSkipReason = "cooldown"
	AlertRuleSkipReasonSnoozed  AlertRuleSkipReason = "snoozed"
)

Values of AlertRuleSkipReason.

type AlertRuleSnoozeInput

type AlertRuleSnoozeInput struct {
	// When the snooze ends (in the future, at most 90 days ahead).
	Until time.Time `json:"until"`
}

AlertRuleSnoozeInput is a schema of the public API.

type AlertRuleUsage

type AlertRuleUsage struct {
	// Rules the org has.
	Rules int `json:"rules"`
	// The plan's limit; absent when unlimited.
	MaxRules *int `json:"maxRules,omitempty"`
}

AlertRuleUsage is a schema of the public API.

type AlertScope

type AlertScope struct {
	Kind   AlertScopeKind      `json:"kind"`
	Ref    *string             `json:"ref,omitempty"`
	Filter *AlertCatalogFilter `json:"filter,omitempty"`
	// Display name (event, list or attraction name, or the filter summary).
	Label string `json:"label"`
}

AlertScope is a schema of the public API.

type AlertScopeInput

type AlertScopeInput struct {
	Kind AlertScopeKind `json:"kind"`
	// Event id, list uuid, attraction id or venue id (not for catalog_filter).
	Ref    *string             `json:"ref,omitempty"`
	Filter *AlertCatalogFilter `json:"filter,omitempty"`
}

AlertScopeInput is a schema of the public API.

type AlertScopeKind

type AlertScopeKind string

AlertScopeKind is a schema of the public API.

const (
	AlertScopeKindEvent         AlertScopeKind = "event"
	AlertScopeKindList          AlertScopeKind = "list"
	AlertScopeKindAttraction    AlertScopeKind = "attraction"
	AlertScopeKindVenue         AlertScopeKind = "venue"
	AlertScopeKindCatalogFilter AlertScopeKind = "catalog_filter"
)

Values of AlertScopeKind.

type AttractionDetail

type AttractionDetail struct {
	ID int64 `json:"id"`
	// Ticketmaster Discovery attraction id.
	DiscoveryID string `json:"discoveryId"`
	Name        string `json:"name"`
	// Ticketmaster attraction page.
	URL             *string          `json:"url"`
	Segment         *string          `json:"segment"`
	Genre           *string          `json:"genre"`
	Subgenre        *string          `json:"subgenre"`
	Classifications []Classification `json:"classifications"`
	// Official and social links, by kind.
	Links  []ExternalLink `json:"links"`
	Rollup EventRollup    `json:"rollup"`
	// Distinct cities of the upcoming events' venues.
	UpcomingCities int `json:"upcomingCities"`
	// Countries (ISO 3166-1 alpha-2) of the upcoming events' venues, alphabetical.
	UpcomingCountries []string      `json:"upcomingCountries"`
	NextEvent         *EventSummary `json:"nextEvent,omitempty"`
	UpdatedAt         time.Time     `json:"updatedAt"`
}

AttractionDetail is a schema of the public API.

type AttractionHistory

type AttractionHistory struct {
	AttractionID int64                    `json:"attractionId"`
	Items        []AttractionHistoryEvent `json:"items"`
}

AttractionHistory is a schema of the public API.

type AttractionHistoryEvent

type AttractionHistoryEvent struct {
	ID       int64     `json:"id"`
	Name     string    `json:"name"`
	StartsAt time.Time `json:"startsAt"`
	Venue    *VenueRef `json:"venue,omitempty"`
	// Last primary floor, all-in minor units of `currency`.
	PrimaryFloor *int64  `json:"primaryFloor"`
	Currency     *string `json:"currency"`
	// TM resale floor ÷ primary floor − 1.
	ResaleSpread *float64 `json:"resaleSpread"`
	// Best marketplace floor ÷ primary floor − 1; null without secondary marketplaces in the plan.
	SecondarySpread *float64 `json:"secondarySpread"`
	// Primary sell-through, 1 − open primary tickets / seat-map capacity.
	SellThrough *float64 `json:"sellThrough"`
	// (first primary inventory − last primary inventory before the start) ÷
	// first primary inventory, over the collected primary samples; null with
	// fewer than two samples or no first inventory.
	Depletion *float64 `json:"depletion"`
	// First minus last primary inventory over the same samples.
	PrimarySold *int `json:"primarySold"`
	// Time of the newest market sample behind the metrics.
	AsOf *time.Time `json:"asOf"`
}

AttractionHistoryEvent: One past event and how its market ended. Spreads and sell-through are fractions (0.12 = 12%) with the definitions of `EventMetrics`, as of `asOf` (the event's last metrics); null when not measured.

type AttractionRef

type AttractionRef struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

AttractionRef is a schema of the public API.

type CachedResponse

type CachedResponse struct {
	ETag        string
	Body        []byte
	ContentType string
}

CachedResponse is a response body stored by an ETagCache, keyed by request URL.

type CalendarCounts

type CalendarCounts struct {
	Onsale  int `json:"onsale"`
	Presale int `json:"presale"`
	Event   int `json:"event"`
}

CalendarCounts is a schema of the public API.

type CalendarDay

type CalendarDay struct {
	Date   string         `json:"date"`
	Counts CalendarCounts `json:"counts"`
	// Highest on-sale heat (`CalendarItem.heat`) among the day's on-sale and
	// presale items matching the filters; null when none is scored. Drives
	// the calendar's per-cell heat colouring.
	Heat *float64 `json:"heat"`
	// The day's most prominent items (ties by time; one item per event first).
	Top []CalendarItem `json:"top"`
}

CalendarDay is a schema of the public API.

type CalendarDays

type CalendarDays struct {
	TZ   string        `json:"tz"`
	From string        `json:"from"`
	To   string        `json:"to"`
	Days []CalendarDay `json:"days"`
}

CalendarDays is a schema of the public API.

type CalendarEvent

type CalendarEvent struct {
	ID        int64   `json:"id"`
	Name      string  `json:"name"`
	TmEventID *string `json:"tmEventId"`
	// The event's primary seller (`EventSummary.primarySource`).
	PrimarySource *PrimarySource `json:"primarySource"`
	// Ticketmaster (or other primary) event page.
	URL       *string     `json:"url"`
	StartsAt  *time.Time  `json:"startsAt"`
	LocalDate *string     `json:"localDate"`
	Timezone  *string     `json:"timezone"`
	Status    EventStatus `json:"status"`
	Venue     *VenueRef   `json:"venue,omitempty"`
	// The event's attractions in billing order.
	Attractions []AttractionRef `json:"attractions"`
	// A compiled seat map is linked to the event.
	HasSeatMap bool `json:"hasSeatMap"`
	// Declared places of the compiled seat map: seats plus GA capacity (the larger of
	// the seat count and the sections' declared totals). A venue capacity proxy; null
	// without a map or when the map declares none.
	Capacity *int `json:"capacity"`
}

CalendarEvent is a schema of the public API.

type CalendarItem

type CalendarItem struct {
	// Stable item key (`kind:eventId:unixSeconds`).
	ID   string       `json:"id"`
	Kind CalendarKind `json:"kind"`
	At   time.Time    `json:"at"`
	// End of the sale window (the latest end of a presale stack); null for shows and open-ended windows.
	EndsAt *time.Time `json:"endsAt"`
	// Local day of `at` in the requested `tz`.
	Date string `json:"date"`
	// The presales starting together, by name (`presale` items only; empty otherwise).
	Presales []CalendarPresale `json:"presales"`
	// 0–100 ranking prior from catalog facts: 25 if hosted on
	// Ticketmaster, up to 40 for venue capacity (ln(1+capacity)/ln(1+80000),
	// see `CalendarEvent.capacity`), up to 20 for the event's presale count
	// (4+ = full), up to 15 for the advertised face-value maximum
	// (ln(1+max)/ln(1+1000), major units, not currency-converted).
	// Cancelled events score 0.
	Prominence float64 `json:"prominence"`
	// The event's on-sale heat, 0–100, recomputed on every metrics refresh
	// for listed upcoming events with an on-sale or presale
	// starting in the last 7 days or later; null for other events. A weighted
	// mean of component scores (weights renormalised over the known ones):
	// 30% the median secondary spread of the reference events (+100% = full),
	// 20% their median primary sell-through, 15% their median secondary
	// median ÷ the advertised face maximum (0.5× = 0, 2× = full), 10% venue
	// capacity (log scale, 80k = full), 10% routing (1 / (1 + log2 shows of
	// the headliner within ±90 days)), 15% presales (4+ = full). Reference
	// events are the headliner's other events with metrics (2+), else the
	// segment's (5+), else every event's.
	Heat  *float64      `json:"heat"`
	Event CalendarEvent `json:"event"`
}

CalendarItem is a schema of the public API.

type CalendarItemPage

type CalendarItemPage struct {
	Items []CalendarItem `json:"items"`
	// Cursor of the next page; null on the last page.
	NextCursor *string `json:"nextCursor"`
}

CalendarItemPage is a schema of the public API.

type CalendarKind

type CalendarKind string

CalendarKind: `onsale`: public on-sale start; `presale`: presale start; `event`: show start.

const (
	CalendarKindOnsale  CalendarKind = "onsale"
	CalendarKindPresale CalendarKind = "presale"
	CalendarKindEvent   CalendarKind = "event"
)

Values of CalendarKind.

type CalendarPresale

type CalendarPresale struct {
	Name   string     `json:"name"`
	EndsAt *time.Time `json:"endsAt"`
}

CalendarPresale is a schema of the public API.

type CatalogFacet

type CatalogFacet struct {
	Name string `json:"name"`
	// Upcoming (or undated) events with this value.
	Events int `json:"events"`
}

CatalogFacet is a schema of the public API.

type CatalogFacets

type CatalogFacets struct {
	// Segments by upcoming events, each with its genres by upcoming events.
	Segments []CatalogSegmentFacet `json:"segments"`
}

CatalogFacets is a schema of the public API.

type CatalogSegmentFacet

type CatalogSegmentFacet struct {
	CatalogFacet
	Genres []CatalogFacet `json:"genres"`
}

CatalogSegmentFacet is a schema of the public API.

type ChannelKind

type ChannelKind string

ChannelKind: `slack_app` channels post as the org's installed Slack app (Settings → Integrations; created with `POST /v1/integrations/slack/workspaces/{teamId}/channels`, not `POST /v1/channels`). `webpush` and `apns` channels are members' own browsers and iOS devices.

const (
	ChannelKindDiscordWebhook    ChannelKind = "discord_webhook"
	ChannelKindSlackWebhook      ChannelKind = "slack_webhook"
	ChannelKindSlackApp          ChannelKind = "slack_app"
	ChannelKindTeamsWebhook      ChannelKind = "teams_webhook"
	ChannelKindGoogleChatWebhook ChannelKind = "google_chat_webhook"
	ChannelKindTelegram          ChannelKind = "telegram"
	ChannelKindEmail             ChannelKind = "email"
	ChannelKindWebpush           ChannelKind = "webpush"
	ChannelKindApns              ChannelKind = "apns"
)

Values of ChannelKind.

type Classification

type Classification struct {
	Primary  bool   `json:"primary"`
	Family   bool   `json:"family"`
	Segment  string `json:"segment"`
	Genre    string `json:"genre"`
	Subgenre string `json:"subgenre"`
	Type     string `json:"type"`
	Subtype  string `json:"subtype"`
}

Classification: A Discovery classification; names are empty where Discovery leaves them undefined.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the Status302 REST client. Every operation of the public API is a method (operations.go), typed from the public OpenAPI spec:

client := status302.NewClient(os.Getenv("STATUS302_API_KEY"))
page, err := client.ListEvents(ctx, &status302.ListEventsParams{Limit: new(10)})

A Client is safe for concurrent use.

func NewClient

func NewClient(apiKey string, opts ...Option) *Client

NewClient returns a client authenticating with apiKey (`tx_live_<keyId>_<secret>`, sent as `Authorization: Bearer`). An empty key sends no credentials (e.g. when the HTTP client adds them itself).

func (*Client) AddSavedListItems

func (c *Client) AddSavedListItems(ctx context.Context, listID string, body *AddSavedListItemsRequest, opts ...RequestOption) (*AddSavedListItemsResult, error)

AddSavedListItems calls POST /v1/lists/{listId}/items: Add events to a list.

Idempotent bulk add (1–500 events): events already in the list are skipped. Unknown event ids reject the whole call (400). The plan's per-list limit applies to the events new to the list (402).

**API key scope:** `lists:write`.

func (*Client) BaseURL

func (c *Client) BaseURL() string

BaseURL is the API origin the client sends requests to.

func (*Client) CreateAlertRule

func (c *Client) CreateAlertRule(ctx context.Context, body *AlertRuleInput, opts ...RequestOption) (*AlertRule, error)

CreateAlertRule calls POST /v1/alerts/rules: Create a rule.

Validates the scope (event, list, attraction or catalog filter) and the condition against the plan (rule count, % change metrics, scopes). Metric rules are evaluated against current metrics right away (events already matching fire once).

**API key scope:** `alerts:write`.

func (*Client) CreateChannel

func (c *Client) CreateChannel(ctx context.Context, body *CreateChannelRequest, opts ...RequestOption) (*NotificationChannelCreated, error)

CreateChannel calls POST /v1/channels: Add a channel.

`discord_webhook`, `slack_webhook`, `teams_webhook`, `google_chat_webhook`: the platform's incoming-webhook URL — https, on the platform's own host (discord.com/discordapp.com, hooks.slack.com, a Teams Workflows URL on *.logic.azure.com or *.environment.api.powerplatform.com, chat.googleapis.com) and public addresses only; a "connected" message is delivered first and a failure rejects the channel (422). `email`: verified at once when it is the signed-in caller's own address, else (always for API keys) a 6-digit code is emailed to it (`POST …/verify`). `telegram`: returns `linkUrl`, a bot deep link that connects the chat it is opened in (valid 1 h). Web Push channels are per browser and come from the app only.

Limits: an org has at most 25 channels (Web Push not counted; 409). Verification messages (email codes, webhook "connected" messages, reissued Telegram links) are limited to 10 per hour per org and 5 per hour per channel and per email address; over a limit the answer is 429 with `Retry-After`. Owners and admins only (a key acts with its creator's role, capped at admin).

**API key scope:** `alerts:write`.

func (*Client) CreateExport

func (c *Client) CreateExport(ctx context.Context, body *ExportInput, opts ...RequestOption) (*Export, error)

CreateExport calls POST /v1/exports: Start an async export.

Writes every row of a REST read to a CSV or JSON Lines file in the background; poll `GET /v1/exports/{exportId}` until `status` is `succeeded`, then download `downloadUrl` (signed, valid 15 minutes, no credentials needed). `filters` are the query parameters of the read the kind mirrors, with the same validation and plan clamps:

| kind | read | required filters | |---|---|---| | `events` | `GET /v1/events` | – | | `sales` | `GET /v1/sales/feed`, or `GET /v1/events/{eventId}/sales` with `eventId` | – | | `series` | `GET /v1/events/{eventId}/series` | `eventId` | | `list` | `GET /v1/lists/{listId}/grid` (the list's rows with their metrics) | `listId` |

Scopes: `catalog:read` for events and lists, `sales:read` for sales, `market:read` for series. Rows are capped by the plan's export limit and, on every plan, by 1,000,000 rows and 256 MiB per file (`truncated` tells). An org may have 3 exports queued or running; another is answered 429 (`limit` `concurrent`) with Retry-After.

**API key scope:** `catalog:read`.

func (*Client) CreateSavedList

func (c *Client) CreateSavedList(ctx context.Context, body *CreateSavedListRequest, opts ...RequestOption) (*SavedList, error)

CreateSavedList calls POST /v1/lists: Create a list.

Creates a list in the active org, optionally with its first events (at most 500). The org's plan limits the number of lists and of events per list (402). Recorded in the audit log.

**API key scope:** `lists:write`.

func (*Client) CreateStreamTicket

func (c *Client) CreateStreamTicket(ctx context.Context, opts ...RequestOption) (*StreamTicket, error)

CreateStreamTicket calls POST /v1/stream/ticket: Ticket for a browser WebSocket connection.

Returns a single-use ticket, valid for 60 s, for opening the realtime stream from a browser: `GET /v1/stream?ticket=<ticket>` (WebSocket, protocol: https://status302.com/docs/stream/). Long-lived credentials never appear in URLs. The connection acts as the caller; ending the session (or revoking the API key) closes it with 4401. With an API key (backends handing tickets to their own browser clients) the key needs the `stream` scope; server-side clients can instead send the key in `Authorization: Bearer` on the upgrade itself.

**API key scope:** `stream`.

func (*Client) CreateWebhook

func (c *Client) CreateWebhook(ctx context.Context, body *WebhookInput, opts ...RequestOption) (*WebhookSecret, error)

CreateWebhook calls POST /v1/webhooks: Register a webhook endpoint.

Deliveries are signed POSTs (see the `Webhooks` guide): header `Status302-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + "." + body)>`, plus `Status302-Delivery-Id` (idempotency key) and `Status302-Event`. The signing secret is returned once here (and on rotate). The URL must be https and resolve to public addresses only. `list.sale`, `event.status_changed` and the market-activity types (`inventory.restocked`, `inventory.sold`, `resale.listed`, `resale.sold`, `marketplace.listed`, `marketplace.sold`) need a `listId`: they cover the events of that list. `markets` narrows `list.sale` and the market-activity types to some markets. Needs a plan with webhooks (Elite). Audited.

**API key scope:** `webhooks:write`.

func (*Client) DeleteAlertRule

func (c *Client) DeleteAlertRule(ctx context.Context, ruleID int64, opts ...RequestOption) error

DeleteAlertRule calls DELETE /v1/alerts/rules/{ruleId}: Delete a rule.

Its firings stay in the history.

**API key scope:** `alerts:write`.

func (*Client) DeleteChannel

func (c *Client) DeleteChannel(ctx context.Context, channelID int64, opts ...RequestOption) error

DeleteChannel calls DELETE /v1/channels/{channelId}: Delete a channel.

It is removed from every rule; past deliveries keep its name. Owners and admins only.

**API key scope:** `alerts:write`.

func (*Client) DeleteSavedList

func (c *Client) DeleteSavedList(ctx context.Context, listID string, opts ...RequestOption) error

DeleteSavedList calls DELETE /v1/lists/{listId}: Delete a list.

The list's creator or an org admin/owner. Recorded in the audit log.

**API key scope:** `lists:write`.

func (*Client) DeleteWebhook

func (c *Client) DeleteWebhook(ctx context.Context, webhookID string, opts ...RequestOption) error

DeleteWebhook calls DELETE /v1/webhooks/{webhookId}: Delete an endpoint.

Pending deliveries are dropped. Audited.

**API key scope:** `webhooks:write`.

func (*Client) DownloadExport

func (c *Client) DownloadExport(ctx context.Context, exportID string, params *DownloadExportParams, opts ...RequestOption) ([]byte, error)

DownloadExport calls GET /v1/exports/{exportId}/download: Download an export file (signed URL).

The `downloadUrl` of a succeeded export when the object store cannot presign URLs itself: authenticated by its `expires` and `signature` query parameters, not by credentials.

func (*Client) ExportPortfolioCSV

func (c *Client) ExportPortfolioCSV(ctx context.Context, params *ExportPortfolioCSVParams, opts ...RequestOption) ([]byte, error)

ExportPortfolioCSV calls GET /v1/portfolio/export.csv: The portfolio's positions as CSV.

The rows of `GET /v1/portfolio` (per position, or per event with `groupBy=event`: lists joined by "; ", average cost basis) in its order as RFC 4180 CSV: event, list, quantity, cost basis and total (cost currency), floor, value, P&L and P&L % (market currency), Δ24h, sales 24h, bucket, at-risk reasons and the market sample time. Money in major units, changes as percentages, times in RFC 3339 UTC; text starting with `= + - @` is prefixed with an apostrophe. Needs CSV export and the plan's export row limit, like list exports (402).

**API key scope:** `catalog:read`.

func (*Client) ExportSavedListCSV

func (c *Client) ExportSavedListCSV(ctx context.Context, listID string, params *ExportSavedListCSVParams, opts ...RequestOption) ([]byte, error)

ExportSavedListCSV calls GET /v1/lists/{listId}/export.csv: The grid as CSV.

The same rows as the grid (same parameters and fallbacks) as RFC 4180 CSV: event id and name, the columns in order (sparklines left out), then the row currency. Money in major units, changes and shares as percentages, times in RFC 3339 UTC. Text starting with `= + - @` is prefixed with an apostrophe (formula injection). Counts against the same in-flight limit as the grid (429, `limit` `concurrent`).

**API key scope:** `catalog:read`.

func (*Client) GetAlertRule

func (c *Client) GetAlertRule(ctx context.Context, ruleID int64, opts ...RequestOption) (*AlertRule, error)

GetAlertRule calls GET /v1/alerts/rules/{ruleId}: One rule.

**API key scope:** `alerts:write`.

func (*Client) GetAttraction

func (c *Client) GetAttraction(ctx context.Context, id int64, opts ...RequestOption) (*AttractionDetail, error)

GetAttraction calls GET /v1/attractions/{id}: Attraction detail.

One attraction (performer, team, show) with its Discovery classifications and links, a rollup of its catalog events around now and its next upcoming event.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetAttractionHistory

func (c *Client) GetAttractionHistory(ctx context.Context, id int64, params *GetAttractionHistoryParams, opts ...RequestOption) (*AttractionHistory, error)

GetAttractionHistory calls GET /v1/attractions/{id}/history: Market history of an attraction's past events.

The attraction's events that have started, most recent first, each with how its market ended: the resale and secondary spread over the primary floor and the primary sell-through from the event's last metrics, and the primary depletion over its collected history (first to last primary sample up to the start). Use it to judge an upcoming on-sale by how the act's earlier shows went. Needs market data and ended-event history; `secondarySpread` is null without secondary marketplaces.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetCatalogFacets

func (c *Client) GetCatalogFacets(ctx context.Context, opts ...RequestOption) (*CatalogFacets, error)

GetCatalogFacets calls GET /v1/catalog/facets: Segments and genres of the catalog.

The values of the `segment` and `genre` filters of `GET /v1/events` with their numbers of upcoming (or undated) events.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetCompareSeries

func (c *Client) GetCompareSeries(ctx context.Context, params *GetCompareSeriesParams, opts ...RequestOption) (*CompareSeriesSet, error)

GetCompareSeries calls GET /v1/compare/series: One metric across several events.

`align=calendar` returns every event over the same range (`from`/`to`, default the last 30 days); `align=days_to_event` returns each event over the `daysBefore` days before its own start (up to now for upcoming shows), with `daysToEvent` as the shared axis.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetEvent

func (c *Client) GetEvent(ctx context.Context, id int64, opts ...RequestOption) (*EventDetail, error)

GetEvent calls GET /v1/events/{id}: Event detail.

One catalog event including its public on-sale and presale windows.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetEventMap

func (c *Client) GetEventMap(ctx context.Context, id int64, opts ...RequestOption) (*EventMap, error)

GetEventMap calls GET /v1/events/{id}/map: The event's seat map.

Status of the event's seat map and, once compiled, the artifact it uses (fetched from the event's own Ticketmaster map, never "latest for the venue"). `pending` until the first map fetch; `no_map` when Ticketmaster has none (GA-only events); `error` when the map could not be compiled (the last good artifact, if any, is still returned).

**API key scope:** `maps:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetEventMapOverlay

func (c *Client) GetEventMapOverlay(ctx context.Context, id int64, params *GetEventMapOverlayParams, opts ...RequestOption) (*MapOverlay, error)

GetEventMapOverlay calls GET /v1/events/{id}/map/overlay: Live availability and prices on the seat map.

Ticketmaster primary inventory of the event's last accepted snapshot and its current TM resale listings (source `tmresale`), keyed by the artifact's place and section indexes. Bitsets are base64, one bit per place, LSB first (place *i* is bit *i*&nbsp;mod&nbsp;8 of byte *i*&nbsp;div&nbsp;8). `priceLevel` is base64 of a little-endian int16 per place: an index into `priceLevels`, or -1 when unpriced. Primary seats join through the manifest's placeIds, TM resale listings through the placeIds they name; GA stock through the section names. The ETag changes with the seat map, the snapshot and the pricing; send it back in `If-None-Match` to get a 304.

With `mode`, the body also carries `sectionLayers`: per scope (Ticketmaster `primary` and `tm_resale`, each marketplace `secondary:<source>` with section data and their best `secondary:best`), the values of every section on the map, keyed by section index and key: tickets (`availability`), plus the median (`price`), 24h/72h sales (`sales`), or the spread and ROI against the section's primary floor (`spread`, see `GET /v1/events/{id}/sections`). With map prices every mode but `availability` also carries each section's floor and its 24h change (`delta` carries only those), so a hover can show them in every mode. Marketplace layers (`secondary:<source>`, `secondary:best`) also break each section's tickets down by the row the listings name (`rows`), with the seats of listings that name them, so a map can light the exact seats, else the row, else the whole section. `mode=availability` also strips the price layers like plans without map prices get them. `market` and `source` narrow the layers; marketplace layers need a plan with secondary marketplaces (omitted otherwise, 402 when asked for), and the `price`, `delta` and `spread` modes map prices (402). With `mode`, the ETag also follows the section data, and for `sales` and every mode carrying the 24h change it changes at least every 5 minutes. Section layers of an event that started more than 24 hours ago need ended-event history (402). Live updates: stream topic `event.{id}.map`.

**API key scope:** `maps:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetEventMetrics

func (c *Client) GetEventMetrics(ctx context.Context, id int64, opts ...RequestOption) (*EventMetricsList, error)

GetEventMetrics calls GET /v1/events/{id}/metrics: Market metrics of an event.

The event's serving metrics for every scope with market data (KPIs, sparkline, movement) that the plan may see: marketplace scopes (`secondary:*`) only with secondary marketplaces. Events that started more than 24 hours ago need ended-event history (402).

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetEventSectionSeries

func (c *Client) GetEventSectionSeries(ctx context.Context, id int64, key string, params *GetEventSectionSeriesParams, opts ...RequestOption) (*SectionSeries, error)

GetEventSectionSeries calls GET /v1/events/{id}/sections/{key}/series: Chart series of one section.

Column-oriented buckets of one section's history in a scope: floor, median and tickets holding at the end of each bucket (each change holds until the next; null before the first known value, floor and median null while nothing is priced) and the tickets sold in it. `secondary:best` takes the lowest floor and the summed tickets across marketplaces. Without `res` the resolution follows the range: 5m up to 3 days, 1h up to 60 days, 1d beyond; more than 2000 buckets is a 400. History reaches back as far as the plan's chart history. Plans without map prices (`mapPrices`) get availability only: `currency` null and every `floor` and `median` bucket null; `tickets` and `sales` stay.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetEventSeries

func (c *Client) GetEventSeries(ctx context.Context, id int64, params *GetEventSeriesParams, opts ...RequestOption) (*EventSeries, error)

GetEventSeries calls GET /v1/events/{id}/series: Chart series of an event.

Column-oriented buckets of the event's market and sales history from the continuous aggregates. Without `res` the resolution follows the range: 5m up to 3 days, 1h up to 60 days, 1d beyond. A range above 2000 buckets at the requested resolution is a 400.

With `section`, the series is a custom zone: the named sections of the `scope` charted together from the section history (the source of `GET /v1/events/{id}/sections/{key}/series`). `floor` is the lowest zone floor holding at the bucket end, `floorMin` the lowest at any time in the bucket (the value held at its start included), `median` the priced-ticket-weighted median of the zone sections' medians, `tickets` their summed tickets, `sales` the tickets sold in them during the bucket and `volume` Σ qty × all-in price of those priced sales, in `currency` (the zone's most-listed currency; other currencies convert at the day's rate). Range, resolution and plan limits are the same. Plans without map prices (`mapPrices`) get a zone's availability only, like the section series: `currency` null and every `floor`, `floorMin`, `median` and `volume` bucket null.

With `offer` (Ticketmaster events, `scope` primary), the series is one ticket type: the primary price levels of that offer (the `name` of `GET /v1/events/{id}/offers`), from their seat and GA stock history. `floor` is the cheapest of its levels with open stock at the bucket end, `floorMin` the cheapest at any time in the bucket, `median` the ticket-weighted median of its open levels' all-in prices, `tickets` their open stock, `sales` the settled primary sales at those levels during the bucket and `volume` Σ qty × all-in price of them. With `section` too, only the stock and sales in those sections count (seats and GA pools placed through the event's current Ticketmaster manifest). Every bucket of the range is returned (null before the event's first poll; `floor` and `median` null while nothing is open). `offer` with another scope is a 400. Plans without map prices get availability only, as for a zone.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetExport

func (c *Client) GetExport(ctx context.Context, exportID string, opts ...RequestOption) (*Export, error)

GetExport calls GET /v1/exports/{exportId}: Status of an export.

**API key scope:** `catalog:read`.

func (*Client) GetPath

func (c *Client) GetPath(ctx context.Context, pathAndQuery string, opts ...RequestOption) (json.RawMessage, error)

GetPath GETs a REST path returned by the API itself (a stream snapshot, a resync target), including its query string, and returns the JSON body.

func (*Client) GetPortfolio

func (c *Client) GetPortfolio(ctx context.Context, params *GetPortfolioParams, opts ...RequestOption) (*Portfolio, error)

GetPortfolio calls GET /v1/portfolio: The active org's positions across its lists.

Every list item with a quantity held, valued at the floor of `scope` (the grid's position columns: cost = qty × cost basis, value = qty × floor, P&L = qty × (floor − cost basis); no seller fee is deducted). An event held in two lists is two positions (`eventPositions` counts them); `groupBy=event` folds them into one row per event (`lists` names its lists; quantities and money summed, `costBasis` the average per ticket). `totals` equal the overview's `holdings`; `exposure` splits them by the event's date: `past` (the `past`/`archived` lifecycles — tickets still held after the event), `next7d`, `next30d` (8–30 days), `later` and `undated`. Positions in upcoming events carry at-risk reasons. Any member or key reads it; market data in the scope needs the plan's (402). Money is in minor units (cost in `costCurrency`, market value and P&L in the market's currency; see the money guide).

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetPortfolioHistory

func (c *Client) GetPortfolioHistory(ctx context.Context, params *GetPortfolioHistoryParams, opts ...RequestOption) (*PortfolioHistory, error)

GetPortfolioHistory calls GET /v1/portfolio/history: The portfolio's cost, market value and P&L over time.

The org's held list items summed per bucket of `interval` over `[from, to)`, one series per currency, with the meanings of the portfolio's `totals`: `cost` in the cost basis's currency, `value` (qty × floor) and `pnl` (qty × (floor − cost basis)) in the market's, `pnlCost` the cost of the positions in `pnl`. Floors come from the hourly or daily market aggregates of `scope`: a bucket's floor is its last one, else the last before it (up to 7 days before `from`). Assumptions: an item counts from the bucket in which it was added to its list, with its current quantity and cost basis (earlier quantities and removed items are not recorded); positions in events that ended beyond the plan's history keep their cost but no value. `from` defaults to 30 days before `to` (default now); `interval` defaults to `1h` for spans up to 31 days, `1d` beyond; at most 2000 buckets. The range is clamped to the plan's series history (402 when nothing remains). Market data in the scope needs the plan's (402).

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetPredictionAvailability

func (c *Client) GetPredictionAvailability(ctx context.Context, opts ...RequestOption) (*PredictionAvailability, error)

GetPredictionAvailability calls GET /v1/predictions/availability: Whether the caller sees the predictions.

Customers on any plan see a category of predictions once it is published: staff switched it on for the org and its current model has a track record of at least `minGraded` graded calls. Each category (`tm`, `dice`) is published on its own; the top-level fields are `tm`'s. Any member or key may ask, so a client can tell a wait (`reason` `unpublished`) before calling `GET /v1/predictions`.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetPredictionTrackRecord

func (c *Client) GetPredictionTrackRecord(ctx context.Context, params *GetPredictionTrackRecordParams, opts ...RequestOption) (*PredictionTrackRecord, error)

GetPredictionTrackRecord calls GET /v1/predictions/track-record: Prediction track record.

How one category's calls turned out, overall and per model version, all time and over the last 30 and 90 days (by grading time): hits, misses, voids, hit rate, mean exit markup, Brier score of the risk at the call, and the calibration per 10-point risk band (the miss rate the risk predicted against the one observed). Recomputed at most every minute. Same access as `GET /v1/predictions` for the category.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetSalesSummary

func (c *Client) GetSalesSummary(ctx context.Context, params *GetSalesSummaryParams, opts ...RequestOption) (*SalesSummary, error)

GetSalesSummary calls GET /v1/sales/summary: Sales totals of a recent window.

Settled sales of the last 24 hours (or `window`) across events, per market scope (every scope the plan may see listed, zeros included): sales, tickets and volume per currency. Marketplace scopes need secondary marketplaces: left out without `scope`, 402 when asked for. Filters and the confidence default (every confidence) match `GET /v1/sales/feed`.

**API key scope:** `sales:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetSavedList

func (c *Client) GetSavedList(ctx context.Context, listID string, opts ...RequestOption) (*SavedList, error)

GetSavedList calls GET /v1/lists/{listId}: One list with its saved view.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetSeatmap

func (c *Client) GetSeatmap(ctx context.Context, hash string, opts ...RequestOption) ([]byte, error)

GetSeatmap calls GET /v1/seatmaps/{hash}: Seat map artifact.

The compiled `.tmap` seat map artifact (format 2, docs/seatmap-format.md), addressed by the SHA-256 of its uncompressed bytes and therefore immutable. It holds section names, kinds and capacities, rows, seat positions, seat labels and placeIds, plus section outlines generated from the seats and the sections' extents; it carries no provider artwork and no labels (draw section names yourself). Sent brotli-compressed (`Content-Encoding: br`) when the request accepts `br`, uncompressed otherwise. The ETag is the hash.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetUsage

func (c *Client) GetUsage(ctx context.Context, params *GetUsageParams, opts ...RequestOption) (*Usage, error)

GetUsage calls GET /v1/usage: API usage and quotas of the org.

Requests (by endpoint group), 429s, server errors and stream connections/messages of the org's API keys, metered per key and minute, bucketed by `granularity` over [`from`, `to`) (default: the last 24 hours by hour; minute buckets cover at most 6 hours, hour buckets 7 days, day buckets 90 days). The current minute is included live. `quota` is the plan's limits; `current` the live usage against them. Any key may read it (no scope needed).

func (*Client) GetVenue

func (c *Client) GetVenue(ctx context.Context, id int64, opts ...RequestOption) (*VenueDetail, error)

GetVenue calls GET /v1/venues/{id}: Venue detail.

One venue with its address and location, a rollup of its catalog events around now, its next upcoming event, and the Ticketmaster venue configurations (layouts) of its events' compiled seat maps.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) GetWebhook

func (c *Client) GetWebhook(ctx context.Context, webhookID string, opts ...RequestOption) (*Webhook, error)

GetWebhook calls GET /v1/webhooks/{webhookId}: One webhook endpoint.

**API key scope:** `webhooks:write`.

func (*Client) ListAlertEvents

func (c *Client) ListAlertEvents(ctx context.Context, params *ListAlertEventsParams, opts ...RequestOption) (*AlertEventPage, error)

ListAlertEvents calls GET /v1/alerts/events: Alert history.

The org's firings, newest first, with each channel delivery's status. Snapshot of the `alerts` stream topic.

**API key scope:** `alerts:write`.

func (*Client) ListAlertEventsAll

func (c *Client) ListAlertEventsAll(ctx context.Context, params *ListAlertEventsParams, opts ...RequestOption) iter.Seq2[AlertEvent, error]

ListAlertEventsAll iterates every item of ListAlertEvents across pages.

func (*Client) ListAlertEventsPages

func (c *Client) ListAlertEventsPages(ctx context.Context, params *ListAlertEventsParams, opts ...RequestOption) iter.Seq2[*AlertEventPage, error]

ListAlertEventsPages iterates the pages of ListAlertEvents, following nextBefore as before until the last page.

func (*Client) ListAlertRules

func (c *Client) ListAlertRules(ctx context.Context, params *ListAlertRulesParams, opts ...RequestOption) (*AlertRulePage, error)

ListAlertRules calls GET /v1/alerts/rules: The org's alert rules.

Newest first, with the org's rule count and plan limit.

**API key scope:** `alerts:write`.

func (*Client) ListAlertRulesAll

func (c *Client) ListAlertRulesAll(ctx context.Context, params *ListAlertRulesParams, opts ...RequestOption) iter.Seq2[AlertRule, error]

ListAlertRulesAll iterates every item of ListAlertRules across pages.

func (*Client) ListAlertRulesPages

func (c *Client) ListAlertRulesPages(ctx context.Context, params *ListAlertRulesParams, opts ...RequestOption) iter.Seq2[*AlertRulePage, error]

ListAlertRulesPages iterates the pages of ListAlertRules, following nextBefore as before until the last page.

func (*Client) ListAttractionEvents

func (c *Client) ListAttractionEvents(ctx context.Context, id int64, params *ListAttractionEventsParams, opts ...RequestOption) (*EventPage, error)

ListAttractionEvents calls GET /v1/attractions/{id}/events: Events of an attraction.

The attraction's catalog events in start order (undated last), upcoming by default, with cursor pagination like `listEvents`.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListAttractionEventsAll

func (c *Client) ListAttractionEventsAll(ctx context.Context, id int64, params *ListAttractionEventsParams, opts ...RequestOption) iter.Seq2[EventSummary, error]

ListAttractionEventsAll iterates every item of ListAttractionEvents across pages.

func (*Client) ListAttractionEventsPages

func (c *Client) ListAttractionEventsPages(ctx context.Context, id int64, params *ListAttractionEventsParams, opts ...RequestOption) iter.Seq2[*EventPage, error]

ListAttractionEventsPages iterates the pages of ListAttractionEvents, following nextCursor as cursor until the last page.

func (*Client) ListCalendarDays

func (c *Client) ListCalendarDays(ctx context.Context, params *ListCalendarDaysParams, opts ...RequestOption) (*CalendarDays, error)

ListCalendarDays calls GET /v1/calendar/days: Calendar items counted per day.

One row per local day of `[from, to)` in `tz` that has at least one item (days without items are omitted), with the item count per kind and the `top` most prominent items of the day (see `CalendarItem.prominence`; an event's first item of the day ranks ahead of its later ones). Items are public on-sale starts (`onsale`), presale starts (`presale`, presales of one event that start together are one item) and show starts (`event`). Items without a known instant are excluded: TBA/TBD dates, shows whose time is TBA, public on-sales flagged TBD and presales without a start. The range is at most 62 days (a 6-week month grid).

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListCalendarItems

func (c *Client) ListCalendarItems(ctx context.Context, params *ListCalendarItemsParams, opts ...RequestOption) (*CalendarItemPage, error)

ListCalendarItems calls GET /v1/calendar/items: Calendar items.

On-sale, presale and show items starting in the local days `[from, to)` of `tz` (at most 366 days), with cursor pagination. `sort=time` (the default) is chronological; `sort=prominence` puts the most prominent first. Pass `nextCursor` as `cursor` with the same parameters for the next page. The same exclusions as `/v1/calendar/days` apply.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListCalendarItemsAll

func (c *Client) ListCalendarItemsAll(ctx context.Context, params *ListCalendarItemsParams, opts ...RequestOption) iter.Seq2[CalendarItem, error]

ListCalendarItemsAll iterates every item of ListCalendarItems across pages.

func (*Client) ListCalendarItemsPages

func (c *Client) ListCalendarItemsPages(ctx context.Context, params *ListCalendarItemsParams, opts ...RequestOption) iter.Seq2[*CalendarItemPage, error]

ListCalendarItemsPages iterates the pages of ListCalendarItems, following nextCursor as cursor until the last page.

func (*Client) ListChannels

func (c *Client) ListChannels(ctx context.Context, opts ...RequestOption) (*NotificationChannelList, error)

ListChannels calls GET /v1/channels: The org's notification channels.

Where alert rules deliver: every channel of the org, oldest first, with whether it is verified and enabled and the outcome of its last delivery (`lastSentAt`, `lastError`). Route a rule to channels by their `id` (`channels` of `POST /v1/alerts/rules`). Every member sees them; owners and admins (and their keys) manage them.

**API key scope:** `alerts:write`.

func (*Client) ListEventListingChanges

func (c *Client) ListEventListingChanges(ctx context.Context, id int64, params *ListEventListingChangesParams, opts ...RequestOption) (*ListingChangePage, error)

ListEventListingChanges calls GET /v1/events/{id}/listings/changes: Recent marketplace listing changes.

Changes between consecutive polls of the event's linked secondary marketplaces, newest first: listings that appeared (`added`), changed price or quantity, or disappeared (`removed`). Prices are all-in per ticket. Needs a plan with secondary marketplaces; history reaches back as far as the plan's sales history. Pass `nextCursor` as `cursor` (with the same filters) for the next page.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventListingChangesAll

func (c *Client) ListEventListingChangesAll(ctx context.Context, id int64, params *ListEventListingChangesParams, opts ...RequestOption) iter.Seq2[ListingChange, error]

ListEventListingChangesAll iterates every item of ListEventListingChanges across pages.

func (*Client) ListEventListingChangesPages

func (c *Client) ListEventListingChangesPages(ctx context.Context, id int64, params *ListEventListingChangesParams, opts ...RequestOption) iter.Seq2[*ListingChangePage, error]

ListEventListingChangesPages iterates the pages of ListEventListingChanges, following nextCursor as cursor until the last page.

func (*Client) ListEventListingSections

func (c *Client) ListEventListingSections(ctx context.Context, id int64, params *ListEventListingSectionsParams, opts ...RequestOption) (*ListingSectionList, error)

ListEventListingSections calls GET /v1/events/{id}/listings/sections: Current marketplace listings per section.

The event's current marketplace listings aggregated per section, and within each section per marketplace (the per-section source compare): listings, tickets and the cheapest all-in price per ticket. Sections group by canonical `sectionKey`, unmapped labels under their own label. Sections are ordered by their cheapest listing (in the minor units of each marketplace's currency). Needs a plan with secondary marketplaces. Filter the listings of one section with `GET /v1/events/{id}/listings?section=<sectionKey or label>`.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventListings

func (c *Client) ListEventListings(ctx context.Context, id int64, params *ListEventListingsParams, opts ...RequestOption) (*ListingPage, error)

ListEventListings calls GET /v1/events/{id}/listings: Current marketplace listings.

The event's current listings on Ticketmaster resale (market `tm_resale`, source `tmresale`) and its linked secondary marketplaces, as of each source's latest poll (`asOf`), cheapest all-in price per ticket first. Marketplace listings need a plan with secondary marketplaces; TM resale listings need market data. Pass `nextCursor` as `cursor` (with the same filters and sort) for the next page. Live updates: stream topic `event.{id}.listings`.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventListingsAll

func (c *Client) ListEventListingsAll(ctx context.Context, id int64, params *ListEventListingsParams, opts ...RequestOption) iter.Seq2[Listing, error]

ListEventListingsAll iterates every item of ListEventListings across pages.

func (*Client) ListEventListingsPages

func (c *Client) ListEventListingsPages(ctx context.Context, id int64, params *ListEventListingsParams, opts ...RequestOption) iter.Seq2[*ListingPage, error]

ListEventListingsPages iterates the pages of ListEventListings, following nextCursor as cursor until the last page.

func (*Client) ListEventOffers

func (c *Client) ListEventOffers(ctx context.Context, id int64, opts ...RequestOption) (*TicketOfferList, error)

ListEventOffers calls GET /v1/events/{id}/offers: Ticketmaster ticket types.

The offers (ticket types) of the event's Ticketmaster primary price levels, each with its levels in use now, their open stock and price range: the values `offer` of `GET /v1/events/{id}/series` takes. Offers whose levels ended before the plan's chart history are left out; events without Ticketmaster price levels answer an empty list. Plans without map prices get no prices (`currency`, `minMinor` and `maxMinor` null).

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventPriceLevels

func (c *Client) ListEventPriceLevels(ctx context.Context, id int64, params *ListEventPriceLevelsParams, opts ...RequestOption) (*PriceLevelHistory, error)

ListEventPriceLevels calls GET /v1/events/{id}/price-levels: Primary price-level history.

Every version of the event's Ticketmaster primary price levels (one per AVSC price key): a level whose price, fees or offer changes, or that disappears, ends (`validTo`) and its new version starts. Ordered by price key, then oldest version first; `validTo` null marks a level in use now. Versions that ended before the plan's chart history are left out. Needs a plan with map prices.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventSales

func (c *Client) ListEventSales(ctx context.Context, id int64, params *ListEventSalesParams, opts ...RequestOption) (*SalePage, error)

ListEventSales calls GET /v1/events/{id}/sales: Sales history of an event.

The event's settled sales, newest first (every confidence unless `confidence` narrows them; `section` keeps those of some sections). Marketplace sales (`secondary:*`) need secondary marketplaces: left out without `scope`, 402 when asked for. Pass `nextCursor` as `cursor` (same filters) for the next page.

**API key scope:** `sales:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventSalesAll

func (c *Client) ListEventSalesAll(ctx context.Context, id int64, params *ListEventSalesParams, opts ...RequestOption) iter.Seq2[Sale, error]

ListEventSalesAll iterates every item of ListEventSales across pages.

func (*Client) ListEventSalesPages

func (c *Client) ListEventSalesPages(ctx context.Context, id int64, params *ListEventSalesParams, opts ...RequestOption) iter.Seq2[*SalePage, error]

ListEventSalesPages iterates the pages of ListEventSales, following nextCursor as cursor until the last page.

func (*Client) ListEventSalesSections

func (c *Client) ListEventSalesSections(ctx context.Context, id int64, params *ListEventSalesSectionsParams, opts ...RequestOption) (*SectionSalesList, error)

ListEventSalesSections calls GET /v1/events/{id}/sales/sections: Sales of an event per section.

The event's settled sales (the same rows as `GET /v1/events/{id}/sales` with the same filters) aggregated per section and currency, most tickets first. Ticketmaster primary sales group under the manifest's section name, TM resale and marketplace sales under their canonical `sectionKey` (their own label when unmapped). Unpriced sales (GA units without a price level) count in `sales` and `tickets` and join the section's priced currency. Without secondary marketplaces, marketplace sales are left out.

**API key scope:** `sales:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventSavedLists

func (c *Client) ListEventSavedLists(ctx context.Context, id int64, opts ...RequestOption) (*EventSavedLists, error)

ListEventSavedLists calls GET /v1/events/{id}/lists: The active org's lists containing an event.

**API key scope:** `catalog:read`.

func (*Client) ListEventSections

func (c *Client) ListEventSections(ctx context.Context, id int64, params *ListEventSectionsParams, opts ...RequestOption) (*EventSections, error)

ListEventSections calls GET /v1/events/{id}/sections: Section table of an event.

Every section of the event with stock in the scope now or sales in the last 72 hours: current tickets, floor and median (all-in per ticket, ticket-weighted median), when they last changed, the 24h floor change, tickets sold in 24h and 72h with the 24h average sale price, the spread against the primary floor and an estimated ROI. Section keys are the event's seat map section names (`index` is the artifact section index); Ticketmaster sections no map section matched keep their manifest name. The primary floor of a section is its current one or, once sold out, the last one Ticketmaster showed; the spread compares the scope's floor with it (`primary`: the best marketplace floor), the ROI the median resale price over 72h (`primary`: marketplace sales) after `sellerFee`. Prices are in `currency` (other currencies converted at the day's rate). Secondary scopes need a plan with secondary marketplaces. Plans without map prices (`mapPrices`) get availability only, like the map overlay: tickets and sales counts, with `currency`, `floorMinor`, `medianMinor`, `saleAvg24hMinor`, `floorChg24h`, `spread` and `roi` null. Events that started more than 24 hours ago need ended-event history (402). Live section values: stream topic `event.{id}.map`.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventTicketTypes

func (c *Client) ListEventTicketTypes(ctx context.Context, id int64, opts ...RequestOption) (*TicketTypeList, error)

ListEventTicketTypes calls GET /v1/events/{id}/ticket-types: Primary ticket types and their changes.

The ticket types the event's primary source sells (Dice: general admission at one price per type, without remaining quantities) and the latest changes to them: types added or removed, status, price tier and all-in price, waiting list. `items` lists the current types in the source's order, then removed ones (most recently removed first); `changes` are newest first, at most 200. Events whose primary seller publishes no ticket types (Ticketmaster: see the price levels) answer empty lists. Changes, and types removed, before the plan's chart history are left out.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEvents

func (c *Client) ListEvents(ctx context.Context, params *ListEventsParams, opts ...RequestOption) (*EventPage, error)

ListEvents calls GET /v1/events: Search the event catalog.

Lists catalog events with cursor pagination. Pass `nextCursor` from a response as `cursor` (with the same filters and sort) to get the next page. Each row carries the `metrics` of `scope` (default `primary`) when the event has market data. Events that started more than 24 hours ago carry no metrics without ended-event history (metric filters and sorts treat them as having no value).

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListEventsAll

func (c *Client) ListEventsAll(ctx context.Context, params *ListEventsParams, opts ...RequestOption) iter.Seq2[EventSummary, error]

ListEventsAll iterates every item of ListEvents across pages.

func (*Client) ListEventsPages

func (c *Client) ListEventsPages(ctx context.Context, params *ListEventsParams, opts ...RequestOption) iter.Seq2[*EventPage, error]

ListEventsPages iterates the pages of ListEvents, following nextCursor as cursor until the last page.

func (*Client) ListExports

func (c *Client) ListExports(ctx context.Context, params *ListExportsParams, opts ...RequestOption) (*ExportPage, error)

ListExports calls GET /v1/exports: The org's exports.

Newest first, cursor-paginated; files are deleted 7 days after they were written.

**API key scope:** `catalog:read`.

func (*Client) ListExportsAll

func (c *Client) ListExportsAll(ctx context.Context, params *ListExportsParams, opts ...RequestOption) iter.Seq2[Export, error]

ListExportsAll iterates every item of ListExports across pages.

func (*Client) ListExportsPages

func (c *Client) ListExportsPages(ctx context.Context, params *ListExportsParams, opts ...RequestOption) iter.Seq2[*ExportPage, error]

ListExportsPages iterates the pages of ListExports, following nextCursor as cursor until the last page.

func (*Client) ListInventoryChanges

func (c *Client) ListInventoryChanges(ctx context.Context, id int64, params *ListInventoryChangesParams, opts ...RequestOption) (*InventoryChangePage, error)

ListInventoryChanges calls GET /v1/events/{id}/inventory/changes: Recent inventory changes.

Changes between consecutive accepted Ticketmaster primary inventory polls of the event, newest first: seats and GA stock that appeared (`restock`, `ga_restock`), disappeared (`drop`/`ga_drop`, `pending` while inside the cart-hold window), came back from a cart hold (`hold_released`, `ga_hold_released`) or settled into sales (`sale`, `ga_sale`). Each row groups the seats of one section, row and price level that changed together. TM resale activity is listing history (`/v1/events/{id}/listings/changes`, source `tmresale`). Pass `nextCursor` as `cursor` (with the same filters) for the next page.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListInventoryChangesAll

func (c *Client) ListInventoryChangesAll(ctx context.Context, id int64, params *ListInventoryChangesParams, opts ...RequestOption) iter.Seq2[InventoryChange, error]

ListInventoryChangesAll iterates every item of ListInventoryChanges across pages.

func (*Client) ListInventoryChangesPages

func (c *Client) ListInventoryChangesPages(ctx context.Context, id int64, params *ListInventoryChangesParams, opts ...RequestOption) iter.Seq2[*InventoryChangePage, error]

ListInventoryChangesPages iterates the pages of ListInventoryChanges, following nextCursor as cursor until the last page.

func (*Client) ListMovers

func (c *Client) ListMovers(ctx context.Context, params *ListMoversParams, opts ...RequestOption) (*MoverPage, error)

ListMovers calls GET /v1/movers: Top movers.

Upcoming events with metrics fresher than 24h, ranked by how much they moved within their cohort: `24h` by the movement score, `72h`/`7d` by |z| of the window's floor change within the cohort. `direction` keeps rising (`up`) or falling (`down`) floors. Marketplace scopes need secondary marketplaces (402).

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListMustCops

func (c *Client) ListMustCops(ctx context.Context, params *ListMustCopsParams, opts ...RequestOption) (*MustCopPage, error)

ListMustCops calls GET /v1/must-cop: Must cops.

Upcoming public on-sales (Ticketmaster or DICE, within 60 days) of acts whose latest known on-sales sold out instantly: at least 2 of the act's last 3 (the last two years, both sellers; the act is the headliner) sold out within two hours of their public on-sale. Each pick carries the on-sales it rests on and is graded from its own on-sale: `hit` when it sold out within two hours too. `status=open` (the default) lists open picks soonest on-sale first; `graded` (hits and misses), `hit`, `miss` and `void` list graded picks most recently graded first. `record` counts every graded pick. Refreshed every 15 minutes.

Every plan includes them once they are published to the org (403 `https://status302.com/problems/must-cop-unpublished` until staff do); staff always see them. API keys and signed-in members see the same picks (keys get no staff bypass). Not financial advice: do your own research.

**API key scope:** `market:read`.

func (*Client) ListMustCopsAll

func (c *Client) ListMustCopsAll(ctx context.Context, params *ListMustCopsParams, opts ...RequestOption) iter.Seq2[MustCop, error]

ListMustCopsAll iterates every item of ListMustCops across pages.

func (*Client) ListMustCopsPages

func (c *Client) ListMustCopsPages(ctx context.Context, params *ListMustCopsParams, opts ...RequestOption) iter.Seq2[*MustCopPage, error]

ListMustCopsPages iterates the pages of ListMustCops, following nextCursor as cursor until the last page.

func (*Client) ListPredictions

func (c *Client) ListPredictions(ctx context.Context, params *ListPredictionsParams, opts ...RequestOption) (*PredictionCallPage, error)

ListPredictions calls GET /v1/predictions: Scalping predictions.

Calls on upcoming events whose primary tickets are expected to resell above the price paid, one category at a time (`category`: `tm`, the default, for Ticketmaster events; `dice` for DICE events resold on a marketplace): the event, the entry (the primary floor when the call was made), the risk (the chance the call is wrong, 0–100) with its reasons, the latest resale floor and markup, and once graded the exit, the exit markup and the outcome. `status=open` (the default) lists open calls lowest risk first; `graded` (hits and misses), `hit`, `miss` and `void` list graded calls most recently graded first. Money is in minor units of `currency` (see the money guide).

Every plan includes predictions; a category answers 403 `https://status302.com/problems/predictions-unpublished` until it is published, and `GET /v1/predictions/availability` tells when. API keys and signed-in members see the same calls. The calls are model output, not financial advice: do your own research.

**API key scope:** `market:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListPredictionsAll

func (c *Client) ListPredictionsAll(ctx context.Context, params *ListPredictionsParams, opts ...RequestOption) iter.Seq2[PredictionCall, error]

ListPredictionsAll iterates every item of ListPredictions across pages.

func (*Client) ListPredictionsPages

func (c *Client) ListPredictionsPages(ctx context.Context, params *ListPredictionsParams, opts ...RequestOption) iter.Seq2[*PredictionCallPage, error]

ListPredictionsPages iterates the pages of ListPredictions, following nextCursor as cursor until the last page.

func (*Client) ListRegions

func (c *Client) ListRegions(ctx context.Context, opts ...RequestOption) (*RegionList, error)

ListRegions calls GET /v1/regions: Regions.

The regions of the `region` filter (catalog, calendar, sales feed and summary, `sales`/`onsales` stream topics): named groups of venue countries with a display currency, in display order. Regions do not overlap.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListSalesFeed

func (c *Client) ListSalesFeed(ctx context.Context, params *ListSalesFeedParams, opts ...RequestOption) (*SalePage, error)

ListSalesFeed calls GET /v1/sales/feed: Sales feed across events.

Settled sales of every event, newest first, each with its event summary: Ticketmaster primary and resale sales and marketplace sales (scope `secondary:<source>`; `scope=secondary:best` selects every marketplace). Marketplace scopes need secondary marketplaces: left out without `scope`, 402 when asked for. Every confidence is included unless `confidence` narrows it. Live updates arrive on the `sales` stream topic (https://status302.com/docs/stream/#topics).

**API key scope:** `sales:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListSalesFeedAll

func (c *Client) ListSalesFeedAll(ctx context.Context, params *ListSalesFeedParams, opts ...RequestOption) iter.Seq2[Sale, error]

ListSalesFeedAll iterates every item of ListSalesFeed across pages.

func (*Client) ListSalesFeedPages

func (c *Client) ListSalesFeedPages(ctx context.Context, params *ListSalesFeedParams, opts ...RequestOption) iter.Seq2[*SalePage, error]

ListSalesFeedPages iterates the pages of ListSalesFeed, following nextCursor as cursor until the last page.

func (*Client) ListSavedListItems

func (c *Client) ListSavedListItems(ctx context.Context, listID string, opts ...RequestOption) (*SavedListItemList, error)

ListSavedListItems calls GET /v1/lists/{listId}/items: The events of a list with their user columns.

Oldest first.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListSavedLists

func (c *Client) ListSavedLists(ctx context.Context, opts ...RequestOption) (*SavedListList, error)

ListSavedLists calls GET /v1/lists: The active org's saved lists.

Every list of the active org, by name, with item counts. Any member reads them.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListVenueEvents

func (c *Client) ListVenueEvents(ctx context.Context, id int64, params *ListVenueEventsParams, opts ...RequestOption) (*EventPage, error)

ListVenueEvents calls GET /v1/venues/{id}/events: Events at a venue.

The venue's catalog events in start order (undated last), upcoming by default, with cursor pagination like `listEvents`.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) ListVenueEventsAll

func (c *Client) ListVenueEventsAll(ctx context.Context, id int64, params *ListVenueEventsParams, opts ...RequestOption) iter.Seq2[EventSummary, error]

ListVenueEventsAll iterates every item of ListVenueEvents across pages.

func (*Client) ListVenueEventsPages

func (c *Client) ListVenueEventsPages(ctx context.Context, id int64, params *ListVenueEventsParams, opts ...RequestOption) iter.Seq2[*EventPage, error]

ListVenueEventsPages iterates the pages of ListVenueEvents, following nextCursor as cursor until the last page.

func (*Client) ListWebhookDeliveries

func (c *Client) ListWebhookDeliveries(ctx context.Context, webhookID string, params *ListWebhookDeliveriesParams, opts ...RequestOption) (*WebhookDeliveryPage, error)

ListWebhookDeliveries calls GET /v1/webhooks/{webhookId}/deliveries: Delivery log of an endpoint.

Newest first, cursor-paginated; kept 30 days.

**API key scope:** `webhooks:write`.

func (*Client) ListWebhookDeliveriesAll

func (c *Client) ListWebhookDeliveriesAll(ctx context.Context, webhookID string, params *ListWebhookDeliveriesParams, opts ...RequestOption) iter.Seq2[WebhookDelivery, error]

ListWebhookDeliveriesAll iterates every item of ListWebhookDeliveries across pages.

func (*Client) ListWebhookDeliveriesPages

func (c *Client) ListWebhookDeliveriesPages(ctx context.Context, webhookID string, params *ListWebhookDeliveriesParams, opts ...RequestOption) iter.Seq2[*WebhookDeliveryPage, error]

ListWebhookDeliveriesPages iterates the pages of ListWebhookDeliveries, following nextCursor as cursor until the last page.

func (*Client) ListWebhooks

func (c *Client) ListWebhooks(ctx context.Context, opts ...RequestOption) (*WebhookList, error)

ListWebhooks calls GET /v1/webhooks: The org's webhook endpoints.

**API key scope:** `webhooks:write`.

func (*Client) PreviewAlertRule

func (c *Client) PreviewAlertRule(ctx context.Context, body *AlertRuleInput, opts ...RequestOption) (*AlertPreview, error)

PreviewAlertRule calls POST /v1/alerts/rules/preview: Preview a draft rule.

Dry-runs a draft rule (the body of `POST /v1/alerts/rules`; its `channels` are ignored) so you can tune a threshold before saving it. Metric conditions list the events in scope matching now (section conditions: one item per matching section of the first 50 upcoming events in scope, `detail` naming the section and value); other conditions list what would have fired recently (restocks and activity: last 24 h; sale bursts: the current window; catalog: announced in the last 7 days). `window` says which. The draft is validated against the plan like a new rule (400, 402). Nothing is saved or sent.

**API key scope:** `alerts:write`.

func (*Client) RedeliverWebhook

func (c *Client) RedeliverWebhook(ctx context.Context, webhookID string, deliveryID string, opts ...RequestOption) (*WebhookDelivery, error)

RedeliverWebhook calls POST /v1/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver: Deliver a past event again.

Queues a new delivery of the same envelope (same `id`, a new delivery log row with `redeliveryOf`).

**API key scope:** `webhooks:write`.

func (*Client) RemoveSavedListItems

func (c *Client) RemoveSavedListItems(ctx context.Context, listID string, params *RemoveSavedListItemsParams, opts ...RequestOption) (*RemoveSavedListItemsResult, error)

RemoveSavedListItems calls DELETE /v1/lists/{listId}/items: Remove events from a list.

**API key scope:** `lists:write`.

func (*Client) RestartChannelVerification

func (c *Client) RestartChannelVerification(ctx context.Context, channelID int64, opts ...RequestOption) (*NotificationChannelCreated, error)

RestartChannelVerification calls POST /v1/channels/{channelId}/verification: Resend an email code or issue a new Telegram link.

Counts against the verification-message limits of `createChannel` (per channel, per email address, per org; 429 with `Retry-After`). Owners and admins only.

**API key scope:** `alerts:write`.

func (*Client) RotateWebhookSecret

func (c *Client) RotateWebhookSecret(ctx context.Context, webhookID string, opts ...RequestOption) (*WebhookSecret, error)

RotateWebhookSecret calls POST /v1/webhooks/{webhookId}/rotate-secret: Replace an endpoint's signing secret.

The new secret signs every delivery from now on (including retries) and is returned once. Audited.

**API key scope:** `webhooks:write`.

func (*Client) SearchCatalog

func (c *Client) SearchCatalog(ctx context.Context, params *SearchCatalogParams, opts ...RequestOption) (*SearchResults, error)

SearchCatalog calls GET /v1/search: Typeahead across events, attractions and venues.

Name search for the ⌘K palette. The query and the names are compared folded (lower case, accents and punctuation removed, `&` = `and`), by substring and pg_trgm word similarity; queries shorter than three characters match name and word prefixes only. Each group is ranked: exact name, then name prefix, then word prefix, then substring/trigram similarity. Events list upcoming ones (not started, or undated) before past ones, then by match and soonest start; attractions and venues with upcoming events come first, by upcoming event count within the exact/prefix tiers and by similarity within the trigram tier.

A `q` that is an event ID or event page URL also finds the events it names, listed first: a Ticketmaster event ID (16 hex digits, any case, e.g. `380064AEC95E177C`, or a ticketmaster.* `…/event/{id}` URL) or a StubHub/viagogo event number of a linked marketplace listing (e.g. `161219435`, viagogo's `E-161219435`, or a stubhub.* / viagogo.* `…/event/{n}` or `…/E-{n}` URL). URLs may omit the scheme; their query string and fragment are ignored.

**API key scope:** `catalog:read`.

Conditional: with WithIfNoneMatch(etag) the call fails with ErrNotModified (*NotModifiedError) while the representation still has that ETag.

func (*Client) SnoozeAlertRule

func (c *Client) SnoozeAlertRule(ctx context.Context, ruleID int64, body *AlertRuleSnoozeInput, opts ...RequestOption) (*AlertRule, error)

SnoozeAlertRule calls PUT /v1/alerts/rules/{ruleId}/snooze: Snooze a rule.

The rule stays enabled but sends nothing until `until` (at most 90 days ahead); replaces an earlier snooze. Its matches meanwhile are recorded as the skip `snoozed`. A metric or section condition still holding when the snooze ends fires then. The snooze simply expires.

**API key scope:** `alerts:write`.

func (*Client) Stream

func (c *Client) Stream(opts StreamOptions) *Stream

Stream returns a realtime stream client; it connects on the first Subscribe. Close it when done.

func (*Client) TestAlertRule

func (c *Client) TestAlertRule(ctx context.Context, ruleID int64, opts ...RequestOption) (*AlertEvent, error)

TestAlertRule calls POST /v1/alerts/rules/{ruleId}/test: Test-fire a rule.

Writes a test firing (marked `test`) about the scope's best current match, or any upcoming event in scope, and delivers it to the rule's channels and the `alerts` stream topic (not to `alert.fired` webhooks), ignoring cooldown and state: use it to check a rule's routing end to end. The rule must still be allowed by the org's current plan (its scope and features, and its place within the rule count; 402); activity it lists stays inside the plan's sales window and ended-event bound. An org gets 30 test firings per rolling hour (429 with `Retry-After`), and test firings are kept 7 days (real firings: the history retention).

**API key scope:** `alerts:write`.

func (*Client) TestChannel

func (c *Client) TestChannel(ctx context.Context, channelID int64, opts ...RequestOption) (*NotificationChannel, error)

TestChannel calls POST /v1/channels/{channelId}/test: Send a test notification now.

Delivered synchronously, within the channel's rate limit; the outcome is recorded on the channel (`lastSentAt` or `lastError`) and returned. Owners and admins only.

**API key scope:** `alerts:write`.

func (*Client) TestWebhook

func (c *Client) TestWebhook(ctx context.Context, webhookID string, body *WebhookTestInput, opts ...RequestOption) (*WebhookDelivery, error)

TestWebhook calls POST /v1/webhooks/{webhookId}/test: Send a test event.

Queues one delivery of a sample `type` event (default: the first subscribed type) marked `"test": true` in the envelope. Disabled endpoints are tested too (to check a fix before re-enabling).

**API key scope:** `webhooks:write`.

func (*Client) UnsnoozeAlertRule

func (c *Client) UnsnoozeAlertRule(ctx context.Context, ruleID int64, opts ...RequestOption) (*AlertRule, error)

UnsnoozeAlertRule calls DELETE /v1/alerts/rules/{ruleId}/snooze: Unsnooze a rule.

Ends the rule's snooze now (a no-op when it has none); an enabled metric or section rule is evaluated right away.

**API key scope:** `alerts:write`.

func (*Client) UpdateAlertRule

func (c *Client) UpdateAlertRule(ctx context.Context, ruleID int64, body *AlertRulePatch, opts ...RequestOption) (*AlertRule, error)

UpdateAlertRule calls PATCH /v1/alerts/rules/{ruleId}: Edit, enable or disable a rule.

Fields given replace the rule's. Changing the scope or condition resets its per-event state (the rule re-evaluates from scratch); enabling a metric rule evaluates it right away.

**API key scope:** `alerts:write`.

func (*Client) UpdateChannel

func (c *Client) UpdateChannel(ctx context.Context, channelID int64, body *UpdateChannelRequest, opts ...RequestOption) (*NotificationChannel, error)

UpdateChannel calls PATCH /v1/channels/{channelId}: Rename, enable or disable a channel.

A disabled channel keeps its rules' routing but receives nothing until enabled again. Owners and admins only.

**API key scope:** `alerts:write`.

func (*Client) UpdateSavedList

func (c *Client) UpdateSavedList(ctx context.Context, listID string, body *UpdateSavedListRequest, opts ...RequestOption) (*SavedList, error)

UpdateSavedList calls PATCH /v1/lists/{listId}: Rename a list or change its saved view.

Any member. View fields that are present replace the stored ones.

**API key scope:** `lists:write`.

func (*Client) UpdateSavedListItems

func (c *Client) UpdateSavedListItems(ctx context.Context, listID string, body *UpdateSavedListItemsRequest, opts ...RequestOption) (*SavedListItemList, error)

UpdateSavedListItems calls PATCH /v1/lists/{listId}/items: Edit the user columns of items.

Notes, cost basis (per ticket, minor units) and quantity held of 1–500 items, all or nothing. A cost basis without `currency` keeps the item's currency or takes the event's market currency. `clear` empties columns. An event that is not in the list is a 404.

**API key scope:** `lists:write`.

func (*Client) UpdateWebhook

func (c *Client) UpdateWebhook(ctx context.Context, webhookID string, body *WebhookPatch, opts ...RequestOption) (*Webhook, error)

UpdateWebhook calls PATCH /v1/webhooks/{webhookId}: Change an endpoint, or re-enable a disabled one.

Fields given replace the endpoint's; `status=active` re-enables it and resets its failure count. Audited.

**API key scope:** `webhooks:write`.

func (*Client) VerifyChannel

func (c *Client) VerifyChannel(ctx context.Context, channelID int64, body *VerifyChannelRequest, opts ...RequestOption) (*NotificationChannel, error)

VerifyChannel calls POST /v1/channels/{channelId}/verify: Verify an email channel with its code.

The 6-digit code emailed to the channel's address. Codes expire after 1 h or 5 wrong tries (`POST …/verification` sends a new one). After 15 wrong codes over the channel's lifetime (new codes do not reset this) the channel cannot be verified any more (409): delete it and add the address again. Owners and admins only.

**API key scope:** `alerts:write`.

type CompareSeries

type CompareSeries struct {
	Event       SaleEventRef `json:"event"`
	T           []time.Time  `json:"t"`
	DaysToEvent []*float64   `json:"daysToEvent"`
	V           SeriesColumn `json:"v"`
}

CompareSeries: One event's series. `t` are bucket starts, `daysToEvent` the same instants as days relative to the event's start (negative before the show; null without a start date), `v` the metric's values.

type CompareSeriesSet

type CompareSeriesSet struct {
	Metric SeriesMetric          `json:"metric"`
	Align  CompareSeriesSetAlign `json:"align"`
	Scope  MetricScope           `json:"scope"`
	Res    SeriesResolution      `json:"res"`
	Series []CompareSeries       `json:"series"`
}

CompareSeriesSet is a schema of the public API.

type CompareSeriesSetAlign

type CompareSeriesSetAlign string

CompareSeriesSetAlign is a schema of the public API.

const (
	CompareSeriesSetAlignCalendar    CompareSeriesSetAlign = "calendar"
	CompareSeriesSetAlignDaysToEvent CompareSeriesSetAlign = "days_to_event"
)

Values of CompareSeriesSetAlign.

type ConnectionError

type ConnectionError struct {
	Method string
	URL    string
	Err    error
}

ConnectionError means the request never produced an HTTP response (DNS, TLS, reset, timeout).

func (*ConnectionError) Error

func (e *ConnectionError) Error() string

func (*ConnectionError) Unwrap

func (e *ConnectionError) Unwrap() error

type CreateChannelRequest

type CreateChannelRequest struct {
	Kind CreateChannelRequestKind `json:"kind"`
	Name string                   `json:"name"`
	// Incoming-webhook URL (discord_webhook, slack_webhook, teams_webhook, google_chat_webhook).
	URL *string `json:"url,omitempty"`
	// Email address (email).
	Address *string `json:"address,omitempty"`
}

CreateChannelRequest is a schema of the public API.

type CreateChannelRequestKind

type CreateChannelRequestKind string

CreateChannelRequestKind is a schema of the public API.

const (
	CreateChannelRequestKindDiscordWebhook    CreateChannelRequestKind = "discord_webhook"
	CreateChannelRequestKindSlackWebhook      CreateChannelRequestKind = "slack_webhook"
	CreateChannelRequestKindTeamsWebhook      CreateChannelRequestKind = "teams_webhook"
	CreateChannelRequestKindGoogleChatWebhook CreateChannelRequestKind = "google_chat_webhook"
	CreateChannelRequestKindTelegram          CreateChannelRequestKind = "telegram"
	CreateChannelRequestKindEmail             CreateChannelRequestKind = "email"
)

Values of CreateChannelRequestKind.

type CreateSavedListRequest

type CreateSavedListRequest struct {
	// 1–80 characters.
	Name string `json:"name"`
	// At most 500 characters.
	Description *string             `json:"description,omitempty"`
	EventIDs    []int64             `json:"eventIds,omitempty"`
	View        *SavedListViewPatch `json:"view,omitempty"`
}

CreateSavedListRequest is a schema of the public API.

type DataMessage

type DataMessage struct {
	Topic string
	Seq   int64
	TS    string
	Data  json.RawMessage
}

DataMessage is a topic message. Seq increases per topic; Data is the topic payload (re-encoded as JSON with the msgpack encoding).

func (*DataMessage) Decode

func (m *DataMessage) Decode(v any) error

Decode unmarshals Data into v.

func (*DataMessage) StreamTopic

func (m *DataMessage) StreamTopic() string

StreamTopic is the message's topic.

type DownloadExportParams

type DownloadExportParams struct {
	// Required.
	Expires int64
	// Required.
	Signature string
}

DownloadExportParams holds the query parameters of DownloadExport.

type ETagCache

type ETagCache interface {
	Get(ctx context.Context, key string) (CachedResponse, bool)
	Set(ctx context.Context, key string, value CachedResponse)
}

ETagCache stores the bodies of GET responses for WithETagCache. Entries never go stale: an ETag hashes its body, so a 304 proves the stored body is current. Implementations must be safe for concurrent use; a networked store (e.g. Redis) should treat its own failures as misses.

type ErrorMessage

type ErrorMessage struct {
	Topic   string
	Code    string
	Message string
}

ErrorMessage reports that the server refused the subscription to Topic; it is dropped and its Subscription.Ready returns a *SubscriptionError.

func (*ErrorMessage) StreamTopic

func (m *ErrorMessage) StreamTopic() string

StreamTopic is the message's topic.

type EventDetail

type EventDetail struct {
	EventSummary
	// Local start time (HH:MM:SS); null when the time is TBA.
	LocalTime *string `json:"localTime"`
	Subgenre  *string `json:"subgenre"`
	// Ticketing system hosting the event (ticketmaster, universe, frontgate, ticketweb, ...).
	Source        *string    `json:"source"`
	Locale        *string    `json:"locale"`
	DateTBA       bool       `json:"dateTBA"`
	DateTBD       bool       `json:"dateTBD"`
	TimeTBA       bool       `json:"timeTBA"`
	PublicSaleEnd *time.Time `json:"publicSaleEnd"`
	PublicSaleTBD bool       `json:"publicSaleTBD"`
	// When Discovery last returned the event.
	LastSeenAt time.Time `json:"lastSeenAt"`
	UpdatedAt  time.Time `json:"updatedAt"`
	// Public on-sale and presale windows, ordered by start.
	Sales []SaleWindow `json:"sales"`
	// Secondary marketplaces the event is linked to, with how fresh their listings are.
	Sources []EventSource `json:"sources"`
}

EventDetail is a schema of the public API.

type EventLifecycle

type EventLifecycle string

EventLifecycle: Where the event is in its sale lifecycle, derived when read: `archived` 30 days after the start, `past` 2 hours after it (when polling stops); cancelled and postponed events stay `announced` until then. Otherwise `sold_out` once the sale began and Ticketmaster went off sale or the primary inventory is empty, `on_sale` once the public on-sale started (or a presale is running, or the event sells without an announced on-sale date), `on_sale_soon` when a public on-sale or presale starts within 7 days, else `announced`.

const (
	EventLifecycleAnnounced  EventLifecycle = "announced"
	EventLifecycleOnSaleSoon EventLifecycle = "on_sale_soon"
	EventLifecycleOnSale     EventLifecycle = "on_sale"
	EventLifecycleSoldOut    EventLifecycle = "sold_out"
	EventLifecyclePast       EventLifecycle = "past"
	EventLifecycleArchived   EventLifecycle = "archived"
)

Values of EventLifecycle.

type EventMap

type EventMap struct {
	EventID int64          `json:"eventId"`
	Status  EventMapStatus `json:"status"`
	// Ticketmaster venue configuration of the event's map.
	VenueConfigID *string `json:"venueConfigId"`
	// Last map fetch; null while pending.
	FetchedAt *time.Time `json:"fetchedAt"`
	// Why the last fetched map could not be compiled (status `error`).
	Error *string `json:"error"`
	// The inventory manifest version current when the map was fetched.
	ManifestVersion *string  `json:"manifestVersion"`
	Seatmap         *Seatmap `json:"seatmap,omitempty"`
}

EventMap is a schema of the public API.

type EventMapStatus

type EventMapStatus string

EventMapStatus is a schema of the public API.

const (
	EventMapStatusOk      EventMapStatus = "ok"
	EventMapStatusNoMap   EventMapStatus = "no_map"
	EventMapStatusError   EventMapStatus = "error"
	EventMapStatusPending EventMapStatus = "pending"
)

Values of EventMapStatus.

type EventMetrics

type EventMetrics struct {
	Scope MetricScope `json:"scope"`
	// Movement cohort, segment slug and days-to-event bucket (`music/3-7d`; buckets `0-2d`, `3-7d`, `8-30d`, `31-90d`, `90d+`, `past`, `tba`).
	Cohort   string  `json:"cohort"`
	Currency *string `json:"currency"`
	// Lowest all-in price of the latest sample; null without priced stock. `secondary:best`, the lowest across marketplaces.
	Floor *int64 `json:"floor"`
	// Lowest all-in price among stock that can sell two tickets together:
	// resale and marketplace listings that can split to a pair; on
	// Ticketmaster primary the cheapest price level with two adjacent open
	// seats of one row (seat ids consecutive in the manifest) or a GA
	// section with two open places (`secondary:best`, the lowest across
	// marketplaces).
	FloorPair *int64 `json:"floorPair"`
	// Ticket-weighted 25th percentile all-in price of the latest sample.
	// `secondary:best`: the ticket-weighted median of the marketplaces' p25s.
	P25 *int64 `json:"p25"`
	// Ticket-weighted median all-in price of the latest sample. `secondary:best`:
	// the ticket-weighted median of the marketplaces' medians.
	Median *int64 `json:"median"`
	// Tickets available in the latest sample (primary, open seats plus GA stock).
	Inventory *int `json:"inventory"`
	// Time-weighted mean floor over 24h (each 5-minute sample holds until the next; gaps carry forward).
	Avg24h *int64 `json:"avg24h"`
	Avg72h *int64 `json:"avg72h"`
	Avg7d  *int64 `json:"avg7d"`
	Avg30d *int64 `json:"avg30d"`
	// (floor now − floor 24h ago) / floor 24h ago; null without a baseline.
	Chg24h *float64 `json:"chg24h"`
	Chg72h *float64 `json:"chg72h"`
	Chg7d  *float64 `json:"chg7d"`
	// Tickets sold in the last 24h.
	Sales24h int `json:"sales24h"`
	Sales72h int `json:"sales72h"`
	// Σ qty·all-in of the last 24h's priced sales.
	Volume24h int64 `json:"volume24h"`
	// Σ qty·all-in of the last 72h's priced sales.
	Volume72h int64 `json:"volume72h"`
	// Quantity-weighted mean all-in price of the last 24h's priced sales.
	SaleAvg24h *int64 `json:"saleAvg24h"`
	SaleAvg72h *int64 `json:"saleAvg72h"`
	// Tickets sold per hour, exponentially weighted with a 6h time constant.
	Velocity float64 `json:"velocity"`
	// (inventory 24h ago − inventory now) / inventory 24h ago.
	Depletion24h *float64 `json:"depletion24h"`
	// Primary only, 1 − open primary tickets / seat-map capacity; null without a compiled seat map.
	SellThrough *float64 `json:"sellThrough"`
	// Primary only: hours until the open primary tickets sell out at the current pace,
	// `inventory` ÷ `velocity` (settled sales; Ticketmaster settles a sale ~20 minutes after the
	// seats leave the inventory into a cart, so in a rush the estimate errs late). Null when there
	// are no open tickets (sold out or not on sale), without a settled sale in the last 24h, when
	// the latest primary sample is over 2h old, and when the estimate is past 90 days or the
	// event start.
	SelloutHours *float64 `json:"selloutHours"`
	// Inventory turnover over 24h, (tickets added + tickets gone for good) / inventory.
	Churn24h *float64 `json:"churn24h"`
	// floor ÷ primary floor − 1 (the primary floor converted into this scope's
	// currency at the day's reference rate); null for `primary` and without
	// both floors.
	Spread *float64 `json:"spread"`
	// 0.35·|z(chg24h)| + 0.30·z(sales24h) + 0.20·z(depletion24h) + 0.15·z(churn24h), z-scores
	// within the cohort (the whole scope for cohorts under 8 events); weights are configurable.
	Movement *float64 `json:"movement"`
	// Sign of chg24h.
	MovementDir EventMetricsMovementDir `json:"movementDir"`
	// Floor at 48 instants 90 minutes apart over the last 72h, oldest first; null where unknown.
	Spark []*float64 `json:"spark"`
	// Time of the newest market sample the metrics are computed from.
	AsOf time.Time `json:"asOf"`
	// Timeframe windows with their comparisons (the 7-day sales, volume and
	// mean sale price are `windows.7d`); null until the row is recomputed
	// after their introduction.
	Windows *MetricWindows `json:"windows"`
}

EventMetrics: Serving metrics of one event and scope, recomputed whenever the event's market data changes and on every sweep. Money is minor units of `currency`, all-in per ticket; changes, depletion, sell-through, churn and spread are fractions (0.12 = 12%). Sales count settled sales of every confidence (`confirmed`, `inferred_high` and `inferred_low`), mass transitions excluded. `secondary:<source>` is in the marketplace's currency; `secondary:best` converts each marketplace's prices into the event's currency (its Ticketmaster currency) at the daily reference rate of each value's day, leaving out marketplaces without a rate.

type EventMetricsList

type EventMetricsList struct {
	EventID int64 `json:"eventId"`
	// One entry per scope with market data.
	Items []EventMetrics `json:"items"`
}

EventMetricsList is a schema of the public API.

type EventMetricsMovementDir

type EventMetricsMovementDir int

EventMetricsMovementDir: Sign of chg24h.

const (
	EventMetricsMovementDir1Desc EventMetricsMovementDir = -1
	EventMetricsMovementDir0     EventMetricsMovementDir = 0
	EventMetricsMovementDir1     EventMetricsMovementDir = 1
)

Values of EventMetricsMovementDir.

type EventPage

type EventPage struct {
	Items []EventSummary `json:"items"`
	// Cursor of the next page; null on the last page.
	NextCursor *string `json:"nextCursor"`
}

EventPage is a schema of the public API.

type EventRollup

type EventRollup struct {
	Upcoming int `json:"upcoming"`
	Past     int `json:"past"`
	// Start of the first dated upcoming event.
	FirstStartsAt *time.Time `json:"firstStartsAt"`
	// Start of the last dated upcoming event.
	LastStartsAt *time.Time `json:"lastStartsAt"`
	// Local date (in the event's zone) of the first dated upcoming event.
	FirstLocalDate *string `json:"firstLocalDate"`
	// Local date of the last dated upcoming event.
	LastLocalDate *string `json:"lastLocalDate"`
}

EventRollup: Catalog events of an attraction or venue around now (upcoming = not started, or undated).

type EventSavedLists

type EventSavedLists struct {
	EventID int64          `json:"eventId"`
	Items   []SavedListRef `json:"items"`
}

EventSavedLists is a schema of the public API.

type EventSections

type EventSections struct {
	EventID int64  `json:"eventId"`
	Scope   string `json:"scope"`
	// Currency of every price of the table.
	Currency *string `json:"currency"`
	// Latest change of the scope's sections.
	AsOf *time.Time `json:"asOf"`
	// The seat map `index` refers to.
	SeatmapHash *string `json:"seatmapHash"`
	// Sections in map order (sections without an index last, by key).
	Items []SectionRow `json:"items"`
}

EventSections is a schema of the public API.

type EventSeries

type EventSeries struct {
	EventID int64       `json:"eventId"`
	Scope   MetricScope `json:"scope"`
	// Currency of the money columns (`floor`, `floorMin`, `median`,
	// `volume`): the scope's latest snapshot currency as of `to` (the
	// marketplace's own for `secondary:<source>`; the event's for
	// `secondary:best`, which converts). Null when the range has no buckets.
	Currency *string          `json:"currency"`
	Res      SeriesResolution `json:"res"`
	From     time.Time        `json:"from"`
	To       time.Time        `json:"to"`
	T        []time.Time      `json:"t"`
	Floor    *SeriesColumn    `json:"floor,omitempty"`
	FloorMin *SeriesColumn    `json:"floorMin,omitempty"`
	Median   *SeriesColumn    `json:"median,omitempty"`
	Tickets  *SeriesColumn    `json:"tickets,omitempty"`
	Sales    *SeriesColumn    `json:"sales,omitempty"`
	Volume   *SeriesColumn    `json:"volume,omitempty"`
}

EventSeries: Column-oriented chart data: `t` holds the bucket starts and each requested metric one value per bucket (null where the bucket has no data). `floor` is the bucket's last floor, `floorMin` its lowest, `median` the mean median, `tickets` the last inventory, `sales` the tickets sold and `volume` Σ qty·all-in of its priced sales (all-in minor units).

type EventSource

type EventSource struct {
	// Marketplace source id (`stubhub` — StubHub and viagogo, one catalogue sold under two brands; `crowdvolt` — CrowdVolt, US Dice and Ticketmaster/AXS music events; `tickpick` — TickPick, the whole US catalogue, all-in prices; `vividseats` — Vivid Seats, the whole US catalogue, pre-fee and all-in prices; `ticombo` — Ticombo, a European marketplace that also lists US events, pre-fee and all-in prices in each seller's currency; `tmresale` — Ticketmaster's fan-to-fan resale listings, US, Canadian, UK and Irish events hosted on Ticketmaster, pre-fee and all-in prices).
	Source string `json:"source"`
	// The marketplace's event id.
	ExternalID string `json:"externalId"`
	// The event's page on the marketplace: for `stubhub`, its canonical StubHub
	// link. StubHub and viagogo sell one catalogue under two brands, so the same
	// `externalId` opens on either: `https://www.stubhub.com/event/{externalId}`
	// and `https://www.viagogo.com/E-{externalId}`. For `crowdvolt`,
	// `https://www.crowdvolt.com/event/{externalId}`. For `tickpick`,
	// `https://www.tickpick.com/buy-tickets/{externalId}/`. For `vividseats`,
	// `https://www.vividseats.com/tickets/production/{externalId}`. For `ticombo`,
	// the event page found by the search (no URL form opens an id alone). For `tmresale`,
	// `https://www.ticketmaster.com/event/{externalId}`.
	URL    *string           `json:"url"`
	Status EventSourceStatus `json:"status"`
	// `exact`: the marketplace reported the event's own id (its TM event id, or the Dice event id of a Dice event); `auto`: matched by score; `manual`: linked by staff.
	Method   EventSourceMethod `json:"method"`
	LinkedAt time.Time         `json:"linkedAt"`
	// When the marketplace's listings were last collected; null until the first poll.
	LastPolledAt *time.Time `json:"lastPolledAt"`
	// `fresh`: polled within twice its current poll interval; `stale`:
	// older (or the event is no longer polled); `pending`: not polled yet.
	Freshness EventSourceFreshness `json:"freshness"`
}

EventSource is a schema of the public API.

type EventSourceFreshness

type EventSourceFreshness string

EventSourceFreshness: `fresh`: polled within twice its current poll interval; `stale`: older (or the event is no longer polled); `pending`: not polled yet.

const (
	EventSourceFreshnessFresh   EventSourceFreshness = "fresh"
	EventSourceFreshnessStale   EventSourceFreshness = "stale"
	EventSourceFreshnessPending EventSourceFreshness = "pending"
)

Values of EventSourceFreshness.

type EventSourceMethod

type EventSourceMethod string

EventSourceMethod: `exact`: the marketplace reported the event's own id (its TM event id, or the Dice event id of a Dice event); `auto`: matched by score; `manual`: linked by staff.

const (
	EventSourceMethodExact  EventSourceMethod = "exact"
	EventSourceMethodAuto   EventSourceMethod = "auto"
	EventSourceMethodManual EventSourceMethod = "manual"
)

Values of EventSourceMethod.

type EventSourceStatus

type EventSourceStatus string

EventSourceStatus is a schema of the public API.

const (
	EventSourceStatusLinked EventSourceStatus = "linked"
)

Values of EventSourceStatus.

type EventStatus

type EventStatus string

EventStatus is a schema of the public API.

const (
	EventStatusOnsale      EventStatus = "onsale"
	EventStatusOffsale     EventStatus = "offsale"
	EventStatusCanceled    EventStatus = "canceled"
	EventStatusPostponed   EventStatus = "postponed"
	EventStatusRescheduled EventStatus = "rescheduled"
	EventStatusUnknown     EventStatus = "unknown"
)

Values of EventStatus.

type EventSummary

type EventSummary struct {
	ID int64 `json:"id"`
	// Ticketmaster Discovery event id; empty for events not listed by Ticketmaster Discovery (e.g. `primarySource` `dice`).
	DiscoveryID string `json:"discoveryId"`
	// Ticketmaster host event id (16 uppercase hex); null for events not hosted on Ticketmaster.
	TmEventID *string `json:"tmEventId"`
	// The event's primary seller, whose inventory backs the `primary` market: `tm` when hosted on
	// Ticketmaster, `dice` for a Dice event (see `GET /v1/events/{id}/ticket-types`); null when the
	// platform collects no primary inventory for it.
	PrimarySource *PrimarySource `json:"primarySource"`
	Name          string         `json:"name"`
	URL           *string        `json:"url"`
	// Start instant; null while the date is TBA/TBD.
	StartsAt  *time.Time `json:"startsAt"`
	LocalDate *string    `json:"localDate"`
	// IANA zone of the event.
	Timezone    *string         `json:"timezone"`
	Status      EventStatus     `json:"status"`
	Venue       *VenueRef       `json:"venue,omitempty"`
	Attractions []AttractionRef `json:"attractions"`
	// Classification segment, e.g. Music or Sports.
	Segment         *string     `json:"segment"`
	Genre           *string     `json:"genre"`
	PublicSaleStart *time.Time  `json:"publicSaleStart"`
	PriceRange      *PriceRange `json:"priceRange,omitempty"`
	// When the catalog first saw the event.
	FirstSeenAt time.Time `json:"firstSeenAt"`
	// Set when a complete sweep no longer found the event in Discovery.
	MissingSince *time.Time     `json:"missingSince"`
	Lifecycle    EventLifecycle `json:"lifecycle"`
	Tier         EventTier      `json:"tier"`
	// Whether the event has a compiled seat map.
	HasMap bool `json:"hasMap"`
	// Sources the event is available at, sorted (`tm` when hosted on Ticketmaster, `dice` for a Dice event, then marketplaces with a linked listing).
	AvailableSources []string `json:"availableSources"`
	// Tickets listed on Ticketmaster resale at the last poll of its listings (0: none listed now). Absent
	// for events without Ticketmaster resale data (no linked `tmresale` listing, not polled yet) and for
	// plans without market data.
	TmResaleTickets *int          `json:"tmResaleTickets,omitempty"`
	Metrics         *EventMetrics `json:"metrics,omitempty"`
}

EventSummary is a schema of the public API.

type EventTier

type EventTier string

EventTier: Polling tier: `watched` (in scope of an enabled market alert rule, polled about every 30 s), `standard` (on sale, about hourly) or `dormant` (not polled: not on sale yet, ended, cancelled, or without a pollable source).

const (
	EventTierWatched  EventTier = "watched"
	EventTierStandard EventTier = "standard"
	EventTierDormant  EventTier = "dormant"
)

Values of EventTier.

type Export

type Export struct {
	ID      string         `json:"id"`
	Kind    ExportKind     `json:"kind"`
	Format  ExportFormat   `json:"format"`
	Filters map[string]any `json:"filters"`
	Status  ExportStatus   `json:"status"`
	Rows    *int64         `json:"rows"`
	// The plan's export row limit cut the file short.
	Truncated  bool       `json:"truncated"`
	Bytes      *int64     `json:"bytes"`
	Error      *string    `json:"error"`
	CreatedAt  time.Time  `json:"createdAt"`
	StartedAt  *time.Time `json:"startedAt"`
	FinishedAt *time.Time `json:"finishedAt"`
	// When the file is deleted (7 days after it was written).
	ExpiresAt time.Time `json:"expiresAt"`
	// Signed, credential-free URL of the file, valid 15 minutes from this response (set when succeeded).
	DownloadURL *string `json:"downloadUrl"`
}

Export is a schema of the public API.

type ExportFormat

type ExportFormat string

ExportFormat is a schema of the public API.

const (
	ExportFormatCSV   ExportFormat = "csv"
	ExportFormatJsonl ExportFormat = "jsonl"
)

Values of ExportFormat.

type ExportInput

type ExportInput struct {
	Kind   ExportKind   `json:"kind"`
	Format ExportFormat `json:"format"`
	// Query parameters of the mirrored read (strings, numbers, booleans or arrays of them), plus `eventId`/`listId` where the read has them in its path.
	Filters map[string]any `json:"filters,omitempty"`
}

ExportInput is a schema of the public API.

type ExportKind

type ExportKind string

ExportKind is a schema of the public API.

const (
	ExportKindEvents ExportKind = "events"
	ExportKindSales  ExportKind = "sales"
	ExportKindSeries ExportKind = "series"
	ExportKindList   ExportKind = "list"
)

Values of ExportKind.

type ExportPage

type ExportPage struct {
	Items      []Export `json:"items"`
	NextCursor *string  `json:"nextCursor"`
}

ExportPage is a schema of the public API.

type ExportPortfolioCSVParams

type ExportPortfolioCSVParams struct {
	// Market scope (default `primary`).
	Scope *MetricScope
	// Rows per list item held (`position`, default) or per event (`event`).
	GroupBy *PortfolioGroupBy
}

ExportPortfolioCSVParams holds the query parameters of ExportPortfolioCSV.

type ExportSavedListCSVParams

type ExportSavedListCSVParams struct {
	// Market scope (default `primary`).
	Scope *MetricScope
	// Comma-separated column ids in display order (`GridColumn.id`); absent = the saved view's, else the defaults.
	Columns []string
	// Comma-separated sort keys, first wins; a leading `-` sorts descending (`-chg24h,name`). Empty = start date; absent = the saved view's.
	Sort *string
	// Repeatable `column:op[:value]`. Numeric ops `lt`, `lte`, `gt`, `gte`, `eq`, `ne` take numbers in API units
	// (minor units, fractions, unix seconds); text ops `contains`, `notContains`, `eq`, `ne`; any column
	// `empty`, `notEmpty`. Empty entries are ignored, so `filter=` clears the saved filters.
	Filter []string
	// Share of the resale price the seller pays, for the `roi` column (default 0; the web app sends the
	// user's seller fee for the resale market, `GET /v1/me/preferences`).
	SellerFee *float64
}

ExportSavedListCSVParams holds the query parameters of ExportSavedListCSV.

type ExportStatus

type ExportStatus string

ExportStatus is a schema of the public API.

const (
	ExportStatusQueued    ExportStatus = "queued"
	ExportStatusRunning   ExportStatus = "running"
	ExportStatusSucceeded ExportStatus = "succeeded"
	ExportStatusFailed    ExportStatus = "failed"
	ExportStatusExpired   ExportStatus = "expired"
)

Values of ExportStatus.

type ExternalLink struct {
	// Discovery's link kind, e.g. homepage, spotify, youtube, instagram, wiki.
	Kind string `json:"kind"`
	URL  string `json:"url"`
}

ExternalLink is a schema of the public API.

type GeoPoint

type GeoPoint struct {
	Lat float64 `json:"lat"`
	Lng float64 `json:"lng"`
}

GeoPoint is a schema of the public API.

type GetAttractionHistoryParams

type GetAttractionHistoryParams struct {
	// Past events returned, most recent first.
	Limit *int
}

GetAttractionHistoryParams holds the query parameters of GetAttractionHistory.

type GetCompareSeriesAlign

type GetCompareSeriesAlign string

GetCompareSeriesAlign is a schema of the public API.

const (
	GetCompareSeriesAlignCalendar    GetCompareSeriesAlign = "calendar"
	GetCompareSeriesAlignDaysToEvent GetCompareSeriesAlign = "days_to_event"
)

Values of GetCompareSeriesAlign.

type GetCompareSeriesParams

type GetCompareSeriesParams struct {
	// Comma-separated event ids (1–8).
	// Required.
	Events []int64
	// The metric (default `floor`).
	Metric *SeriesMetric
	Align  *GetCompareSeriesAlign
	// Market scope (default `primary`).
	Scope      *MetricScope
	Res        *SeriesResolution
	From       *time.Time
	To         *time.Time
	DaysBefore *int
}

GetCompareSeriesParams holds the query parameters of GetCompareSeries.

type GetEventMapOverlayParams

type GetEventMapOverlayParams struct {
	// Add the section layers with this mode's values (none by default).
	Mode *OverlayMode
	// Only section layers of this market (all by default).
	Market *OverlayMarket
	// Only the section layer of this marketplace (implies `market=secondary`).
	Source *string
}

GetEventMapOverlayParams holds the query parameters of GetEventMapOverlay.

type GetEventSectionSeriesParams

type GetEventSectionSeriesParams struct {
	// Market scope (default `primary`): `primary`, `tm_resale`, `secondary:best` or
	// `secondary:<marketplace>` (any marketplace id, e.g. `secondary:stubhub`).
	Scope *string
	Res   *SeriesResolution
	// Range start (default `to` − 72h).
	From *time.Time
	// Range end, exclusive (default now).
	To *time.Time
}

GetEventSectionSeriesParams holds the query parameters of GetEventSectionSeries.

type GetEventSeriesParams

type GetEventSeriesParams struct {
	// Chart only this Ticketmaster offer (ticket type), by its price levels' `offerName`; combines with `section`.
	Offer *string
	// Chart these sections as one zone (repeat the parameter for several:
	// `section=101&section=102`): the `key` of the overlay's section
	// layers, the `sectionKey` of the section table. Unknown keys add
	// nothing.
	Section []string
	// Comma-separated metrics (default `floor,median,tickets,sales`).
	Metrics []SeriesMetric
	// Market scope (default `primary`).
	Scope *MetricScope
	Res   *SeriesResolution
	// Range start (default `to` − 72h).
	From *time.Time
	// Range end, exclusive (default now).
	To *time.Time
}

GetEventSeriesParams holds the query parameters of GetEventSeries.

type GetPortfolioHistoryParams

type GetPortfolioHistoryParams struct {
	// Market scope (default `primary`).
	Scope    *MetricScope
	From     *time.Time
	To       *time.Time
	Interval *PortfolioHistoryInterval
}

GetPortfolioHistoryParams holds the query parameters of GetPortfolioHistory.

type GetPortfolioParams

type GetPortfolioParams struct {
	// Market scope (default `primary`).
	Scope *MetricScope
	// Rows per list item held (`position`, default) or per event (`event`).
	GroupBy *PortfolioGroupBy
}

GetPortfolioParams holds the query parameters of GetPortfolio.

type GetPredictionTrackRecordParams

type GetPredictionTrackRecordParams struct {
	// The call family (`tm`, the default, or `dice`).
	Category *PredictionCategory
}

GetPredictionTrackRecordParams holds the query parameters of GetPredictionTrackRecord.

type GetSalesSummaryParams

type GetSalesSummaryParams struct {
	// How far back the totals reach. Up to `24h` the window starts
	// exactly that long before now; `72h` and `7d` start at the UTC
	// hour holding that instant (`from`). A window longer than the
	// plan's sales history is a 402 (`sales_history`).
	Window *SalesSummaryWindow
	// Region code (`GET /v1/regions`); only venues in one of its countries. With `country`, both apply.
	Region *string
	// Venue country (ISO 3166-1 alpha-2).
	Country *string
	// Event segment (case-insensitive), e.g. `Music`.
	Segment *string
	// Minimum all-in price per ticket, minor units of the sale's currency.
	MinPrice *int64
	// Only this scope (both by default).
	Scope *MetricScope
	// Comma-separated sale confidences to include (default: every one).
	// `confirmed` sales are reported by a marketplace; Ticketmaster sales
	// are always inferred.
	Confidence []SaleConfidence
	// Only sales of this source: `ticketmaster` (primary and TM resale) or a
	// marketplace id (`stubhub`, its `secondary:<source>` sales). Combines with
	// `scope` (a scope of another source matches nothing).
	Source *string
	// Only sales of the events in this saved list of the active organization.
	ListID *string
}

GetSalesSummaryParams holds the query parameters of GetSalesSummary.

type GetUsageGranularity

type GetUsageGranularity string

GetUsageGranularity is a schema of the public API.

const (
	GetUsageGranularityMinute GetUsageGranularity = "minute"
	GetUsageGranularityHour   GetUsageGranularity = "hour"
	GetUsageGranularityDay    GetUsageGranularity = "day"
)

Values of GetUsageGranularity.

type GetUsageParams

type GetUsageParams struct {
	// Start (inclusive); default `to` − 24 h.
	From *time.Time
	// End (exclusive); default now.
	To          *time.Time
	Granularity *GetUsageGranularity
	// Only this key.
	APIKeyID *string
}

GetUsageParams holds the query parameters of GetUsage.

type InventoryChange

type InventoryChange struct {
	// Time of the poll that observed the change.
	Ts     time.Time           `json:"ts"`
	Market InventoryMarket     `json:"market"`
	Kind   InventoryChangeKind `json:"kind"`
	// Manifest section name.
	Section string `json:"section"`
	// Manifest section index (-1 when the manifest was not loaded).
	SectionIdx int `json:"sectionIdx"`
	// Row name; empty for GA stock.
	Row string `json:"row"`
	// Seats (or GA units) in the change.
	Count int `json:"count"`
	// Seat labels; empty for GA stock.
	Seats []string `json:"seats"`
	// Ticketmaster placeIds of the seats (join to the seat map's places).
	PlaceIDs []string `json:"placeIds"`
	// List price per ticket in minor units; null when unpriced.
	ListMinor *int64 `json:"listMinor"`
	// All-in price per ticket in minor units; null when unpriced.
	TotalMinor *int64  `json:"totalMinor"`
	Currency   *string `json:"currency"`
	// `drop`/`ga_drop`: `pending` inside the cart-hold window, `none` for a
	// mass transition; `sale`/`ga_sale`: `inferred_high` or `inferred_low`;
	// null otherwise.
	Confidence *InventoryChangeConfidence `json:"confidence"`
	// Part of a mass transition (not counted as sales).
	Mass bool `json:"mass"`
}

InventoryChange is a schema of the public API.

type InventoryChangeConfidence

type InventoryChangeConfidence string

InventoryChangeConfidence: `drop`/`ga_drop`: `pending` inside the cart-hold window, `none` for a mass transition; `sale`/`ga_sale`: `inferred_high` or `inferred_low`; null otherwise.

const (
	InventoryChangeConfidencePending      InventoryChangeConfidence = "pending"
	InventoryChangeConfidenceInferredHigh InventoryChangeConfidence = "inferred_high"
	InventoryChangeConfidenceInferredLow  InventoryChangeConfidence = "inferred_low"
	InventoryChangeConfidenceNone         InventoryChangeConfidence = "none"
)

Values of InventoryChangeConfidence.

type InventoryChangeKind

type InventoryChangeKind string

InventoryChangeKind is a schema of the public API.

const (
	InventoryChangeKindRestock        InventoryChangeKind = "restock"
	InventoryChangeKindDrop           InventoryChangeKind = "drop"
	InventoryChangeKindGaRestock      InventoryChangeKind = "ga_restock"
	InventoryChangeKindGaDrop         InventoryChangeKind = "ga_drop"
	InventoryChangeKindHoldReleased   InventoryChangeKind = "hold_released"
	InventoryChangeKindGaHoldReleased InventoryChangeKind = "ga_hold_released"
	InventoryChangeKindSale           InventoryChangeKind = "sale"
	InventoryChangeKindGaSale         InventoryChangeKind = "ga_sale"
)

Values of InventoryChangeKind.

type InventoryChangePage

type InventoryChangePage struct {
	Items []InventoryChange `json:"items"`
	// Cursor of the next page; null on the last page.
	NextCursor *string `json:"nextCursor"`
}

InventoryChangePage is a schema of the public API.

type InventoryMarket

type InventoryMarket string

InventoryMarket is a schema of the public API.

const (
	InventoryMarketPrimary InventoryMarket = "primary"
)

Values of InventoryMarket.

type ListAlertEventsParams

type ListAlertEventsParams struct {
	RuleID  *int64
	EventID *int64
	// Firings older than this id (`nextBefore`).
	Before *int64
	Limit  *int
}

ListAlertEventsParams holds the query parameters of ListAlertEvents.

type ListAlertRulesParams

type ListAlertRulesParams struct {
	// Rules older than this id (`nextBefore`).
	Before *int64
	Limit  *int
}

ListAlertRulesParams holds the query parameters of ListAlertRules.

type ListAttractionEventsParams

type ListAttractionEventsParams struct {
	// Only events starting at or after this instant. Defaults to now, in which case undated (TBA/TBD) events are included too.
	From *time.Time
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListAttractionEventsParams holds the query parameters of ListAttractionEvents.

type ListCalendarDaysParams

type ListCalendarDaysParams struct {
	// First local day of the range (inclusive) in `tz`.
	// Required.
	From string
	// Local day after the range (exclusive) in `tz`; must be after `from`.
	// Required.
	To string
	// IANA time zone of the viewer; days and `date` are local to it. Unknown zones are rejected.
	TZ *string
	// Comma-separated item kinds to include (all by default).
	Kinds []CalendarKind
	// Venue country (ISO 3166-1 alpha-2).
	Country *string
	// Region code (`GET /v1/regions`); only venues in one of its countries. With `country`, both apply.
	Region *string
	// Only events of this primary seller (`CalendarEvent.primarySource`): `tm` for events hosted on Ticketmaster, `dice` for Dice's own events.
	PrimarySource *PrimarySource
	// Only events hosted on Ticketmaster (with a `tmEventId`). Same as `primarySource=tm`, which replaces it; 400 together with another `primarySource`.
	TmOnly *bool
	// Event name search (substring or trigram word similarity on the normalized name).
	Q *string
	// Only events in any of the active organization's saved lists.
	MyLists *bool
	// Items returned per day, most prominent first (a month cell shows a few, the week grid more).
	Top *int
}

ListCalendarDaysParams holds the query parameters of ListCalendarDays.

type ListCalendarItemsParams

type ListCalendarItemsParams struct {
	// First local day of the range (inclusive) in `tz`.
	// Required.
	From string
	// Local day after the range (exclusive) in `tz`; must be after `from`.
	// Required.
	To string
	// IANA time zone of the viewer; days and `date` are local to it. Unknown zones are rejected.
	TZ *string
	// Comma-separated item kinds to include (all by default).
	Kinds []CalendarKind
	// Venue country (ISO 3166-1 alpha-2).
	Country *string
	// Region code (`GET /v1/regions`); only venues in one of its countries. With `country`, both apply.
	Region *string
	// Only events of this primary seller (`CalendarEvent.primarySource`): `tm` for events hosted on Ticketmaster, `dice` for Dice's own events.
	PrimarySource *PrimarySource
	// Only events hosted on Ticketmaster (with a `tmEventId`). Same as `primarySource=tm`, which replaces it; 400 together with another `primarySource`.
	TmOnly *bool
	// Event name search (substring or trigram word similarity on the normalized name).
	Q *string
	// Only events in any of the active organization's saved lists.
	MyLists *bool
	Sort    *ListCalendarItemsSort
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListCalendarItemsParams holds the query parameters of ListCalendarItems.

type ListCalendarItemsSort

type ListCalendarItemsSort string

ListCalendarItemsSort is a schema of the public API.

const (
	ListCalendarItemsSortTime       ListCalendarItemsSort = "time"
	ListCalendarItemsSortProminence ListCalendarItemsSort = "prominence"
)

Values of ListCalendarItemsSort.

type ListEventListingChangesParams

type ListEventListingChangesParams struct {
	// Only this secondary marketplace (`stubhub`); every linked marketplace by default.
	Source *string
	// Comma-separated change kinds to include (all by default).
	Kinds []ListingChangeKind
	// Only these sections (repeat the parameter for several). A value matches
	// the marketplace's section label after normalisation (letters and digits,
	// lower-cased: `Floor 2` = `FLOOR-2`) or the canonical `sectionKey` exactly.
	Section []string
	// Only changes at or after this instant.
	Since *time.Time
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListEventListingChangesParams holds the query parameters of ListEventListingChanges.

type ListEventListingSectionsParams

type ListEventListingSectionsParams struct {
	// Only this secondary marketplace (`stubhub`); every linked marketplace by default.
	Source *string
}

ListEventListingSectionsParams holds the query parameters of ListEventListingSections.

type ListEventListingsMarket

type ListEventListingsMarket string

ListEventListingsMarket is a schema of the public API.

const (
	ListEventListingsMarketPrimary   ListEventListingsMarket = "primary"
	ListEventListingsMarketTmResale  ListEventListingsMarket = "tm_resale"
	ListEventListingsMarketSecondary ListEventListingsMarket = "secondary"
)

Values of ListEventListingsMarket.

type ListEventListingsParams

type ListEventListingsParams struct {
	// Only this secondary marketplace (`stubhub`); every linked marketplace by default.
	Source *string
	// Only listings of this market (`tm_resale`: Ticketmaster resale; `secondary`: the marketplaces).
	Market *ListEventListingsMarket
	// Only these sections (repeat the parameter for several). A value matches
	// the marketplace's section label after normalisation (letters and digits,
	// lower-cased: `Floor 2` = `FLOOR-2`) or the canonical `sectionKey` exactly.
	Section []string
	// Only listings offering at least this many tickets.
	MinQty *int
	// Only listings whose all-in price per ticket is at most this (minor units of the listing's currency).
	MaxPrice *int64
	// All-in price per ticket, ascending (`price`) or descending (`-price`).
	Sort *ListEventListingsSort
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListEventListingsParams holds the query parameters of ListEventListings.

type ListEventListingsSort

type ListEventListingsSort string

ListEventListingsSort is a schema of the public API.

const (
	ListEventListingsSortPrice     ListEventListingsSort = "price"
	ListEventListingsSortPriceDesc ListEventListingsSort = "-price"
)

Values of ListEventListingsSort.

type ListEventPriceLevelsParams

type ListEventPriceLevelsParams struct {
	// Only this price key.
	PriceKey *int32
}

ListEventPriceLevelsParams holds the query parameters of ListEventPriceLevels.

type ListEventSalesParams

type ListEventSalesParams struct {
	// Only this scope (both by default).
	Scope *MetricScope
	// Only sales in these sections (repeat the parameter for several). A
	// value matches the sale's section label after normalisation (letters
	// and digits, lower-cased: `Floor 2` = `FLOOR-2`; Ticketmaster
	// manifest names and marketplace labels) or a marketplace sale's
	// canonical `sectionKey` exactly. No match is an empty page.
	Section []string
	// Comma-separated sale confidences to include (default: every one).
	// `confirmed` sales are reported by a marketplace; Ticketmaster sales
	// are always inferred.
	Confidence []SaleConfidence
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListEventSalesParams holds the query parameters of ListEventSales.

type ListEventSalesSectionsParams

type ListEventSalesSectionsParams struct {
	// Only this scope (every scope by default).
	Scope *MetricScope
	// Comma-separated sale confidences to include (default: every one).
	// `confirmed` sales are reported by a marketplace; Ticketmaster sales
	// are always inferred.
	Confidence []SaleConfidence
}

ListEventSalesSectionsParams holds the query parameters of ListEventSalesSections.

type ListEventSectionsParams

type ListEventSectionsParams struct {
	// Market scope (default `primary`): `primary`, `tm_resale`, `secondary:best` or
	// `secondary:<marketplace>` (any marketplace id, e.g. `secondary:stubhub`).
	Scope *string
	// Share of the resale price the seller pays, for `roi` (default 0).
	SellerFee *float64
}

ListEventSectionsParams holds the query parameters of ListEventSections.

type ListEventsOrder

type ListEventsOrder string

ListEventsOrder is a schema of the public API.

const (
	ListEventsOrderAsc  ListEventsOrder = "asc"
	ListEventsOrderDesc ListEventsOrder = "desc"
)

Values of ListEventsOrder.

type ListEventsParams

type ListEventsParams struct {
	// Name search (substring or trigram word similarity on the normalized event name). An event ID or event page URL also matches the events it names: a Ticketmaster event ID (16 hex digits, e.g. `380064AEC95E177C`, or a ticketmaster.* `…/event/{id}` URL) or a StubHub/viagogo event number of a linked marketplace listing (e.g. `161219435`, `E-161219435`, or a stubhub.* / viagogo.* `…/event/{n}` or `…/E-{n}` URL).
	Q *string
	// Only events starting at or after this instant. Defaults to now, in which case undated (TBA/TBD) events are included too; pass an earlier instant to see events that already started.
	From *time.Time
	// Only events starting before this instant.
	To *time.Time
	// Venue country (ISO 3166-1 alpha-2).
	Country *string
	// Region code (`GET /v1/regions`); only venues in one of its countries. With `country`, both apply.
	Region *string
	// Venue city (case-insensitive exact match).
	City *string
	// `lat,lng,radiusKm`: only events at venues within `radiusKm` (at most 500) of
	// the point, e.g. `51.5072,-0.1276,25`.
	Near *string
	// Comma-separated classification segments (any of them, case-insensitive), e.g. `Music,Sports`. See `GET /v1/catalog/facets`.
	Segment []string
	// Comma-separated genres (any of them, case-insensitive).
	Genre []string
	// Comma-separated lifecycle states to include (see `EventLifecycle`).
	Lifecycle []EventLifecycle
	// Comma-separated polling tiers to include (see `EventTier`).
	Tier []EventTier
	// Only events with (`true`) or without (`false`) a compiled seat map.
	HasMap *bool
	// Comma-separated sources the event must be available at, all of them:
	// `tm` (hosted on Ticketmaster), `dice` (a Dice event) and marketplaces
	// (`stubhub` — StubHub & viagogo, `crowdvolt`, `tickpick`, `vividseats`, `ticombo` — Ticombo, `tmresale` — Ticketmaster resale listings, the `tm_resale` market) with a linked listing.
	Sources []string
	// Comma-separated statuses to include.
	Status []EventStatus
	// Only events of this primary seller (`EventSummary.primarySource`): `tm` for events hosted on Ticketmaster, `dice` for Dice's own events.
	PrimarySource *PrimarySource
	// Only events hosted on Ticketmaster (with a `tmEventId`). Same as `primarySource=tm`, which replaces it; 400 together with another `primarySource`.
	TmOnly *bool
	// Only events first seen by the catalog at or after this instant.
	NewSince *time.Time
	// Only events at this venue.
	VenueID *int64
	// Only events featuring this attraction.
	AttractionID *int64
	// Market scope (default `primary`).
	Scope *MetricScope
	// Minimum floor of the scope (all-in minor units); excludes events without a floor.
	MinFloor *int64
	MaxFloor *int64
	// Minimum 24h floor change (fraction, 0.1 = +10%); excludes events without a baseline.
	MinChg24h *float64
	MaxChg24h *float64
	// Minimum tickets sold in the last 24h.
	MinSales24h *int
	// Minimum spread of the scope (fraction, 0.2 = the floor is 20% above the primary floor); marketplace scopes carry a spread. Excludes events without one.
	MinSpread *float64
	// Maximum primary sell-out estimate in hours (`EventMetrics.selloutHours`); only the `primary` scope carries one. Excludes events without one.
	MaxSelloutHours *float64
	// Only events whose public on-sale started at or after this instant (excludes events without one).
	OnsaleFrom *time.Time
	// Only events whose public on-sale starts before this instant (excludes events without one).
	OnsaleTo *time.Time
	// Comma-separated event IDs (at most 200, more is a 400), e.g. `123,456`. Only these events; combines with every other filter, the sort and `scope`. Unknown IDs match nothing.
	IDs []int64
	// Only the events in this saved list of the active organization (404 when there is none); combines with `ids` and every other filter.
	ListID *string
	// `startsAt` (ascending, undated events last), `firstSeen` (newest first),
	// `onsale` (public on-sale start, latest first; events without one excluded), or
	// any numeric metric of `scope` (the `EventMetrics` field of the same name;
	// events without the value last).
	Sort *ListEventsSort
	// Direction of a metric sort (default `asc` for `floor` and `selloutHours`, `desc` otherwise); not allowed with `startsAt`/`firstSeen`/`onsale`.
	Order *ListEventsOrder
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListEventsParams holds the query parameters of ListEvents.

type ListEventsSort

type ListEventsSort string

ListEventsSort is a schema of the public API.

const (
	ListEventsSortStartsAt     ListEventsSort = "startsAt"
	ListEventsSortFirstSeen    ListEventsSort = "firstSeen"
	ListEventsSortOnsale       ListEventsSort = "onsale"
	ListEventsSortFloor        ListEventsSort = "floor"
	ListEventsSortChg24h       ListEventsSort = "chg24h"
	ListEventsSortChg72h       ListEventsSort = "chg72h"
	ListEventsSortSales24h     ListEventsSort = "sales24h"
	ListEventsSortDepletion24h ListEventsSort = "depletion24h"
	ListEventsSortMovement     ListEventsSort = "movement"
	ListEventsSortInventory    ListEventsSort = "inventory"
	ListEventsSortSellThrough  ListEventsSort = "sellThrough"
	ListEventsSortSpread       ListEventsSort = "spread"
	ListEventsSortFloorPair    ListEventsSort = "floorPair"
	ListEventsSortMedian       ListEventsSort = "median"
	ListEventsSortAvg24h       ListEventsSort = "avg24h"
	ListEventsSortAvg72h       ListEventsSort = "avg72h"
	ListEventsSortAvg7d        ListEventsSort = "avg7d"
	ListEventsSortAvg30d       ListEventsSort = "avg30d"
	ListEventsSortChg7d        ListEventsSort = "chg7d"
	ListEventsSortSales72h     ListEventsSort = "sales72h"
	ListEventsSortVolume24h    ListEventsSort = "volume24h"
	ListEventsSortSaleAvg24h   ListEventsSort = "saleAvg24h"
	ListEventsSortSaleAvg72h   ListEventsSort = "saleAvg72h"
	ListEventsSortVelocity     ListEventsSort = "velocity"
	ListEventsSortChurn24h     ListEventsSort = "churn24h"
	ListEventsSortSelloutHours ListEventsSort = "selloutHours"
)

Values of ListEventsSort.

type ListExportsParams

type ListExportsParams struct {
	Cursor *string
	Limit  *int
}

ListExportsParams holds the query parameters of ListExports.

type ListInventoryChangesParams

type ListInventoryChangesParams struct {
	// Comma-separated change kinds to include (all by default).
	Kinds []InventoryChangeKind
	// Only changes in these sections (repeat the parameter for several,
	// e.g. the GA sections sold under one floor outline). Names are
	// compared after the seat-map normalisation (letters and digits,
	// lower-cased), so the artifact's section name matches the
	// manifest's (`PIT B` = `PITB`).
	Section []string
	Market  *InventoryMarket
	// Only changes at or after this instant.
	Since *time.Time
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListInventoryChangesParams holds the query parameters of ListInventoryChanges.

type ListMoversDirection

type ListMoversDirection string

ListMoversDirection is a schema of the public API.

const (
	ListMoversDirectionUp   ListMoversDirection = "up"
	ListMoversDirectionDown ListMoversDirection = "down"
)

Values of ListMoversDirection.

type ListMoversParams

type ListMoversParams struct {
	Window    *ListMoversWindow
	Direction *ListMoversDirection
	// Market scope (default `primary`).
	Scope *MetricScope
	// Only this cohort, e.g. `music/3-7d`.
	Cohort *string
	Limit  *int
}

ListMoversParams holds the query parameters of ListMovers.

type ListMoversWindow

type ListMoversWindow string

ListMoversWindow is a schema of the public API.

const (
	ListMoversWindow24h ListMoversWindow = "24h"
	ListMoversWindow72h ListMoversWindow = "72h"
	ListMoversWindow7d  ListMoversWindow = "7d"
)

Values of ListMoversWindow.

type ListMustCopsParams

type ListMustCopsParams struct {
	Status *MustCopStatusFilter
	// The `nextCursor` of the previous page (with the same `status`).
	Cursor *string
	Limit  *int
}

ListMustCopsParams holds the query parameters of ListMustCops.

type ListPredictionsParams

type ListPredictionsParams struct {
	// The call family (`tm`, the default, or `dice`).
	Category *PredictionCategory
	Status   *PredictionStatusFilter
	// The `nextCursor` of the previous page (with the same `status`).
	Cursor *string
	Limit  *int
}

ListPredictionsParams holds the query parameters of ListPredictions.

type ListSalesFeedParams

type ListSalesFeedParams struct {
	// Region code (`GET /v1/regions`); only venues in one of its countries. With `country`, both apply.
	Region *string
	// Venue country (ISO 3166-1 alpha-2).
	Country *string
	// Event segment (case-insensitive), e.g. `Music`.
	Segment *string
	// Minimum all-in price per ticket, minor units of the sale's currency.
	MinPrice *int64
	// Only this scope (both by default).
	Scope *MetricScope
	// Comma-separated sale confidences to include (default: every one).
	// `confirmed` sales are reported by a marketplace; Ticketmaster sales
	// are always inferred.
	Confidence []SaleConfidence
	// Only sales of this source: `ticketmaster` (primary and TM resale) or a
	// marketplace id (`stubhub`, its `secondary:<source>` sales). Combines with
	// `scope` (a scope of another source matches nothing).
	Source *string
	// Only sales of the events in this saved list of the active organization.
	ListID *string
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListSalesFeedParams holds the query parameters of ListSalesFeed.

type ListVenueEventsParams

type ListVenueEventsParams struct {
	// Only events starting at or after this instant. Defaults to now, in which case undated (TBA/TBD) events are included too.
	From *time.Time
	// Opaque `nextCursor` of the previous page.
	Cursor *string
	Limit  *int
}

ListVenueEventsParams holds the query parameters of ListVenueEvents.

type ListWebhookDeliveriesParams

type ListWebhookDeliveriesParams struct {
	Status *WebhookDeliveryStatus
	Cursor *string
	Limit  *int
}

ListWebhookDeliveriesParams holds the query parameters of ListWebhookDeliveries.

type Listing

type Listing struct {
	// Marketplace (`stubhub`).
	Source string `json:"source"`
	// The marketplace's listing id.
	ExternalID string `json:"externalId"`
	// Section label as the marketplace shows it.
	Section string `json:"section"`
	// Canonical section of the event's seat map; null when unmapped.
	SectionKey *string `json:"sectionKey"`
	// Empty when the marketplace does not tell.
	Row      string  `json:"row"`
	SeatFrom *string `json:"seatFrom"`
	SeatTo   *string `json:"seatTo"`
	// Tickets offered.
	Quantity int `json:"quantity"`
	// Quantities a buyer may purchase; null when any split is allowed or unknown.
	Splits         []int  `json:"splits"`
	PriceMinor     int64  `json:"priceMinor"`
	AllInMinor     int64  `json:"allInMinor"`
	AllInEstimated bool   `json:"allInEstimated"`
	Currency       string `json:"currency"`
	// Listing features the marketplace reports (e.g. aisle, instant delivery).
	Traits      []string  `json:"traits"`
	FirstSeenAt time.Time `json:"firstSeenAt"`
	// Last price or quantity change.
	ChangedAt time.Time `json:"changedAt"`
}

Listing: One listing currently offered on a secondary marketplace. Prices are per ticket in minor units of `currency`: `priceMinor` is the seller's price, `allInMinor` what a buyer pays with fees (estimated from the marketplace's fee model when it does not report it, `allInEstimated`).

type ListingChange

type ListingChange struct {
	// Time of the poll that observed the change.
	Ts         time.Time         `json:"ts"`
	Source     string            `json:"source"`
	ExternalID string            `json:"externalId"`
	Kind       ListingChangeKind `json:"kind"`
	Section    string            `json:"section"`
	SectionKey *string           `json:"sectionKey"`
	Row        string            `json:"row"`
	QtyOld     *int              `json:"qtyOld"`
	QtyNew     *int              `json:"qtyNew"`
	PriceOld   *int64            `json:"priceOld"`
	PriceNew   *int64            `json:"priceNew"`
	Currency   string            `json:"currency"`
}

ListingChange: One listing that changed between consecutive polls of a marketplace. Prices are all-in per ticket in minor units of `currency`; `qtyOld`/`priceOld` are null for `added`, `qtyNew`/`priceNew` null for `removed`.

type ListingChangeKind

type ListingChangeKind string

ListingChangeKind is a schema of the public API.

const (
	ListingChangeKindAdded        ListingChangeKind = "added"
	ListingChangeKindPriceChanged ListingChangeKind = "price_changed"
	ListingChangeKindQtyChanged   ListingChangeKind = "qty_changed"
	ListingChangeKindRemoved      ListingChangeKind = "removed"
)

Values of ListingChangeKind.

type ListingChangePage

type ListingChangePage struct {
	Items []ListingChange `json:"items"`
	// Cursor of the next page; null on the last page.
	NextCursor *string `json:"nextCursor"`
}

ListingChangePage is a schema of the public API.

type ListingPage

type ListingPage struct {
	Items []Listing `json:"items"`
	// Cursor of the next page; null on the last page.
	NextCursor *string `json:"nextCursor"`
	// Time of the latest poll per marketplace, keyed by marketplace (`stubhub`); the listings are as of then.
	AsOf map[string]time.Time `json:"asOf"`
}

ListingPage is a schema of the public API.

type ListingSection

type ListingSection struct {
	// The canonical section key, or the marketplace label of an unmapped section.
	Section string `json:"section"`
	// Canonical section of the event's seat map; null when unmapped.
	SectionKey *string                `json:"sectionKey"`
	Listings   int                    `json:"listings"`
	Tickets    int                    `json:"tickets"`
	Sources    []ListingSectionSource `json:"sources"`
}

ListingSection: Current listings of one section across marketplaces. `sources` compares the marketplaces offering it, cheapest first; prices are all-in per ticket in minor units of each source's currency.

type ListingSectionList

type ListingSectionList struct {
	EventID int64            `json:"eventId"`
	Items   []ListingSection `json:"items"`
	// Time of the latest poll per marketplace, keyed by marketplace (`stubhub`).
	AsOf map[string]time.Time `json:"asOf"`
}

ListingSectionList is a schema of the public API.

type ListingSectionSource

type ListingSectionSource struct {
	// Marketplace (`stubhub`).
	Source   string `json:"source"`
	Listings int    `json:"listings"`
	Tickets  int    `json:"tickets"`
	// Cheapest all-in price per ticket.
	FloorMinor int64  `json:"floorMinor"`
	Currency   string `json:"currency"`
	// Distinct rows listed (empty row labels count as one).
	Rows int `json:"rows"`
}

ListingSectionSource is a schema of the public API.

type MapOverlay

type MapOverlay struct {
	EventID int64 `json:"eventId"`
	// The artifact the indexes refer to.
	SeatmapHash string `json:"seatmapHash"`
	// Time of the inventory snapshot.
	AsOf time.Time `json:"asOf"`
	// Availability revision of the snapshot.
	Revision int64 `json:"revision"`
	// Places in the artifact (bits per bitset, entries in `priceLevel`).
	Places int `json:"places"`
	// Bitset of places open on the primary market.
	Primary []byte `json:"primary"`
	// Bitset of places listed on TM resale (the tmresale listings that name their places).
	Resale []byte `json:"resale"`
	// Little-endian int16 per place; index into `priceLevels`, -1 when unpriced.
	PriceLevel []byte `json:"priceLevel"`
	// Price levels in use, cheapest all-in first.
	PriceLevels []OverlayPriceLevel `json:"priceLevels"`
	// Sections with open stock, by artifact section index.
	Sections []OverlaySection `json:"sections"`
	// Open primary GA stock per GA section.
	Ga          []OverlayGA        `json:"ga"`
	Currency    *string            `json:"currency"`
	Diagnostics OverlayDiagnostics `json:"diagnostics"`
	// Per-scope section values; present when `mode` is given.
	SectionLayers []OverlaySectionLayer `json:"sectionLayers,omitempty"`
}

MapOverlay is a schema of the public API.

type MemoryETagCache

type MemoryETagCache struct {
	// contains filtered or unexported fields
}

MemoryETagCache is an in-memory, concurrency-safe ETagCache keeping the most recently used responses.

func NewMemoryETagCache

func NewMemoryETagCache(maxEntries int) *MemoryETagCache

NewMemoryETagCache returns an LRU cache of up to maxEntries responses (1000 when maxEntries < 1).

func (*MemoryETagCache) Get

Get returns the response stored under key and marks it recently used.

func (*MemoryETagCache) Len

func (m *MemoryETagCache) Len() int

Len is the number of stored responses.

func (*MemoryETagCache) Set

func (m *MemoryETagCache) Set(_ context.Context, key string, value CachedResponse)

Set stores a response, evicting the least recently used one beyond the limit.

type Message

type Message interface {
	// StreamTopic is the topic the message belongs to.
	StreamTopic() string
}

Message is a message delivered by Stream.Next: a *DataMessage, a *ResyncMessage or an *ErrorMessage.

type MetricScope

type MetricScope string

MetricScope: Market scope of a metric: Ticketmaster primary (`primary`), Ticketmaster resale (`tm_resale`: Ticketmaster's fan-to-fan resale order book, from the `tmresale` listings, with asking and all-in prices and sales inferred from listings that sold down or disappeared), one marketplace (`secondary:<source>`, e.g. `secondary:stubhub`), or the best of the marketplaces (`secondary:best`: lowest floor, summed inventory and sales across them, in the event's currency; TM resale is not part of it). Secondary scopes need the secondary-marketplaces feature. More marketplaces may be added; treat unknown values as other scopes.

const (
	MetricScopePrimary             MetricScope = "primary"
	MetricScopeTmResale            MetricScope = "tm_resale"
	MetricScopeSecondaryBest       MetricScope = "secondary:best"
	MetricScopeSecondaryStubhub    MetricScope = "secondary:stubhub"
	MetricScopeSecondaryCrowdvolt  MetricScope = "secondary:crowdvolt"
	MetricScopeSecondaryTickpick   MetricScope = "secondary:tickpick"
	MetricScopeSecondaryVividseats MetricScope = "secondary:vividseats"
	MetricScopeSecondaryTicombo    MetricScope = "secondary:ticombo"
)

Values of MetricScope.

type MetricWindow

type MetricWindow struct {
	// Time-weighted mean floor over the window.
	Avg *int64 `json:"avg"`
	// (floor now − floor at the window start) / floor at the window start; null without a baseline.
	Chg *float64 `json:"chg"`
	// Tickets sold in the window.
	Sales int `json:"sales"`
	// Σ qty·all-in of the window's priced sales.
	Volume int64 `json:"volume"`
	// Quantity-weighted mean all-in price of the window's priced sales.
	SaleAvg *int64 `json:"saleAvg"`
	// sales ÷ the window's covered hours (those since the scope's first market sample or sale; 0 without any).
	SalesPerHour float64 `json:"salesPerHour"`
	// (inventory at the window start − inventory now) / inventory at the window start.
	Depletion *float64               `json:"depletion"`
	Vs        MetricWindowComparison `json:"vs"`
}

MetricWindow: One timeframe's metrics over (now − window, now], defined like the 24h fields of EventMetrics (`avg` like `avg24h`, `chg` like `chg24h`, `sales` like `sales24h`, …). Money is minor units of the row's `currency`.

type MetricWindowComparison

type MetricWindowComparison struct {
	// The base, the next longer window ending now; `prev30d` is the 30 days before the `30d` window.
	Window MetricWindowComparisonWindow `json:"window"`
	// avg ÷ the base's avg − 1.
	Avg *float64 `json:"avg"`
	// (sales ÷ covered hours) ÷ (base sales ÷ base covered hours) − 1; null when the base sold nothing or has no covered hours.
	SalesRate *float64 `json:"salesRate"`
	// (volume ÷ covered hours) ÷ (base volume ÷ base covered hours) − 1; null when the base has no volume or no covered hours.
	VolumeRate *float64 `json:"volumeRate"`
	// saleAvg ÷ the base's saleAvg − 1.
	SaleAvg *float64 `json:"saleAvg"`
}

MetricWindowComparison: A window against its base (`window`): fractions (0.12 = 12% higher), price means as ratios and sales and volume as per-hour rates, each value ÷ the base's − 1; null when either side is unknown or the base is zero. Rates count only the hours since the scope's first market sample or sale, so a recently tracked event is not compared against hours it had no data for.

type MetricWindowComparisonWindow

type MetricWindowComparisonWindow string

MetricWindowComparisonWindow: The base, the next longer window ending now; `prev30d` is the 30 days before the `30d` window.

const (
	MetricWindowComparisonWindow12h     MetricWindowComparisonWindow = "12h"
	MetricWindowComparisonWindow24h     MetricWindowComparisonWindow = "24h"
	MetricWindowComparisonWindow7d      MetricWindowComparisonWindow = "7d"
	MetricWindowComparisonWindow30d     MetricWindowComparisonWindow = "30d"
	MetricWindowComparisonWindowPrev30d MetricWindowComparisonWindow = "prev30d"
)

Values of MetricWindowComparisonWindow.

type MetricWindows

type MetricWindows struct {
	N6h  MetricWindow `json:"6h"`
	N12h MetricWindow `json:"12h"`
	N24h MetricWindow `json:"24h"`
	N7d  MetricWindow `json:"7d"`
	N30d MetricWindow `json:"30d"`
}

MetricWindows: The metrics of each timeframe ending now, keyed by window. Each window is compared with the next longer one (`6h` with `12h`, `12h` with `24h`, `24h` with `7d`, `7d` with `30d`) and `30d` with the 30 days before it (`prev30d`).

type MoneyTotal

type MoneyTotal struct {
	Currency string `json:"currency"`
	Minor    int64  `json:"minor"`
}

MoneyTotal is a schema of the public API.

type Mover

type Mover struct {
	Event EventSummary `json:"event"`
	// 24h, the movement score; 72h/7d, |z| of the window's floor change within the cohort.
	Score float64 `json:"score"`
	// Floor change over the window (fraction).
	Change *float64 `json:"change"`
}

Mover is a schema of the public API.

type MoverPage

type MoverPage struct {
	Window MoverPageWindow `json:"window"`
	Scope  MetricScope     `json:"scope"`
	Items  []Mover         `json:"items"`
}

MoverPage is a schema of the public API.

type MoverPageWindow

type MoverPageWindow string

MoverPageWindow is a schema of the public API.

const (
	MoverPageWindow24h MoverPageWindow = "24h"
	MoverPageWindow72h MoverPageWindow = "72h"
	MoverPageWindow7d  MoverPageWindow = "7d"
)

Values of MoverPageWindow.

type MustCop

type MustCop struct {
	ID    int64           `json:"id"`
	Event PredictionEvent `json:"event"`
	// The headliner the pick rests on.
	Act string `json:"act"`
	// The event's public on-sale start (followed while the pick is open).
	OnSaleAt time.Time     `json:"onSaleAt"`
	Status   MustCopStatus `json:"status"`
	Reasons  []string      `json:"reasons"`
	// The act's on-sales the pick rests on, newest first, as they were at the pick.
	Releases  []MustCopRelease `json:"releases"`
	CalledAt  time.Time        `json:"calledAt"`
	UpdatedAt time.Time        `json:"updatedAt"`
	GradedAt  *time.Time       `json:"gradedAt,omitempty"`
	// A hit's sell-out (see `MustCopRelease.soldOutAt`).
	SoldOutAt *time.Time `json:"soldOutAt,omitempty"`
}

MustCop: An upcoming public on-sale of an act whose latest known on-sales (Ticketmaster or DICE) mostly sold out instantly: at least 2 of its last 3 within two hours.

type MustCopPage

type MustCopPage struct {
	Items []MustCop `json:"items"`
	// Pass as `cursor` for the next page; absent on the last page.
	NextCursor *string       `json:"nextCursor,omitempty"`
	Record     MustCopRecord `json:"record"`
}

MustCopPage is a schema of the public API.

type MustCopRecord

type MustCopRecord struct {
	Hits   int `json:"hits"`
	Misses int `json:"misses"`
	Voided int `json:"voided"`
	// hits ÷ (hits + misses); absent before the first grade.
	HitRate *float64 `json:"hitRate,omitempty"`
}

MustCopRecord: How the graded picks turned out. Graded picks are hits and misses; voids count apart.

type MustCopRelease

type MustCopRelease struct {
	EventID   int64      `json:"eventId"`
	Name      string     `json:"name"`
	StartsAt  *time.Time `json:"startsAt,omitempty"`
	VenueName *string    `json:"venueName,omitempty"`
	City      *string    `json:"city,omitempty"`
	// The public on-sale start.
	OnSaleAt time.Time `json:"onSaleAt"`
	// When the primary market was seen sold out, at most two hours after `onSaleAt` (before it: sold out in a presale); absent when it was still on sale then. Unwatched events are checked hourly, so this is an upper bound.
	SoldOutAt *time.Time `json:"soldOutAt,omitempty"`
}

MustCopRelease: A past public on-sale of the act with a known outcome.

type MustCopStatus

type MustCopStatus string

MustCopStatus: `open` until graded; `hit` sold out within two hours of its public on-sale, `miss` did not, `void` the on-sale went unobserved or the event was canceled, postponed or delisted.

const (
	MustCopStatusOpen MustCopStatus = "open"
	MustCopStatusHit  MustCopStatus = "hit"
	MustCopStatusMiss MustCopStatus = "miss"
	MustCopStatusVoid MustCopStatus = "void"
)

Values of MustCopStatus.

type MustCopStatusFilter

type MustCopStatusFilter string

MustCopStatusFilter: `graded`: hit or miss.

const (
	MustCopStatusFilterOpen   MustCopStatusFilter = "open"
	MustCopStatusFilterGraded MustCopStatusFilter = "graded"
	MustCopStatusFilterHit    MustCopStatusFilter = "hit"
	MustCopStatusFilterMiss   MustCopStatusFilter = "miss"
	MustCopStatusFilterVoid   MustCopStatusFilter = "void"
)

Values of MustCopStatusFilter.

type NotModifiedError

type NotModifiedError struct {
	// ETag is the current ETag, equal to (one of) the ETags sent.
	ETag      string
	Header    http.Header
	RateLimit *RateLimitInfo
}

NotModifiedError is the answer to a conditional request (WithIfNoneMatch) while the copy with that ETag is still current (HTTP 304).

func (*NotModifiedError) Error

func (e *NotModifiedError) Error() string

func (*NotModifiedError) Is

func (e *NotModifiedError) Is(target error) bool

Is matches ErrNotModified.

type NotificationChannel

type NotificationChannel struct {
	ID   int64       `json:"id"`
	Kind ChannelKind `json:"kind"`
	Name string      `json:"name"`
	// Non-secret destination hint (webhook host, chat title, address, push service, APNs environment).
	Label    string `json:"label"`
	Verified bool   `json:"verified"`
	Enabled  bool   `json:"enabled"`
	// An email code or Telegram link is outstanding.
	VerificationPending bool       `json:"verificationPending"`
	VerifyExpiresAt     *time.Time `json:"verifyExpiresAt,omitempty"`
	// A device channel (Web Push browser, iOS device) of the signed-in caller; always false for API keys.
	Mine        bool       `json:"mine"`
	LastError   *string    `json:"lastError,omitempty"`
	LastErrorAt *time.Time `json:"lastErrorAt,omitempty"`
	LastSentAt  *time.Time `json:"lastSentAt,omitempty"`
	CreatedAt   time.Time  `json:"createdAt"`
}

NotificationChannel is a schema of the public API.

type NotificationChannelCreated

type NotificationChannelCreated struct {
	Channel NotificationChannel `json:"channel"`
	// Telegram deep link (t.me/<bot>?start=<code>) that connects the chat it is opened in; shown once, valid 1 h.
	LinkURL *string `json:"linkUrl,omitempty"`
}

NotificationChannelCreated is a schema of the public API.

type NotificationChannelList

type NotificationChannelList struct {
	Items []NotificationChannel `json:"items"`
}

NotificationChannelList is a schema of the public API.

type Nullable

type Nullable[T any] struct {
	// contains filtered or unexported fields
}

Nullable is an optional property that may also be null: unset (omitted from JSON), null, or a value. PATCH bodies use it to tell "leave as is" (unset) from "clear" (null).

func Null

func Null[T any]() Nullable[T]

Null returns a Nullable holding JSON null.

func Value

func Value[T any](v T) Nullable[T]

Value returns a Nullable holding v.

func (Nullable[T]) Get

func (n Nullable[T]) Get() (T, bool)

Get returns the value and whether there is one (false when unset or null).

func (Nullable[T]) IsNull

func (n Nullable[T]) IsNull() bool

IsNull reports whether the property is explicitly null.

func (Nullable[T]) IsSet

func (n Nullable[T]) IsSet() bool

IsSet reports whether the property is present (a value or null).

func (Nullable[T]) IsZero

func (n Nullable[T]) IsZero() bool

IsZero reports whether the property is unset; the `omitzero` tag omits it then.

func (Nullable[T]) MarshalJSON

func (n Nullable[T]) MarshalJSON() ([]byte, error)

MarshalJSON encodes null or the value.

func (*Nullable[T]) UnmarshalJSON

func (n *Nullable[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes null or a value; a property absent from the JSON stays unset.

type Option

type Option func(*Client)

Option configures a Client.

func WithBaseURL

func WithBaseURL(baseURL string) Option

WithBaseURL sets the API origin (default DefaultBaseURL).

func WithETagCache

func WithETagCache(cache ETagCache) Option

WithETagCache makes the client revalidate GET responses that carried an ETag: the next GET of the same URL sends If-None-Match and a 304 returns the stored body, so unchanged data costs no transfer. E.g. NewMemoryETagCache(1000). Off by default.

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

WithHTTPClient sets the HTTP client (default http.DefaultClient). Its own timeout, if any, applies on top of WithTimeout.

func WithMaxRetries

func WithMaxRetries(n int) Option

WithMaxRetries sets how often a request is retried after a 429, a 5xx (idempotent methods) or a connection error. Default 3.

func WithMaxRetryAfter

func WithMaxRetryAfter(d time.Duration) Option

WithMaxRetryAfter sets the longest Retry-After the client waits out before returning the 429 (or 503) error. Default 60 s.

func WithTimeout

func WithTimeout(d time.Duration) Option

WithTimeout sets the per-attempt timeout. Default 30 s; 0 disables it.

type OverlayDiagnostics

type OverlayDiagnostics struct {
	// Open primary seats in the snapshot.
	PrimarySeats int `json:"primarySeats"`
	// PlaceIds named by the current TM resale listings.
	ResaleSeats int `json:"resaleSeats"`
	// Of them, placed on the map (bits set in `primary`).
	PrimaryMapped int `json:"primaryMapped"`
	// Of them, placed on the map (bits set in `resale`).
	ResaleMapped int `json:"resaleMapped"`
	// Open seats (either market) whose manifest entry has no placeId.
	SeatsWithoutPlaceID int `json:"seatsWithoutPlaceId"`
	// Open seats whose placeId the map does not contain.
	PlaceIDsNotInMap int `json:"placeIdsNotInMap"`
	GaOpen           int `json:"gaOpen"`
	// GA stock in manifest sections no map section matched.
	GaUnmatched         int      `json:"gaUnmatched"`
	UnmatchedGASections []string `json:"unmatchedGASections"`
	ManifestSeats       int      `json:"manifestSeats"`
	ManifestPlaceIDs    int      `json:"manifestPlaceIds"`
	// Manifest seats whose placeId is on the map.
	MappedSeats int `json:"mappedSeats"`
}

OverlayDiagnostics: How the inventory joined the map.

type OverlayGA

type OverlayGA struct {
	Section    int              `json:"section"`
	Open       int              `json:"open"`
	FloorMinor *int64           `json:"floorMinor"`
	Levels     []OverlayGALevel `json:"levels"`
}

OverlayGA is a schema of the public API.

type OverlayGALevel

type OverlayGALevel struct {
	// Index into `priceLevels`, -1 when unpriced.
	Level int `json:"level"`
	Open  int `json:"open"`
}

OverlayGALevel is a schema of the public API.

type OverlayMarket

type OverlayMarket string

OverlayMarket is a schema of the public API.

const (
	OverlayMarketPrimary   OverlayMarket = "primary"
	OverlayMarketTmResale  OverlayMarket = "tm_resale"
	OverlayMarketSecondary OverlayMarket = "secondary"
)

Values of OverlayMarket.

type OverlayMode

type OverlayMode string

OverlayMode is a schema of the public API.

const (
	OverlayModeAvailability OverlayMode = "availability"
	OverlayModePrice        OverlayMode = "price"
	OverlayModeDelta        OverlayMode = "delta"
	OverlayModeSales        OverlayMode = "sales"
	OverlayModeSpread       OverlayMode = "spread"
)

Values of OverlayMode.

type OverlayPriceLevel

type OverlayPriceLevel struct {
	// AVSC price key.
	Key       int32  `json:"key"`
	OfferName string `json:"offerName"`
	ListMinor int64  `json:"listMinor"`
	// All-in price per ticket.
	TotalMinor int64  `json:"totalMinor"`
	Currency   string `json:"currency"`
	// Dynamic (seat-level, e.g. Platinum) pricing.
	SeatLevel bool `json:"seatLevel"`
}

OverlayPriceLevel is a schema of the public API.

type OverlaySeatRange

type OverlaySeatRange struct {
	// First seat label.
	From string `json:"from"`
	// Last seat label (equal to `from` for one seat).
	To string `json:"to"`
}

OverlaySeatRange is a schema of the public API.

type OverlaySeatRow

type OverlaySeatRow struct {
	Row     string `json:"row"`
	Tickets int    `json:"tickets"`
	// Tickets of listings with seat positions (`seats` or `places`).
	Seated int `json:"seated"`
	// Seat label ranges of the listings naming their seats (inclusive, as listed), by label.
	Seats []OverlaySeatRange `json:"seats"`
	// Artifact place indexes of the listings that came with them, ascending.
	Places []int `json:"places"`
}

OverlaySeatRow: A marketplace's tickets in one row of a section. `row` is the row label as the listings give it (match it against the artifact's row names folded to letters and digits, lower-cased), empty for listings naming no row. `seated` of the tickets come from listings naming their seats: by seat label range (`seats`) or by artifact place index (`places`).

type OverlaySection

type OverlaySection struct {
	Index int `json:"index"`
	// Open primary seats plus GA stock.
	PrimaryOpen int `json:"primaryOpen"`
	// Tickets of the section's current TM resale listings.
	ResaleOpen int `json:"resaleOpen"`
	// Cheapest all-in primary price; null when nothing open is priced.
	PrimaryFloorMinor *int64 `json:"primaryFloorMinor"`
	// Cheapest all-in TM resale listing price per ticket; null without one.
	ResaleFloorMinor *int64 `json:"resaleFloorMinor"`
}

OverlaySection is a schema of the public API.

type OverlaySectionLayer

type OverlaySectionLayer struct {
	// `primary`, `tm_resale`, `secondary:<source>` or `secondary:best`.
	Scope string `json:"scope"`
	// Currency of the layer's prices.
	Currency *string `json:"currency"`
	// Latest change of the layer's sections.
	AsOf *time.Time `json:"asOf"`
	// Sections on the map with stock or (mode `sales`, `spread`) recent sales, by index.
	Sections []OverlaySectionValue `json:"sections"`
}

OverlaySectionLayer is a schema of the public API.

type OverlaySectionValue

type OverlaySectionValue struct {
	// Artifact section index.
	Index       int             `json:"index"`
	Key         string          `json:"key"`
	Tickets     int             `json:"tickets"`
	FloorMinor  Nullable[int64] `json:"floorMinor,omitzero"`
	MedianMinor Nullable[int64] `json:"medianMinor,omitzero"`
	// (floor − floor 24h ago) ÷ floor 24h ago.
	FloorChg24h     Nullable[float64] `json:"floorChg24h,omitzero"`
	Sales24h        *int              `json:"sales24h,omitempty"`
	Sales72h        *int              `json:"sales72h,omitempty"`
	SaleAvg24hMinor Nullable[int64]   `json:"saleAvg24hMinor,omitzero"`
	Spread          Nullable[float64] `json:"spread,omitzero"`
	ROI             Nullable[float64] `json:"roi,omitzero"`
	// Marketplace layers only: the section's tickets by the row their
	// listings name, by row label; their tickets add up to `tickets`.
	// Listings naming no row sit in the entry with an empty `row`.
	Rows []OverlaySeatRow `json:"rows,omitempty"`
}

OverlaySectionValue: One section's values in a layer; the mode decides which optional fields are present. With map prices every mode but `availability` carries `floorMinor` and `floorChg24h` (the map's hover shows them in every mode) besides its own: `price` adds `medianMinor`, `sales` adds `sales24h`, `sales72h` and `saleAvg24hMinor`, `spread` adds `spread` and `roi`. Without map prices only `availability` and `sales` (counts only) are available.

type OverviewHoldings

type OverviewHoldings struct {
	// Items with a quantity held.
	Items int `json:"items"`
	// Σ quantity held.
	Tickets int64 `json:"tickets"`
	// Σ qty × cost basis, in the cost basis's currency.
	Cost []MoneyTotal `json:"cost"`
	// Σ qty × floor, in the market's currency.
	Value []MoneyTotal `json:"value"`
	// Σ qty × (floor − cost basis) of the items with both prices in one currency.
	Pnl []MoneyTotal `json:"pnl"`
	// Σ qty × cost basis of the items in `pnl` (the base of a P&L percentage).
	PnlCost []MoneyTotal `json:"pnlCost"`
}

OverviewHoldings: Positions recorded on list items with a quantity held, valued at the scope's floor (the grid's position columns, summed). Each item counts, so an event held in two lists counts twice. Money is per currency, largest first.

type PlanID

type PlanID string

PlanID: `free` is the state of an org without an active plan.

const (
	PlanIDFree       PlanID = "free"
	PlanIDCore       PlanID = "core"
	PlanIDPro        PlanID = "pro"
	PlanIDElite      PlanID = "elite"
	PlanIDEnterprise PlanID = "enterprise"
)

Values of PlanID.

type PlanRequiredProblem

type PlanRequiredProblem struct {
	Problem
	RequiredPlan PlanID `json:"requiredPlan"`
	CurrentPlan  PlanID `json:"currentPlan"`
	// The gated capability, e.g. `market_data`, `percent_change_filters`, `alert_rules`.
	Feature string `json:"feature"`
	// The exhausted count limit of the current plan (count features only).
	Limit *int `json:"limit,omitempty"`
}

PlanRequiredProblem: A 402 problem naming the plan that allows the request.

type Portfolio

type Portfolio struct {
	Scope   MetricScope      `json:"scope"`
	GroupBy PortfolioGroupBy `json:"groupBy"`
	// Newest market sample among the positions.
	AsOf *time.Time `json:"asOf"`
	// The Δ24h (a fraction) at or below which a position's floor is falling (`floor_falling`).
	FloorFallingAt float64          `json:"floorFallingAt"`
	Totals         OverviewHoldings `json:"totals"`
	// One entry per bucket, in the order past, next7d, next30d, later, undated; they partition `totals`.
	Exposure []PortfolioExposure `json:"exposure"`
	// Upcoming events by start (undated last), then past events, most
	// recent first; ties by list name (by event: one row per event).
	Positions []PortfolioPosition `json:"positions"`
}

Portfolio: The active org's positions (list items with a quantity held) in one market scope, per position or per event.

type PortfolioBucket

type PortfolioBucket string

PortfolioBucket: When a position's event takes place, by its start (else the start of its local date, UTC): `past` once the event is past (2 hours after its start, the `past`/`archived` lifecycles), `next7d` within 7 days (started events until past), `next30d` in 7–30 days, `later` beyond, `undated` without a date.

const (
	PortfolioBucketPast    PortfolioBucket = "past"
	PortfolioBucketNext7d  PortfolioBucket = "next7d"
	PortfolioBucketNext30d PortfolioBucket = "next30d"
	PortfolioBucketLater   PortfolioBucket = "later"
	PortfolioBucketUndated PortfolioBucket = "undated"
)

Values of PortfolioBucket.

type PortfolioExposure

type PortfolioExposure struct {
	Bucket   PortfolioBucket  `json:"bucket"`
	Holdings OverviewHoldings `json:"holdings"`
}

PortfolioExposure is a schema of the public API.

type PortfolioGroupBy

type PortfolioGroupBy string

PortfolioGroupBy: `position`: one row per list item held (an event held in two lists is two rows); `event`: one row per event, folding its positions across the org's lists.

const (
	PortfolioGroupByPosition PortfolioGroupBy = "position"
	PortfolioGroupByEvent    PortfolioGroupBy = "event"
)

Values of PortfolioGroupBy.

type PortfolioHistory

type PortfolioHistory struct {
	Scope    MetricScope              `json:"scope"`
	Interval PortfolioHistoryInterval `json:"interval"`
	// The first bucket's start (after plan clamping).
	From time.Time `json:"from"`
	To   time.Time `json:"to"`
	// Every bucket start in `[from, to)`, oldest first.
	T []time.Time `json:"t"`
	// One per currency, largest latest value first.
	Series []PortfolioHistorySeries `json:"series"`
}

PortfolioHistory: The portfolio's money per bucket, one series per currency (column-oriented, aligned on `t`).

type PortfolioHistoryInterval

type PortfolioHistoryInterval string

PortfolioHistoryInterval: Bucket width of `GET /v1/portfolio/history`.

const (
	PortfolioHistoryInterval1h PortfolioHistoryInterval = "1h"
	PortfolioHistoryInterval1d PortfolioHistoryInterval = "1d"
)

Values of PortfolioHistoryInterval.

type PortfolioHistorySeries

type PortfolioHistorySeries struct {
	Currency string `json:"currency"`
	// Σ qty × cost basis of the items held by the bucket's end.
	Cost []*int64 `json:"cost"`
	// Σ qty × floor.
	Value []*int64 `json:"value"`
	// Σ qty × (floor − cost basis) where floor and cost basis share this currency.
	Pnl []*int64 `json:"pnl"`
	// The cost of the items in `pnl` (P&L % = pnl ÷ pnlCost).
	PnlCost []*int64 `json:"pnlCost"`
}

PortfolioHistorySeries: One currency's sums per bucket of `t` (minor units; null when nothing in the bucket has that money in this currency).

type PortfolioPosition

type PortfolioPosition struct {
	Event SavedListEvent `json:"event"`
	// The item's list; null when grouped by event.
	List *SavedListRef `json:"list"`
	// The position's list, or grouped by event every list holding the event, by name.
	Lists []SavedListRef `json:"lists"`
	// Positions of the event across the org's lists, this one included (2+ when it is held in several lists).
	EventPositions int `json:"eventPositions"`
	// Tickets held (grouped by event, summed).
	QtyHeld int `json:"qtyHeld"`
	// Cost per ticket, minor units of `costCurrency`. Grouped by event:
	// the average over the items with one (rounded); null when their
	// cost currencies differ.
	CostBasis *int64 `json:"costBasis"`
	// Currency of `costBasis` and `costTotal` (the item's, else the market's, else the face price's).
	CostCurrency *string `json:"costCurrency"`
	// qty × cost basis (grouped by event, summed over the items with a cost basis).
	CostTotal *int64 `json:"costTotal"`
	// Currency of `floor`, `marketValue` and `pnl` (the market's, else the cost basis's, else the face price's).
	Currency *string `json:"currency"`
	Floor    *int64  `json:"floor"`
	// qty × floor.
	MarketValue *int64 `json:"marketValue"`
	// qty × (floor − cost basis); null without both prices in one currency (grouped by event, summed over the items with one).
	Pnl *int64 `json:"pnl"`
	// (floor − cost basis) ÷ cost basis (grouped by event, Σ pnl ÷ the cost of the items in it).
	PnlPct *float64 `json:"pnlPct"`
	Chg24h *float64 `json:"chg24h"`
	// Tickets sold in the last 24h; null without market data.
	Sales24h *int `json:"sales24h"`
	// When the market row was computed (freshness); null without market data.
	AsOf   *time.Time      `json:"asOf"`
	Bucket PortfolioBucket `json:"bucket"`
	// At-risk reasons; empty for past events.
	Risks []PortfolioRisk `json:"risks"`
}

PortfolioPosition: One list item with a quantity held, valued at the scope's floor; grouped by event, an event's items folded (`list` null, `lists` every list holding it).

type PortfolioRisk

type PortfolioRisk string

PortfolioRisk: Why a position in an upcoming event is at risk: `losing_soon` — P&L below zero with the event within 7 days; `floor_falling` — the floor changed by `floorFallingAt` or less over 24h.

const (
	PortfolioRiskLosingSoon   PortfolioRisk = "losing_soon"
	PortfolioRiskFloorFalling PortfolioRisk = "floor_falling"
)

Values of PortfolioRisk.

type PredictionAvailability

type PredictionAvailability struct {
	// Whether the caller sees the `tm` predictions.
	Available    bool                          `json:"available"`
	Reason       *PredictionAvailabilityReason `json:"reason,omitempty"`
	CurrentModel string                        `json:"currentModel"`
	// Graded calls (hits and misses) of the current `tm` model.
	Graded int `json:"graded"`
	// Graded calls the current model needs before customers see the predictions.
	MinGraded int `json:"minGraded"`
	// Every category, `tm` first.
	Categories []PredictionCategoryAvailability `json:"categories"`
}

PredictionAvailability: The caller's access. The top-level fields are the default category's (`tm`); `categories` has every category, each published on its own.

type PredictionAvailabilityReason

type PredictionAvailabilityReason string

PredictionAvailabilityReason: Why not: `unpublished` (not published to customers yet); `plan` (the plan lacks `predictions`) no longer occurs, every plan has them.

const (
	PredictionAvailabilityReasonPlan        PredictionAvailabilityReason = "plan"
	PredictionAvailabilityReasonUnpublished PredictionAvailabilityReason = "unpublished"
)

Values of PredictionAvailabilityReason.

type PredictionBand

type PredictionBand struct {
	MinRisk int `json:"minRisk"`
	// Exclusive, except 100.
	MaxRisk int `json:"maxRisk"`
	// Hits and misses.
	Graded int `json:"graded"`
	Misses int `json:"misses"`
	// Mean risk at the call ÷ 100, the miss rate the risk predicted.
	ExpectedMissRate float64 `json:"expectedMissRate"`
	// misses ÷ graded, the miss rate observed.
	MissRate float64 `json:"missRate"`
}

PredictionBand: Graded calls of one band of the risk at the call.

type PredictionCall

type PredictionCall struct {
	ID       int64              `json:"id"`
	Category PredictionCategory `json:"category"`
	Event    PredictionEvent    `json:"event"`
	// Version of the logic that made the call (graded against its own required markup and risk at the call).
	Model  string           `json:"model"`
	Status PredictionStatus `json:"status"`
	// Latest chance (%) that the call is wrong; frozen when the event starts.
	Risk int `json:"risk"`
	// The risk when the call was made; graded for calibration.
	RiskAtCall int `json:"riskAtCall"`
	// Why, strongest factor first (the risks included).
	Reasons  []string `json:"reasons"`
	Currency string   `json:"currency"`
	// Primary floor when the call was made (minor units), the price the call buys at.
	Entry int64 `json:"entry"`
	// Latest resale floor, converted into the currency.
	Resale *int64 `json:"resale,omitempty"`
	// Latest resale ÷ entry − 1.
	Markup *float64 `json:"markup,omitempty"`
	// Markup the resale has to clear for a hit (fees and margin).
	RequiredMarkup float64    `json:"requiredMarkup"`
	CalledAt       time.Time  `json:"calledAt"`
	UpdatedAt      time.Time  `json:"updatedAt"`
	GradedAt       *time.Time `json:"gradedAt,omitempty"`
	// Median all-in price of the resale sales (marketplaces and Ticketmaster resale) between the call and the event, in the currency. Absent on a void (fewer than 3 resale sales).
	Exit *int64 `json:"exit,omitempty"`
	// exit ÷ entry − 1.
	ExitMarkup *float64 `json:"exitMarkup,omitempty"`
	// How the call was graded, in words.
	Outcome *string `json:"outcome,omitempty"`
}

PredictionCall: A scalping call as customers see it (the model's inputs left out).

type PredictionCallPage

type PredictionCallPage struct {
	Items []PredictionCall `json:"items"`
	// Pass as `cursor` for the next page; absent on the last page.
	NextCursor *string `json:"nextCursor,omitempty"`
}

PredictionCallPage is a schema of the public API.

type PredictionCategory

type PredictionCategory string

PredictionCategory: The call family, each with its own model versions, track record and publication: `tm` (Ticketmaster primary, read with its ticket counts) or `dice` (DICE primary resold on a marketplace, scored mostly on the lineup's artists and the venue).

const (
	PredictionCategoryTm   PredictionCategory = "tm"
	PredictionCategoryDice PredictionCategory = "dice"
)

Values of PredictionCategory.

type PredictionCategoryAvailability

type PredictionCategoryAvailability struct {
	Category     PredictionCategory            `json:"category"`
	Available    bool                          `json:"available"`
	Reason       *PredictionAvailabilityReason `json:"reason,omitempty"`
	CurrentModel string                        `json:"currentModel"`
	// Graded calls (hits and misses) of the category's current model.
	Graded int `json:"graded"`
	// Graded calls the current model needs before customers see the category.
	MinGraded int `json:"minGraded"`
}

PredictionCategoryAvailability: Whether the caller sees one category's calls.

type PredictionEvent

type PredictionEvent struct {
	ID        int64      `json:"id"`
	Name      string     `json:"name"`
	StartsAt  *time.Time `json:"startsAt,omitempty"`
	Status    string     `json:"status"`
	VenueName *string    `json:"venueName,omitempty"`
	City      *string    `json:"city,omitempty"`
}

PredictionEvent is a schema of the public API.

type PredictionRecord

type PredictionRecord struct {
	Hits   int `json:"hits"`
	Misses int `json:"misses"`
	Voided int `json:"voided"`
	// hits ÷ (hits + misses); absent before the first grade.
	HitRate *float64 `json:"hitRate,omitempty"`
	// Mean exit markup (realized resale ÷ entry − 1) of the graded calls.
	MeanExitMarkup *float64 `json:"meanExitMarkup,omitempty"`
	// Mean squared error of 1 − risk at the call ÷ 100 against the outcome (0 is perfect, 0.25 is a coin flip).
	Brier *float64 `json:"brier,omitempty"`
	// Calibration per 10-point band of the risk at the call (90–100 includes 100); empty bands left out.
	Bands []PredictionBand `json:"bands"`
}

PredictionRecord: How a set of calls turned out. Graded calls are hits and misses; voids count apart.

type PredictionScope

type PredictionScope struct {
	// The model version; absent for the overall record.
	Model *string `json:"model,omitempty"`
	// Open calls.
	Open       int              `json:"open"`
	AllTime    PredictionRecord `json:"allTime"`
	Last30Days PredictionRecord `json:"last30Days"`
	Last90Days PredictionRecord `json:"last90Days"`
}

PredictionScope: The track record of one model version, or of every version.

type PredictionStatus

type PredictionStatus string

PredictionStatus is a schema of the public API.

const (
	PredictionStatusOpen PredictionStatus = "open"
	PredictionStatusHit  PredictionStatus = "hit"
	PredictionStatusMiss PredictionStatus = "miss"
	PredictionStatusVoid PredictionStatus = "void"
)

Values of PredictionStatus.

type PredictionStatusFilter

type PredictionStatusFilter string

PredictionStatusFilter: `graded`: hit or miss.

const (
	PredictionStatusFilterOpen   PredictionStatusFilter = "open"
	PredictionStatusFilterGraded PredictionStatusFilter = "graded"
	PredictionStatusFilterHit    PredictionStatusFilter = "hit"
	PredictionStatusFilterMiss   PredictionStatusFilter = "miss"
	PredictionStatusFilterVoid   PredictionStatusFilter = "void"
)

Values of PredictionStatusFilter.

type PredictionTrackRecord

type PredictionTrackRecord struct {
	ComputedAt time.Time          `json:"computedAt"`
	Category   PredictionCategory `json:"category"`
	// The model version making the category's new calls.
	CurrentModel string          `json:"currentModel"`
	Overall      PredictionScope `json:"overall"`
	// Per model version, newest call first.
	Models []PredictionScope `json:"models"`
}

PredictionTrackRecord is a schema of the public API.

type PriceLevelHistory

type PriceLevelHistory struct {
	EventID int64               `json:"eventId"`
	Items   []PriceLevelVersion `json:"items"`
}

PriceLevelHistory is a schema of the public API.

type PriceLevelVersion

type PriceLevelVersion struct {
	// AVSC price key (`OverlayPriceLevel.key`).
	PriceKey      int32  `json:"priceKey"`
	PriceID       int32  `json:"priceId"`
	Zone          int32  `json:"zone"`
	OfferID       string `json:"offerId"`
	OfferName     string `json:"offerName"`
	Currency      string `json:"currency"`
	ListMinor     int64  `json:"listMinor"`
	FaceMinor     int64  `json:"faceMinor"`
	FacilityMinor int64  `json:"facilityMinor"`
	ServiceMinor  int64  `json:"serviceMinor"`
	DistanceMinor int64  `json:"distanceMinor"`
	TaxMinor      int64  `json:"taxMinor"`
	TotalMinor    int64  `json:"totalMinor"`
	// Dynamic (seat-level, e.g. Platinum) pricing.
	SeatLevel bool      `json:"seatLevel"`
	ValidFrom time.Time `json:"validFrom"`
	// When the version was replaced or the level disappeared; null while in use.
	ValidTo *time.Time `json:"validTo"`
}

PriceLevelVersion: One version of a Ticketmaster primary price level. Money is minor units of `currency` per ticket: `faceMinor` the face value, `listMinor` the list price, the fee parts, and `totalMinor` the all-in price.

type PriceRange

type PriceRange struct {
	MinMinor int64  `json:"minMinor"`
	MaxMinor int64  `json:"maxMinor"`
	Currency string `json:"currency"`
}

PriceRange: Face-value range advertised by Ticketmaster, in minor units (cents).

type PrimarySource

type PrimarySource string

PrimarySource: An event's primary seller: `tm` (Ticketmaster-hosted) or a primary source with its own catalog (`dice`).

const (
	PrimarySourceTm   PrimarySource = "tm"
	PrimarySourceDice PrimarySource = "dice"
)

Values of PrimarySource.

type Problem

type Problem struct {
	Type     string  `json:"type"`
	Title    string  `json:"title"`
	Status   int     `json:"status"`
	Detail   *string `json:"detail,omitempty"`
	Instance *string `json:"instance,omitempty"`
}

Problem: RFC 9457 problem details.

type RateLimitInfo

type RateLimitInfo struct {
	// Policy is the name of the policy the counters below belong to.
	Policy string
	// Remaining is the number of requests left in the current window.
	Remaining int64
	// Reset is the number of seconds until the window resets.
	Reset int64
	// Policies lists every policy applied to the request.
	Policies []RateLimitPolicy
}

RateLimitInfo is the parsed RateLimit header: it describes the most constrained policy (`RateLimit: "minute";r=59;t=42`).

func ParseRateLimit

func ParseRateLimit(h http.Header) *RateLimitInfo

ParseRateLimit reads the RateLimit and RateLimit-Policy headers; nil when the response has none.

type RateLimitPolicy

type RateLimitPolicy struct {
	// Name is the policy name, e.g. `minute`, `day`, `key_minute`.
	Name string
	// Quota is the number of requests allowed per window.
	Quota int64
	// Window is the window length in seconds.
	Window int64
}

RateLimitPolicy is one entry of the RateLimit-Policy header (draft-ietf-httpapi-ratelimit-headers-09, structured fields):

RateLimit-Policy: "minute";q=60;w=60, "day";q=5000;w=86400

type RateLimitedProblem

type RateLimitedProblem struct {
	Problem
	// The exhausted limit (`key_minute` / `key_day`, the API key's own quotas).
	Limit RateLimitedProblemLimit `json:"limit"`
}

RateLimitedProblem is a schema of the public API.

type RateLimitedProblemLimit

type RateLimitedProblemLimit string

RateLimitedProblemLimit: The exhausted limit (`key_minute` / `key_day`, the API key's own quotas).

const (
	RateLimitedProblemLimitMinute            RateLimitedProblemLimit = "minute"
	RateLimitedProblemLimitDay               RateLimitedProblemLimit = "day"
	RateLimitedProblemLimitConcurrent        RateLimitedProblemLimit = "concurrent"
	RateLimitedProblemLimitStreamConnections RateLimitedProblemLimit = "stream_connections"
	RateLimitedProblemLimitUser              RateLimitedProblemLimit = "user"
	RateLimitedProblemLimitIP                RateLimitedProblemLimit = "ip"
	RateLimitedProblemLimitStreamTickets     RateLimitedProblemLimit = "stream_tickets"
	RateLimitedProblemLimitKeyMinute         RateLimitedProblemLimit = "key_minute"
	RateLimitedProblemLimitKeyDay            RateLimitedProblemLimit = "key_day"
)

Values of RateLimitedProblemLimit.

type Region

type Region struct {
	Code string `json:"code"`
	Name string `json:"name"`
	// Display currency (ISO 4217).
	Currency string `json:"currency"`
	// Venue country codes of the region (Discovery `countryCode` values).
	Countries []string `json:"countries"`
}

Region is a schema of the public API.

type RegionList

type RegionList struct {
	Items []Region `json:"items"`
}

RegionList is a schema of the public API.

type RemoveSavedListItemsParams

type RemoveSavedListItemsParams struct {
	// Comma-separated event ids (1–500).
	// Required.
	EventIDs []int64
}

RemoveSavedListItemsParams holds the query parameters of RemoveSavedListItems.

type RemoveSavedListItemsResult

type RemoveSavedListItemsResult struct {
	Removed int `json:"removed"`
	Total   int `json:"total"`
}

RemoveSavedListItemsResult is a schema of the public API.

type RequestOption

type RequestOption func(*requestConfig)

RequestOption adjusts a single call.

func WithHeader

func WithHeader(key, value string) RequestOption

WithHeader adds a request header to the call.

func WithIfNoneMatch

func WithIfNoneMatch(etag string) RequestOption

WithIfNoneMatch makes the call conditional: while the representation still has that ETag the API answers 304 and the call fails with a *NotModifiedError (errors.Is(err, ErrNotModified)). An empty etag sends no condition, so WithIfNoneMatch(previous.ETag) works on the first call too.

func WithResponseInto

func WithResponseInto(resp *Response) RequestOption

WithResponseInto stores the call's status, headers, ETag and rate limit state in resp.

type Response

type Response struct {
	// StatusCode is the HTTP status; 304 when the body was revalidated from the client's ETag cache.
	StatusCode int
	Header     http.Header
	// ETag is the response's ETag header ("" when absent): pass it to WithIfNoneMatch to revalidate.
	ETag string
	// RateLimit is the parsed RateLimit / RateLimit-Policy state (nil on unmetered requests).
	RateLimit *RateLimitInfo
}

Response describes the HTTP response of a call: pass WithResponseInto to receive it.

type ResyncMessage

type ResyncMessage struct {
	Topic    string
	Reason   string
	Snapshot string
}

ResyncMessage asks to reload Snapshot (a REST path, see Stream.FetchSnapshot). Reason is `gap` (`since` is older than the replay window, or the server's seq counter restarted: seqs start over after it), `backpressure` (messages were dropped) or `reconnect` (a coalesced topic was resubscribed after a reconnect).

func (*ResyncMessage) StreamTopic

func (m *ResyncMessage) StreamTopic() string

StreamTopic is the message's topic.

type Sale

type Sale struct {
	// Time of the poll that settled the sale.
	Ts      time.Time   `json:"ts"`
	EventID int64       `json:"eventId"`
	Scope   MetricScope `json:"scope"`
	Kind    SaleKind    `json:"kind"`
	Section string      `json:"section"`
	// Empty for GA stock.
	Row   string   `json:"row"`
	Seats []string `json:"seats"`
	Qty   int      `json:"qty"`
	// All-in price per ticket; null when unpriced. Marketplace sales without a reported all-in price estimate it from the source's buyer fee (`allInEstimated`).
	PriceMinor *int64  `json:"priceMinor"`
	ListMinor  *int64  `json:"listMinor"`
	Currency   *string `json:"currency"`
	// `priceMinor` adds an estimated buyer fee to the seller's price (`listMinor`); false for Ticketmaster sales.
	AllInEstimated bool           `json:"allInEstimated"`
	Confidence     SaleConfidence `json:"confidence"`
	Event          *SaleEventRef  `json:"event,omitempty"`
}

Sale: One settled sale: Ticketmaster primary seats (`sale`) or GA units (`ga_sale`) that left `open` and stayed gone past the cart-hold window, or a resale sale on Ticketmaster resale (scope `tm_resale`) or a marketplace (scope `secondary:<source>`): reported by the source (`confirmed`), a listing whose quantity dropped (`partial`) or one that vanished and stayed gone past the grace period (`removal`). Prices are per ticket; `priceMinor` is all-in.

type SaleConfidence

type SaleConfidence string

SaleConfidence: `confirmed`: reported by the marketplace; `inferred_high`/`inferred_low`: inferred from consecutive polls (low after a long gap between them).

const (
	SaleConfidenceConfirmed    SaleConfidence = "confirmed"
	SaleConfidenceInferredHigh SaleConfidence = "inferred_high"
	SaleConfidenceInferredLow  SaleConfidence = "inferred_low"
)

Values of SaleConfidence.

type SaleEventRef

type SaleEventRef struct {
	ID       int64      `json:"id"`
	Name     string     `json:"name"`
	StartsAt *time.Time `json:"startsAt"`
	Segment  *string    `json:"segment"`
	Genre    *string    `json:"genre"`
	Venue    *string    `json:"venue"`
	City     *string    `json:"city"`
	Country  *string    `json:"country"`
}

SaleEventRef: Summary of the sale's event (cross-event feeds).

type SaleKind

type SaleKind string

SaleKind is a schema of the public API.

const (
	SaleKindSale      SaleKind = "sale"
	SaleKindGaSale    SaleKind = "ga_sale"
	SaleKindConfirmed SaleKind = "confirmed"
	SaleKindPartial   SaleKind = "partial"
	SaleKindRemoval   SaleKind = "removal"
)

Values of SaleKind.

type SalePage

type SalePage struct {
	Items []Sale `json:"items"`
	// Cursor of the next page; null on the last page.
	NextCursor *string `json:"nextCursor"`
}

SalePage is a schema of the public API.

type SaleWindow

type SaleWindow struct {
	Kind SaleWindowKind `json:"kind"`
	// Presale name; empty for the public on-sale.
	Name     string     `json:"name"`
	StartsAt *time.Time `json:"startsAt"`
	EndsAt   *time.Time `json:"endsAt"`
	// Presale sign-up or access page, when Discovery provides one.
	URL *string `json:"url"`
	// Discovery's presale terms: who is eligible and whether (and how) a
	// presale code is needed. Discovery does not publish the codes themselves.
	Description *string `json:"description"`
}

SaleWindow is a schema of the public API.

type SaleWindowKind

type SaleWindowKind string

SaleWindowKind is a schema of the public API.

const (
	SaleWindowKindPublic  SaleWindowKind = "public"
	SaleWindowKindPresale SaleWindowKind = "presale"
)

Values of SaleWindowKind.

type SalesMarketTotal

type SalesMarketTotal struct {
	Scope MetricScope `json:"scope"`
	// Whether the scope's sales are collected in the requested `country` or `region` (and `segment`) at all. False when no source covers them, e.g. `tm_resale` outside the US, Canada, the UK and Ireland: its zeros then mean not collected, not no sales. Always true without a country or region.
	Tracked bool `json:"tracked"`
	// Settled sales (rows of the feed).
	Sales int `json:"sales"`
	// Σ qty.
	Tickets int64 `json:"tickets"`
	// Σ qty·all-in of the priced sales per currency, largest first.
	Volume []MoneyTotal `json:"volume"`
}

SalesMarketTotal is a schema of the public API.

type SalesSummary

type SalesSummary struct {
	Window SalesSummaryWindow `json:"window"`
	// Start of the window (inclusive).
	From time.Time `json:"from"`
	// End of the window (exclusive), the time of the request.
	To time.Time `json:"to"`
	// One entry per scope (filtered by `scope` when given).
	Markets []SalesMarketTotal `json:"markets"`
}

SalesSummary is a schema of the public API.

type SalesSummaryWindow

type SalesSummaryWindow string

SalesSummaryWindow is a schema of the public API.

const (
	SalesSummaryWindow1h  SalesSummaryWindow = "1h"
	SalesSummaryWindow6h  SalesSummaryWindow = "6h"
	SalesSummaryWindow24h SalesSummaryWindow = "24h"
	SalesSummaryWindow72h SalesSummaryWindow = "72h"
	SalesSummaryWindow7d  SalesSummaryWindow = "7d"
)

Values of SalesSummaryWindow.

type SavedList

type SavedList struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	// The creator; null when their account is gone.
	Owner     *UserRef      `json:"owner"`
	ItemCount int           `json:"itemCount"`
	View      SavedListView `json:"view"`
	// Whether the caller may delete it (creator or org admin).
	CanDelete bool      `json:"canDelete"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

SavedList: An org's saved list of events (spreadsheet source) and its saved view.

type SavedListColumn

type SavedListColumn struct {
	ID string `json:"id"`
	// Pixels; absent = automatic.
	Width *int `json:"width,omitempty"`
}

SavedListColumn is a schema of the public API.

type SavedListEvent

type SavedListEvent struct {
	ID        int64       `json:"id"`
	Name      string      `json:"name"`
	StartsAt  *time.Time  `json:"startsAt"`
	LocalDate *string     `json:"localDate"`
	Timezone  *string     `json:"timezone"`
	Status    EventStatus `json:"status"`
	Segment   *string     `json:"segment"`
	TmEventID *string     `json:"tmEventId"`
	// The event's primary seller (`EventSummary.primarySource`).
	PrimarySource *PrimarySource  `json:"primarySource"`
	Venue         *VenueRef       `json:"venue,omitempty"`
	Attractions   []AttractionRef `json:"attractions"`
}

SavedListEvent is a schema of the public API.

type SavedListFilter

type SavedListFilter struct {
	Column string            `json:"column"`
	Op     SavedListFilterOp `json:"op"`
	// Number in API units for numeric columns, text otherwise; absent for `empty`/`notEmpty`.
	Value *string `json:"value,omitempty"`
}

SavedListFilter is a schema of the public API.

type SavedListFilterOp

type SavedListFilterOp string

SavedListFilterOp is a schema of the public API.

const (
	SavedListFilterOpLt          SavedListFilterOp = "lt"
	SavedListFilterOpLte         SavedListFilterOp = "lte"
	SavedListFilterOpGt          SavedListFilterOp = "gt"
	SavedListFilterOpGte         SavedListFilterOp = "gte"
	SavedListFilterOpEq          SavedListFilterOp = "eq"
	SavedListFilterOpNe          SavedListFilterOp = "ne"
	SavedListFilterOpContains    SavedListFilterOp = "contains"
	SavedListFilterOpNotContains SavedListFilterOp = "notContains"
	SavedListFilterOpEmpty       SavedListFilterOp = "empty"
	SavedListFilterOpNotEmpty    SavedListFilterOp = "notEmpty"
)

Values of SavedListFilterOp.

type SavedListFormat

type SavedListFormat struct {
	Column string            `json:"column"`
	Op     SavedListFilterOp `json:"op"`
	// Number in API units for numeric columns, text otherwise; absent for `empty`/`notEmpty`.
	Value *string `json:"value,omitempty"`
	// Design token the cell is tinted with.
	Color SavedListFormatColor `json:"color"`
}

SavedListFormat: Conditional formatting rule: cells of `column` whose value satisfies `op`/`value` (the filter semantics) are tinted with `color`. Rules are in priority order; the first match colours a cell.

type SavedListFormatColor

type SavedListFormatColor string

SavedListFormatColor: Design token the cell is tinted with.

const (
	SavedListFormatColorUp     SavedListFormatColor = "up"
	SavedListFormatColorDown   SavedListFormatColor = "down"
	SavedListFormatColorWarn   SavedListFormatColor = "warn"
	SavedListFormatColorAccent SavedListFormatColor = "accent"
)

Values of SavedListFormatColor.

type SavedListGroupBy

type SavedListGroupBy string

SavedListGroupBy is a schema of the public API.

const (
	SavedListGroupByNone       SavedListGroupBy = "none"
	SavedListGroupByAttraction SavedListGroupBy = "attraction"
	SavedListGroupByDate       SavedListGroupBy = "date"
	SavedListGroupByVenue      SavedListGroupBy = "venue"
)

Values of SavedListGroupBy.

type SavedListItem

type SavedListItem struct {
	EventID int64  `json:"eventId"`
	Note    string `json:"note"`
	// Cost per ticket in minor units of `currency`.
	CostBasis *int64    `json:"costBasis"`
	Currency  *string   `json:"currency"`
	QtyHeld   *int      `json:"qtyHeld"`
	AddedBy   *UserRef  `json:"addedBy"`
	AddedAt   time.Time `json:"addedAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

SavedListItem is a schema of the public API.

type SavedListItemList

type SavedListItemList struct {
	ListID string          `json:"listId"`
	Items  []SavedListItem `json:"items"`
}

SavedListItemList is a schema of the public API.

type SavedListItemPatch

type SavedListItemPatch struct {
	EventID int64 `json:"eventId"`
	// At most 2000 characters.
	Note *string `json:"note,omitempty"`
	// Cost per ticket in minor units.
	CostBasis *int64 `json:"costBasis,omitempty"`
	// ISO 4217 code of the cost basis.
	Currency *string `json:"currency,omitempty"`
	QtyHeld  *int    `json:"qtyHeld,omitempty"`
	// Columns to empty.
	Clear []SavedListItemPatchClearItem `json:"clear,omitempty"`
}

SavedListItemPatch is a schema of the public API.

type SavedListItemPatchClearItem

type SavedListItemPatchClearItem string

SavedListItemPatchClearItem is a schema of the public API.

const (
	SavedListItemPatchClearItemCostBasis SavedListItemPatchClearItem = "costBasis"
	SavedListItemPatchClearItemQtyHeld   SavedListItemPatchClearItem = "qtyHeld"
)

Values of SavedListItemPatchClearItem.

type SavedListList

type SavedListList struct {
	Items []SavedList `json:"items"`
}

SavedListList is a schema of the public API.

type SavedListRef

type SavedListRef struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	ItemCount int    `json:"itemCount"`
}

SavedListRef is a schema of the public API.

type SavedListSortKey

type SavedListSortKey struct {
	Column string `json:"column"`
	Desc   bool   `json:"desc"`
}

SavedListSortKey is a schema of the public API.

type SavedListView

type SavedListView struct {
	// Visible columns in order (empty = defaults); the event name column is always first.
	Columns []SavedListColumn  `json:"columns"`
	Sort    []SavedListSortKey `json:"sort"`
	Filters []SavedListFilter  `json:"filters"`
	// Conditional formatting rules in priority order.
	Formats []SavedListFormat `json:"formats"`
	GroupBy SavedListGroupBy  `json:"groupBy"`
	Scope   MetricScope       `json:"scope"`
}

SavedListView: Spreadsheet state shared by the org's members.

type SavedListViewPatch

type SavedListViewPatch struct {
	Columns []SavedListColumn  `json:"columns,omitempty"`
	Sort    []SavedListSortKey `json:"sort,omitempty"`
	Filters []SavedListFilter  `json:"filters,omitempty"`
	Formats []SavedListFormat  `json:"formats,omitempty"`
	GroupBy *SavedListGroupBy  `json:"groupBy,omitempty"`
	Scope   *MetricScope       `json:"scope,omitempty"`
}

SavedListViewPatch: Present fields replace the saved ones.

type SearchAttraction

type SearchAttraction struct {
	ID             int64   `json:"id"`
	Name           string  `json:"name"`
	Segment        *string `json:"segment"`
	Genre          *string `json:"genre"`
	UpcomingEvents int     `json:"upcomingEvents"`
}

SearchAttraction is a schema of the public API.

type SearchCatalogParams

type SearchCatalogParams struct {
	// Required.
	Q string
	// Hits per group.
	Limit *int
}

SearchCatalogParams holds the query parameters of SearchCatalog.

type SearchEvent

type SearchEvent struct {
	ID        int64       `json:"id"`
	Name      string      `json:"name"`
	StartsAt  *time.Time  `json:"startsAt"`
	LocalDate *string     `json:"localDate"`
	Timezone  *string     `json:"timezone"`
	Status    EventStatus `json:"status"`
	Venue     *VenueRef   `json:"venue,omitempty"`
	// Not started yet, or undated.
	Upcoming bool `json:"upcoming"`
}

SearchEvent is a schema of the public API.

type SearchResults

type SearchResults struct {
	// The folded query the names were matched against.
	Q           string             `json:"q"`
	Events      []SearchEvent      `json:"events"`
	Attractions []SearchAttraction `json:"attractions"`
	Venues      []SearchVenue      `json:"venues"`
}

SearchResults is a schema of the public API.

type SearchVenue

type SearchVenue struct {
	ID             int64   `json:"id"`
	Name           string  `json:"name"`
	City           *string `json:"city"`
	StateCode      *string `json:"stateCode"`
	CountryCode    *string `json:"countryCode"`
	UpcomingEvents int     `json:"upcomingEvents"`
}

SearchVenue is a schema of the public API.

type Seatmap

type Seatmap struct {
	// Lowercase hex SHA-256 of the uncompressed artifact.
	Hash string `json:"hash"`
	// Path of the artifact (`/v1/seatmaps/{hash}`).
	URL string `json:"url"`
	// Absolute URL of the same artifact on the public map artifact
	// store (a CDN in front of the object storage bucket,
	// `…/maps/{venueConfigId}/{hash}.tmap`), present when the
	// deployment publishes artifacts there. Always brotli-encoded
	// (`Content-Encoding: br`), immutable, readable cross-origin
	// without credentials. Prefer it to `url` when present.
	CdnURL *string `json:"cdnUrl,omitempty"`
	// .tmap format version (2; format 1 artifacts were deleted and are no longer served).
	Format        int    `json:"format"`
	VenueConfigID string `json:"venueConfigId"`
	PageWidth     int    `json:"pageWidth"`
	PageHeight    int    `json:"pageHeight"`
	Sections      int    `json:"sections"`
	GaSections    int    `json:"gaSections"`
	Places        int    `json:"places"`
	RawBytes      int    `json:"rawBytes"`
	// Size with brotli (`Content-Encoding: br`).
	CompressedBytes int `json:"compressedBytes"`
}

Seatmap: A compiled artifact (absent for `pending`, `no_map`, and errors without an earlier map).

type SectionRow

type SectionRow struct {
	SectionKey string `json:"sectionKey"`
	// Artifact section index; null when the key names no section of the map.
	Index *int `json:"index"`
	// Tickets listed now (0 for a section that only sold recently).
	Tickets     int    `json:"tickets"`
	FloorMinor  *int64 `json:"floorMinor"`
	MedianMinor *int64 `json:"medianMinor"`
	// When the section's values last changed.
	ChangedAt *time.Time `json:"changedAt"`
	// (floor − floor 24h ago) ÷ floor 24h ago; null without both.
	FloorChg24h *float64 `json:"floorChg24h"`
	// Tickets sold in the last 24 hours.
	Sales24h int `json:"sales24h"`
	Sales72h int `json:"sales72h"`
	// Quantity-weighted mean sale price over 24 hours.
	SaleAvg24hMinor *int64 `json:"saleAvg24hMinor"`
	// Floor (`primary`, the best marketplace floor) ÷ the section's primary floor − 1.
	Spread *float64 `json:"spread"`
	// (median resale price over 72h × (1 − sellerFee) − primary floor) ÷ primary floor.
	ROI *float64 `json:"roi"`
}

SectionRow is a schema of the public API.

type SectionSales

type SectionSales struct {
	// Manifest section name (Ticketmaster) or canonical section key (marketplaces; their label when unmapped).
	Section string `json:"section"`
	// Null when none of the section's sales is priced.
	Currency *string `json:"currency"`
	// Sale rows (a seat group or a marketplace sale each).
	Sales         int `json:"sales"`
	Tickets       int `json:"tickets"`
	PricedTickets int `json:"pricedTickets"`
	// Σ qty·price of the priced sales.
	VolumeMinor int64 `json:"volumeMinor"`
	// Ticket-weighted mean price (`volumeMinor` ÷ `pricedTickets`, rounded).
	AvgMinor   *int64    `json:"avgMinor"`
	MinMinor   *int64    `json:"minMinor"`
	MaxMinor   *int64    `json:"maxMinor"`
	LastSaleAt time.Time `json:"lastSaleAt"`
	// Tickets per scope (sale scopes only, most first).
	Scopes []SectionSalesScope `json:"scopes"`
}

SectionSales: Settled sales of one section in one currency. Money is minor units of `currency`, all-in per ticket; prices aggregate the priced sales only (`pricedTickets`).

type SectionSalesList

type SectionSalesList struct {
	EventID int64 `json:"eventId"`
	// One row per section and currency, most tickets first.
	Items []SectionSales `json:"items"`
}

SectionSalesList is a schema of the public API.

type SectionSalesScope

type SectionSalesScope struct {
	Scope   MetricScope `json:"scope"`
	Tickets int         `json:"tickets"`
}

SectionSalesScope is a schema of the public API.

type SectionSeries

type SectionSeries struct {
	EventID    int64            `json:"eventId"`
	SectionKey string           `json:"sectionKey"`
	Scope      string           `json:"scope"`
	Res        SeriesResolution `json:"res"`
	From       time.Time        `json:"from"`
	To         time.Time        `json:"to"`
	Currency   *string          `json:"currency"`
	T          []time.Time      `json:"t"`
	Floor      SeriesColumn     `json:"floor"`
	Median     SeriesColumn     `json:"median"`
	Tickets    SeriesColumn     `json:"tickets"`
	Sales      SeriesColumn     `json:"sales"`
}

SectionSeries is a schema of the public API.

type SeriesColumn

type SeriesColumn []*int64

SeriesColumn is a schema of the public API.

type SeriesMetric

type SeriesMetric string

SeriesMetric is a schema of the public API.

const (
	SeriesMetricFloor    SeriesMetric = "floor"
	SeriesMetricFloorMin SeriesMetric = "floorMin"
	SeriesMetricMedian   SeriesMetric = "median"
	SeriesMetricTickets  SeriesMetric = "tickets"
	SeriesMetricSales    SeriesMetric = "sales"
	SeriesMetricVolume   SeriesMetric = "volume"
)

Values of SeriesMetric.

type SeriesResolution

type SeriesResolution string

SeriesResolution is a schema of the public API.

const (
	SeriesResolution5m SeriesResolution = "5m"
	SeriesResolution1h SeriesResolution = "1h"
	SeriesResolution1d SeriesResolution = "1d"
)

Values of SeriesResolution.

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

Stream is the realtime stream client (protocol: https://status302.com/docs/stream/reference/). One WebSocket carries every subscription; the stream connects on the first Subscribe, reconnects with backoff, resumes every replayable topic with `since` from the last delivered seq, drops duplicates by seq, and delivers a *ResyncMessage when the server cannot replay a gap (or a coalesced topic was resubscribed after a reconnect):

stream := client.Stream(status302.StreamOptions{})
defer stream.Close()
stream.Subscribe("sales", status302.SubscribeOptions{Filter: map[string]any{"country": []string{"US"}}})
for msg, err := range stream.Messages(ctx) {
	if err != nil {
		return err // a *StreamClosedError (4401, 4403, refused ticket) or ctx.Err()
	}
	switch m := msg.(type) {
	case *status302.DataMessage:
		fmt.Println(m.Topic, m.Seq, string(m.Data))
	case *status302.ResyncMessage:
		snapshot, err := stream.FetchSnapshot(ctx, m)
		…
	case *status302.ErrorMessage:
		log.Printf("%s refused: %s", m.Topic, m.Code)
	}
}

Messages queue up without bound until Next takes them. A Stream is safe for concurrent use.

func (*Stream) Close

func (s *Stream) Close() error

Close ends the stream for good: it closes the connection (1000 "client closed", waiting for the close handshake), drops undelivered messages and makes Next return ErrStreamClosed. Calling it again does nothing.

func (*Stream) FetchSnapshot

func (s *Stream) FetchSnapshot(ctx context.Context, m *ResyncMessage) (json.RawMessage, error)

FetchSnapshot loads a resync snapshot through the REST client.

func (*Stream) Messages

func (s *Stream) Messages(ctx context.Context) iter.Seq2[Message, error]

Messages iterates over Next until the stream ends: it yields every message, then the final error or ctx.Err() (and stops); ErrStreamClosed ends it without being yielded.

func (*Stream) Next

func (s *Stream) Next(ctx context.Context) (Message, error)

Next returns the next message, waiting for one until ctx ends. Once the stream ended for good it returns the final error (a *StreamClosedError, or the invalid StreamOptions) once, after the messages queued before it, then ErrStreamClosed. After Close it returns ErrStreamClosed.

func (*Stream) State

func (s *Stream) State() StreamState

State is the current connection state.

func (*Stream) Subscribe

func (s *Stream) Subscribe(topic string, opts SubscribeOptions) *Subscription

Subscribe subscribes to a topic; the first call connects. Subscribing to the same topic again replaces its subscription (and filter). Messages arrive through Next. After Close the returned Subscription's Ready fails with ErrStreamClosed.

type StreamAuth

type StreamAuth string

StreamAuth selects how a Stream authenticates its WebSocket upgrade.

const (
	// StreamAuthBearer sends the API key as `Authorization: Bearer` on the upgrade request.
	StreamAuthBearer StreamAuth = "bearer"
	// StreamAuthTicket connects with `?ticket=` from StreamOptions.GetTicket,
	// fetched before every (re)connect.
	StreamAuthTicket StreamAuth = "ticket"
)

type StreamClosedError

type StreamClosedError struct {
	Code   int
	Reason string
	// contains filtered or unexported fields
}

StreamClosedError ends a stream for good: the server closed it with 4401 or 4403, or a ticket was refused (Code 4401, Reason "ticket refused"; the *APIError is wrapped). Stream.Next returns it once. StreamOptions.OnError also receives it for 4429, which is retried.

func (*StreamClosedError) Error

func (e *StreamClosedError) Error() string

func (*StreamClosedError) Unwrap

func (e *StreamClosedError) Unwrap() error

Unwrap returns the cause, e.g. the *APIError of a refused ticket.

type StreamEncoding

type StreamEncoding string

StreamEncoding is the wire encoding of server → client messages.

const (
	// StreamEncodingJSON: every server message is a JSON text frame (the default).
	StreamEncodingJSON StreamEncoding = "json"
	// StreamEncodingMsgpack: every server message is one binary MessagePack
	// frame (`?encoding=msgpack`), decoded into the same messages as JSON.
	// Client messages stay JSON text.
	StreamEncodingMsgpack StreamEncoding = "msgpack"
)

type StreamOptions

type StreamOptions struct {
	// APIKey is sent with bearer auth (default: the client's key).
	APIKey string
	// Auth is StreamAuthBearer (server-side) or StreamAuthTicket. Default:
	// bearer when an API key is set, else ticket.
	Auth StreamAuth
	// GetTicket returns a fresh single-use ticket; called before every
	// (re)connect with ticket auth. Default: the client's CreateStreamTicket.
	GetTicket func(ctx context.Context) (string, error)
	// URL is the WebSocket URL (default StreamURL(client.BaseURL())).
	URL string
	// Encoding of server messages (default StreamEncodingJSON).
	Encoding StreamEncoding
	// ReconnectDelay is the first reconnect delay (default 500 ms); it
	// doubles per failed attempt, with full jitter.
	ReconnectDelay time.Duration
	// MaxReconnectDelay caps the reconnect delay (default 30 s).
	MaxReconnectDelay time.Duration
	// IdleTimeout reconnects when nothing arrives for this long (default 60 s;
	// the server sends a heartbeat every 20 s). It also bounds the handshake.
	IdleTimeout time.Duration
	// HTTPClient dials the WebSocket (default http.DefaultClient).
	HTTPClient *http.Client
	// OnStateChange receives every state change, in order, from a goroutine
	// of the stream.
	OnStateChange func(StreamState)
	// OnError receives non-final connection problems, in order, from a
	// goroutine of the stream: 4429 closes (*StreamClosedError), ticket
	// errors, malformed messages and server errors that answer no pending
	// request. Final errors are returned by Stream.Next instead.
	OnError func(error)
}

StreamOptions configures Client.Stream. The zero value streams JSON from the client's base URL with the client's API key.

type StreamState

type StreamState string

StreamState is the connection state of a Stream (see StreamOptions.OnStateChange).

const (
	// StreamIdle: nothing subscribed yet, so not connected.
	StreamIdle StreamState = "idle"
	// StreamConnecting: the first connection is being opened.
	StreamConnecting StreamState = "connecting"
	// StreamOpen: connected; the subscriptions are (re)sent.
	StreamOpen StreamState = "open"
	// StreamReconnecting: the connection failed or ended; waiting out the backoff or dialing again.
	StreamReconnecting StreamState = "reconnecting"
	// StreamClosed: ended for good (Close, a final close code or a refused ticket).
	StreamClosed StreamState = "closed"
)

type StreamTicket

type StreamTicket struct {
	// Opaque single-use credential; pass as `?ticket=` on `GET /v1/stream`.
	Ticket    string    `json:"ticket"`
	ExpiresAt time.Time `json:"expiresAt"`
}

StreamTicket is a schema of the public API.

type SubscribeOptions

type SubscribeOptions struct {
	// Filter narrows the topic, e.g. {"country": ["US"], "minPrice": 10000} for `sales`.
	Filter map[string]any
	// Since resumes after this seq (replayable topics). Later reconnects
	// resume from the last delivered seq automatically.
	Since *int64
}

SubscribeOptions configures Stream.Subscribe.

type Subscription

type Subscription struct {
	// contains filtered or unexported fields
}

Subscription is one topic subscription; it survives reconnects.

func (*Subscription) LastSeq

func (sub *Subscription) LastSeq() (int64, bool)

LastSeq is the seq of the last delivered message (or the confirmed head seq before any); resubscribes resume after it. False before the first confirmation and after a resync.

func (*Subscription) Ready

func (sub *Subscription) Ready(ctx context.Context) (int64, error)

Ready waits until the server confirms the first subscribe and returns the topic's head seq. A refused subscription returns a *SubscriptionError, a stream that ended first ErrStreamClosed.

func (*Subscription) Topic

func (sub *Subscription) Topic() string

Topic is the subscribed topic.

func (*Subscription) Unsubscribe

func (sub *Subscription) Unsubscribe()

Unsubscribe stops the subscription; the server is told when connected.

type SubscriptionError

type SubscriptionError struct {
	Topic   string
	Code    string
	Message string
}

SubscriptionError is a subscribe request the server refused (`forbidden_topic`, `unknown_topic`, `bad_request`, `subscription_limit`).

func (*SubscriptionError) Error

func (e *SubscriptionError) Error() string

type TicketOffer

type TicketOffer struct {
	// The levels' `offerName`; the series' `offer`.
	Name string `json:"name"`
	// Price levels of the offer in use now (0 for an offer no longer sold).
	Levels int32 `json:"levels"`
	// Open primary seats and GA stock at those levels; null before the event's first poll.
	Tickets *int64 `json:"tickets"`
	// Cheapest all-in price of those levels; null without levels in use or without map prices.
	MinMinor *int64 `json:"minMinor"`
	// Dearest all-in price of those levels; null like `minMinor`.
	MaxMinor *int64 `json:"maxMinor"`
}

TicketOffer: One Ticketmaster offer (ticket type, e.g. `ADULT`, `PLAT1`) over its primary price levels.

type TicketOfferList

type TicketOfferList struct {
	EventID int64 `json:"eventId"`
	// Currency of `minMinor` and `maxMinor`; null without priced offers or without map prices.
	Currency *string `json:"currency"`
	// Offers with price levels in use first, then by name.
	Items []TicketOffer `json:"items"`
}

TicketOfferList is a schema of the public API.

type TicketType

type TicketType struct {
	// The source's ticket type id.
	ExternalID string `json:"externalId"`
	Name       string `json:"name"`
	// `on_sale`, `sold_out`, `off_sale`, or another source status in snake case.
	Status string `json:"status"`
	// The source runs a waiting list for it.
	Waitlist bool `json:"waitlist"`
	// Price tier (release) index; -1 when the source names no tier.
	TierIndex int32 `json:"tierIndex"`
	// Price tier name, e.g. "Second release".
	TierName    *string   `json:"tierName"`
	PriceMinor  int64     `json:"priceMinor"`
	AllInMinor  int64     `json:"allInMinor"`
	Currency    string    `json:"currency"`
	MaxPerOrder *int32    `json:"maxPerOrder"`
	FirstSeen   time.Time `json:"firstSeen"`
	LastChanged time.Time `json:"lastChanged"`
	// When the source stopped listing the type; null while listed.
	RemovedAt *time.Time `json:"removedAt"`
}

TicketType: One ticket type of a primary source's event: general admission at one price, without a remaining count. Money is minor units of `currency` per ticket: `priceMinor` before tax, `allInMinor` what a buyer pays.

type TicketTypeChange

type TicketTypeChange struct {
	Ts             time.Time            `json:"ts"`
	ExternalID     string               `json:"externalId"`
	Kind           TicketTypeChangeKind `json:"kind"`
	Name           string               `json:"name"`
	PrevStatus     *string              `json:"prevStatus"`
	Status         *string              `json:"status"`
	PrevTierName   *string              `json:"prevTierName"`
	TierName       *string              `json:"tierName"`
	PrevAllInMinor *int64               `json:"prevAllInMinor"`
	AllInMinor     *int64               `json:"allInMinor"`
	Currency       *string              `json:"currency"`
	PrevWaitlist   *bool                `json:"prevWaitlist"`
	Waitlist       *bool                `json:"waitlist"`
}

TicketTypeChange: One change of a ticket type; the fields of other kinds are null.

type TicketTypeChangeKind

type TicketTypeChangeKind string

TicketTypeChangeKind: `added` / `removed`: the type appeared in or left the list; `status`: its status changed; `price`: its all-in price or tier changed; `waitlist`: its waiting list opened or closed.

const (
	TicketTypeChangeKindAdded    TicketTypeChangeKind = "added"
	TicketTypeChangeKindRemoved  TicketTypeChangeKind = "removed"
	TicketTypeChangeKindStatus   TicketTypeChangeKind = "status"
	TicketTypeChangeKindPrice    TicketTypeChangeKind = "price"
	TicketTypeChangeKindWaitlist TicketTypeChangeKind = "waitlist"
)

Values of TicketTypeChangeKind.

type TicketTypeList

type TicketTypeList struct {
	EventID int64 `json:"eventId"`
	// The event's primary seller (`EventSummary.primarySource`).
	Source *PrimarySource `json:"source"`
	// Current ticket types in the source's order, then removed ones (most recently removed first).
	Items []TicketType `json:"items"`
	// Changes, newest first, at most 200.
	Changes []TicketTypeChange `json:"changes"`
}

TicketTypeList is a schema of the public API.

type UpdateChannelRequest

type UpdateChannelRequest struct {
	Name    *string `json:"name,omitempty"`
	Enabled *bool   `json:"enabled,omitempty"`
}

UpdateChannelRequest is a schema of the public API.

type UpdateSavedListItemsRequest

type UpdateSavedListItemsRequest struct {
	Items []SavedListItemPatch `json:"items"`
}

UpdateSavedListItemsRequest is a schema of the public API.

type UpdateSavedListRequest

type UpdateSavedListRequest struct {
	Name        *string             `json:"name,omitempty"`
	Description *string             `json:"description,omitempty"`
	View        *SavedListViewPatch `json:"view,omitempty"`
}

UpdateSavedListRequest is a schema of the public API.

type Usage

type Usage struct {
	From        time.Time          `json:"from"`
	To          time.Time          `json:"to"`
	Granularity UsageGranularity   `json:"granularity"`
	Quota       UsageQuota         `json:"quota"`
	Current     UsageCurrent       `json:"current"`
	Totals      UsageCounts        `json:"totals"`
	Buckets     []UsageBucket      `json:"buckets"`
	Groups      []UsageGroupCounts `json:"groups"`
	Keys        []UsageKeyCounts   `json:"keys"`
}

Usage is a schema of the public API.

type UsageBucket

type UsageBucket struct {
	UsageCounts
	// Bucket start.
	Ts time.Time `json:"ts"`
}

UsageBucket is a schema of the public API.

type UsageCounts

type UsageCounts struct {
	// Requests answered (including 429s).
	Requests int64 `json:"requests"`
	// Requests refused with 429.
	Throttled int64 `json:"throttled"`
	// Requests answered with a 5xx.
	Errors int64 `json:"errors"`
	// Stream connections opened.
	StreamConnections int64 `json:"streamConnections"`
	// Stream messages delivered.
	StreamMessages int64 `json:"streamMessages"`
}

UsageCounts is a schema of the public API.

type UsageCurrent

type UsageCurrent struct {
	RequestsThisMinute int `json:"requestsThisMinute"`
	// Requests since 00:00 UTC.
	RequestsToday int `json:"requestsToday"`
	// Open stream connections of the org's keys.
	StreamConnections int `json:"streamConnections"`
}

UsageCurrent: Live usage against the quota.

type UsageGranularity

type UsageGranularity string

UsageGranularity is a schema of the public API.

const (
	UsageGranularityMinute UsageGranularity = "minute"
	UsageGranularityHour   UsageGranularity = "hour"
	UsageGranularityDay    UsageGranularity = "day"
)

Values of UsageGranularity.

type UsageGroup

type UsageGroup string

UsageGroup: Endpoint group a request is metered under.

const (
	UsageGroupCatalog  UsageGroup = "catalog"
	UsageGroupMarket   UsageGroup = "market"
	UsageGroupSales    UsageGroup = "sales"
	UsageGroupMaps     UsageGroup = "maps"
	UsageGroupLists    UsageGroup = "lists"
	UsageGroupAlerts   UsageGroup = "alerts"
	UsageGroupWebhooks UsageGroup = "webhooks"
	UsageGroupExports  UsageGroup = "exports"
	UsageGroupStream   UsageGroup = "stream"
	UsageGroupUsage    UsageGroup = "usage"
)

Values of UsageGroup.

type UsageGroupCounts

type UsageGroupCounts struct {
	UsageCounts
	Group UsageGroup `json:"group"`
}

UsageGroupCounts is a schema of the public API.

type UsageKeyCounts

type UsageKeyCounts struct {
	UsageCounts
	APIKeyID string `json:"apiKeyId"`
	KeyID    string `json:"keyId"`
	Name     string `json:"name"`
	// Requests per bucket, aligned with `buckets`.
	Series []int64 `json:"series"`
}

UsageKeyCounts is a schema of the public API.

type UsageQuota

type UsageQuota struct {
	RequestsPerMinute   int `json:"requestsPerMinute"`
	RequestsPerDay      int `json:"requestsPerDay"`
	ConcurrentRequests  int `json:"concurrentRequests"`
	StreamConnections   int `json:"streamConnections"`
	StreamSubscriptions int `json:"streamSubscriptions"`
}

UsageQuota: The plan's API limits (0 = unlimited).

type UserRef

type UserRef struct {
	ID        string  `json:"id"`
	Email     string  `json:"email"`
	Name      string  `json:"name"`
	AvatarURL *string `json:"avatarUrl,omitempty"`
}

UserRef is a schema of the public API.

type VenueConfig

type VenueConfig struct {
	VenueConfigID  string `json:"venueConfigId"`
	Events         int    `json:"events"`
	UpcomingEvents int    `json:"upcomingEvents"`
	// Compiled maps of this configuration, most recently fetched first.
	Seatmaps []VenueSeatmap `json:"seatmaps"`
}

VenueConfig: A Ticketmaster venue configuration (layout) seen at the venue.

type VenueDetail

type VenueDetail struct {
	ID int64 `json:"id"`
	// Ticketmaster Discovery venue id; empty for venues not listed by Ticketmaster Discovery (e.g. Dice venues).
	DiscoveryID string `json:"discoveryId"`
	// The seller whose catalog lists the venue, and whose site `url` opens: `tm` for Ticketmaster
	// Discovery venues, `dice` for Dice venues.
	PrimarySource *PrimarySource `json:"primarySource"`
	Name          string         `json:"name"`
	URL           *string        `json:"url"`
	Address       *string        `json:"address"`
	City          *string        `json:"city"`
	StateCode     *string        `json:"stateCode"`
	CountryCode   *string        `json:"countryCode"`
	PostalCode    *string        `json:"postalCode"`
	// IANA zone of the venue.
	Timezone *string   `json:"timezone"`
	Location *GeoPoint `json:"location,omitempty"`
	// Largest declared capacity among the venue's compiled seat maps; null without one.
	Capacity  *int          `json:"capacity"`
	Rollup    EventRollup   `json:"rollup"`
	NextEvent *EventSummary `json:"nextEvent,omitempty"`
	// Venue configurations, most upcoming events first.
	Configs   []VenueConfig `json:"configs"`
	UpdatedAt time.Time     `json:"updatedAt"`
}

VenueDetail is a schema of the public API.

type VenueRef

type VenueRef struct {
	ID          int64   `json:"id"`
	Name        string  `json:"name"`
	City        *string `json:"city"`
	StateCode   *string `json:"stateCode"`
	CountryCode *string `json:"countryCode"`
}

VenueRef is a schema of the public API.

type VenueSeatmap

type VenueSeatmap struct {
	// Hex sha256 of the uncompressed artifact.
	Hash string `json:"hash"`
	// The artifact (`getSeatmap`).
	URL string `json:"url"`
	// The artifact on the public map artifact store, when published there (see `Seatmap.cdnUrl`).
	CdnURL     *string `json:"cdnUrl,omitempty"`
	Format     int     `json:"format"`
	PageWidth  int     `json:"pageWidth"`
	PageHeight int     `json:"pageHeight"`
	Sections   int     `json:"sections"`
	GaSections int     `json:"gaSections"`
	// Seats with a position on the map.
	Places int `json:"places"`
	// Declared places (seats plus GA capacity); null when the map declares none.
	Capacity   *int      `json:"capacity"`
	CompiledAt time.Time `json:"compiledAt"`
	// Events at the venue linked to this map.
	Events int `json:"events"`
	// Latest map fetch of those events.
	LastFetchedAt time.Time `json:"lastFetchedAt"`
}

VenueSeatmap: A compiled seat map used by events at the venue.

type VerifyChannelRequest

type VerifyChannelRequest struct {
	Code string `json:"code"`
}

VerifyChannelRequest is a schema of the public API.

type VerifyOptions

type VerifyOptions struct {
	// Tolerance is the oldest accepted signature age (and the furthest in the future). Default 5 minutes.
	Tolerance time.Duration
	// Now is the current time (tests). Default time.Now().
	Now time.Time
}

VerifyOptions tunes VerifyWebhookWith.

type Webhook

type Webhook struct {
	ID          string             `json:"id"`
	URL         string             `json:"url"`
	Description string             `json:"description"`
	Events      []WebhookEventType `json:"events"`
	// Scopes `list.sale`, `event.status_changed` and the market-activity types to this list's events.
	ListID *string `json:"listId"`
	// Markets `list.sale` and the market-activity types are limited to; empty means every market.
	Markets []WebhookMarket `json:"markets"`
	Status  WebhookStatus   `json:"status"`
	// Why the endpoint is disabled (auto-disabled after 24 h of failed deliveries, or by a user).
	DisabledReason      *string `json:"disabledReason"`
	ConsecutiveFailures int     `json:"consecutiveFailures"`
	// First failure of the current failure streak.
	FailingSince   *time.Time `json:"failingSince"`
	LastDeliveryAt *time.Time `json:"lastDeliveryAt"`
	LastSuccessAt  *time.Time `json:"lastSuccessAt"`
	// The secret's last four characters, `whsec_…abcd`.
	SecretHint string    `json:"secretHint"`
	CreatedAt  time.Time `json:"createdAt"`
	CreatedBy  *UserRef  `json:"createdBy"`
}

Webhook is a schema of the public API.

type WebhookActivity

type WebhookActivity struct {
	Event  WebhookEventRef `json:"event"`
	Market WebhookMarket   `json:"market"`
	// Time of the poll that saw the changes.
	At time.Time `json:"at"`
	// Tickets over every change of the poll, including any left out of `changes`.
	Quantity int `json:"quantity"`
	// More than 200 changes; `changes` holds the first 200.
	Truncated bool                    `json:"truncated"`
	Changes   []WebhookActivityChange `json:"changes"`
}

WebhookActivity: The changes of one type found by one poll of an event. Changes of a mass transition (a hold pulled or an event withdrawn in one poll) are never delivered.

type WebhookActivityChange

type WebhookActivityChange struct {
	// `restock`/`ga_restock` (inventory.restocked), `sale`/`ga_sale`
	// (inventory.sold), `added` (resale.listed, marketplace.listed),
	// `confirmed` (reported by the marketplace), `partial` (a
	// listing's quantity dropped) or `removal` (a listing vanished and
	// stayed gone) (resale.sold, marketplace.sold).
	Kind     WebhookActivityChangeKind `json:"kind"`
	Section  string                    `json:"section"`
	Row      string                    `json:"row"`
	Seats    []string                  `json:"seats"`
	Quantity int                       `json:"quantity"`
	// All-in price per ticket in minor units; null when unpriced.
	PriceMinor *int64 `json:"priceMinor"`
	// Face (list) price per ticket before fees.
	ListMinor *int64  `json:"listMinor"`
	Currency  *string `json:"currency"`
	// Sales only (null otherwise): primary sales are `inferred_high`
	// when the polls around them were close together, else
	// `inferred_low`; resale sales are always `inferred_low`;
	// marketplace sales are `confirmed`, or inferred like primary
	// sales.
	Confidence *SaleConfidence `json:"confidence"`
}

WebhookActivityChange: Seats of one section, row and price that changed together; GA pools have an empty row and no seats. Marketplace listings carry no seat numbers (empty `seats`).

type WebhookActivityChangeKind

type WebhookActivityChangeKind string

WebhookActivityChangeKind: `restock`/`ga_restock` (inventory.restocked), `sale`/`ga_sale` (inventory.sold), `added` (resale.listed, marketplace.listed), `confirmed` (reported by the marketplace), `partial` (a listing's quantity dropped) or `removal` (a listing vanished and stayed gone) (resale.sold, marketplace.sold).

const (
	WebhookActivityChangeKindRestock   WebhookActivityChangeKind = "restock"
	WebhookActivityChangeKindGaRestock WebhookActivityChangeKind = "ga_restock"
	WebhookActivityChangeKindSale      WebhookActivityChangeKind = "sale"
	WebhookActivityChangeKindGaSale    WebhookActivityChangeKind = "ga_sale"
	WebhookActivityChangeKindAdded     WebhookActivityChangeKind = "added"
	WebhookActivityChangeKindConfirmed WebhookActivityChangeKind = "confirmed"
	WebhookActivityChangeKindPartial   WebhookActivityChangeKind = "partial"
	WebhookActivityChangeKindRemoval   WebhookActivityChangeKind = "removal"
)

Values of WebhookActivityChangeKind.

type WebhookActivityEnvelope

type WebhookActivityEnvelope struct {
	// Derived from the source poll and the type, so a poll is delivered
	// at most once per type even across retries and restarts.
	ID        string                      `json:"id"`
	Type      WebhookActivityEnvelopeType `json:"type"`
	CreatedAt time.Time                   `json:"createdAt"`
	Test      bool                        `json:"test"`
	Data      WebhookActivity             `json:"data"`
}

WebhookActivityEnvelope: The envelope of `inventory.restocked`, `inventory.sold`, `resale.listed`, `resale.sold`, `marketplace.listed` and `marketplace.sold` deliveries.

type WebhookActivityEnvelopeType

type WebhookActivityEnvelopeType string

WebhookActivityEnvelopeType is a schema of the public API.

const (
	WebhookActivityEnvelopeTypeInventoryRestocked WebhookActivityEnvelopeType = "inventory.restocked"
	WebhookActivityEnvelopeTypeInventorySold      WebhookActivityEnvelopeType = "inventory.sold"
	WebhookActivityEnvelopeTypeResaleListed       WebhookActivityEnvelopeType = "resale.listed"
	WebhookActivityEnvelopeTypeResaleSold         WebhookActivityEnvelopeType = "resale.sold"
	WebhookActivityEnvelopeTypeMarketplaceListed  WebhookActivityEnvelopeType = "marketplace.listed"
	WebhookActivityEnvelopeTypeMarketplaceSold    WebhookActivityEnvelopeType = "marketplace.sold"
)

Values of WebhookActivityEnvelopeType.

type WebhookDelivery

type WebhookDelivery struct {
	// This delivery (`Status302-Delivery-Id`).
	ID        string `json:"id"`
	WebhookID string `json:"webhookId"`
	// The envelope `id`; redeliveries keep it, so receivers can dedupe on it.
	EventID        string                `json:"eventId"`
	Event          WebhookEventType      `json:"event"`
	Test           bool                  `json:"test"`
	Status         WebhookDeliveryStatus `json:"status"`
	Attempts       int                   `json:"attempts"`
	ResponseStatus *int                  `json:"responseStatus"`
	// First 512 bytes of the last response body.
	ResponseSnippet *string `json:"responseSnippet"`
	// Duration of the last attempt.
	LatencyMs     *int       `json:"latencyMs"`
	Error         *string    `json:"error"`
	CreatedAt     time.Time  `json:"createdAt"`
	LastAttemptAt *time.Time `json:"lastAttemptAt"`
	NextAttemptAt *time.Time `json:"nextAttemptAt"`
	RedeliveryOf  *string    `json:"redeliveryOf"`
}

WebhookDelivery is a schema of the public API.

type WebhookDeliveryPage

type WebhookDeliveryPage struct {
	Items      []WebhookDelivery `json:"items"`
	NextCursor *string           `json:"nextCursor"`
}

WebhookDeliveryPage is a schema of the public API.

type WebhookDeliveryStatus

type WebhookDeliveryStatus string

WebhookDeliveryStatus: `pending`: queued or retrying; `succeeded`: a 2xx answer; `failed`: gave up (24 h of retries, endpoint disabled or deleted, or a permanent error).

const (
	WebhookDeliveryStatusPending   WebhookDeliveryStatus = "pending"
	WebhookDeliveryStatusSucceeded WebhookDeliveryStatus = "succeeded"
	WebhookDeliveryStatusFailed    WebhookDeliveryStatus = "failed"
)

Values of WebhookDeliveryStatus.

type WebhookEnvelope

type WebhookEnvelope struct {
	// The event id, kept by retries and redeliveries; process each id once.
	ID        string           `json:"id"`
	Type      WebhookEventType `json:"type"`
	CreatedAt time.Time        `json:"createdAt"`
	Test      bool             `json:"test"`
	Data      map[string]any   `json:"data"`
}

WebhookEnvelope: The JSON body of every webhook delivery. `data` depends on `type`: `WebhookActivity` for the market-activity types, the `Sale` schema for `list.sale` (see `WebhookEventType`).

type WebhookEvent

type WebhookEvent struct {
	ID        string          `json:"id"`
	Type      string          `json:"type"`
	CreatedAt time.Time       `json:"createdAt"`
	Test      bool            `json:"test"`
	Data      json.RawMessage `json:"data"`
}

WebhookEvent is a webhook delivery body. ID identifies the event and stays the same across retries and redeliveries (process each ID once); the `Status302-Delivery-Id` header identifies one delivery. Test marks "Send test event" deliveries.

func VerifyWebhook

func VerifyWebhook(rawBody []byte, signatureHeader string, secrets ...string) (*WebhookEvent, error)

VerifyWebhook verifies a webhook delivery and returns its parsed body.

`Status302-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>`. Pass the raw request body exactly as received (before any JSON parsing) and the endpoint's signing secret (`whsec_…`); during a secret rotation pass both secrets. An empty secret (an unset environment variable) is rejected, never used as an HMAC key. Comparison is constant-time.

func VerifyWebhookWith

func VerifyWebhookWith(rawBody []byte, signatureHeader string, secrets []string, opts VerifyOptions) (*WebhookEvent, error)

VerifyWebhookWith is VerifyWebhook with a custom tolerance or clock.

func (*WebhookEvent) Decode

func (e *WebhookEvent) Decode(v any) error

Decode unmarshals the event's data into v.

type WebhookEventRef

type WebhookEventRef struct {
	SaleEventRef
	// The event's Ticketmaster page, when known.
	URL *string `json:"url"`
}

WebhookEventRef: The event summary of a market-activity payload.

type WebhookEventType

type WebhookEventType string

WebhookEventType: `alert.fired`: an alert rule of the org fired (payload: the firing); `onsale.announced`: a newly announced event, on-sale or presale (the `onsales` stream payload); `event.status_changed`: an event of the endpoint's list changed status (onsale, offsale, canceled, postponed, rescheduled); `list.sale`: a sale on an event of the endpoint's list (the `Sale` schema). Market activity on events of the endpoint's list (payload: `WebhookActivity`, one delivery per poll of the event): `inventory.restocked`: primary seats became available (restocks, GA restocks); `inventory.sold`: settled primary sales (inferred); `resale.listed`: listings were added on Ticketmaster resale; `resale.sold`: Ticketmaster resale sales inferred from its listings (a listing sold down or vanished; each change carries its confidence); `marketplace.listed`: listings were added on a secondary marketplace; `marketplace.sold`: secondary-marketplace sales, confirmed by the marketplace or inferred from its listings (each change carries its confidence).

const (
	WebhookEventTypeAlertFired         WebhookEventType = "alert.fired"
	WebhookEventTypeOnsaleAnnounced    WebhookEventType = "onsale.announced"
	WebhookEventTypeEventStatusChanged WebhookEventType = "event.status_changed"
	WebhookEventTypeListSale           WebhookEventType = "list.sale"
	WebhookEventTypeInventoryRestocked WebhookEventType = "inventory.restocked"
	WebhookEventTypeInventorySold      WebhookEventType = "inventory.sold"
	WebhookEventTypeResaleListed       WebhookEventType = "resale.listed"
	WebhookEventTypeResaleSold         WebhookEventType = "resale.sold"
	WebhookEventTypeMarketplaceListed  WebhookEventType = "marketplace.listed"
	WebhookEventTypeMarketplaceSold    WebhookEventType = "marketplace.sold"
)

Values of WebhookEventType.

type WebhookInput

type WebhookInput struct {
	URL         string             `json:"url"`
	Description *string            `json:"description,omitempty"`
	Events      []WebhookEventType `json:"events"`
	ListID      Nullable[string]   `json:"listId,omitzero"`
	// Limit `list.sale` and the market-activity types to these markets; omitted or empty means every market.
	Markets []WebhookMarket `json:"markets,omitempty"`
}

WebhookInput is a schema of the public API.

type WebhookList

type WebhookList struct {
	Items []Webhook `json:"items"`
}

WebhookList is a schema of the public API.

type WebhookMarket

type WebhookMarket string

WebhookMarket: A market of an endpoint's `markets` filter: `primary` (Ticketmaster primary), `tm_resale` (Ticketmaster resale) or `secondary:<marketplace>` (`list.sale` and marketplace activity of a marketplace; needs the secondary-marketplaces feature to deliver). More marketplaces may be added; treat unknown values as other markets.

const (
	WebhookMarketPrimary             WebhookMarket = "primary"
	WebhookMarketTmResale            WebhookMarket = "tm_resale"
	WebhookMarketSecondaryStubhub    WebhookMarket = "secondary:stubhub"
	WebhookMarketSecondaryCrowdvolt  WebhookMarket = "secondary:crowdvolt"
	WebhookMarketSecondaryTickpick   WebhookMarket = "secondary:tickpick"
	WebhookMarketSecondaryVividseats WebhookMarket = "secondary:vividseats"
	WebhookMarketSecondaryTicombo    WebhookMarket = "secondary:ticombo"
)

Values of WebhookMarket.

type WebhookPatch

type WebhookPatch struct {
	URL         *string            `json:"url,omitempty"`
	Description *string            `json:"description,omitempty"`
	Events      []WebhookEventType `json:"events,omitempty"`
	ListID      Nullable[string]   `json:"listId,omitzero"`
	// Replaces the market filter; empty means every market.
	Markets []WebhookMarket `json:"markets,omitempty"`
	// Remove the list filter.
	ClearList *bool          `json:"clearList,omitempty"`
	Status    *WebhookStatus `json:"status,omitempty"`
}

WebhookPatch is a schema of the public API.

type WebhookSecret

type WebhookSecret struct {
	Webhook Webhook `json:"webhook"`
	// The signing secret (`whsec_` + 32 random bytes in base62). The HMAC key is this whole string as UTF-8 bytes.
	Secret string `json:"secret"`
}

WebhookSecret is a schema of the public API.

type WebhookStatus

type WebhookStatus string

WebhookStatus is a schema of the public API.

const (
	WebhookStatusActive   WebhookStatus = "active"
	WebhookStatusDisabled WebhookStatus = "disabled"
)

Values of WebhookStatus.

type WebhookTestInput

type WebhookTestInput struct {
	Type *WebhookEventType `json:"type,omitempty"`
}

WebhookTestInput is a schema of the public API.

Directories

Path Synopsis
examples
quickstart command
Command quickstart lists events, reads an event's market metrics, receives a realtime message and verifies a webhook signature.
Command quickstart lists events, reads an event's market metrics, receives a realtime message and verifies a webhook signature.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL