Get list of plans

The Get list of plans method returns the list of plans of the current reseller or any of its downstream resellers.

An API token of a manager is required for authorization. To get an API token via the Operator Control Panel, see Viewing and updating manager's information

The manager's API token specified in an API request determines:

  • The role and access level of the manager, which determine the availability of a method.
  • The current reseller and downstream resellers accessible within a method.

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

Arguments

Name

Parameter type

Data type

Required/Optional

Description

X-Api-TokenheaderstringRequiredAPI token of a manager that performs the operation (see Viewing and updating manager's information)
Content-TypeheaderstringRequiredMedia type of the request. Specify the following: application/vnd.api+json
AcceptheaderstringRequired

Supported media types of the answer. Specify the following: application/vnd.api+json

base_urlpathstringRequiredActivePlatform URL
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
filter[name]

query

integer

OptionalFiltering the list of plans by name — partial matching, not case-sensitive
filter[sku]

query

integer

OptionalFiltering the list of plans by sku — partial matching, not case-sensitive
filter[updated_at]

string

Optional

Filtering plans by the date and time when the plan was updated in the YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format for the platform time zone or in the specified time zone (for example, YYYY-MM-DDTHH:MM:SSZ for UTC, see RFC 3339). To specify the period, the following filters are used:

  • filter[updated_at][gt] — date and time are greater than the specified.
  • filter[updated_at][gte]  date and time are greater than or equal to the specified.
  • filter[updated_at][lt] — date and time are less than the specified.
  • filter[updated_at][lte]  date and time are less than or equal to the specified.
includequerystring
Optional

Returns additional information about objects related to a plan. The following objects and possible values are supported:

ObjectParameter value
Plan categoryplan_category

Response model

Name

Data type

Description

dataarray of objectsResponse data


id

integer

ID of the plan


typestringData type

attributesobjectInformation about the plan


created_at

string

Date and time of the plan creation



updated_at

string

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:

  • true — the plan is available for sale.
  • false — the plan is not available for sale.


plan_class_id

integer

ID of the service term (see Managing service terms)



product_id

integer

ID of the product of the plan



billing_typestringBilling type of the plan (see Charges for the subscriptions with different billing types)


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


fixed_pricebool

The Fixed price option of the plan:

  • true — a customer pays for the subscription and ordering additional resources the same price as it was set at the moment of the subscription order. The new price will be applied only after the subscription is renewed.
  • false — the plan prices are not fixed for customers.


skustringSKU of the plan


singletonbool

The Singleton option of the plan:

  • true — a customer can have only one subscription to the plan.
  • false — a customer can have several subscriptions to the plan.


auto_renewalbool

Indicates the status of the Auto-renew option of the plan:

  • true — the Auto-renew option is activated.
  • false — the Auto-renew option is not activated.


auto_renewal_disabledbool

Indicates the status of the Disable the Auto-renew option option of the plan:

  • true — the Disable the Auto-renew option option is activated.
  • false — the Disable the Auto-renew option option is not activated.


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_category_publicbool

Indicates the status of the Public option of the product category:

  • true — the product category is available for selling.
  • false — the product category is not available for selling.


product

string

Name of the product of the plan



plan_resources

object

Resources of the plan




dataarray of objectsObject data




idintegerID of the resource in the plan




typestringData type




attributesobjectInformation about the resource





created_atstringDate and time of the resource creation





updated_atstringDate and time when the resource was updated





namestring

Name of the resource






measurablebool

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

  • true — the 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.
  • boolean — the resource is non-measurable. The resource amount is not required and:
    • true — the resource is included in the plan.
    • false — the 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. For an unlimited resource (unlimited_units = true), limit = 0






setup_feestring

Setup fee of the resource






recurring_feestring

Monthly recurring fee of the resource






overuse_feestring

Overuse fee of the resource






renewal_feestring

Renewal fee of the resource






unlimited_unitsbool

Attribute of the unlimited resource:

  • true — the resource is unlimited.
  • false — the resource is not unlimited.





publicbool

Availability of the resource:

  • true — the resource is available for ordering.
  • false — the resource is not available for ordering.





statusstring

Status of the resource:

  • active
  • inactive
  • deleted





resource_idinteger

ID of the resource in the application template






priorityintegerPriority of the resource. For the main resource, priority is maximal





net_costsobject

The resource net costs







setup_feestringSetup fee of the resource






recurring_feestring

Monthly recurring fee of the resource







overuse_feestring

Overuse fee of the resource







renewal_feestring

Renewal fee of the resource






erpobject

The recommended price (ERP) of the resource







setup_feestring

Setup fee of the resource







recurring_feestring

Monthly recurring fee of the resource







overuse_feestring

Overuse fee of the resource







renewal_feestring

Renewal fee of the resource






custom_attributesobjectInformation about custom attributes of the resource






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


plan_periodsobjectPlan periods



dataarray of objectsObject data




idintegerID of the plan period




typestringData type




attributesobjectInformation about the plan period





created_atstring

Date and time of the plan period creation






updated_atstring

Date and time when the plan period was updated






duration_valueintegerDuration of the plan period. For an endless plan period, duration_value = null





duration_typestringUnit of measure of the plan period duration. For an endless plan period, duration_type = null





setup_feestringSetup fee of the plan for the plan period





recurring_feestringMonthly recurring fee of the plan for the plan period





transfer_feestringTransfer fee of a domain for the plan period. The transfer fee is applied if domains are available as a resource in the Service





renewal_feestringRenewal 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





endlessbool

Indicator of the endless plan period:

  • true — the plan period is endless (perpetual).
  • false — the plan period is not endless. For the plan period duration, see duration_value and duration_type.





net_costsobject

The period net costs







setup_feestringSetup fee of the plan for the plan period






recurring_feestringMonthly recurring fee of the plan for the plan period






transfer_feestringTransfer fee of a domain for the plan period. The transfer fee is applied if domains are available as a resource in the service






renewal_feestringRenewal fee of the plan for the plan period





erpobjectThe recommended price (ERP) of the plan period






setup_feestringSetup fee of the plan for the plan period






recurring_feestringMonthly recurring fee of the plan for the plan period






transfer_feestringTransfer fee of a domain for the plan period. The transfer fee is applied if domains are available as a resource in the service






renewal_feestringRenewal fee of the plan for the plan period


plan_currencystringCurrency code of the plan


available_account_types

objectInformation about account types



dataarray of objectsObject data




id

integer

ID of the account type




typestringData type




attributesobjectInformation about an account type





created_atstringDate and time of the account type creation





updated_atstringDate and time when the account type was updated





reseller_idintegerID of the reseller linked to the account type





namestringName of the account types





ancestrystringID of the parent account type





default_payment_method_idintegerID of the default payment method (see Configuring payment methods)





keystringKey that is used to refer to the account type by API or a placeholder





name_pattern

string

Template of the account type name which is displayed in the platform





use_by_default

bool

Default account type:

  • true — the account type is used by default.
  • false — the account type is not used by default.





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


custom_attributesobjectInformation about custom attributes of the plan



custom_attributes.['custom_attribute_key']stringValue of the custom attribute of the plan

relationshipsobjectInformation about the related objects


plan_categoryobjectInformation about the related plan category



dataobjectInformation about the plan category




idstringID of the plan category




typestringData type
includedarray of objects

Additional information about objects listed in the request:

NameData typeDescription
idstringID of the object
typestringData type
attributesobjectAttributes of the object (see details below)

For a plan category (see Creating a plan category):

NameData typeDescription
created_atstringDate and time of the plan category creation

updated_at

stringDate and time of the plan category last update
keystringUnique key of the plan category
namestringName of the plan category
descriptionstringDescription of the plan category
priorityintegerDisplaying priority of the plan category
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,
                "fixed_price": true,
                "sku": "91fd106f-4b2c",
                "singleton": false,
                "auto_renewal": false,
                "auto_renewal_disabled": false,
                "plan_class": "test",
                "product_category_id": 190,
                "product_category": "default",
				"product_category_public": false,
                "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": "res2",
                                "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,
                                "priority": 0,
                                "net_costs": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                },
                                "erp": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                }, 
                                "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": "res3",
                                "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,
                                "priority": 1,
                                "net_costs": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                },
                                "erp": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                }, 
                                "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,
                                "endless": true,
                                "net_costs": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "transfer_fee": "0.0",
                                    "renewal_fee": "0.0"
                                },
                                "erp": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "transfer_fee": "0.0",
                                    "renewal_fee": "0.0"
                                }
                            }
                        }
                    ]
                },
                "available_account_types": {
                    "data": [
                        {
                            "id": "12",
                            "type": "account_types",
                            "attributes": {
                                "created_at": "2016-10-25T05:16:28.789779+0000",
                                "updated_at": "2017-02-01T12:04:39.227805+0000",
                                "reseller_id": 1,
                                "name": "Business",
                                "ancestry": null,
                                "default_payment_method_id": 197,
                                "key": "business",
                                "name_pattern": "%primary_name",
                                "use_by_default": false,
                                "primary_name": "Company name"
                            }
                        },
                        {
                            "id": "1564",
                            "type": "account_types",
                            "attributes": {
                                "created_at": "2017-03-20T13:34:28.163302+0000",
                                "updated_at": "2022-09-15T08:33:31.943006+0000",
                                "reseller_id": 1,
                                "name": "Personal",
                                "ancestry": "1562",
                                "default_payment_method_id": 2,
                                "key": "personal",
                                "name_pattern": "%first_name %middle_name %last_name",
                                "use_by_default": false,
                                "primary_name": ""
                            }
                        }
                    ]
                },
                "plan_currency": "RUB",
                "custom_attributes": {
                    "vat25": "0"
                }
            },
            "relationships": {
                "plan_category": {
                    "data": {
                        "id": "190",
                        "type": "plan_categories"
                    }
                }
            }
        },
        {
            "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,
                "fixed_price": true,
                "sku": "f54f74e9a239",
                "singleton": false,
                "auto_renewal": true,
                "auto_renewal_disabled": false,
                "plan_class": "Plan VSP billing info 7-Reservation",
                "product_category_id": 190,
                "product_category": "default",
				"product_category_public": false,
                "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,
                                "priority": 0,
                                "net_costs": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                },
                                "erp": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                }, 
                                "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": "Licenses",
                                "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,
                                "priority": 1,
                                "net_costs": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                },
                                "erp": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                },  
                                "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,
                                "endless": false,
                                "net_costs": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "transfer_fee": "0.0",
                                    "renewal_fee": "0.0"
                                },
                                "erp": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "0.0",
                                    "transfer_fee": "0.0",
                                    "renewal_fee": "0.0"
                                }  
                            }
                        }
                    ]
                },
                "available_account_types": {
                    "data": [
                        {
                            "id": "12",
                            "type": "account_types",
                            "attributes": {
                                "created_at": "2016-10-25T05:16:28.789779+0000",
                                "updated_at": "2017-02-01T12:04:39.227805+0000",
                                "reseller_id": 1,
                                "name": "Business",
                                "ancestry": null,
                                "default_payment_method_id": 197,
                                "key": "business",
                                "name_pattern": "%primary_name",
                                "use_by_default": false,
                                "primary_name": "Company name"
                            }
                        },
                        {
                            "id": "1564",
                            "type": "account_types",
                            "attributes": {
                                "created_at": "2017-03-20T13:34:28.163302+0000",
                                "updated_at": "2022-09-15T08:33:31.943006+0000",
                                "reseller_id": 1,
                                "name": "Personal",
                                "ancestry": "1562",
                                "default_payment_method_id": 2,
                                "key": "personal",
                                "name_pattern": "%first_name %middle_name %last_name",
                                "use_by_default": false,
                                "primary_name": ""
                            }
                        }
                    ]
                },
                "plan_currency": "RUB",
                "custom_attributes": {}
            },
            "relationships": {
                "plan_category": {
                    "data": {
                        "id": "190",
                        "type": "plan_categories"
                    }
                }
            }
        }
    ],
    "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"
    }
}