Skip to content
BusinessObject

Fields

idID!
nameString!
handleString!

URL-safe handle used as the first path segment in public and admin URLs (e.g. ottawa-volleyball).

handleManagementBusinessHandleManagement!

Editing state for the public handle: whether the business may choose a custom one (a paid Grow+ perk) and how many changes remain. The edit-affordance fields (eligible, changesRemaining) only reflect real values for staff viewers; non-staff see eligible: false, changesRemaining: 0.

Classifies the business — a real customer business (standard) or an automated-test fixture (endToEndTest). Surfaced in the internal admin so operators can tell test shops apart from real ones.

ownerUser!

The single owner of this business. Exactly one user per business — transferred via transferBusinessOwnership.

organizationOrganization

The organization this business belongs to, or null for standalone (non-multi-location) businesses. Org-level admins and owners inherit full permissions on all child businesses of the org.

Staff members of this business. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is name ASC, id ASC. Passing filter.query matches the staff member's name.

Arguments (3)
firstInt= 50
afterString
ownerStaff[StaffMember!]!

Staff entries for the holders of the implicit Owner role — the business owner (owner). Used by the read-only Owner role view; ordered by name.

memberInvites[BusinessInvite!]!

Where this business was migrated from, when it was pre-built by Sessions to woo an operator off a competitor platform. Null for ordinary self-serve signups. Drives the "Import from your old platform" onboarding step.

roles[BusinessRole!]!

Permission roles (templates) defined for this business, including seeded built-in presets. Sorted by name ASC, id ASC. Excludes soft-deleted roles.

The current user's effective access to this business — resolved permission bitmask, assigned role, home layout, and convenience booleans. Used to gate the admin navigation and pick the home layout. Permissions are all-false for a user with no access (which should not occur for activeBusiness).

features[Feature!]!

The platform feature flags currently enabled for this business. Used by the app to gate opt-in functionality (e.g. league/team surfaces). Only enabled flags appear; absence means the feature is off for this business.

featureFlagSettings[FeatureFlagSetting!]!

Every feature flag's setting for this business, including disabled ones, for the internal-admin feature-flag editor. Returns an empty list for non-internal viewers — read features for the app-facing enabled set.

viewerStaffMemberStaffMember

The current user's own staff member at this business, or null when the viewer has no staff row (e.g. an organization admin without one). Powers the role-aware "my schedule" home, which reads viewerStaffMember.sessions.

bookableActivities[Activity!]!

Booking activities (structure: booking) that currently accept online bookings — those with availability windows configured. Drives the public booking calendar's chooser. Empty when the appointments feature is off or the business has no booking activities.

nextBookingAvailabilityDateTime

The earliest open appointment slot across all of the business's booking activities, strictly after after (defaults to now). Lets a discovery card for a booking-based business show "next availability" in place of a session count. null when the appointments feature is off or nothing is open within the booking horizon.

Arguments (1)
nextScheduledSessionDateDateTime

The start of the next scheduled session strictly after after, across all of the business's activities (excluding cancelled sessions and resource bookings). Lets the schedule's prev/next nav skip empty weeks straight to the next one with sessions. null when there are none ahead.

Arguments (1)
afterDateTime!
previousScheduledSessionDateDateTime

The start of the most recent scheduled session strictly before before, across all of the business's activities (excluding cancelled sessions and resource bookings). The backward counterpart to nextScheduledSessionDate. null when there are none earlier.

Arguments (1)
beforeDateTime!

Activities offered by this business. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC. filter.query matches the activity's name (case-insensitive). The array filters (types, structures, registrationStatuses) AND together — passing two structures returns activities matching either one; passing both a structure and a type returns activities matching both. startAfter / endBefore filter on the activity's startDate / endDate columns directly.

Arguments (3)
firstInt= 50
afterString
sessions[ActivitySession!]!

Sessions across all activities in this business, ordered by start time. Defaults to a cap of 50 results when first is not specified — guards against accidental full-scan queries on large businesses. Callers wanting more should paginate using starting.from / starting.to.

Arguments (2)
scheduledSessionsActivitySessionConnection!

