Get list of resellers (Customer Store)

The Get list of resellers (Customer Store) method requires installed Customer Store (see Managing Storefront).

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

The Get list of resellers (Customer Store) method returns the list of all downstream resellers with respect to the current reseller.

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/customer_store/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
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/customer_store/resellers/?page[size]=2&page[number]=78
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetest3gJXZH5uHCw
Accept: application/vnd.api+json

Response example

{
    "data": [
        {
            "id": "297",
            "type": "resellers",
            "attributes": {
                "created_at": "2020-02-06T11:04:58.024+03:00",
                "updated_at": "2020-02-06T11:04:58.031+03:00",
                "parent_id": 294,
                "general": {
                    "created_at": "2020-02-06T11:04:58.024+03:00",
                    "updated_at": "2020-02-06T11:04:58.031+03:00",
                    "name": "3 2 child",
                    "domain": "",
                    "manager": "admin",
                    "currency": "USD"
                },
                "company": {
                    "created_at": "2020-02-06T11:04:58.024+03:00",
                    "updated_at": "2020-02-06T11:04:58.031+03:00",
                    "city": "Минск",
                    "zip": "220005",
                    "country": "BY",
                    "fax": "",
                    "name": "yuy",
                    "address_line_1": "Колоса",
                    "address_line_2": "",
                    "state": "Минская",
                    "phone": "+375298794561",
                    "email": "hko@tttu.by"
                },
                "contacts": {
                    "created_at": "2020-02-06T11:04:58.024+03:00",
                    "updated_at": "2020-02-06T11:04:58.031+03:00",
                    "first_name": "Юлий",
                    "last_name": "Юлий",
                    "middle_name": "",
                    "position": "",
                    "phone": "+375298794599",
                    "email": "ko@tttu.by"
                },
                "custom_attributes": {}
            }
        },
        {
            "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": "romankuzenkotest.com",
                    "manager": "Roman Kuzenko",
                    "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": "Kuzenko",
                    "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": ""
                }
            }
        }
    ],
    "links": {
        "self": "http://test.activeplatform.com/api/v3/customer_store/resellers/?page%5Bnumber%5D=78&page%5Bsize%5D=2",
        "first": "http://test.activeplatform.com/api/v3/customer_store/resellers/?page%5Bnumber%5D=1&page%5Bsize%5D=2",
        "prev": "http://test.activeplatform.com/api/v3/customer_store/resellers/?page%5Bnumber%5D=77&page%5Bsize%5D=2",
        "next": "http://test.activeplatform.com/api/v3/customer_store/resellers/?page%5Bnumber%5D=79&page%5Bsize%5D=2",
        "last": "http://test.activeplatform.com/api/v3/customer_store/resellers/?page%5Bnumber%5D=80&page%5Bsize%5D=2"
    }
}