Get downstream Reseller information by ID

There are two API methods to get information about a downstream Reseller:

  • Get downline Reseller information by ID
    GET {base_url}/api/v3/resellers/{reseller_id}

  • Get Reseller by ID
    GET {base_url}/customer_store/resellers/{reseller_id}

Each method returns the same response with information about the selected downstream Reseller.

The Get downline Reseller information by ID method doesn't require the Customer Store module, while the Get Reseller by ID method requires installed Customer Store (see Managing Storefront).

Get downline Reseller information by ID

The Get downline Reseller information by ID method returns information about the current Reseller or about any of its downstream Resellers.

Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.

GET: {base_url}/api/v3/resellers/{reseller_id}

Arguments

Name

Parameter type

Data type

Required/Optional

Description

X-Api-TokenheaderstringRequiredAPI token of the Manager that performs the operation (see Viewing and updating manager's information)
Content-TypeheaderstringRequiredIndicates the media type (text/html or text/JSON) of the response that is sent to the client by the server
AcceptheaderstringRequired

Information about data types that the client (browser) supports

reseller_idpathintegerRequiredID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information)

Response model

See below the response model of the Get Reseller by ID method.

Request example

GET http://reseller.activeplatform.com/api/v3/resellers/1 
 
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
X-Api-Token:qQwW12

Response example

See below the response example of the Get Reseller by ID method.

Get Reseller by ID

The Get Reseller by ID method returns information about selected downstream Reseller.

Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.

GET {base_url}/customer_store/resellers/{reseller_id}

Arguments

Name

Parameter type

Data type

Required/Optional

Description

reseller_id

path

integer

Required

ID of the current Reseller or any of its downline Resellers (see Viewing and updating reseller general information

api_tokenquerystringRequiredAPI token of the Manager that performs the operation (see Viewing and updating manager's information)

Response model

NameData typeDescription
idstringReseller ID
typestringData type
attributesobjectReseller information

parent-idstringUpline (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

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

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"
            }
        }
    }
}