Get the downline Resellers list
The Get Resellers List method returns the List of Resellers of all levels that are downline in relation to the selected one.
The selected Reseller, for whom the downline Resellers list is generated, is identified by the Manager's token that is specified in the request header.
The List of Resellers can be shown page by page. To split by page, the following Arguments should be passed:
- the page number (page);
- the amount of items per page (per_page).
GET: {base_url}/resellers
Arguments
Name | Parameter Type | Data type | Required/ | Description |
---|---|---|---|---|
page | query | integer | Optional | Returning the list of Resellers at the page with the specified number. |
per_page | query | integer | Optional | Setting a number of items in the page. |
Response model
Name | Data type | Description |
---|---|---|
data[] | array of objects | Response data. |
data[].id | string | Reseller's unique ID. |
data[].type | string | Response model type. |
data[].attributes | object | Model of the full information about the Reseller. |
data[].attributes.parent-id | string | Upline (parent) Reseller's unique ID. |
data[].attributes.created-at | string | Date and time of the Reseller creation. |
data[].attributes.updated-at | string | Date and time of the last update of the Reseller information. |
data[].attributes.general | object | Model of the general information about the Reseller. |
data[].attributes.general.name | string | Reseller's name. |
data[].attributes.general.domain | string | Reseller's domain. |
data[].attributes.general.currency | string | Reseller's currency in the ISO 4217 alfa-3 format. |
data[].attributes.general.manager | string | Manager that is attached to the Reseller. |
data[].attributes.company | object | Model of the information about the Reseller's company. |
data[].attributes.company.name | string | Company name. |
data[].attributes.company.address-line-1 | string | First line of the company address. |
data[].attributes.company.address-line-2 | string | Second line of the company address. |
data[].attributes.company.city | string | City, in which the company is situated. |
data[].attributes.company.state | string | State, in which the company is situated. |
data[].attributes.company.zip | string | Zip-code of the company. |
data[].attributes.company.country | string | Company country code according to ISO 3166-1 alpha-2 standard. |
data[].attributes.company.phone | string | Phone number of the company:
|
data[].attributes.company.fax | string | Company fax number. |
data[].attributes.company.email | string | Company email. |
data[].attributes.contacts | object | Model of the information about the Reseller's company contact person. |
data[].attributes.contacts.first-name | string | First name of the company contact person. |
data[].attributes.contacts.last-name | string | Last name of the company contact person. |
data[].attributes.contacts.middle-name | string | Middle name of the company contact person. |
data[].attributes.contacts.position | string | Position of the company contact person. |
data[].attributes.contacts.phone | string | Phone number of the company contact person:
|
data[].attributes.contacts.email | string | Company contact person's email. |
data[].attributes.custom-attributes | object | Model of the Reseller custom attributes. |
data[].attributes.custom-attributes['custom-attribute-key'] | string | Value of the Reseller custom attributes. |
Request example
curl -X GET -H "Content-Type: application/vnd.api+json" -H "Accept: application/vnd.api+json" -H "X-Api-Token: G2dYuBK44dgYu90id1122e" http://billing.activeplatform.com/api/v3/customer_store/resellers/
Response example
{
"data": [
{
"id": "1",
"type": "resellers",
"attributes": {
"created-at": "2017-06-09T15:44:51.694+03:00",
"updated-at": "2017-12-22T16:38:53.600+03:00",
"parent-id": 1,
"general": {
"name": "Company 1",
"domain": "cn1.billing.activeplatform.com",
"manager": "Manager 1",
"currency": "USD"
},
"company": {
"name": "Company name 1",
"address-line-1": "Nezalezhnosty av., 1",
"address-line-2": "Sovietsky distr.",
"city": "Minsk",
"state": "Minskaya",
"zip": "220000",
"country": "BY",
"fax": "+375170345678",
"phone": "+375290468624",
"email": "company@example.com"
},
"contacts": {
"first-name": "Ivan",
"last-name": "Petrov",
"middle-name": "Ivanovich",
"position": "Sales representative",
"phone": "+375290468624",
"email": "petrov.company@example.com"
},
"custom-attributes": {
"1c password ": "password",
"1c api name ": "1c api",
"kpp": "234342617111",
"inn": "23411113234",
"reseller pin": "1234"
}
}
},
{
"id": "2",
"type": "resellers",
"attributes": {
"created-at": "2017-06-12T17:41:51.694+03:00",
"updated-at": "2017-12-24T10:38:53.600+03:00",
"parent-id": 1,
"general": {
"name": "Company 2",
"domain": "cn2.billing.activeplatform.com",
"manager": "Manager 2",
"currency": "USD"
},
"company": {
"name": "Company name 2",
"address-line-1": "Nezalezhnosty av., 2",
"address-line-2": "Sovietsky distr.",
"city": "Minsk",
"state": "Minskaya",
"zip": "220000",
"country": "BY",
"fax": "+375172545458",
"phone": "+375292968624",
"email": "company2@example.com"
},
"contacts": {
"first-name": "Petr",
"last-name": "Ivanov",
"middle-name": "Ivanovich",
"position": "Sales representative",
"phone": "+375290478626",
"email": "ivanov.company2@example.com"
},
"custom-attributes": {
"1c password ": "password",
"1c api name ": "1c api",
"kpp": "444342617931",
"inn": "55411113276",
"reseller pin": "4321"
}
}
}
],
"links": {
"self": "http://billing.activeplatform.com/api/v3/customer_store/resellers?page%5Bnumber%5D=1&page%5Bsize%5D=50",
"next": "http://billing.activeplatform.com/api/v3/customer_store/resellers?page%5Bnumber%5D=2&page%5Bsize%5D=50",
"last": "http://billing.activeplatform.com/api/v3/customer_store/resellers?page%5Bnumber%5D=5&page%5Bsize%5D=50"
}
}