Skip to content

Subscriptions

A Subscription is a commercial product configured by the selected club. A UserSubscription assigns one of those products to an athlete for a defined period and, optionally, a limited number of activities.

This guide covers the catalog. Continue with User subscriptions to list, create, update, or delete athlete assignments.

The public schema uses ClassSubscriptionId and ClassSubscriptionPlanId. Treat them as stable opaque IDs even though this guide uses the shorter public terms.

Open GET /Subscriptions in the API reference for the complete parameter and response schemas.

Start a forward traversal with fromId=1:

Terminal window
curl --request GET \
--url "https://api-gw.uptivo.fit/club/Subscriptions?fromId=1&count=500" \
--header "X-Sub-Key: <subscription-key>" \
--header "Authorization: Bearer <club-api-key>"

The response uses the standard pagination envelope. The default count is 100 and the maximum is 500. Repeat all parameters from the first request and pass the returned token unchanged:

GET /Subscriptions?fromId=1&count=500&cursor=<NextCursor>

Only count may change between pages. See Pagination and synchronization for the complete checkpointing strategy.

Each result describes one product owned by the selected club:

Property Meaning
ClassSubscriptionId Stable identifier of the catalog product.
Name, ShortDescription Product name and concise description.
LongDescription Optional extended description, included only when requested.
Type Other, Trial, or Membership.
PublishState Whether the product is published or unpublished.
MaxWeeklyBookings, MaxMonthlyBookings Booking limits configured on the product.
AutoAssign Whether Uptivo is configured to assign an eligible plan automatically. Do not reproduce this workflow in the client.
Plans Optional commercial plans associated with the product.

Catalog responses are deliberately compact. Add either expansion only when it is needed:

GET /Subscriptions?withLongDescription=true&withPlans=true
  • withLongDescription=true includes LongDescription;
  • withPlans=true includes Plans and their price, duration, and recurrence data.

When an expansion is omitted, its property can be absent from the JSON rather than present with null. Persist the core product independently from optional expanded fields so a compact response does not erase data collected by an earlier expanded request.

Use publishState=Published or publishState=Unpublished:

GET /Subscriptions?publishState=Published&withPlans=true

Published products are currently offered through Uptivo’s public product flows. Unpublished products remain part of the club configuration but are no longer publicly offered. Changing the publication state does not delete existing UserSubscriptions.

If no filter is supplied, the Club API returns both states and includes PublishState in each item. When publishState is supplied, the current response can omit PublishState; the requested filter is then the authoritative state for every returned item.

A product can expose multiple plans. A plan controls the commercial amount and can describe either a fixed-duration assignment or a recurring offer.

Property Meaning
ClassSubscriptionPlanId Stable plan identifier.
Amount Integer amount in the smallest unit of Currency.
Currency ISO currency code, such as eur.
UnitMultiplier Divisor used to convert Amount to the major currency unit.
DurationDays Duration of a non-recurring plan.
MaxActivities Activity allowance of a non-recurring plan; 0 means unlimited.
Interval None, Day, Month, or Year.
IntervalCount Number of interval units in one recurrence.
Iterations Number of recurrence iterations.

For example, Amount: 12000, Currency: "eur", and UnitMultiplier: 100 represent EUR 120.00. Do not assume that every currency uses the same multiplier.

For a fixed-duration plan, Interval is None; DurationDays carries the duration, while IntervalCount and Iterations are 0. For a recurring plan, Interval is Day, Month, or Year; recurrence is described by IntervalCount and Iterations, while DurationDays and MaxActivities are 0.

Catalog reads require Read or ReadWrite access. See Authentication for credential handling and User subscriptions for assigning a product to an athlete.