Salta ai contenuti

Subscription

Questi contenuti non sono ancora disponibili nella tua lingua.

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
POST
/v2/subscription/index

Returns a paginated and filterable list of subscriptions.
Use POST to allow complex filters via JSON payload.

Parameters for searching subscriptions

object
filter
object
subscription_id

The unique identifier for the subscription.

string
<= 50 characters
created_at

The timestamp when the subscription was created.

integer
started_at

The timestamp when the subscription started.

integer
activated_at

The timestamp when the subscription was activated.

integer
cancelled_at

The timestamp when the subscription was cancelled.

integer
deleted_at

The timestamp when the subscription was deleted.

integer
current_term_start

The start timestamp of the current subscription term.

integer
current_term_end

The end timestamp of the current subscription term.

integer
next_billing_at

The timestamp when the next billing cycle starts.

integer
status

The current status of the subscription (e.g., active, cancelled).

string
<= 50 characters
plan_id

The identifier of the subscription plan.

string
<= 50 characters
trial_start

The timestamp when the trial period starts.

integer
trial_end

The timestamp when the trial period ends.

integer
cancel_reason

The reason for the subscription cancellation, if provided.

string
<= 255 characters
cb_subscription_id

The unique identifier of the subscription in the external system (e.g., CB).

string
<= 50 characters
cb_customer_id

The unique identifier of the customer in the external system (e.g., CB).

string
<= 50 characters
npeople

The number of people associated with the subscription.

integer
nproject

The number of projects associated with the subscription.

integer
plan_quantity

The quantity of the plan purchased by the customer.

integer
currency_code

The currency code used for subscription payments.

string
<= 50 characters
locked

A flag indicating whether the subscription is locked (1 for locked, 0 for unlocked).

integer
invoicing_method

The method used for invoicing (e.g., monthly, yearly).

string
<= 50 characters
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort

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

string
history

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.

boolean
Example
{
"filter": {
"status": "active",
"plan_id": "plan-1"
},
"per-page": 20,
"page": 1,
"sort": "created_at"
}

List of subscriptions

Array<object>
object
subscription_id

The unique identifier for the subscription.

string
<= 50 characters
created_at

The timestamp when the subscription was created.

integer
started_at

The timestamp when the subscription started.

integer
activated_at

The timestamp when the subscription was activated.

integer
cancelled_at

The timestamp when the subscription was cancelled.

integer
deleted_at

The timestamp when the subscription was deleted.

integer
current_term_start

The start timestamp of the current subscription term.

integer
current_term_end

The end timestamp of the current subscription term.

integer
next_billing_at

The timestamp when the next billing cycle starts.

integer
status

The current status of the subscription (e.g., active, cancelled).

string
<= 50 characters
plan_id

The identifier of the subscription plan.

string
<= 50 characters
trial_start

The timestamp when the trial period starts.

integer
trial_end

The timestamp when the trial period ends.

integer
cancel_reason

The reason for the subscription cancellation, if provided.

string
<= 255 characters
cb_subscription_id

The unique identifier of the subscription in the external system (e.g., CB).

string
<= 50 characters
cb_customer_id

The unique identifier of the customer in the external system (e.g., CB).

string
<= 50 characters
npeople

The number of people associated with the subscription.

integer
nproject

The number of projects associated with the subscription.

integer
plan_quantity

The quantity of the plan purchased by the customer.

integer
currency_code

The currency code used for subscription payments.

string
<= 50 characters
locked

A flag indicating whether the subscription is locked (1 for locked, 0 for unlocked).

integer
invoicing_method

The method used for invoicing (e.g., monthly, yearly).

string
<= 50 characters
Example
{
"subscription_id": "sub-1",
"status": "active",
"plan_id": "plan-1",
"created_at": 1700000000,
"started_at": 1700000001,
"npeople": 10,
"nproject": 2,
"currency_code": "EUR"
}
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

GET
/v2/subscription/view/{id}

Retrieve a subscription by its unique ID.

id
required
string format: uuid

ID of the subscription to retrieve

Subscription found

object
subscription_id

The unique identifier for the subscription.

string
<= 50 characters
created_at

The timestamp when the subscription was created.

integer
started_at

The timestamp when the subscription started.

integer
activated_at

The timestamp when the subscription was activated.

integer
cancelled_at

The timestamp when the subscription was cancelled.

integer
deleted_at

The timestamp when the subscription was deleted.

integer
current_term_start

The start timestamp of the current subscription term.

integer
current_term_end

The end timestamp of the current subscription term.

integer
next_billing_at

The timestamp when the next billing cycle starts.

integer
status

The current status of the subscription (e.g., active, cancelled).

string
<= 50 characters
plan_id

The identifier of the subscription plan.

string
<= 50 characters
trial_start

The timestamp when the trial period starts.

integer
trial_end

The timestamp when the trial period ends.

integer
cancel_reason

The reason for the subscription cancellation, if provided.

string
<= 255 characters
cb_subscription_id

The unique identifier of the subscription in the external system (e.g., CB).

string
<= 50 characters
cb_customer_id

The unique identifier of the customer in the external system (e.g., CB).

string
<= 50 characters
npeople

The number of people associated with the subscription.

integer
nproject

The number of projects associated with the subscription.

integer
plan_quantity

The quantity of the plan purchased by the customer.

integer
currency_code

The currency code used for subscription payments.

string
<= 50 characters
locked

A flag indicating whether the subscription is locked (1 for locked, 0 for unlocked).

integer
invoicing_method

The method used for invoicing (e.g., monthly, yearly).

string
<= 50 characters
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