On this page

6 endpoints.

MethodPathSummary
GET/api/subscriptionsGet all subscriptions (Admin only)
POST/api/subscriptionsCreate a new subscription
GET/api/subscriptions/{tenantId}Get subscription details for a tenant
PUT/api/subscriptions/{tenantId}Update subscription plan
POST/api/subscriptions/{tenantId}/cancelCancel subscription
POST/api/subscriptions/{tenantId}/renewRenew subscription

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
pagequerynointeger—
limitquerynointeger—
statusquerynoenum: PENDING, TRIAL, ACTIVE, CANCELLED, EXPIRED—

Responses

StatusDescriptionBody
200List of subscriptions—

Auth: Bearer JWT required.

Request body (required) — application/json

Type: CreateSubscriptionRequest

Responses

StatusDescriptionBody
201Subscription created successfully—
400Validation error or tenant already has subscription—
404Tenant or plan not found—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tenantIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Subscription details—
404Subscription not found—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tenantIdpathyesstring (uuid)—

Request body (required) — application/json

FieldTypeRequiredDescription
planIdstring (uuid)yes—

Responses

StatusDescriptionBody
200Subscription updated successfully—
404Subscription or plan not found—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tenantIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Subscription cancelled successfully—
404Subscription not found—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tenantIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Subscription renewed successfully—
404Subscription not found—