Skip to content
activeBusinessQuery
activeBusinessBusinessany key

The business currently active for the authenticated user, determined by the active_business cookie. Falls back to the user's first business and sets the cookie as a side-effect. Returns null if the user has no businesses.

Try it

Read your business and its participants
activeBusiness resolves to the business your key (or session) is scoped to. From there you can page through participants and their registrations and purchases.
Query
query ActiveBusiness($first: Int) {
  activeBusiness {
    id
    name
    participants(first: $first) {
      nodes {
        id
        name
        email
        emailMarketingConsent {
          status
          at
        }
      }
      pageInfo {
        hasNextPage
        endCursor
      }
    }
  }
}
Variables
{
  "first": 25
}
POST https://business.sessions.website/@ottawa-volleyball/api/graphql

← Back to the reference

activeBusiness