Get a List of the Reseller's switchable Plans
The Get a List of the Reseller's switchable Plans method returns the list of switchable Plans for a Plan by its ID of the current Reseller or any of its downstream Resellers (see Managing switchable plans).
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/{plan_id}/switchable_plans
Arguments
Name | Parameter Type | Data type | Required/Optional | Description |
---|---|---|---|---|
X-Api-Token | header | string | Required | API token of the Manager that performs the operation (see Viewing and updating manager's information) |
Content-Type | header | string | Required | Indicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser) |
Accept | header | string | Required | Information about data types that the client (browser) supports |
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 a List of the Reseller's 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,
"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": "HDD",
"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,
"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": ""
}
},
{
"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": ""
}
}
]
},
"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": ""
}
}
}
],
"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"
}
}