Get the downstream Resellers list
For getting the list of all downstream Resellers, the Get Resellers List (Customer Store) method can also be used (see Get Resellers List (Customer Store)).
The Get the downstream Resellers list method returns the list of all downstream Resellers with respect to the current Reseller, or with respect to any of its downstream Resellers.
The Manager's API token specified in an API request determines 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-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 |
reseller_id | path | integer | Required | ID 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
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/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"
}
}