vivenu subscription-cycles API
The subscription-cycles API from vivenu — 4 operation(s) for subscription-cycles.
The subscription-cycles API from vivenu — 4 operation(s) for subscription-cycles.
openapi: 3.0.3
info:
title: vivenu access-lists subscription-cycles API
description: vivenu API Documentation
version: 1.0.0
contact:
name: vivenu GmbH
url: https://vivenu.com
servers:
- url: https://vivenu.com
description: Production API
- url: https://vivenu.dev
description: Staging API
tags:
- name: subscription-cycles
paths:
/api/subscriptions/cycles:
get:
security:
- jwt: []
- apikey: []
parameters:
- name: top
required: false
schema:
type: number
format: float
description: A limit on the number of objects to be returned. Can range between 1 and 1000.
default: 25
metas: {}
in: query
style: form
explode: true
- name: skip
required: false
schema:
type: number
format: float
description: The number of objects to skip for the requested result
metas: {}
in: query
style: form
explode: true
- name: name
required: false
schema:
type: string
description: The name to filter for
metas: {}
in: query
style: form
explode: true
- name: planId
required: false
schema:
type: string
description: The plan ID to filter for
metas: {}
in: query
style: form
explode: true
- name: planVariantIds
required: false
schema:
type: array
items:
type: string
metas: {}
description: An array of plan variant IDs to filter for
metas: {}
in: query
style: form
explode: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GET_Subscription-cycles_GetAllSubscriptionCycles_200_response'
'400':
description: Bad Request
'401':
description: Unauthorized
tags:
- subscription-cycles
description: Get all Subscription Cycles
operationId: get_all_subscription_cycles
post:
security:
- jwt: []
- apikey: []
parameters: []
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/POST_Subscription-cycles_CreateASubscriptionCycle_201_response'
'400':
description: Bad Request
'401':
description: Unauthorized
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/POST_Subscription-cycles_CreateASubscriptionCycle'
tags:
- subscription-cycles
description: Create a Subscription Cycle
operationId: create_a_subscription_cycle
/api/subscriptions/cycles/{id}:
get:
security:
- jwt: []
- apikey: []
parameters:
- name: id
required: true
schema:
type: string
metas: {}
in: path
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GET_Subscription-cycles_GetASubscriptionCycle_200_response'
'400':
description: Bad Request
'401':
description: Unauthorized
'404':
description: Not Found
tags:
- subscription-cycles
description: Get a Subscription Cycle
operationId: get_a_subscription_cycle
put:
security:
- jwt: []
- apikey: []
parameters:
- name: id
schema:
type: string
required: true
in: path
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PUT_Subscription-cycles_UpdateASubscriptionCycle_200_response'
'400':
description: Bad Request
'401':
description: Unauthorized
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PUT_Subscription-cycles_UpdateASubscriptionCycle'
tags:
- subscription-cycles
description: Update a Subscription Cycle
operationId: update_a_subscription_cycle
/api/subscriptions/cycles/{id}/active:
post:
security:
- jwt: []
- apikey: []
parameters:
- name: id
schema:
type: string
required: true
in: path
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/POST_Subscription-cycles_ActivateASubscriptionCycle_200_response'
'401':
description: Unauthorized
tags:
- subscription-cycles
description: Activate a Subscription Cycle
operationId: activate_a_subscription_cycle
/api/subscriptions/cycles/{id}/retry:
post:
security:
- jwt: []
- apikey: []
parameters:
- name: id
schema:
type: string
required: true
in: path
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/POST_Subscription-cycles_RetryASubscriptionCyclesFailedActions_200_response'
'401':
description: Unauthorized
tags:
- subscription-cycles
description: Retry a Subscription Cycles failed actions
operationId: retry_a_subscription_cycles_failed_actions
components:
schemas:
GET_Subscription-cycles_GetAllSubscriptionCycles_200_response:
type: object
properties:
docs:
type: array
items:
type: object
properties:
_id:
type: string
description: The ID of the subscription cycle
name:
type: string
description: The name of the subscription cycle
status:
type: string
enum:
- DRAFT
- SCHEDULED
- ACTIVE
- COMPLETED
description: The status of the subscription cycle
default: DRAFT
action:
type: string
enum:
- extension
- renewal
- status-change
description: The action of the subscription cycle
planId:
type: string
description: The ID of the plan of the subscription cycle
planVariantIds:
type: array
items:
type: string
description: The ID of the plan variant of the subscription cycle
eventId:
type: string
description: The ID of the event of the subscription cycle
billing:
type: object
properties: {}
nullable: true
description: The billing of the subscription cycle
statusChange:
type: object
properties:
type:
type: string
enum:
- draft-to-active
- draft-to-canceled
description: The type of the status change
description: The status change settings of the subscription cycle
extension:
type: object
properties:
type:
type: string
enum:
- purchaseIntent
- freeticket
- transaction
description: The type of the extension
baseEventId:
type: string
description: The Base Event Id from which the mapping of the extension starts
targetEventId:
type: string
description: The Target Event Id to which the mapping of the extension goes
ticketTypeMapping:
type: object
description: A mapping of the ticketTypes from the base event to the target event in key/value format where the key is the ticket type ID of a base event and the value is the ticket type ID of the target event
keepSameBarcodes:
type: boolean
description: Whether to keep the same barcode between base ticket and target ticket or not
issueTickets:
type: boolean
description: Whether the tickets should be issued or not on extension
description: The extension settings of the subscription cycle
renewal:
type: object
properties:
type:
type: string
enum:
- purchaseIntent
- subscription
description: The type of the renewal
status:
type: string
description: The status of the renewal
baseEventId:
type: string
description: The Base Event Id from which the mapping of the renewal starts
targetEventId:
type: string
description: The Target Event Id to which the mapping of the renewal goes
ticketTypeMapping:
type: object
description: A mapping of the ticketTypes from the base event to the target event in key/value format where the key is the ticket type ID of a base event and the value is the ticket type ID of the target event
keepSameBarcodes:
type: boolean
description: Whether to keep the same barcode between base ticket and target ticket or not
targetSubscriptionPlanId:
type: string
description: The target subscription plan ID to which the mapping of the renewal goes
subscriptionPlanVariantMapping:
type: object
description: A mapping of the subscription plan variants from the base event to the target event in key/value format where the key is the subscription plan variant ID of a base event and the value is the subscription plan variant ID of the target event
description: The renewal settings of the subscription cycle
sellerId:
type: string
description: The ID of the seller of the subscription cycle
createdAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
updatedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
startedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
finishedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
subscriptionsAffected:
type: number
format: float
description: Amount of affected subscription after cycle applied
deliverySettings:
type: object
properties:
notifyCustomer:
type: boolean
description: Whether the customer should be notified or not on cycle apply
description: The delivery settings of the subscription cycle
default:
notifyCustomer: true
failedActions:
type: array
items:
type: object
properties:
subscriptionId:
type: string
description: The subscription ID which failed in the subscription cycle action
error:
type: string
description: The error message why the subscription failed in the subscription cycle action
required:
- subscriptionId
description: An array of subscriptions which failed during subscription cycle action and related error
subscriptionFilter:
type: object
description: The subscription filters to apply to the subscriptions in the cycle. This is used to filter subscriptions that should be affected by the cycle
required:
- _id
- name
- status
- action
- planId
- planVariantIds
- eventId
- sellerId
- createdAt
- updatedAt
total:
type: integer
POST_Subscription-cycles_ActivateASubscriptionCycle_200_response:
type: object
properties:
_id:
type: string
description: The ID of the subscription cycle
name:
type: string
description: The name of the subscription cycle
status:
type: string
enum:
- DRAFT
- SCHEDULED
- ACTIVE
- COMPLETED
description: The status of the subscription cycle
default: DRAFT
action:
type: string
enum:
- extension
- renewal
- status-change
description: The action of the subscription cycle
planId:
type: string
description: The ID of the plan of the subscription cycle
planVariantIds:
type: array
items:
type: string
description: The ID of the plan variant of the subscription cycle
eventId:
type: string
description: The ID of the event of the subscription cycle
billing:
type: object
properties: {}
nullable: true
description: The billing of the subscription cycle
statusChange:
type: object
properties:
type:
type: string
enum:
- draft-to-active
- draft-to-canceled
description: The type of the status change
description: The status change settings of the subscription cycle
extension:
type: object
properties:
type:
type: string
enum:
- purchaseIntent
- freeticket
- transaction
description: The type of the extension
baseEventId:
type: string
description: The Base Event Id from which the mapping of the extension starts
targetEventId:
type: string
description: The Target Event Id to which the mapping of the extension goes
ticketTypeMapping:
type: object
description: A mapping of the ticketTypes from the base event to the target event in key/value format where the key is the ticket type ID of a base event and the value is the ticket type ID of the target event
keepSameBarcodes:
type: boolean
description: Whether to keep the same barcode between base ticket and target ticket or not
issueTickets:
type: boolean
description: Whether the tickets should be issued or not on extension
description: The extension settings of the subscription cycle
renewal:
type: object
properties:
type:
type: string
enum:
- purchaseIntent
- subscription
description: The type of the renewal
status:
type: string
description: The status of the renewal
baseEventId:
type: string
description: The Base Event Id from which the mapping of the renewal starts
targetEventId:
type: string
description: The Target Event Id to which the mapping of the renewal goes
ticketTypeMapping:
type: object
description: A mapping of the ticketTypes from the base event to the target event in key/value format where the key is the ticket type ID of a base event and the value is the ticket type ID of the target event
keepSameBarcodes:
type: boolean
description: Whether to keep the same barcode between base ticket and target ticket or not
targetSubscriptionPlanId:
type: string
description: The target subscription plan ID to which the mapping of the renewal goes
subscriptionPlanVariantMapping:
type: object
description: A mapping of the subscription plan variants from the base event to the target event in key/value format where the key is the subscription plan variant ID of a base event and the value is the subscription plan variant ID of the target event
description: The renewal settings of the subscription cycle
sellerId:
type: string
description: The ID of the seller of the subscription cycle
createdAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
updatedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
startedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
finishedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
subscriptionsAffected:
type: number
format: float
description: Amount of affected subscription after cycle applied
deliverySettings:
type: object
properties:
notifyCustomer:
type: boolean
description: Whether the customer should be notified or not on cycle apply
description: The delivery settings of the subscription cycle
default:
notifyCustomer: true
failedActions:
type: array
items:
type: object
properties:
subscriptionId:
type: string
description: The subscription ID which failed in the subscription cycle action
error:
type: string
description: The error message why the subscription failed in the subscription cycle action
required:
- subscriptionId
description: An array of subscriptions which failed during subscription cycle action and related error
subscriptionFilter:
type: object
description: The subscription filters to apply to the subscriptions in the cycle. This is used to filter subscriptions that should be affected by the cycle
required:
- _id
- name
- status
- action
- planId
- planVariantIds
- eventId
- sellerId
- createdAt
- updatedAt
GET_Subscription-cycles_GetASubscriptionCycle_200_response:
type: object
properties:
_id:
type: string
description: The ID of the subscription cycle
name:
type: string
description: The name of the subscription cycle
status:
type: string
enum:
- DRAFT
- SCHEDULED
- ACTIVE
- COMPLETED
description: The status of the subscription cycle
default: DRAFT
action:
type: string
enum:
- extension
- renewal
- status-change
description: The action of the subscription cycle
planId:
type: string
description: The ID of the plan of the subscription cycle
planVariantIds:
type: array
items:
type: string
description: The ID of the plan variant of the subscription cycle
eventId:
type: string
description: The ID of the event of the subscription cycle
billing:
type: object
properties: {}
nullable: true
description: The billing of the subscription cycle
statusChange:
type: object
properties:
type:
type: string
enum:
- draft-to-active
- draft-to-canceled
description: The type of the status change
description: The status change settings of the subscription cycle
extension:
type: object
properties:
type:
type: string
enum:
- purchaseIntent
- freeticket
- transaction
description: The type of the extension
baseEventId:
type: string
description: The Base Event Id from which the mapping of the extension starts
targetEventId:
type: string
description: The Target Event Id to which the mapping of the extension goes
ticketTypeMapping:
type: object
description: A mapping of the ticketTypes from the base event to the target event in key/value format where the key is the ticket type ID of a base event and the value is the ticket type ID of the target event
keepSameBarcodes:
type: boolean
description: Whether to keep the same barcode between base ticket and target ticket or not
issueTickets:
type: boolean
description: Whether the tickets should be issued or not on extension
description: The extension settings of the subscription cycle
renewal:
type: object
properties:
type:
type: string
enum:
- purchaseIntent
- subscription
description: The type of the renewal
status:
type: string
description: The status of the renewal
baseEventId:
type: string
description: The Base Event Id from which the mapping of the renewal starts
targetEventId:
type: string
description: The Target Event Id to which the mapping of the renewal goes
ticketTypeMapping:
type: object
description: A mapping of the ticketTypes from the base event to the target event in key/value format where the key is the ticket type ID of a base event and the value is the ticket type ID of the target event
keepSameBarcodes:
type: boolean
description: Whether to keep the same barcode between base ticket and target ticket or not
targetSubscriptionPlanId:
type: string
description: The target subscription plan ID to which the mapping of the renewal goes
subscriptionPlanVariantMapping:
type: object
description: A mapping of the subscription plan variants from the base event to the target event in key/value format where the key is the subscription plan variant ID of a base event and the value is the subscription plan variant ID of the target event
description: The renewal settings of the subscription cycle
sellerId:
type: string
description: The ID of the seller of the subscription cycle
createdAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
updatedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
startedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
finishedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
subscriptionsAffected:
type: number
format: float
description: Amount of affected subscription after cycle applied
deliverySettings:
type: object
properties:
notifyCustomer:
type: boolean
description: Whether the customer should be notified or not on cycle apply
description: The delivery settings of the subscription cycle
default:
notifyCustomer: true
failedActions:
type: array
items:
type: object
properties:
subscriptionId:
type: string
description: The subscription ID which failed in the subscription cycle action
error:
type: string
description: The error message why the subscription failed in the subscription cycle action
required:
- subscriptionId
description: An array of subscriptions which failed during subscription cycle action and related error
subscriptionFilter:
type: object
description: The subscription filters to apply to the subscriptions in the cycle. This is used to filter subscriptions that should be affected by the cycle
required:
- _id
- name
- status
- action
- planId
- planVariantIds
- eventId
- sellerId
- createdAt
- updatedAt
PUT_Subscription-cycles_UpdateASubscriptionCycle_200_response:
type: object
properties:
_id:
type: string
description: The ID of the subscription cycle
name:
type: string
description: The name of the subscription cycle
status:
type: string
enum:
- DRAFT
- SCHEDULED
- ACTIVE
- COMPLETED
description: The status of the subscription cycle
default: DRAFT
action:
type: string
enum:
- extension
- renewal
- status-change
description: The action of the subscription cycle
planId:
type: string
description: The ID of the plan of the subscription cycle
planVariantIds:
type: array
items:
type: string
description: The ID of the plan variant of the subscription cycle
eventId:
type: string
description: The ID of the event of the subscription cycle
billing:
type: object
properties: {}
nullable: true
description: The billing of the subscription cycle
statusChange:
type: object
properties:
type:
type: string
enum:
- draft-to-active
- draft-to-canceled
description: The type of the status change
description: The status change settings of the subscription cycle
extension:
type: object
properties:
type:
type: string
enum:
- purchaseIntent
- freeticket
- transaction
description: The type of the extension
baseEventId:
type: string
description: The Base Event Id from which the mapping of the extension starts
targetEventId:
type: string
description: The Target Event Id to which the mapping of the extension goes
ticketTypeMapping:
type: object
description: A mapping of the ticketTypes from the base event to the target event in key/value format where the key is the ticket type ID of a base event and the value is the ticket type ID of the target event
keepSameBarcodes:
type: boolean
description: Whether to keep the same barcode between base ticket and target ticket or not
issueTickets:
type: boolean
description: Whether the tickets should be issued or not on extension
description: The extension settings of the subscription cycle
renewal:
type: object
properties:
type:
type: string
enum:
- purchaseIntent
- subscription
description: The type of the renewal
status:
type: string
description: The status of the renewal
baseEventId:
type: string
description: The Base Event Id from which the mapping of the renewal starts
targetEventId:
type: string
description: The Target Event Id to which the mapping of the renewal goes
ticketTypeMapping:
type: object
description: A mapping of the ticketTypes from the base event to the target event in key/value format where the key is the ticket type ID of a base event and the value is the ticket type ID of the target event
keepSameBarcodes:
type: boolean
description: Whether to keep the same barcode between base ticket and target ticket or not
targetSubscriptionPlanId:
type: string
description: The target subscription plan ID to which the mapping of the renewal goes
subscriptionPlanVariantMapping:
type: object
description: A mapping of the subscription plan variants from the base event to the target event in key/value format where the key is the subscription plan variant ID of a base event and the value is the subscription plan variant ID of the target event
description: The renewal settings of the subscription cycle
sellerId:
type: string
description: The ID of the seller of the subscription cycle
createdAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
updatedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
startedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
finishedAt:
type: string
format: date-time
description: An ISO timestamp indicating when the cycle was created
subscriptionsAffected:
type: number
format: float
description: Amount of affected subscription after cycle applied
deliverySettings:
type: object
properties:
notifyCustomer:
type: boolean
description: Whether the customer should be notified or not on cycle apply
description: The delivery settings of the subscription cycle
default:
notifyCustomer: true
failedActions:
type: array
items:
type: object
properties:
subscriptionId:
type: string
description: The subscription ID which failed in the subscription cycle action
error:
type: string
description: The error message w
# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vivenu/refs/heads/main/openapi/vivenu-subscription-cycles-api-openapi.yml