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/
Optional

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 objectsResponse data.
data[].idstringReseller's unique ID.
data[].typestringResponse model type.
data[].attributesobjectModel of the full information about the Reseller.
data[].attributes.parent-idstringUpline (parent) Reseller's unique ID.
data[].attributes.created-atstringDate and time of the Reseller creation.
data[].attributes.updated-atstringDate and time of the last update of the Reseller information.
data[].attributes.generalobjectModel of the general information about the Reseller.
data[].attributes.general.namestringReseller's name.
data[].attributes.general.domainstringReseller's domain.
data[].attributes.general.currencystringReseller's currency in the ISO 4217 alfa-3 format.
data[].attributes.general.managerstringManager that is attached to the Reseller.
data[].attributes.companyobjectModel of the information about the Reseller's company.
data[].attributes.company.namestringCompany name.
data[].attributes.company.address-line-1stringFirst line of the company address.
data[].attributes.company.address-line-2stringSecond line of the company address.
data[].attributes.company.citystringCity, in which the company is situated.
data[].attributes.company.statestringState, in which the company is situated.
data[].attributes.company.zipstringZip-code of the company.
data[].attributes.company.countrystringCompany country code according to ISO 3166-1 alpha-2 standard.
data[].attributes.company.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 >
data[].attributes.company.faxstringCompany fax number.
data[].attributes.company.emailstringCompany email.
data[].attributes.contactsobjectModel of the information about the Reseller's company contact person.
data[].attributes.contacts.first-namestringFirst name of the company contact person.
data[].attributes.contacts.last-namestringLast name of the company contact person.
data[].attributes.contacts.middle-namestringMiddle name of the company contact person.
data[].attributes.contacts.positionstringPosition of the company contact person.
data[].attributes.contacts.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 >
data[].attributes.contacts.emailstringCompany contact person's email.
data[].attributes.custom-attributesobjectModel of the Reseller custom attributes.
data[].attributes.custom-attributes['custom-attribute-key']stringValue 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"
    }
}