Get a List of the Reseller's Plans

The Get a List of the Reseller's Plans API method returns the list of Plans of the current Reseller or any of its downstream Resellers.

Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.

GET {base_url}/api/v3/resellers/{reseller_id}/plans

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

X-Api-TokenheaderstringRequiredAPI token of the Manager that performs the operation (see Viewing and updating manager's information)
Content-TypeheaderstringRequiredIndicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser)
AcceptheaderstringRequired

Information about data types that the client (browser) supports

reseller_idpathintegerRequiredID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information)
page[size]queryintegerOptionalPage navigation: number of elements per page. The default value is 50
page[number]queryintegerOptionalPage navigation: page number

Response model

Name

Data type

Description

dataarrayResponse data


id

integer

ID of the Plan


typestringData type

attributesobjectInformation about the Plan


created_at

date

Date and time of the Plan creation



updated_at

date

Date and time when the Plan was updated



statusstringStatus of the Plan (for the list of Plans statuses, see Viewing the list of plans)


name

string

Name of the Plan



description

string

Plan details description



public

bool

Indication whether the Plan is available for sale:

  • truethe Plan is available for sale
  • falsethe Plan is not available for sale


plan_class_id

integer

ID of the Plan Class (see Managing service terms)



product_id

integer

ID of the Product of the Plan



billing_typestringBilling type of the Plan


ancestrystringFor delegated Plans, consists of the list of all parent Plans starting from the root Plan (see Viewing the list of delegated plans). For plans created by the Reseller, is null.


reseller_idintegerID of the Reseller


plan_class

string

Name of the Service Term



product_category_id

integer

ID of the Product Category of the Plan



product_category

string

Name of the Product Category of the Plan



product

string

Name of the Product of the Plan



plan_resources

array of objects

Resources of the Plan




dataarrayObject data




idintegerID of the Resource in the Plan




typestringData type




attributesobjectInformation about the Resource





created_atdateDate and time of the Resource creation





updated_atdateDate and time when the Resource was updated





namestring

Name the Resource






measurablebool

Displays whether the actual amount of the used Resource is supported:

    • truethe actual amount of the used Resource is used for generating Charges
    • false — the actual amount of the used Resource is not used for generating Charges





unit_of_measurestring

Unit of measure of the Resource:

    • unit — the Resource is measurable. The Resource amount is specified.
    • booleanthe Resource is non-measurable. The Resource amount is not required and:
      • truethe Resource is included in the Plan
      • falsethe Resource is not included in the Plan





application_template_namestringName of the Application template





includedinteger

Amount of the Resource included in the Plan by default (included Resources are part of the Subscription price)






minimuminteger

Minimum amount of the Resource (together with the included amount) available for ordering (see Plan Resources)






limitinteger

Maximum amount of the Resource available for ordering. The limit value can be equal to 0 in the following cases:

  • The Resource is unlimited (unlimited_units=true)
  • The Resource is not unlimited (unlimited_units=false) but the minimum and limit amounts of the Resource equals to 0 (minimum=0 and limit=0)





setup_feefloat

Setup fee of the Resource






recurring_feefloat

Monthly recurring fee of the Resource






overuse_feefloat

Overuse fee of the Resource






renewal_feefloat

Renewal fee of the Resource






unlimited_unitsbool

Attribute of the unlimited Resource:

  • true — the Resource is unlimited
  • falsethe Resource is not unlimited





publicbool

Availability of the Resource:

  • truethe Resource is available for ordering
  • falsethe Resource is not available for ordering





statusstring

Status of the Resource:

  • active
  • inactive
  • deleted





resource_idinteger

ID of the Resource in the Application template






custom_attributesarray of objectsInformation about custom attributes of the Resource






plan_resources.custom_attributes.['custom-attribute-key']stringValue of the custom attribute of the Resource


plan_periodsarray of objectsPlan Periods



data
arrayObject data




idintegerID of the Plan Period




typestringData type




attributesobjectInformation about the Plan Period





created_atdate

Date and time of the Plan Period creation






updated_atdate

Date and time when the Plan Period was updated






duration_valueintegerDuration of the Plan Period





duration_typestringUnit of measure of the Plan Period duration





setup_feefloatSetup fee of the Plan for the Plan Period





recurring_feefloatMonthly recurring fee of the Plan for the Plan Period





transfer_feefloatTransfer fee of a domain for the Plan Period. The transfer fee is applied if domains are available as a Resource in the Service





renewal_feefloatRenewal fee of the Plan for the Plan Period





trialbool

Plan Period type:

  • true — trial Plan Period
  • false — commercial Plan Period





publicbool

Availability of the Plan Period:

  • true — the Plan Period is available for ordering
  • false — the Plan Period is not available for ordering





statusstring

Status of the Plan Period:

  • active
  • deleted





descriptionstringPlan Period details description


available_account_types

array of objectsInformation about Account Types



