Get Plan Info by ID

The Get Plan info by ID method allows to get information about Plan by given plan ID.

GET /api/vendor/v1/plans/{id}.json?api_token={api_token}

Arguments

Name

Parameter Type

Data type

Required/ 
Optional

Description

id

path

integer

Required

A plan ID.

api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication).

Response model

Name

Data type

Description

id

integer

A plan ID.

status

string

One of the following plan statuses:

  • active - a plan is available for customers;
  • inactive - a plan is not available for customers;
  • deactivated by provider - a plan is not available for customers because the plan was deactivated by the upline reseller (operator).

name

string

A plan name.

description

string

Additional information about the plan. This information displays to customers in the online store and the Customer Control Panel.

created_at

data

A date and time of the plan's creation.

updated_at

data

A date and time of the last plan update.

public

bool

  • true -  a plan is available for ordering;
  • false -  a plan is not available for ordering.

plan_class_id

integer

A plan class ID (see Managing service terms in the ActivePlatform. Operator Control Panel).

plan_class

string

A plan class name.

plan_resources

array

The following information about plan resources:

  • id - a resource ID;
  • name - a resource name;
  • application_template_name - a name of the application template, which is included in the plan;
  • measurable - a model of calculating usage of the resources (is not available if this function is not supported by third-party service):
    • true - the calculation of the actual resource usage is used;
    • false - the calculation of the actual resource usage is not used.
      A type of the unit is displayed on the "unit_of_measure" parameter. 
  • unit_of_measure - a unit of measure of a resource:
    • unit - measurable resource, for which is a certain amount is specified;
    • boolean - unmeasurable resource, for which is a certain amount is not specified:
      • true - a resource was added;
      • false - a resource was not added.
  • included - a value of the resource which will be included in the plan by default (the included resources are available for free.);
  • minimum - a minimum amount of resources (including the value that was set in the "included" parameter) that can be available for an additional order.
  • limit - a maximum value of the resource which is available for ordering.
  • setup_fee -  a price of the resource installation;
  • recurring_fee - a value of monthly fee for the resource; this type of fee is used if the customer has to pay for the resource each month to renew the subscription;
  • overuse_fee - a price of the resource if a customer overused the included value of the resource.
  • renewal_fee a value of fee, which the subscriber has to pay to renew the resource.
  • unlimited_units - if customers can buy unlimited value of the resource:
    • true - limits is off;
    • false - limits is on.
  • public - the parameter makes the plan's resource available for sale:
    • true - a resource is available for ordering;
    • false - a resource is not available for ordering.
  • status - one of the following statuses of a resource: active; inactive; deleted.
  • resource_id - a plan resource ID;
  • created_at - a date and time of the plan resource creation.
  • updated_at - a date and time of the plan resource change last time.
custom_attributesarray

A list of additional attributes (see Managing attributes in the ActivePlatform. Operator Control Panel):

  • key - a key that is used to refer to the element by API or placeholder;

  • value - a value of the attribute.

Request example

GET http://billing.activeplatform.com:80/api/vendor/v1/plans/2000303.json?api_token=654321

Response example

