Skip to content

Count event attendees

Counts an event's attendees: going, canceled by reason, going by tier, and the spots its capacity leaves.

Needs the customer:read scope.

Call

  • Tool: event_attendee_stats
  • Scope: customer:read
  • Reads only.
  • Acts on a store.

Arguments

Name Type Required Description
store string No The store to act on.
product object Yes
{
  "type": "object",
  "properties": {
    "store": {
      "type": "string",
      "description": "The store to act on."
    },
    "product": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "slug": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          "required": [
            "slug"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "product"
  ],
  "additionalProperties": false
}

Answer

Name Type Required Description
going number Yes
pending number Yes Who waits for the seller’s approval.
waitlisted number Yes Who waits on the waitlist for a seat.
canceled number Yes
canceled_by_reason object Yes
going_by_tier array of object Yes Who is going per tier, highest first; a null tier is access with no tier.
checked_in_by_session array of object Yes How many were let in at each session that let anyone in.
capacity number or null Yes The event’s own capacity; null when it sets none, or stores one no write could make.
remaining number or null Yes The seats left to sell, as checkout counts them (a grant takes none), held to each ticket type’s capacity too; null unless the event is capped, or at least one ticket type is on sale and every one is; none once it is canceled.
held_by_requests integer Yes Of the seats taken, those requests waiting for approval hold.
subscriptions integer Yes Subscriptions to the event still running, which a cancellation stops billing.

The answer’s full shape is on its API reference page.

Errors

A refused call is a tool error. Its structuredContent holds a code and its context, except for client-fault. This tool may answer:

  • invalid: an argument is malformed; context.path names it.
  • invalid at ["store"]: store is missing while the connection reaches more than one store, or names a store it doesn’t reach.
  • not_found: nothing matches a reference given.
  • not_permitted: this connection may not make this call. When context.reason is limit, too many calls: retry_after says when to try again.
  • internal or unavailable: the call failed inside Sherpo. A read marked transient may be retried.
  • client-fault: the server failed around the call. reached_core says whether it reached Sherpo; the call may be made again.
  • HTTP 403 with insufficient_scope: the connection lacks the scope this tool needs.
  • HTTP 401 with invalid_token: the access token expired or the connection ended. Refresh the token, and connect again if the refresh fails or the new token is refused too.

Any other code may come back too, such as a conflict when the state changed under the call. When the answer was already streaming, a 401 or 403 comes back as a tool error with only its text. See Errors for every code and its context.

Type to search…

↑↓ navigate↵ selectEsc close