Cursor-paginated sessions across all activities in this business, for the all-sessions admin list. Supports the same starting filter as sessions, plus filters for activity, staff member, time-of-day, and a free-text query against session/activity name.

Order defaults to startAt ASC, id ASC; pass sort: startDesc to return the most recent sessions first. Default page size 50, clamped to [1, 100].

Arguments (5)
upcomingSessionStatsBusinessUpcomingSessionStats!

Aggregate counts of upcoming sessions, used by KPI / chart surfaces that previously selected the full session list just to compute totals. totalCount is every upcoming session this business has scheduled (status scheduled or active, and endAt in the future). daily emits one entry per local-business-timezone day for the next daysAhead days, including zero-count days, so charts get a fully- shaped bucket array without client-side padding.

Arguments (1)
daysAheadInt= 14
sessionUtilizationHeatmapBusinessSessionUtilizationHeatmap!

Per-day session utilization heatmap for an inclusive start..end range, in the business's local timezone. The resolver returns one entry per calendar day from start through end (zero-fill), plus the business-local "today" boundary so callers can split past from future without re-deriving it.

start and end are YYYY-MM-DD strings; end >= start; window span is capped server-side at 120 days.

Arguments (3)
revenueTimelineBusinessRevenueTimeline!

Daily gross revenue for the inclusive start..end window, in the business's local timezone. One bucket per calendar day from start through end, zero-filled. Only payments rows with status = succeeded contribute. Amounts are in subunits (e.g. cents) of the returned currency.

start and end are YYYY-MM-DD strings; end >= start; window span is capped server-side at 120 days.

Arguments (3)
participantsTimelineBusinessParticipantsTimeline!

Daily new-participant and confirmed-registration counts for the inclusive start..end window, in the business's local timezone. Both series share the same window so they can render on a single chart. Registrations are bucketed by their createdAt (when the booking happened), not by the session date.

start and end are YYYY-MM-DD strings; end >= start; window span is capped server-side at 120 days.

Arguments (3)
topActivitiesBusinessTopActivities!

Activities ranked by the number of confirmed registrations booked in the inclusive start..end window, in the business's local timezone. Registrations are bucketed by their createdAt (when the booking happened), matching participantsTimeline, so this reflects demand over the window rather than scheduled-session dates. Ordered by registration count descending, ties broken by activity id. Returns at most limit entries (default 5, clamped to [1, 20]).

start and end are YYYY-MM-DD strings; end >= start; window span is capped server-side at 120 days.

Arguments (4)
sessionAnalyticsBusinessSessionAnalytics!

Session-level demand breakdowns for the inclusive start..end window, in the business's local timezone. Every breakdown counts confirmed registrations on non-cancelled sessions whose start time falls in the window, sliced along a different dimension so the reports dashboard can render several cards from one round trip:

  • byStaff / byLocation: ranked descending, capped at limit

(default 6, clamped to [1, 20]). A registration on a session with multiple staff is counted once per staff member.

  • byWeekday: seven buckets keyed mondaysunday, zero-filled and

always in that order.

  • byTimeOfDay: three buckets keyed morning (before 12:00),

afternoon (12:00–16:59), and evening (17:00+), zero-filled.

  • attendance: check-in totals across confirmed registrations on

sessions that have already started, so the no-show rate is meaningful.

start and end are YYYY-MM-DD strings; end >= start; window span is capped server-side at 120 days.

Arguments (4)

Teams for this business. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is name ASC, id ASC.

Arguments (2)
firstInt= 50
afterString

Products sold by this business — passes, memberships, gift cards, and physical products in a single mixed list. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is products.createdAt DESC, products.id ASC so newly-created products surface first regardless of subtype.

filter.query matches the product's display name across all subtype tables (case-insensitive). filter.types restricts the result to one or more product subtypes — pass null or omit for the union.

By default the list only contains products available to the current viewer — intro offers drop out once the viewer has purchased from this business — so shopper-facing surfaces can't surface offers the viewer isn't allowed to buy. Management surfaces pass availability: all.

Arguments (4)
firstInt= 50
afterString
availabilityProductAvailability!= "available"

Discount codes a customer can type at checkout. Includes archived codes for redemption-history audit; filter by archivedAt: null to show only the active set in admin UI. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC.

