Get a List of Plans

The method returns a List of Plans (see also Get list of plans of downstream resellers, Get list of plans).

GET /api/vendor/v1/plans.json

Arguments

Name

Parameter Type

Data type

Required/ 
Optional

Description

api_tokenquerystringOptional

API token of a manager who performs the operation (see API Token Authentication):

  • If the API token of a manager is not specified, the method returns only Plans with status = active and public = true.
  • If the API token of a manager is specified, the method returns all Plans.

page

query

integer

Optional

Returning a list of payment 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:

  • true — descending sorting.
  • false — ascending sorting (by default).

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[public]

query

string

Optional

Filtering the list by the "public" flag

Response model

Name

Data type

Description

id

integer

Plan ID

status

string

Plan status:

  • 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 upstream Reseller (Operator).

name

string

Plan name

description

string

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

created_at

data

Date and time of Plan creation

updated_at

data

Date and time of last Plan update

public

bool

Plan availability for ordering:

  • true — a Plan is available for ordering.
  • false — a Plan is not available for ordering.

product_category_id

integer

ID of a Products category that is related to a Plan

product_category

string

Name of a Products category that is related to a Plan

product_id

integer

ID of a Product that is related to a Plan

product

string

Name of a Product that is related to a Plan

plan_class_id

integer

Service Term ID (see Managing service terms in the ActivePlatform. Operator Control Panel).

plan_class

string

Plan class name

billing_typestringPlan billing type

ancestry

stringFor delegated Plans, consists of the list of all parent Plans starting from the root Plan (see Viewing the list of delegated plans)

plan_resources

array of objects

Information about Plan Resources

plan_resources.idintegerResource ID
plan_resources.namestringResource name
plan_resources.application_template_namestringName of a Application, which is used in a Plan
plan_resources.measurablebool

The model of a Resource usage calculation (unavailable if the function is not supported by third-party service):

    • true — an actual amount of the used Resource is calculated.
    • false — the ordered amount of the Resource is calculated.
plan_resources.unit_of_measurestring

Resource unit of measure:

    • unit — countable Resource, an amount of which is specified.
    • boolean — uncountable Resource:
      • trueResource is available.
      • falseResource is unavailable.
plan_resources.includedinteger

Amount of Resource that is included in a Plan by default (included Resources are provisioned within the Subscription cost)

plan_resources.minimuminteger

Minimum Resource amount to order taking into account the included amount (see Plan Resources in ActivePlatform. Operator Control Panel)

plan_resources.limitinteger

Maximum Resource amount to order. When a Resource is unlimited (unlimited_units attribute has "true" value), then limit is equal to 0. Limit may equal 0 for a limited Resource if included and minimum also equal 0

plan_resources.setup_feefloat

Fee for the Resource setup

plan_resources.recurring_feefloat

Monthly recurring fee for the Resource usage

plan_resources.overuse_feefloat

Fee for the Resource usage when a customer used greater amount of the Resource than was included in the Plan

plan_resources.renewal_feefloat

Fee for the Resource renewal

plan_resources.unlimited_unitsbool

An indication if the limits are applicable to the Resource amount:

  • true — limits don't apply to the Resource amount.
  • falselimits apply to the Resource amount.
plan_resources.publicbool

An indication if the Resource is available for ordering within the Plan:

  • trueResource is available for ordering.
  • falseResource is unavailable for ordering.
plan_resources.statusstring

Resource status:

  • active
  • inactive
  • deleted
plan_resources.resource_idinteger

Plan Resource ID

plan_resources.created_atdateDate and time of the Plan Resource creation
plan_resources.updated_atdateDate and time of the Plan Resource last update
plan_resources.custom_attributesarray of objectsThe model of the Resource custom attributes information
plan_resources.custom_attributes.['custom-attribute-key']stringValue of the Resource custom attribute
plan_periodsarray of objectsPlan periods information
plan_periods.idintegerPlan period ID
plan_periods.duration_valueintegerDuration of the Plan period
plan_periods.duration_typestringUnit of measure of the Plan period duration
plan_periods.setup_feefloatSetup fee for the Plan period
plan_periods.recurring_feefloatMonthly recurring fee for the Plan period
plan_periods.renewal_feefloatFee for the Plan period renewal
plan_periods.trialbool

