User subscription suspensions
Suspension temporarily makes a UserSubscription inactive. Use the dedicated suspension operations for this workflow.
| Need | API reference |
|---|---|
| Start, schedule, or update a suspension | POST /UserSubscriptions/{userSubscriptionId}/Suspension |
| Cancel a scheduled suspension or reactivate immediately | DELETE /UserSubscriptions/{userSubscriptionId}/Suspension |
Suspend immediately
Section titled “Suspend immediately”Omit SuspensionStartDate to start at the current server time.
SuspensionEndDate is the last local calendar day included in the suspension:
curl --request POST \ --url https://api-gw.uptivo.fit/club/UserSubscriptions/600001/Suspension \ --header "Content-Type: application/json" \ --header "X-Sub-Key: <subscription-key>" \ --header "Authorization: Bearer <club-api-key>" \ --data '{ "SuspensionEndDate": "2030-10-15" }'The API converts SuspensionEndDate using the selected club’s time zone and
reactivates the membership at the beginning of the following local day. An
empty object starts an indefinite suspension:
{}Supplying today’s local date as SuspensionStartDate also starts the
suspension immediately; it does not backdate it to midnight.
Schedule a suspension
Section titled “Schedule a suspension”Supply both local calendar dates to schedule a future interval:
{ "SuspensionStartDate": "2030-11-01", "SuspensionEndDate": "2030-11-14"}SuspensionStartDate is the first suspended day and SuspensionEndDate is the
last, so this example covers 14 calendar days. The suspension becomes effective
at the beginning of 1 November in the club’s time zone and ends at the beginning
of 15 November. A future SuspensionStartDate always requires an end date. The
inclusive interval can contain from one through 365 calendar days.
Future suspensions are not supported for externally managed recurring UserSubscriptions. Start those suspensions when they become effective, or use the recurring-payment workflow agreed with Uptivo.
Update a suspension
Section titled “Update a suspension”Send the same POST operation again to change a scheduled interval or its end
date. Once a suspension is active, its start cannot be changed, but its end can
be added or updated.
A suspension must start inside the membership validity interval and cannot
overlap an existing class booking for that UserSubscription. A booking conflict
returns 409 Conflict:
{ "ErrorType": "SubscriptionInUse", "Message": "Subscription has bookings in the suspension period"}Interpret suspension state
Section titled “Interpret suspension state”The returned UserSubscription exposes the effective state explicitly:
| Property | Meaning |
|---|---|
SuspensionState |
None, Scheduled, or Active at the time the response is produced. |
IsSuspended |
true only while the suspension is active; it remains false while scheduled. |
SuspensionStartUTC |
Absolute start instant; it can be in the future for a scheduled suspension. |
ReactivationDate |
Absolute automatic reactivation instant, or null for an indefinite active suspension. |
SuspendedAtUTC |
Compatibility alias of SuspensionStartUTC; use SuspensionState to determine whether the suspension is active. |
Use SuspensionState for presentation and current-state decisions. Use the UTC
instants for synchronization or scheduling; do not infer club-local day
boundaries from them without the club’s time zone.
GET /UserSubscriptions/Active excludes the assignment only while the
suspension is active. An assignment with a scheduled suspension remains active
until the suspension starts; automatic reactivation includes it again from the
reactivation instant.
Cancel or reactivate
Section titled “Cancel or reactivate”Use the dedicated DELETE operation for both cases:
curl --request DELETE \ --url https://api-gw.uptivo.fit/club/UserSubscriptions/600001/Suspension \ --header "X-Sub-Key: <subscription-key>" \ --header "Authorization: Bearer <club-api-key>"For a scheduled suspension, this clears the schedule without changing To.
For an active suspension, it reactivates immediately and can move To forward
to preserve the time during which the membership was paused. Always persist
the returned representation and its final To value.
The operation is idempotent: if no suspension exists, it returns the current UserSubscription unchanged.
Both suspension operations require ReadWrite access. A missing or invalid
credential returns 401; an inactive license or insufficient permission
returns 403; an absent or out-of-scope UserSubscription returns 404.