Get a List of Subscriptions
The Get a List of Subscriptions method returns a list of Subscriptions that have been created in the platform.
GET /api/vendor/v1/subscriptions.json?api_token={api_token}
Arguments
Name | Parameter Type | Data type | Required/ Optional | Description |
---|---|---|---|---|
api_token | query | string | Required | API token of the manager who performs the operation (see API Token Authentication) |
page | query | integer | Optional | Returning a list of Subscriptions by current page number |
per_page | query | integer | Optional | Setting a number of items in the page |
sorting[field] | query | string | Optional | Sorting the list by the specified field |
sorting[reversed] | query | string | Optional | Set the reversed sorting mode by the specified field:
|
filters[created_at] | query | date | Optional | Filtering the list by a creation date |
filters[updated_at] | query | date | Optional | Filtering the list by an update date |
filters[status] | query | string | Optional | Filtering the list by a status |
filters[account_id] | query | integer | Optional | Filtering the list by an account ID |
filters[plan_id] | query | integer | Optional | Filtering the list by a plan ID |
Response model
Name | Data type | Description | |
---|---|---|---|
id | integer | Subscription ID | |
plan_id | integer | Subscription Plan ID | |
account_id | integer | ID of the Account that owns the Subscription | |
name | string | Subscription name | |
trial | bool | Subscription type:
| |
status | string | Subscription status (see Viewing the list of subscriptions for the list of Subscription statuses) | |
start_date | date | Subscription activation date | |
expiration_date | date | Subscription expiration date | |
plan_period_id | integer | Plan period ID | |
promo_code | string | A promo code that was used to get the discount (see Managing promo codes) | |
created_at | date | Date and time of Subscription creation | |
updated_at | date | Date and time of Subscription last update | |
hold_to | date | The billing process for the Subscription is skipped till the date because all Subscription Charges were closed manually (see Closing subscription charges manually) | |
payment_model | string | Subscription payment model:
| |
payment_model_parameters | object | Payment model parameters | |
credit_limit | float | The value of the Subscription debt, above which the postpaid Subscription will be stopped. For postpaid Subscription only (payment_model = postpay) | |
current_debt | float | The Subscription debt that is calculated as the total amount of all blocked Charges for the Subscription for the current Billing period. For postpaid Subscription only (payment_model = postpay) |
Request example
GET /api/vendor/v1/subscriptions?api_token=vY5fwetestK3gJXZH5uHCw&per_page=2&page=5&sorting[field]=plan_id&sorting[reversed]=true
Response example
[
{
"id": 3005382,
"plan_id": 1438,
"account_id": 275,
"name": "ESET NOD32(LOCAL SERVICE)",
"trial": false,
"status": "installation_failed",
"start_date": null,
"expiration_date": "2119-09-17",
"plan_period_id": 2599,
"promo_code": null,
"created_at": "2019-06-04T10:53:45.651+03:00",
"updated_at": "2019-06-04T11:06:25.397+03:00",
"hold_to": null,
"payment_model": "prepay",
"payment_model_parameters": {}
},
{
"id": 3005362,
"plan_id": 1437,
"account_id": 411,
"name": " ESET NOD32 Mobile Security",
"trial": false,
"status": "deleted",
"start_date": "2019-12-15",
"expiration_date": "2020-12-15",
"plan_period_id": 2597,
"promo_code": null,
"created_at": "2019-12-15T10:11:56.599+03:00",
"updated_at": "2019-05-31T11:05:41.402+03:00",
"hold_to": null,
"payment_model": "postpay",
"payment_model_parameters": {
"credit_limit": 25.0,
"current_debt": 0.0
}
}
]