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-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 |
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
Name | Data type | Description | ||
---|---|---|---|---|
id | string | Reseller ID | ||
type | string | Data type | ||
attributes | object | Reseller information | ||
parent_id | string | Upstream (parent) reseller ID | ||
created_at | date | Date and time of the reseller creation | ||
updated_at | date | Date and time of the last update of the reseller information | ||
general | object | Model of the general information about the reseller | ||
name | string | Reseller name | ||
domain | string | Reseller domain | ||
currency | string | Reseller currency in the ISO 4217 alfa-3 format | ||
manager | string | Manager that is attached to the reseller | ||
company | object | Model of the information about the reseller company | ||
name | string | Company name | ||
address_line_1 | string | First line of the company address | ||
address_line_2 | string | Second line of the company address | ||
city | string | City, in which the company is situated | ||
state | string | State, in which the company is situated | ||
zip | string | Zip-code of the company | ||
country | string | Company country code according to ISO 3166-1 alpha-2 standard | ||
phone | string | Phone number of the company:
| ||
fax | string | Company fax number | ||
string | Company email | |||
contacts | object | Information about reseller contact person | ||
first_name | string | First name of the company contact person | ||
last_name | string | Last name of the company contact person | ||
middle_name | string | Middle name of the company contact person | ||
position | string | Position of the company contact person | ||
phone | string | Phone number of the company contact person:
| ||
string | Company contact person's email | |||
attributes.custom_attributes | object | Reseller attributes | ||
attributes.custom_attributes['custom_attribute_key'] | string | Reseller 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"
}
}