id

integer

ID of the Account Type



namestringName of the Account Types



created_at

date

Date and time of the Account Type creation



updated_at

date

Date and time when the Account Type was updated



reseller_idintegerID of the Reseller linked to the Account Type



name_patternstringTemplate of the Account Type name which is displayed in the platform



primary_namestringName of the field with the primary name of the Account. For example, for the Business Account Type, the filed may be named as Company name



keystringKey that is used to refer to the Account Type by API or a Placeholder



default_payment_method_idinteger

ID of the default Payment method (see Configuring payment methods)




ancestryintegerID of the parent Account Type



use_by_defaultbool

Default Account Type:

  • true — the Account Type is used by default
  • falsethe Account Type is not used by default


plan_currency

stringCurrency code of the Plan


custom-attributesobjectInformation about custom attributes of the Plan



custom-attributes.['custom-attribute-key']stringValue of the custom attribute of the Plan
linksarrayPage navigation links that use the defined page navigation parameters

selfstringCurrent page link

firststringFirst page link

prevstringPrevious page link

nextstringNext page link

laststringLast page link

Request example

GET /api/v3/resellers/1/plans/?page[size]=2&page[number]=78
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json

Response example

{
    "data": [
        {
            "id": "367",
            "type": "plans",
            "attributes": {
                "created_at": "2017-07-07T10:06:26.669+03:00",
                "updated_at": "2019-11-22T14:13:51.378+03:00",
                "status": "active",
                "name": "test plan",
                "description": "",
                "public": true,
                "plan_class_id": 1300,
                "product_id": 403,
                "billing_type": "reservation",
                "ancestry": null,
                "reseller_id": 1,
                "plan_class": "test",
                "product_category_id": 190,
                "product_category": "default",
                "product": "Default",
                "plan_resources": {
                    "data": [
                        {
                            "id": "2003",
                            "type": "plan_resources",
                            "attributes": {
                                "created_at": "2017-07-07T10:06:38.197+03:00",
                                "updated_at": "2017-07-07T10:06:38.197+03:00",
                                "name": "Ресурс2",
                                "measurable": false,
                                "unit_of_measure": "unit",
                                "application_template_name": "Auto provisioning",
                                "included": 0,
                                "minimum": 0,
                                "limit": 0,
                                "setup_fee": "0.0",
                                "recurring_fee": "0.0",
                                "overuse_fee": "0.0",
                                "renewal_fee": "0.0",
                                "unlimited_units": false,
                                "public": true,
                                "status": "active",
                                "resource_id": 9,
                                "custom_attributes": {}
                            }
                        },
                        {
                            "id": "2004",
                            "type": "plan_resources",
                            "attributes": {
                                "created_at": "2017-07-07T10:06:38.226+03:00",
                                "updated_at": "2017-07-07T10:06:38.226+03:00",
                                "name": "Ресурс3",
                                "measurable": false,
                                "unit_of_measure": "unit",
                                "application_template_name": "Auto provisioning",
                                "included": 0,
                                "minimum": 0,
                                "limit": 0,
                                "setup_fee": "0.0",
                                "recurring_fee": "0.0",
                                "overuse_fee": "0.0",
                                "renewal_fee": "0.0",
                                "unlimited_units": false,
                                "public": true,
                                "status": "active",
                                "resource_id": 10,
                                "custom_attributes": {}
                            }
                        }
                    ]
                },
                "plan_periods": {
                    "data": [
                        {
                            "id": "818",
                            "type": "plan_periods",
                            "attributes": {
                                "created_at": "2017-07-07T10:06:41.766+03:00",
                                "updated_at": "2017-07-07T10:06:41.766+03:00",
                                "duration_value": null,
                                "duration_type": null,
                                "setup_fee": "0.0",
                                "recurring_fee": "0.0",
                                "transfer_fee": "0.0",
                                "renewal_fee": "0.0",
                                "trial": false,
                                "public": true,
                                "status": "active",
                                "description": null
                            }
                        }
                    ]
                },
                "available_account_types": [
                    {
                        "id": 1,
                        "name": "Personal BLR",
                        "created_at": "2016-08-25T09:26:12.658+03:00",
                        "updated_at": "2019-05-08T07:21:42.843+03:00",
                        "reseller_id": 1,
                        "name_pattern": "%first_name %middle_name %last_name",
                        "primary_name": "",
                        "key": "personalblr",
                        "default_payment_method_id": 2,
                        "ancestry": null,
                        "use_by_default": false
                    },
                    {
                        "id": 2,
                        "name": "Business BLR",
                        "created_at": "2016-08-25T09:26:12.674+03:00",
                        "updated_at": "2019-05-08T03:11:31.082+03:00",
                        "reseller_id": 1,
                        "name_pattern": "%primary_name",
                        "primary_name": "Company name",
                        "key": "businessblr",
                        "default_payment_method_id": 197,
                        "ancestry": null,
                        "use_by_default": false
                    }
                ],
                "plan_currency": "RUB",
                "custom_attributes": {
                    "vat25": "0"
                }
            }
        },
        {
            "id": "368",
            "type": "plans",
            "attributes": {
                "created_at": "2017-07-07T11:28:07.244+03:00",
                "updated_at": "2017-07-07T11:28:07.404+03:00",
                "status": "active",
                "name": "Plan VSP billing info 7/1",
                "description": "The best Plan",
                "public": true,
                "plan_class_id": 1366,
                "product_id": 403,
                "billing_type": "reservation",
                "ancestry": null,
                "reseller_id": 1,
                "plan_class": "Plan VSP billing info 7-Reservation",
                "product_category_id": 190,
                "product_category": "default",
                "product": "Default",
                "plan_resources": {
                    "data": [
                        {
                            "id": "2005",
                            "type": "plan_resources",
                            "attributes": {
                                "created_at": "2017-07-07T11:28:07.320+03:00",
                                "updated_at": "2017-07-07T11:28:07.320+03:00",
                                "name": "Users",
                                "measurable": null,
                                "unit_of_measure": "unit",
                                "application_template_name": "Plan VSP billing info 7",
                                "included": 1,
                                "minimum": 1,
                                "limit": 300,
                                "setup_fee": "0.0",
                                "recurring_fee": "249.93",
                                "overuse_fee": "0.0",
                                "renewal_fee": "0.0",
                                "unlimited_units": false,
                                "public": true,
                                "status": "active",
                                "resource_id": 997,
                                "custom_attributes": {}
                            }
                        },
                        {
                            "id": "2006",
                            "type": "plan_resources",
                            "attributes": {
                                "created_at": "2017-07-07T11:28:07.349+03:00",
                                "updated_at": "2017-07-07T11:28:07.349+03:00",
                                "name": "Лицензии",
                                "measurable": null,
                                "unit_of_measure": "unit",
                                "application_template_name": "Plan VSP billing info 7",
                                "included": 0,
                                "minimum": 0,
                                "limit": 300,
                                "setup_fee": "0.0",
                                "recurring_fee": "249.93",
                                "overuse_fee": "0.0",
                                "renewal_fee": "0.0",
                                "unlimited_units": false,
                                "public": true,
                                "status": "active",
                                "resource_id": 998,
                                "custom_attributes": {}
                            }
                        }
                    ]
                },
                "plan_periods": {
                    "data": [
                        {
                            "id": "819",
                            "type": "plan_periods",
                            "attributes": {
                                "created_at": "2017-07-07T11:28:07.366+03:00",
                                "updated_at": "2017-07-07T11:28:07.366+03:00",
                                "duration_value": 1,
                                "duration_type": "year",
                                "setup_fee": "4.0",
                                "recurring_fee": "4.0",
                                "transfer_fee": "0.4",
                                "renewal_fee": "5.54",
                                "trial": false,
                                "public": true,
                                "status": "active",
                                "description": null
                            }
                        }
                    ]
                },
                "available_account_types": [
                    {
                        "id": 1,
                        "name": "Personal BLR",
                        "created_at": "2016-08-25T09:26:12.658+03:00",
                        "updated_at": "2019-05-08T07:21:42.843+03:00",
                        "reseller_id": 1,
                        "name_pattern": "%first_name %middle_name %last_name",
                        "primary_name": "",
                        "key": "personalblr",
                        "default_payment_method_id": 2,
                        "ancestry": null,
                        "use_by_default": false
                    },
                    {
                        "id": 2,
                        "name": "Business BLR",
                        "created_at": "2016-08-25T09:26:12.674+03:00",
                        "updated_at": "2019-05-08T03:11:31.082+03:00",
                        "reseller_id": 1,
                        "name_pattern": "%primary_name",
                        "primary_name": "Company name",
                        "key": "businessblr",
                        "default_payment_method_id": 197,
                        "ancestry": null,
                        "use_by_default": false
                    }
                ],
                "plan_currency": "RUB",
                "custom_attributes": {}
            }
        }
    ],
    "links": {
        "self": "http://test.activeplatform.com/api/v3/resellers/1/plans/?page%5Bnumber%5D=78&page%5Bsize%5D=2",
        "first": "http://test.activeplatform.com/api/v3/resellers/1/plans/?page%5Bnumber%5D=1&page%5Bsize%5D=2",
        "prev": "http://test.activeplatform.com/api/v3/resellers/1/plans/?page%5Bnumber%5D=77&page%5Bsize%5D=2",
        "next": "http://test.activeplatform.com/api/v3/resellers/1/plans/?page%5Bnumber%5D=79&page%5Bsize%5D=2",
        "last": "http://test.activeplatform.com/api/v3/resellers/1/plans/?page%5Bnumber%5D=242&page%5Bsize%5D=2"
    }
}