Get reseller analytics

The Get reseller analytics method is used to get information about the expenses per subscription of all reseller's customers. The target period can be specified using arbitrary dates only. 

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

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


)

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

The reseller ID (see


)

date_from

query

string

Required

The first day of the target period (YYYY-MM-DD)

date_to

query

string

Required

The last day of the target period (YYYY-MM-DD)

Response model

Name

Data type

Description

expenses

array of objects

A list of expenses


total

string

The subscription expenses amount in the reseller currency


billing_period

string

The billing period (YYYY-MM)


account_id

integer

The account ID


subscription_id

integer

The subscription ID

Request example

GET /api/v3/resellers/1/reseller_analytics?date_from=2023-09-01&date_to=2023-09-20
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json

Response example

JSON
{
    "expenses": [
        {
            "total": "25.76",
            "period": "2023-06",
            "account_id": 929,
            "subscription_id": 3008386
        },
        {
            "total": "437.0",
            "period": "2023-06",
            "account_id": 1195,
            "subscription_id": 3008458
        }
    ]
}