Subscription
Manage subscriptions, which represent service plans and billing for customers.
You can create, update, delete, and search for subscriptions with advanced filtering and pagination.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Operations
Section titled “Operations” POST /v2/subscription/index
Returns a paginated and filterable list of subscriptions.
Use POST to allow complex filters via JSON payload.
Request Body
Section titled “Request Body ”Parameters for searching subscriptions
object
object
The unique identifier for the subscription.
The timestamp when the subscription was created.
The timestamp when the subscription started.
The timestamp when the subscription was activated.
The timestamp when the subscription was cancelled.
The timestamp when the subscription was deleted.
The start timestamp of the current subscription term.
The end timestamp of the current subscription term.
The timestamp when the next billing cycle starts.
The current status of the subscription (e.g., active, cancelled).
The identifier of the subscription plan.
The timestamp when the trial period starts.
The timestamp when the trial period ends.
The reason for the subscription cancellation, if provided.
The unique identifier of the subscription in the external system (e.g., CB).
The unique identifier of the customer in the external system (e.g., CB).
The number of people associated with the subscription.
The number of projects associated with the subscription.
The quantity of the plan purchased by the customer.
The currency code used for subscription payments.
A flag indicating whether the subscription is locked (1 for locked, 0 for unlocked).
The method used for invoicing (e.g., monthly, yearly).
The field of the model to sort the list for, use a minus to revert the sort. Es -name is to require the sort in reverse order
The field establishes whether to also include historized elements that are no longer active in the results. If you leave this parameter empty the response returns only actual entries.
Example
{ "filter": { "status": "active", "plan_id": "plan-1" }, "per-page": 20, "page": 1, "sort": "created_at"}
Responses
Section titled “ Responses ”List of subscriptions
object
The unique identifier for the subscription.
The timestamp when the subscription was created.
The timestamp when the subscription started.
The timestamp when the subscription was activated.
The timestamp when the subscription was cancelled.
The timestamp when the subscription was deleted.
The start timestamp of the current subscription term.
The end timestamp of the current subscription term.
The timestamp when the next billing cycle starts.
The current status of the subscription (e.g., active, cancelled).
The identifier of the subscription plan.
The timestamp when the trial period starts.
The timestamp when the trial period ends.
The reason for the subscription cancellation, if provided.
The unique identifier of the subscription in the external system (e.g., CB).
The unique identifier of the customer in the external system (e.g., CB).
The number of people associated with the subscription.
The number of projects associated with the subscription.
The quantity of the plan purchased by the customer.
The currency code used for subscription payments.
A flag indicating whether the subscription is locked (1 for locked, 0 for unlocked).
The method used for invoicing (e.g., monthly, yearly).
Example
{ "subscription_id": "sub-1", "status": "active", "plan_id": "plan-1", "created_at": 1700000000, "started_at": 1700000001, "npeople": 10, "nproject": 2, "currency_code": "EUR"}
Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
GET /v2/subscription/view/{id}
Retrieve a subscription by its unique ID.
Path Parameters
Section titled “Path Parameters ”ID of the subscription to retrieve
Responses
Section titled “ Responses ”Subscription found
object
The unique identifier for the subscription.
The timestamp when the subscription was created.
The timestamp when the subscription started.
The timestamp when the subscription was activated.
The timestamp when the subscription was cancelled.
The timestamp when the subscription was deleted.
The start timestamp of the current subscription term.
The end timestamp of the current subscription term.
The timestamp when the next billing cycle starts.
The current status of the subscription (e.g., active, cancelled).
The identifier of the subscription plan.
The timestamp when the trial period starts.
The timestamp when the trial period ends.
The reason for the subscription cancellation, if provided.
The unique identifier of the subscription in the external system (e.g., CB).
The unique identifier of the customer in the external system (e.g., CB).
The number of people associated with the subscription.
The number of projects associated with the subscription.
The quantity of the plan purchased by the customer.
The currency code used for subscription payments.
A flag indicating whether the subscription is locked (1 for locked, 0 for unlocked).
The method used for invoicing (e.g., monthly, yearly).
Example
{ "subscription_id": "sub-1", "status": "active", "plan_id": "plan-1", "created_at": 1700000000, "started_at": 1700000001, "npeople": 10, "nproject": 2, "currency_code": "EUR"}
Subscription not found