Skip to main content
GET
Revenue 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 clock.

to
string<date>
required

Last day of the period, inclusive.

clubId
integer

Only the revenue of this club - its bookings, plans, check-ins and the sales rung up there.

billingEntityId
integer

Only the revenue of this selling company, for an organization that trades through more than one.

revenueAccountId
integer

Only the revenue filed to this account, e.g. coach time on a separate line from court hire. A sale stored with no account counts as the default account.

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
topItems
integer
default:10

How many items topItems 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 revenue 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.

currency
string
totals
object
comparison
object | null
byStream
object[]
byClub
object[]

Absent when the report is narrowed to one club.

byAccount
object[]

Which revenue account the money was filed to; a sale stored with no account counts as the default account. Absent when the report is narrowed to one account.

byPaymentMethod
object[]

What collected the money. A sale paid by several methods counts under the one that paid most; 'Unattributed' is collected with no real-money payment behind it.

topItems
object[]

What sold most: a class or court, a plan, a product.

trend
object
movers
object[]

The streams, clubs and items whose revenue moved most against the comparison period, largest move first. Empty without a comparison.