Arguments (2)
firstInt= 50
afterString
marketingSegmentsMarketingSegmentConnection!

Saved marketing segments — named, consent-aware participant filters used to target broadcasts and journeys. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC.

Arguments (2)
firstInt= 50
afterString

One-off marketing broadcasts (email campaigns) to a segment. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC.

Arguments (2)
firstInt= 50
afterString

Marketing automations (journeys) this business has set up. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC.

Arguments (2)
firstInt= 50
afterString
webhookEndpointsWebhookEndpointConnection!

Outbound webhook endpoints registered for this business. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC.

Arguments (2)
firstInt= 50
afterString

Partner Business API keys minted for this business. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC. The secret is never returned here — only at creation.

Arguments (2)
firstInt= 50
afterString

Challenges this business has set up. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC.

Arguments (2)
firstInt= 50
afterString

Physical locations this business uses to host activities. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is name ASC, id ASC.

Arguments (2)
firstInt= 50
afterString

All participants associated with this business — created when an admin adds someone or when a user signs up for an activity. Cursor-paginated; default page size is 50, clamped to [1, 100]. Sort defaults to latest confirmed session activity first (lastActivityAt DESC, id ASC). Passing filter.query searches the name and email columns.

Arguments (4)

Historical payments processed for this business — every payments row backing a registration, pass purchase, membership renewal, etc. Cursor-paginated; default page size 50, clamped to [1, 100]. Sort order is createdAt DESC, id ASC so the most recent transactions surface first.

filter.query is a case-insensitive substring match against the participant's name, email, and the Stripe payment intent / customer ids. filter.statuses / filter.types narrow to a set of PaymentStatus / PaymentType values. filter.start / filter.end filter on createdAt using a YYYY-MM-DD boundary (inclusive). All filters AND together.

Arguments (3)
firstInt= 50
afterString

Stripe Connect integration state for this business.

Sessions platform subscription for this business. Null only for legacy businesses that have not been migrated into platform billing yet.

Brand configuration including icon and computed theming tokens.

brandPreviewTokenString

Short-lived embed Bearer token the brand editor's live preview passes to <sessions-schedule auth="…">, so the preview renders the viewer's own sessions — including for a private business that the public, unauthenticated embed would otherwise show as empty. Null when there is no signed-in viewer. The token only ever grants what the viewer can already access, so it is not an escalation; it expires after one hour.

Channel configuration: surfaces through which a business's customers can reach it. Sensitive fields (e.g. embed origins) are gated to staff.

emailMarketingBusinessEmailMarketing!

Email-marketing consent collection settings. Off by default; governs whether the standardized opt-in is presented on registration and checkout.

viewerEmailMarketingConsentEmailMarketingConsentStatus

The signed-in viewer's own marketing-consent status with this business, or null when they are signed out, have no participant record, or were never asked. Lets the registration / checkout opt-in hide itself once the viewer has already subscribed. Only ever the viewer's own status — never another participant's.

Customer-facing contact details surfaced in transactional emails and on the business's public surfaces. Email falls back to the owner's email when not explicitly set.

Localization configuration. Anchors all calendar-relevant rendering (schedule strip, week boundaries, session times, registration close-time math, exports, calendar feeds) to a canonical timezone so SSR HTML and client first paint agree regardless of the visitor's browser timezone.

Sales-tax collection configuration. Always non-null; the inner enabled flag is the master toggle. When disabled, no tax is computed at checkout and existing flows are unchanged.

cancellationPolicyBusinessCancellationPolicy!

Default cancellation policy applied to registrations across the business. Activities can override individual fields. Always non-null; when no row is configured the API returns the platform defaults (no cutoff, 100% refund in window, 0% out of window).

Customer-facing legal and operational policies for this business. Each policy falls back to a Sessions-hosted default until the business configures either an external URL or hosted Markdown content.

isOnboardingBoolean!

Whether this business is still in its initial onboarding state — it has no activities and no participants yet. Drives the home page's getting- started view. Also carried in cross-business navigation snapshots so an in-app hop into a brand-new business can paint the onboarding skeleton on the first frame instead of flashing the full dashboard skeleton. Must stay in agreement with the home query's client-side onboarding test (activities.totalCount == 0 && participants.totalCount == 0).

