Subscriptions API
Subscriptions are membership tiers available for purchase by users. They are priced in EUR and can have monthly or yearly durations. Managing subscription tiers (creating, updating, deleting) requires elevated permissions; listing and purchasing is available to all authenticated users.
List Subscriptions
Get all available subscription tiers.
Endpoint: GET /subscriptions
Headers:
X-F-Authorization: Client token (required)X-F-Authentication: User token (required)
Response:
[
{
"id": "subscription-uuid",
"name": "Pro",
"description": "Full access to all festival management features.",
"price": 99.00,
"duration": 1,
"duration_type": "month",
"createdAt": "2025-01-01T00:00:00Z"
}
]
| Field | Type | Description |
|---|---|---|
id | UUID | Unique subscription ID |
name | string | Tier name |
description | string | Tier description |
price | decimal | Price in EUR |
duration | integer | Numeric duration (e.g. 1, 12) |
duration_type | string | "month" or "year" |
Get Subscription
Endpoint: GET /subscriptions/:id
Headers:
X-F-Authorization: Client token (required)X-F-Authentication: User token (required)
Response: Returns the subscription object.
Create Subscription
Requires the manage_subscriptions client scope and the create_subscriptions user permission.
Endpoint: POST /subscriptions
Headers:
X-F-Authorization: Client token (withmanage_subscriptionsscope, required)X-F-Authentication: User token (withcreate_subscriptionspermission, required)
Request Body:
{
"name": "Pro",
"description": "Full access to all festival management features.",
"price": 99.00,
"duration": 1,
"duration_type": "month"
}
Response: Returns the created subscription object.
Update Subscription
Endpoint: PUT /subscriptions/:id
Headers: Same elevated requirements as Create.
Request Body: Any subset of the subscription fields.
Delete Subscription
Endpoint: DELETE /subscriptions/:id
Headers: Same elevated requirements as Create.
Response:
{ "message": "Subscription deleted successfully" }
Purchase a Subscription
To subscribe a user, use the Payments API with payment_type: "subscription" and entity_id set to the subscription ID.