{
  "id": 2000303,
  "status": "active",
  "name": "MSExPlan",
  "description": "",
  "created_at": "2015-07-20T17:40:47.014+03:00",
  "updated_at": "2016-06-18T16:26:21.043+03:00",
  "public": true,
  "plan_class_id": 1,
  "plan_class": "Default",
  "plan_resources": [
    {
      "id": 2001515,
      "name": "Resource Mailboxes",
      "application_template_name": "MSExchange",
      "measurable": false,
      "unit_of_measure": "unit",
      "included": 1024,
      "minimum": 1024,
      "limit": 10240,
      "setup_fee": 0,
      "recurring_fee": 0,
      "overuse_fee": 0,
      "renewal_fee": 0,
      "unlimited_units": false,
      "public": true,
      "status": "active",
      "resource_id": 2003421,
      "created_at": "2015-07-20T17:42:14.467+03:00",
      "updated_at": "2018-01-03T23:24:33.809+03:00",
      "custom_attributes": []
    },
    {
      "id": 2001516,
      "name": "Disk Spaces",
      "application_template_name": "MSExchange",
      "measurable": false,
      "unit_of_measure": "unit",
      "included": 1024,
      "minimum": 1024,
      "limit": 10240,
      "setup_fee": 0,
      "recurring_fee": 0,
      "overuse_fee": 0,
      "renewal_fee": 0,
      "unlimited_units": false,
      "public": true,
      "status": "active",
      "resource_id": 2003422,
      "created_at": "2015-07-20T17:42:14.469+03:00",
      "updated_at": "2018-01-03T23:24:33.702+03:00",
      "custom_attributes": []
    },
    {
      "id": 2001512,
      "name": "Users",
      "application_template_name": "MSExchange",
      "measurable": false,
      "unit_of_measure": "unit",
      "included": 10,
      "minimum": 10,
      "limit": 13,
      "setup_fee": 0.02,
      "recurring_fee": 0.01,
      "overuse_fee": 0.01,
      "renewal_fee": 0.02,
      "unlimited_units": false,
      "public": true,
      "status": "active",
      "resource_id": 2003418,
      "created_at": "2015-07-20T17:42:14.460+03:00",
      "updated_at": "2016-06-16T18:20:21.789+03:00",
      "custom_attributes": []
    },
    {
      "id": 2001513,
      "name": "Domains",
      "application_template_name": "MSExchange",
      "measurable": false,
      "unit_of_measure": "unit",
      "included": 10,
      "minimum": 10,
      "limit": 13,
      "setup_fee": 0.02,
      "recurring_fee": 0.01,
      "overuse_fee": 0.01,
      "renewal_fee": 0.02,
      "unlimited_units": false,
      "public": true,
      "status": "active",
      "resource_id": 2003419,
      "created_at": "2015-07-20T17:42:14.463+03:00",
      "updated_at": "2016-06-16T18:20:21.792+03:00",
      "custom_attributes": []
    },
    {
      "id": 2001514,
      "name": "Contacts",
      "application_template_name": "MSExchange",
      "measurable": false,
      "unit_of_measure": "unit",
      "included": 10,
      "minimum": 10,
      "limit": 13,
      "setup_fee": 0.02,
      "recurring_fee": 0.01,
      "overuse_fee": 0.01,
      "renewal_fee": 0.02,
      "unlimited_units": false,
      "public": true,
      "status": "active",
      "resource_id": 2003420,
      "created_at": "2015-07-20T17:42:14.465+03:00",
      "updated_at": "2016-06-16T18:20:21.794+03:00",
      "custom_attributes": []
    }
  ],
  "plan_periods": [
    {
      "id": 2000474,
      "duration_value": 3,
      "duration_type": "month",
      "setup_fee": 0.05,
      "recurring_fee": 0.03,
      "renewal_fee": 0.02,
      "trial": false,
      "public": true,
      "status": "active",
      "description": null,
      "created_at": "2015-07-20T17:42:39.582+03:00",
      "updated_at": "2015-07-20T17:42:39.582+03:00"
    },
    {
      "id": 2000480,
      "duration_value": 6,
      "duration_type": "month",
      "setup_fee": 2.02,
      "recurring_fee": 2.01,
      "renewal_fee": 2.01,
      "trial": false,
      "public": true,
      "status": "active",
      "description": "",
      "created_at": "2015-08-12T12:22:28.100+03:00",
      "updated_at": "2016-08-29T01:18:20.282+03:00"
    },
    {
      "id": 2000760,
      "duration_value": 3,
      "duration_type": "day",
      "setup_fee": 0,
      "recurring_fee": 0,
      "renewal_fee": 0,
      "trial": true,
      "public": true,
      "status": "active",
      "description": "",
      "created_at": "2016-01-20T11:31:46.167+03:00",
      "updated_at": "2016-01-20T11:31:46.167+03:00"
    }
  ],
  "custom_attributes": []
}