Get list of plans of downstream resellers

The Get list of plans of downstream resellers method returns the list of plans of all downstream resellers 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}/child_reseller_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 of any 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

The response model is similar to the Get list of plans method, excluding additional information about objects related to a plan (see Get list of plans).

Request example

GET /api/v3/resellers/1/child_reseller_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/child_reseller_plans/?page%5Bnumber%5D=78&page%5Bsize%5D=2",
        "first": "http://test.activeplatform.com/api/v3/resellers/1/child_reseller_plans/?page%5Bnumber%5D=1&page%5Bsize%5D=2",
        "prev": "http://test.activeplatform.com/api/v3/resellers/1/child_reseller_plans/?page%5Bnumber%5D=77&page%5Bsize%5D=2",
        "next": "http://test.activeplatform.com/api/v3/resellers/1/child_reseller_plans/?page%5Bnumber%5D=79&page%5Bsize%5D=2",
        "last": "http://test.activeplatform.com/api/v3/resellers/1/child_reseller_plans/?page%5Bnumber%5D=242&page%5Bsize%5D=2"
    }
}