Subscriptions API
Service catalog browsing and assigning a service to a group.
Behavior summary
Subscription routes expose active services and bind one selected service to a group.
Endpoints
Returns all active SubscriptionService entries.
Success
- Status:
200 - Array fields commonly include:
id,name,providermonthlyPriceCents,currencymaxUsers,category,isActive
Returns detail for one service plus per-member cost projections.
Derived values
Per-member projection should use rounded-up split math.
Math.ceil(monthlyPriceCents / memberCount)
Typical output shape
- Service metadata
- Price projections for group sizes 2 through 6
Failure cases
404 NOT_FOUND
Assigns a service to a group.
Body
{
"serviceId": "clx..."
}
Validation
serviceId: CUID string
Failure cases
401 UNAUTHORIZED403 FORBIDDEN(non-admin or non-member)404 NOT_FOUND(group or service)409 CONFLICTif assignment violates current state
Notes
- The current release models one selected service per group.
GroupSubscription.groupIduniqueness enforces that invariant.