Get list of downstream resellers

For getting the list of all downstream resellers, the Get list of resellers (Customer Store) method can also be used (see Get list of resellers (Customer Store)).

The Get list of downstream resellers method returns the list of all downstream resellers with respect to the current reseller, or with respect to 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_resellers

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]

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

NameData typeDescription
idstringReseller ID
typestringData type
attributesobjectReseller information

parent_idstringUpstream (parent) reseller ID

created_atdateDate and time of the reseller creation

updated_atdateDate and time of the last update of the reseller information

generalobjectModel of the general information about the reseller


namestringReseller name


domainstringReseller domain


currencystringReseller currency in the ISO 4217 alfa-3 format


managerstringManager that is attached to the reseller

companyobjectModel of the information about the reseller company


namestringCompany name


address_line_1stringFirst line of the company address


address_line_2stringSecond line of the company address


citystringCity, in which the company is situated


statestringState, in which the company is situated


zipstringZip-code of the company


countrystringCompany country code according to ISO 3166-1 alpha-2 standard


phonestring

Phone number of the company:

  • + < country code > < city code or network code > < phone number >.
  • 00 < country code > < city code or network code > < phone number >.


faxstringCompany fax number


emailstringCompany email

contactsobjectInformation about reseller contact person


first_namestringFirst name of the company contact person


last_namestringLast name of the company contact person


middle_namestringMiddle name of the company contact person


positionstringPosition of the company contact person


phonestring

Phone number of the company contact person:

  • + < country code > < city code or network code > < phone number >.
  • 00 < country code > < city code or network code > < phone number >.


emailstringCompany contact person's email

attributes.custom_attributesobjectReseller attributes


attributes.custom_attributes['custom_attribute_key']stringReseller attribute value

Request example

GET /api/v3/resellers/1/child_resellers?page[size]=2&page[number]=60
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetest3gJXZH5uHCw
Accept: application/vnd.api+json

Response example

{
    "data": [
        {
            "id": "298",
            "type": "resellers",
            "attributes": {
                "created_at": "2020-02-13T02:43:51.617+03:00",
                "updated_at": "2020-02-16T07:36:55.100+03:00",
                "parent_id": 1,
                "general": {
                    "created_at": "2020-02-13T02:43:51.617+03:00",
                    "updated_at": "2020-02-16T07:36:55.100+03:00",
                    "name": "ResellerRoman",
                    "domain": "romankumenkotest.com",
                    "manager": "Roman Kumenko",
                    "currency": "USD"
                },
                "company": {
                    "created_at": "2020-02-13T02:43:51.617+03:00",
                    "updated_at": "2020-02-16T07:36:55.100+03:00",
                    "city": "Minsk",
                    "zip": "",
                    "country": "BY",
                    "fax": "",
                    "name": "RomanCompany",
                    "address_line_1": "Tanka",
                    "address_line_2": "",
                    "state": "Minsk",
                    "phone": "+375175555555",
                    "email": ""
                },
                "contacts": {
                    "created_at": "2020-02-13T02:43:51.617+03:00",
                    "updated_at": "2020-02-16T07:36:55.100+03:00",
                    "first_name": "Roman",
                    "last_name": "Kumenko",
                    "middle_name": "",
                    "position": "",
                    "phone": "+375175555555",
                    "email": "roman@lop.com"
                },
                "custom_attributes": {
                    "softline1c_plugin_api_password": "",
                    "softline1c_plugin_api_name": "",
                    "kpp": "",
                    "inn": "1321",
                    "reseller_mpn_id_ttttt": "",
                    "loc_1": "555",
                    "l_ocation": "",
                    "l_ocationv": "",
                    "ererere": "5445",
                    "inn_inn": ""
                }
            }
        },
        {
            "id": "299",
            "type": "resellers",
            "attributes": {
                "created_at": "2019-08-31T07:22:39.751+03:00",
                "updated_at": "2019-08-31T07:22:39.778+03:00",
                "parent_id": 1,
                "general": {
                    "created_at": "2019-08-31T07:22:39.751+03:00",
                    "updated_at": "2019-08-31T07:22:39.778+03:00",
                    "name": "ResellerRoman2",
                    "domain": "",
                    "manager": "Roman Kumenko",
                    "currency": "USD"
                },
                "company": {
                    "created_at": "2019-08-31T07:22:39.751+03:00",
                    "updated_at": "2019-08-31T07:22:39.778+03:00",
                    "city": "Minsk",
                    "zip": "220017",
                    "country": "BY",
                    "fax": "",
                    "name": "OlegInterprise",
                    "address_line_1": "Tanka",
                    "address_line_2": "",
                    "state": "Minsk",
                    "phone": "+375179999999",
                    "email": "oleg@rasava.com"
                },
                "contacts": {
                    "created_at": "2019-08-31T07:22:39.751+03:00",
                    "updated_at": "2019-08-31T07:22:39.778+03:00",
                    "first_name": "Oleg",
                    "last_name": "Oleg",
                    "middle_name": "",
                    "position": "OlegInterprise",
                    "phone": "+375179999999",
                    "email": "oleg@rasava.com"
                },
                "custom_attributes": {
                    "softline1c_plugin_api_password": "",
                    "softline1c_plugin_api_name": "",
                    "kpp": "",
                    "inn": "1321",
                    "reseller_mpn_id_ttttt": "",
                    "loc_1": "555",
                    "l_ocation": "",
                    "l_ocationv": "",
                    "ererere": "6354",
                    "inn_inn": ""
                }
            }
        }
    ],
    "links": {
        "self": "http://test.activeplatform.com/api/v3/resellers/1/child_resellers?page%5Bnumber%5D=78&page%5Bsize%5D=2",
        "first": "http://test.activeplatform.com/api/v3/resellers/1/child_resellers?page%5Bnumber%5D=1&page%5Bsize%5D=2",
        "prev": "http://test.activeplatform.com/api/v3/resellers/1/child_resellers?page%5Bnumber%5D=77&page%5Bsize%5D=2",
        "next": "http://test.activeplatform.com/api/v3/resellers/1/child_resellers?page%5Bnumber%5D=79&page%5Bsize%5D=2",
        "last": "http://test.activeplatform.com/api/v3/resellers/1/child_resellers?page%5Bnumber%5D=80&page%5Bsize%5D=2"
    }
}