An indication if the Plan period is the trial one:

  • true Plan period is trial.
  • falsePlan period is not trial.
plan_periods.publicbool
  • truePlan period is available for ordering.
  • falsePlan period is unavailable for ordering.
plan_periods.statusstring

Plan period status:

  • active
  • deleted
plan_periods.descriptionstringPlan period description
plan_periods.created_atdate

Date and time of the Plan period creation

plan_periods.updated_atdate

Date and time of the Plan period last update

attributes.custom-attributesobjectThe model of the Plan custom attributes information
attributes.custom-attributes.['custom-attribute-key']stringValue of the Plan custom attribute

plan_currency

stringCurrency code of the Plan

Request example

GET https://test.activeplatform.com/api/vendor/v1/plans.json?api_token=Y5fwetest3gJXZH5uHCw&page=27&per_page=2

Response example

[
    {
        "id": 149,
        "status": "inactive",
        "name": "wwww",
        "description": "",
        "created_at": "2016-12-09T16:39:40.015+03:00",
        "updated_at": "2019-11-22T14:13:51.171+03:00",
        "public": true,
        "product_category_id": 190,
        "product_category": "default",
        "product_id": 403,
        "product": "Default",
        "plan_class_id": 1,
        "plan_class": "default",
        "billing_type": "reservation",
        "ancestry": "",
        "plan_resources": [
            {
                "id": 1562,
                "name": "Ресурс4",
                "application_template_name": "Auto provisioning",
                "measurable": false,
                "unit_of_measure": "unit",
                "included": 0,
                "minimum": 0,
                "limit": 0,
                "setup_fee": "1.0",
                "recurring_fee": "15.0",
                "overuse_fee": "13.0",
                "renewal_fee": "14.0",
                "unlimited_units": false,
                "public": true,
                "status": "active",
                "resource_id": 272,
                "created_at": "2016-12-09T16:41:04.974+03:00",
                "updated_at": "2016-12-29T12:25:32.219+03:00",
                "custom_attributes": []
            }
        ],
        "plan_periods": [
            {
                "id": 513,
                "duration_value": 2,
                "duration_type": "month",
                "setup_fee": "1.0",
                "recurring_fee": "2.0",
                "renewal_fee": "4.0",
                "trial": false,
                "public": true,
                "status": "active",
                "description": null,
                "created_at": "2016-12-09T16:41:43.088+03:00",
                "updated_at": "2016-12-29T12:23:19.698+03:00"
            },
            {
                "id": 514,
                "duration_value": 3,
                "duration_type": "year",
                "setup_fee": "1.0",
                "recurring_fee": "557.0",
                "renewal_fee": "1.0",
                "trial": false,
                "public": true,
                "status": "active",
                "description": null,
                "created_at": "2016-12-09T16:41:43.108+03:00",
                "updated_at": "2016-12-29T12:23:19.876+03:00"
            }
        ],
        "custom_attributes": [],
        "plan_currency": "RUB"
    },
    {
        "id": 150,
        "status": "active",
        "name": "TrialTest",
        "description": "",
        "created_at": "2016-12-12T12:05:50.637+03:00",
        "updated_at": "2019-11-22T14:13:51.174+03:00",
        "public": true,
        "product_category_id": 190,
        "product_category": "default",
        "product_id": 403,
        "product": "Default",
        "plan_class_id": 5,
        "plan_class": "Domains, Licenses, SSL",
        "billing_type": "reservation",
        "ancestry": "",
        "plan_resources": [],
        "plan_periods": [
            {
                "id": 515,
                "duration_value": 3,
                "duration_type": "day",
                "setup_fee": "0.0",
                "recurring_fee": "0.0",
                "renewal_fee": "0.0",
                "trial": true,
                "public": true,
                "status": "active",
                "description": null,
                "created_at": "2016-12-12T12:06:29.453+03:00",
                "updated_at": "2016-12-12T12:06:29.453+03:00"
            }
        ],
        "custom_attributes": [],
        "plan_currency": "RUB"
    }
]