Skip to main content
GET
Memberships report for a period

Authorizations

Authorization
string
header
required

Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.

Headers

X-1Club-Chart-Image
enum<string>

Send png to have each picture carry its PNG (png, base64, at 2x) beside the SVG, for a client that shows images but does not draw SVG.

Available options:
png

Query Parameters

from
string<date>
required

First day of the period (YYYY-MM-DD), on the organization's own clock.

to
string<date>
required

Last day of the period, inclusive.

clubId
integer

Only the memberships held at this club: its own and the organization-wide ones, which hold at every club.

compare
enum<string>
default:previous_period

What to compare the period with.

Available options:
previous_period,
previous_year,
none
granularity
enum<string>

How trend buckets the period. Chosen from the period's length when omitted.

Available options:
day,
week,
month
topPlans
integer
default:10

How many plans byPlan lists.

Required range: 1 <= x <= 50
charts
enum<string>
default:none

Whether the answer carries pictures, as chart (and moreCharts) beside its figures - none (the default), the one chart of the answer, or every one. Opt-in, so a caller that never draws one pays nothing for it; the figures are the same either way.

Available options:
none,
summary,
all

Response

The report

period
object
chart
object

A picture of the answer, drawn from its own figures (never a second computation) in the caller's language: a member of staff's own when they chose one, otherwise the organization's. Present only when the request asks with charts=summary or charts=all (the default is none), and when the answer has something to draw. Every figure it shows is in alt and in the answer itself.

moreCharts
object[]

With charts=all: every other picture the answer can draw, after chart.

timezone
string

The clock the days are read on: the organization's timezone, as on the admin analytics dashboards.

totals
object
byKind
object[]

Memberships (recurring), Passes and Drop-Ins apart.

byPlan
object[]

The plans that moved most - added plus cancelled - largest first.

comparison
object | null
trend
object