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_tokenquerystringRequiredAPI 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:

  • true – a subscription available for the testing period;
  • false – an ordered subscription.

status

string

A subscription's status:

  • Ordered – a customer has ordered a Plan;
  • Installing – an ordered applications are installing;
  • Installation failed – an error occurred during the installation of the ordered application;
  • Activating – a subscription is activating;
  • Activating failed – an error occurred during the activation process;
  • Active – a subscription has been activated;
  • Updating – a subscription resource is updating;
  • Updating failed – an error occurred during the update process;
  • Renewing – the system is renewing the subscription;
  • Renewing failed – an error occurred during the renewal process;
  • Waiting for manual approve - a subscription should be approved by a manager;
  • Graced – the subscriber has not renewed the subscription, and after Grace period the system will stop the subscription;
  • Stopping – the system is stopping a subscription after Grace period;
  • Stopping failed – an error occurred during the stopping process;
  • Stopped – a subscription has been stopped;
  • Deleting – the system is deleting a subscription after Stop period;
  • Deletion failed – an error occurred during the deleting process;
  • Deleted – a subscription has been deleted.

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"
  }
]