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).
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 current reseller and downstream resellers accessible within a method.
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 Viewing and updating manager's information) |
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 Viewing and updating reseller general information) |
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 |
Response model
If no errors are encountered, the method returns data as the list of plans (see Get list of plans).
Request example
GET /api/v3/resellers/1/plans/1848/switchable_plans
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": [
{
"id": "1598",
"type": "plans",
"attributes": {
"created_at": "2020-05-01T10:01:00.406+03:00",
"updated_at": "2020-04-07T09:28:08.571+03:00",
"status": "active",
"name": "Clean CSPmonthly",
"description": "",
"public": true,
"plan_class_id": 1,
"product_id": 400,
"billing_type": "csp_monthly",
"ancestry": null,
"reseller_id": 1,
"fixed_price": false,
"plan_class": "default",
"product_category_id": 190,
"product_category": "default",
"product": "Default",
"plan_resources": {
"data": [
{
"id": "4338",
"type": "plan_resources",
"attributes": {
"created_at": "2020-05-05T18:59:22.668+03:00",
"updated_at": "2020-11-07T08:31:21.410+03:00",
"name": "CPU",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "cfm030_AT",
"included": 0,
"minimum": 0,
"limit": 0,
"setup_fee": "0.0",
"recurring_fee": "35.0",
"overuse_fee": "0.0",
"renewal_fee": "0.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 1442,
"priority": 0,
"net_costs": {
"setup_fee": "0.0",
"recurring_fee": "0.0",
"overuse_fee": "0.0",
"renewal_fee": "0.0"
},
"custom_attributes": {
"item_1c_id": "",
"vendor_short_name": ""
}
}
},
{
"id": "4340",
"type": "plan_resources",
"attributes": {
"created_at": "2020-05-05T21:01:35.647+03:00",
"updated_at": "2020-07-03T15:41:03.170+03:00",
"name": "Storage",
"measurable": false,
"unit_of_measure": "unit",
"application_template_name": "cfm030_AT",
"included": 0,
"minimum": 0,
"limit": 0,
"setup_fee": "0.0",
"recurring_fee": "15.0",
"overuse_fee": "0.0",
"renewal_fee": "0.0",
"unlimited_units": true,
"public": true,
"status": "active",
"resource_id": 1454,
"priority": 1,
"net_costs": {
"setup_fee": "0.0",
"recurring_fee": "0.0",
"overuse_fee": "0.0",
"renewal_fee": "0.0"
},
"custom_attributes": {
"item_1c_id": "",
"vendor_short_name": ""
}
}
}
]
},
"plan_periods": {
"data": [
{
"id": "3309",
"type": "plan_periods",
"attributes": {
"created_at": "2020-07-29T10:23:05.247+03:00",
"updated_at": "2020-07-29T10:23:05.247+03:00",
"duration_value": 1,
"duration_type": "month",
"setup_fee": "0.0",
"recurring_fee": "0.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": "",
"endless": false,
"net_costs": {
"setup_fee": "0.0",
"recurring_fee": "0.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0"
}
}
},
{
"id": "2808",
"type": "plan_periods",
"attributes": {
"created_at": "2020-03-01T17:21:16.565+03:00",
"updated_at": "2020-03-01T17:21:16.565+03:00",
"duration_value": 1,
"duration_type": "year",
"setup_fee": "0.0",
"recurring_fee": "0.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0",
"trial": false,
"public": true,
"status": "active",
"description": "",
"endless": false,
"net_costs": {
"setup_fee": "0.0",
"recurring_fee": "0.0",
"transfer_fee": "0.0",
"renewal_fee": "0.0"
}
}
}
]
},
"available_account_types": [
{
"id": 1,
"name": "Personal BLR",
"created_at": "2016-08-25T09:26:12.658+03:00",
"updated_at": "2019-10-02T03:30:11.716+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": "2017-05-10T19:28:55.575+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": "EUR",
"custom_attributes": {
"item_1c_id": ""
}
},
"relationships": {
"plan_category": {
"data": {
"id": "190",
"type": "plan_categories"
}
}
}
}
],
"links": {
"self": "https://test.activeplatform.com/api/v3/resellers/1/plans/1848/switchable_plans?page%5Bnumber%5D=1&page%5Bsize%5D=50",
"first": "https://test.activeplatform.com/api/v3/resellers/1/plans/1848/switchable_plans?page%5Bnumber%5D=1&page%5Bsize%5D=50",
"prev": null,
"next": null,
"last": "https://test.activeplatform.com/api/v3/resellers/1/plans/1848/switchable_plans?page%5Bnumber%5D=1&page%5Bsize%5D=50"
}
}