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 | An account ID. |
api_token | query | string | Required | API token of the manager who perform the operation (see API Token Authentication). |
Response model
Name | Data type | Description |
---|---|---|
id | integer | A subscription ID. |
plan_id | integer | Plan ID of the subscription (see Managing plans in the ActivePlatform. Operator Control Panel). |
account_id | integer | Account ID, to which the subscription is related. |
name | string | Subscription name. |
trial | bool | Subscription type:
|
status | string | A subscription's status:
|
start_date | date | An activation date of the subscription. |
expiration_date | date | An expiration date of the subscription. |
plan_period_id | integer | A plan period ID of the subscription (see Managing plans in the ActivePlatform. Operator Control Panel). |
promo_code | string | A promo code, which was used to get the discount (see Managing promo codes in the ActivePlatform. Operator Control Panel). |
created_at | date | A date and time of subscription creation. |
updated_at | date | A date and time, when the subscription was updated. |
Request example
GET http://billing.activeplatform.com:80/api/vendor/v1/accounts/2000532/subscriptions.json?api_token=654321
Response example
[
{
"id": 2006110,
"plan_id": 2000813,
"account_id": 2000532,
"name": "iMind (UZ sanbox)",
"trial": false,
"status": "stopping_failed",
"start_date": "2016-08-15",
"expiration_date": "2016-08-16",
"plan_period_id": 2001359,
"promo_code": null,
"created_at": "2016-08-15T04:38:19.611+03:00",
"updated_at": "2016-10-01T01:15:33.627+03:00"
}
]