Get list of switchable plans

The Get list of switchable plans method returns the list of switchable plans for a plan of the current reseller or any of its downstream resellers (see Managing Switchable plans).

XML
GET {base_url}/api/v3/resellers/{reseller_id}/plans/{plan_id}/switchable_plans

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

X-Api-Token

header

string

Required

API token of a manager that performs the operation (see


)

Content-Type

header

string

Required

Media type of the request. Specify the following: application/vnd.api+json

Accept

header

string

Required

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

base_url

path

string

Required

ActivePlatform URL

reseller_id

path

integer

Required

ID of the current reseller or any of its downstream resellers (see 


)

plan_id

path

integer

Required

ID of the plan for which the list of switchable plans is requested

page[size]

query

integer

Optional

Page navigation: number of elements per page. The default value is 50

page[number]

query

integer

Optional

Page navigation: page number

filter[switch_type]

query

string

Required

Filter the list of switchable plans by switch type:

  • immediate_switch — plans available for the immediate switch.

  • delayed_switch — plans available for the delayed switch.

Response model

Name

Data type

Description

data

array of objects

Response data


id

integer

ID of the plan


type

string

Data type


attributes

object

Information about the plan



created_at

string

Date and time of the plan creation



updated_at

string

Date and time when the plan was updated



status

string

Status of the plan (for the list of plans statuses, see


)



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 )



product_id

integer

ID of the product of the plan



billing_type

string

Billing type of the plan (see


)



ancestry

string

For delegated plans, consists of the list of all parent plans starting from the root plan (see


). For plans created by the reseller, is null.



reseller_id

integer

ID of the reseller



fixed_price

bool

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.



sku

string

SKU of the plan



singleton

bool

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_renewal

bool

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_disabled

bool

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_public

bool

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




data

array of objects

Object data





id

integer

ID of the resource in the plan





type

string

Data type





attributes

object

Information about the resource






created_at

string

Date and time of the resource creation






updated_at

string

Date and time when the resource was updated






name

string

Name of the resource






measurable

bool

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_measure

string

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_name

string

Name of the application template






included

integer

Amount of the resource included in the plan by default (included resources are part of the subscription price)






minimum

integer

Minimum amount of the resource (together with the included amount) available for ordering (see )






limit

integer

Maximum amount of the resource available for ordering. For an unlimited resource (unlimited_units = true), limit = 0






setup_fee

string

Setup fee of the resource






recurring_fee

string

Monthly recurring fee of the resource






overuse_fee

string

Overuse fee of the resource






renewal_fee

string

Renewal fee of the resource






unlimited_units

bool

Attribute of the unlimited resource:

  • true — the resource is unlimited.

  • false — the resource is not unlimited.






public

bool

Availability of the resource:

  • true — the resource is available for ordering.

  • false — the resource is not available for ordering.






status

string

Status of the resource:

  • active

  • inactive

  • deleted






resource_id

integer

ID of the resource in the application template






priority

integer

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






net_costs

object

The resource net costs







setup_fee

string

Setup fee of the resource







recurring_fee

string

Monthly recurring fee of the resource







overuse_fee

string

Overuse fee of the resource







renewal_fee

string

Renewal fee of the resource






erp

object

The recommended price (ERP) of the resource







setup_fee

string

Setup fee of the resource







recurring_fee

string

Monthly recurring fee of the resource







overuse_fee

string

Overuse fee of the resource







renewal_fee

string

Renewal fee of the resource






custom_attributes

object

Information about custom attributes of the resource







plan_resources.custom_attributes.['custom-attribute-key']

string

Value of the custom attribute of the resource



plan_periods

object

Plan periods




data

array of objects

Object data





id

integer

ID of the plan period





type

string

Data type





attributes

object

Information about the plan period






created_at

string

Date and time of the plan period creation






updated_at

string

Date and time when the plan period was updated






duration_value

integer

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






duration_type

string

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






setup_fee

float

Setup fee of the plan for the plan period






recurring_fee

float

Monthly recurring fee of the plan for the plan period






transfer_fee

float

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






renewal_fee

float

Renewal fee of the plan for the plan period






trial

bool

Plan period type:

  • true — trial plan period.

  • false — commercial plan period.






public

bool

Availability of the plan period:

  • true — the plan period is available for ordering.

  • false — the plan period is not available for ordering.






status

string

Status of the plan period:

  • active

  • deleted






description

string

Plan period details description






endless

bool

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_costs

object

The period net costs







setup_fee

string

Setup fee of the plan for the plan period







recurring_fee

string

Monthly recurring fee of the plan for the plan period







transfer_fee

string

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







renewal_fee

string

Renewal fee of the plan for the plan period






erp

object

The recommended price (ERP) of the plan period







setup_fee

string

Setup fee of the plan for the plan period







recurring_fee

string

Monthly recurring fee of the plan for the plan period







transfer_fee

string

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







renewal_fee

string

Renewal fee of the plan for the plan period



plan_currency

string

Currency code of the plan



available_account_types

object

Information about account types




data

array of objects

Object data





id

integer

ID of the account type





type

string

Data type





attributes

object

Information about an account type






created_at

string

Date and time of the account type creation






updated_at

string

Date and time when the account type was updated






reseller_id

integer

ID of the reseller linked to the account type






name

string

Name of the account types






ancestry

string

ID of the parent account type






default_payment_method_id

integer

ID of the default payment method (see


)






key

string

Key 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_name

string

Name 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_attributes

object

Information about custom attributes of the plan




custom_attributes.['custom_attribute_key']

string

Value of the custom attribute of the plan



plan_class_data

object

The switch settings from the linked service term (see


)




