Use the seatlayer package from a trusted Python backend. Version 0.9.0
requires Python 3.10 or newer and has no runtime dependencies.
Install and create the client
pip install seatlayer==0.9.0import os
from seatlayer import SeatLayer
seatlayer = SeatLayer(os.environ["SEATLAYER_SECRET_KEY"])
if seatlayer.mode != "test":
raise RuntimeError("Use a test key while integrating.")Keep SEATLAYER_SECRET_KEY in the server environment. Never expose the client
or its sk_… credential to browser or mobile code.
Exact resource surface
The client exposes charts, channels, events, event_series, holders,
inventory, orders, performance_groups, sessions, seasons,
templates, webhooks, and workspaces.
New in 0.9.0: event_series creates, lists, reads, adds dates to, and
updates event series. holders covers customers (list_customers), holder
details, seasons and tickets, ticket transfers, returns, and renewal checkout
and decline. orders lists and reads orders across events and seasons, and
lists, exports, refunds, cancels, and resends one event’s orders. events adds
the event sales calls: buyer checkout, payment gateway, sales readiness,
preflight and transition, booking fee, and discount codes.
seatlayer.performance_groups contains all 13 released operations: list,
create, retrieve, delete, activate, close, retrieve_lifecycle,
create_buyer_access_session, list_buyer_access_sessions,
revoke_buyer_access_session, retrieve_hold, book_hold, and
retrieve_booking.
seatlayer.seasons contains all 90 Season operations in 0.9.0. Python keeps
the Season prefix and uses snake case, for example create_season,
publish_season_plan, book_season_hold, commit_season_renewal_offer, and
export_season_support_snapshot. The resource covers catalogue, lifecycle,
Plans and sales, plan edits and package prices, performances, buyer handoff,
holder import, holders, season orders, renewals and hosted renewals,
amendments, occurrence return and reclaim, season seats, bulk jobs, reports,
recovery, outbox, audit, and support export. Occurrence return and reclaim are
return_season_occurrence_inventory and
reclaim_season_occurrence_inventory. Each is sent once; reuse the same
action_id if you send it again.
Season seats are SDK methods in 0.9.0: set_aside_season_block,
retrieve_season_block, and release_season_block. Turn them on for a season
with inventory_mode="block" on create_season or update_season; every
Season answer carries inventoryMode, block or per_hold. The season seats
routes give the rules. A refusal raises a
SeatLayerError subclass; read its code, for example
season_block_not_enabled.
The same 13 Performance Group and 90 Season wire operations are released in all seven official server SDKs; only language naming differs.
The 0.9.0 typed performance_groups.create parameters cover the default
fixed policy but do not expose the newer REST inclusionMode field. Use the
REST/raw-request path for
flexible_dates; the other typed create fields and all 13 operations remain
available.
Inspect and book an Event hold
event_key = os.environ["SEATLAYER_EVENT_KEY"]
hold_id = os.environ["SEATLAYER_HOLD_ID"]
booking_ref = os.environ["ORDER_ID"]
hold = seatlayer.inventory.retrieve_hold(event_key, hold_id)
# An expired, released or booked hold still answers with its status.
if hold["status"] != "active":
raise RuntimeError("The hold is no longer active")
labels = [item["label"] for item in hold["items"]]
# Price from hold["items"] and authorize payment in your commerce system here.
booking = seatlayer.inventory.book(
event_key,
hold_id=hold_id,
labels=labels,
booking_ref=booking_ref,
)Do not calculate a charge from browser-submitted totals. A booking_ref is
your commerce system’s immutable join to SeatLayer inventory. If the booking
response is lost, call
seatlayer.inventory.retrieve_booking(event_key, booking_ref) before deciding
whether to repeat the exact same hold, labels, and reference.
Errors, retries, and pagination
Branch on SeatLayerAuthError, SeatLayerConflictError, and
SeatLayerRateLimitError. Mode mismatch is is_mode_mismatch; sold out is
is_sold_out; rate-limit timing is retry_after_seconds.
Reads retry 408, 429, and 5xx responses with backoff. These 43 methods
also retry with one exact idempotency key:
charts.create,charts.copy,templates.instantiate_template,events.create,workspaces.create, andperformance_groups.createevent_series:create_event_series,add_event_series_dates, andupdate_event_seriesholders:update_holder,create_holder_transfer,create_holder_return, andcreate_holder_renewal_checkoutorders:refund_event_orderandcancel_event_orderseasons(28):create_season,update_season,delete_season,publish_season,duplicate_season_to_live,create_season_plan,update_season_plan,delete_season_plan,replace_season_package_prices,create_season_performances,attach_season_performances,delete_season_performance,attach_season_plan_performance,delete_season_plan_performance,mark_season_performance_past,refund_season_performance,create_season_checkout_test,create_season_holder_import,create_season_holder_import_from_season,create_season_renewal_offers,create_season_renewal_checkout,release_season_lapsed_offers,create_season_amendment,refund_season_order,cancel_season_order,cancel_season_order_date,set_aside_season_block, andrelease_season_block
Holds, bookings, lifecycle and sales changes other than publish_season,
occurrence return and reclaim,
the event sales calls, resends, show-once credentials, and raw mutations are
single-attempt.
Large lists use an iterator rather than an unbounded array:
for event in seatlayer.events.list_all():
sync_event(event)That helper is Event-specific. Performance Group and top-level Season list
methods return one cursor page, and so do list_season_renewal_offers,
list_season_holders, retrieve_season_hosted_renewals,
holders.list_customers, holders.list_holder_tickets, orders.list_orders,
orders.list_event_orders, and event_series.list_event_series. Pass the
opaque nextCursor value back through the method’s cursor argument until it
is absent.
Nullable Event fields distinguish omission from explicit None; consult the
package README before sending a reset. See errors, retries, and
idempotency for the shared contract.
Verify and continue
- PyPI package
0.9.0 - tagged source and package README
performance_groups,seasons,event_series,holders, andordersmethods atv0.9.0- server API operation support
- OpenAPI 3.1 reference
Verify the flow with a test key, a test Event, and a real test hold. Then add webhook verification, choose the correct inventory model, and complete the going-live checklist.