Get Account's Subscriptions by ID
The Get Account’s Subscriptions by ID method returns the List of Subscriptions, which have been attached to the given Account.
GET /api/vendor/v1/accounts/{id}/subscriptions.json?api_token={api_token}
Arguments
Name | Parameter Type | Data type | Required/Optional | Description |
---|---|---|---|---|
id | path | integer | Required | Account ID |
api_token | query | string | Required | API token of the manager who performs the operation (see API Token Authentication) |
Response model
Name | Data type | Description | |
---|---|---|---|
id | integer | Subscription ID | |
plan_id | integer | Subscription Plan ID (see Managing plans in the ActivePlatform. Operator Control Panel) | |
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 (see Managing plans in the ActivePlatform. Operator Control Panel) | |
promo_code | string | A promo code that was used to get the discount (see Managing promo codes in the ActivePlatform. Operator Control Panel) | |
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 | array | Subscription payment model:
| |
payment_model_parameters | string | Payment model parameters | |
credit_limit | string | The value of the Subscription debt, above which the postpaid Subscription will be stopped. For postpaid Subscription only (payment_model = postpay) | |
current_debt | string | 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/accounts/431/subscriptions.json?api_token=vY5fwetestK3gJXZH5uHCw
Response example
[
{
"id": 3005515,
"plan_id": 17,
"account_id": 431,
"name": "Manual Provisioning (all)",
"trial": false,
"status": "deleted",
"start_date": null,
"expiration_date": null,
"plan_period_id": 68,
"promo_code": null,
"created_at": "2019-06-27T15:33:46.111+03:00",
"updated_at": "2019-06-27T15:33:46.111+03:00",
"hold_to": null,
"payment_model": "prepay",
"payment_model_parameters": {}
},
{
"id": 3005513,
"plan_id": 5,
"account_id": 431,
"name": "Auto provisioning with resources",
"trial": false,
"status": "stopped",
"start_date": "2019-06-27",
"expiration_date": "2020-06-30",
"plan_period_id": 6,
"promo_code": null,
"created_at": "2019-06-27T15:28:00.932+03:00",
"updated_at": "2019-09-05T00:03:55.165+03:00",
"hold_to": null,
"payment_model": "postpay",
"payment_model_parameters": {
"credit_limit": 1000.0,
"current_debt": 24.0
}
}
]