increase_resources_immediate_switch_plan_order

bool

Ability to increase the resource quantity in an immediate switch plan order:

  • true — the resource quantity can be increased.

  • false — the resource quantity cannot be increased.




decrease_resources_immediate_switch_plan_order

bool

Ability to reduce the resource quantity in an immediate switch plan order:

  • true — the resource quantity can be reduced.

  • false — the resource quantity cannot be reduced.


relationships

object

Information about the related objects



plan_category

object

Information about the related plan category




data

object

Information about the plan category





id

string

ID of the plan category





type

string

Data type

links

array

Page navigation links that use the defined page navigation parameters


self

string

Current page link


first

string

First page link


prev

string

Previous page link


next

string

Next page link


last

string

Last page link

Request example

XML
GET /api/v3/resellers/1/plans/34533/switchable_plans?filter[switch_type]=immediate_switch
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json

Response example

JSON
{
    "data": [
        {
            "id": "34232",
            "type": "plans",
            "attributes": {
                "created_at": "2022-12-12T15:59:18.077871+0300",
                "updated_at": "2022-12-12T15:59:43.218917+0300",
                "status": "active",
                "name": "CSP monthly",
                "description": "",
                "public": true,
                "plan_class_id": 1,
                "product_id": 1143,
                "billing_type": "csp_monthly",
                "ancestry": null,
                "reseller_id": 1,
                "fixed_price": false,
                "sku": "",
                "singleton": false,
                "auto_renewal": false,
                "auto_renewal_disabled": false,
                "plan_class": "default",
                "product_category_id": 196,
                "product_category": "default",
                "product_category_public": false,
                "product": "Default",
                "plan_resources": {
                    "data": [
                        {
                            "id": "56959",
                            "type": "plan_resources",
                            "attributes": {
                                "created_at": "2022-12-12T15:59:43.199689+0300",
                                "updated_at": "2023-04-06T11:47:38.323993+0300",
                                "name": "License",
                                "measurable": false,
                                "unit_of_measure": "unit",
                                "application_template_name": "Manual provisioning",
                                "included": 0,
                                "minimum": 0,
                                "limit": 1500,
                                "setup_fee": "0.0",
                                "recurring_fee": "10.0",
                                "overuse_fee": "0.0",
                                "renewal_fee": "0.0",
                                "unlimited_units": false,
                                "public": true,
                                "status": "active",
                                "resource_id": 276,
                                "priority": 0,
                                "net_costs": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "10.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                },
                                "erp": {
                                    "setup_fee": "0.0",
                                    "recurring_fee": "10.0",
                                    "overuse_fee": "0.0",
                                    "renewal_fee": "0.0"
                                }, 
                                "custom_attributes": {
                                    "item_id": ""
                                }
                            }
                        }
                    ]
                },
                "plan_periods": {
                    "data": [
                        {
                            "id": "43361",
                            "type": "plan_periods",
                            "attributes": {
                                "created_at": "2023-04-04T11:09:29.290425+0300",
                                "updated_at": "2023-04-04T11:09:29.290425+0300",
                                "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": "",
                                "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"
                                } 
                            }
                        },
                        {
                            "id": "43013",
                            "type": "plan_periods",
                            "attributes": {
                                "created_at": "2022-12-12T15:59:43.211786+0300",
                                "updated_at": "2022-12-12T15:59:43.211786+0300",
                                "duration_value": 1,
                                "duration_type": "month",
                                "setup_fee": "0.0",
                                "recurring_fee": "0.0",
                                "transfer_fee": "0.0",
                                "renewal_fee": "0.0",
                                "trial": true,
                                "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"
                                }
                            }
                        }
                    ]
                },
                "plan_currency": "USD",
                "available_account_types": {
                    "data": [
                        {
                            "id": "1",
                            "type": "account_types",
                            "attributes": {
                                "created_at": "2016-08-25T09:26:12.658176+0300",
                                "updated_at": "2023-03-22T13:53:30.437450+0300",
                                "reseller_id": 1,
                                "name": "Personal",
                                "ancestry": null,
                                "default_payment_method_id": 1548,
                                "key": "personal",
                                "name_pattern": "%first_name %middle_name %last_name",
                                "use_by_default": true,
                                "primary_name": ""
                            }
                        },
                        {
                            "id": "2",
                            "type": "account_types",
                            "attributes": {
                                "created_at": "2016-08-25T09:26:12.674666+0300",
                                "updated_at": "2023-03-21T10:22:46.331102+0300",
                                "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"
                            }
                        }
                    ]
                },
                "custom_attributes": {
                    "23234": ""
                },
                "plan_class_data": {
                    "increase_resources_immediate_switch_plan_order": false,
                    "decrease_resources_immediate_switch_plan_order": true
                }
            },
            "relationships": {
                "plan_category": {
                    "data": {
                        "id": "1",
                        "type": "plan_categories"
                    }
                }
            }
        }
    ],
    "links": {
        "self": "https://test.activeplatform.com/api/v3/resellers/1/plans/34533/switchable_plans?filter%5Bswitch_type%5D=immediate_switch&page%5Bnumber%5D=1&page%5Bsize%5D=50",
        "first": "https://test.activeplatform.com/api/v3/resellers/1/plans/34533/switchable_plans?filter%5Bswitch_type%5D=immediate_switch&page%5Bnumber%5D=1&page%5Bsize%5D=50",
        "prev": null,
        "next": null,
        "last": "https://test.activeplatform.com/api/v3/resellers/1/plans/34533/switchable_plans?filter%5Bswitch_type%5D=immediate_switch&page%5Bnumber%5D=1&page%5Bsize%5D=50"
    }
}