guestCheckoutEnabledBoolean!

Whether visitors can pay for activity registrations and product purchases (other than passes/memberships) without signing in. Passes and memberships always require an account regardless of this flag.

hasDiscountsBoolean!

Whether this business has any active discount codes a customer could redeem at checkout. Used by public checkout UIs to suppress the "Add discount" action for businesses that have none. Does not leak which codes exist — callers still have to type a code and submit it.

hasGiftCardsBoolean!

Whether this business sells at least one gift card product that a customer could buy. Used by public checkout UIs to suppress the "Add gift card" action for businesses that do not run gift cards. Does not leak which products exist or whether any redeemable balances are in circulation.

hasPassesBoolean!

Whether this business has at least one visible (purchasable) pass. Used by the public business pages to decide whether to surface the products tab and the account "passes" section without paying for the full products query up front. Hidden and soft-deleted passes do not count.

hasMembershipsBoolean!

Whether this business has at least one visible (purchasable) membership. Used by the public business pages to decide whether to surface the products tab and the account "passes" section. Hidden and soft-deleted memberships do not count.

hasPhysicalProductsBoolean!

Whether this business has at least one visible (purchasable) physical product. Used by the public business pages to decide whether to surface the products tab. Hidden and soft-deleted products do not count.

structures[ActivityStructure!]!

Activity structures (class, league, etc.) the owner indicated this business runs. Captured at creation; drives home-page tailoring and defaults. Empty list means no preference.

activityTypes[ActivityType!]!

Activity types (sports/disciplines) the owner indicated this business offers. Captured at creation; drives home-page tailoring and defaults. Empty list means no preference.

amenities[BusinessAmenity!]!

Practical / facility-level amenities the business offers (parking, accessibility, washrooms, on-site services, etc.). Rendered as a summary section on the public business page; empty list means none declared. Order is significant — clients display in the order the business saved them.

highlights[BusinessHighlight!]!

Values-based "highlight" attributes a business advertises about itself (women-owned, locally-owned, sliding-scale, beginner-friendly, etc.). Surfaced prominently on the public business page and used by the public discovery surface to power buyer-preference filters. Empty list means none declared.

createdAtDateTime!
calendarCalendarUrl!

Quick contextual search across this business's resources, used by the Cmd-K Go menu. Returns a small top-N list per resource type so the menu can surface a mixed result set in one round-trip. Each category is capped at first (default 5, max 10); matches are case-insensitive substring matches on the resource's primary text columns (e.g. name, email).

Arguments (2)
queryString!
firstInt= 5

Public-safe counterpart to search, used by the Cmd-K Go menu on the business's public /@<handle> pages. Returns only resources the public schema is allowed to surface (activities with public visibility, staff, locations, products with visible visibility); participants are intentionally omitted. Each category is capped at first (default 5, max 10); matches are case-insensitive substring matches on the resource's primary text columns.

Arguments (2)
queryString!
firstInt= 5
myRegistrationsOnDate[ActivityRegistration!]!

Returns the viewer's confirmed activity registrations at this business whose session falls on date (a YYYY-MM-DD calendar date in the business's timezone). Includes both attendee registrations (one of the viewer's participant rows) and booker registrations (guest bookings the viewer paid for). Returns an empty list when the viewer is unauthenticated or has no registrations on that date. Used by the Cmd-K Go menu on public pages to surface "Your reservations on May 8th" when the typed query parses as a date.

Arguments (1)
dateString!

Reviews about this business, newest first. Cursor-paginated; default page size 20, clamped to [1, 50]. Reviews removed by platform moderation are excluded; flagged reviews stay included (they remain visible while under review).

Arguments (2)
firstInt= 20
afterString
reviewSummaryReviewSummary!

Aggregate rating summary across this business's visible reviews.

viewerReviewReview

The signed-in viewer's own review of this business, or null when the viewer is unauthenticated or hasn't reviewed it. Drives the "Write a review" vs "Edit your review" affordance.

viewerCanReviewBoolean!

Whether the signed-in viewer may leave a (new) review for this business — true when they have a confirmed registration for one of its sessions and have not already reviewed it. Always false for unauthenticated viewers.

Used in

Business