Skip to main content

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"
}
]
FieldTypeDescription
idUUIDUnique subscription ID
namestringTier name
descriptionstringTier description
pricedecimalPrice in EUR
durationintegerNumeric duration (e.g. 1, 12)
duration_typestring"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 (with manage_subscriptions scope, required)
  • X-F-Authentication: User token (with create_subscriptions permission, 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.