Retrieve a cumulative subscriptions report

Retrieves a cumulative subscriptions report.

SecuritySecretApiKey or JWT
Request
query Parameters
aggregationField
required
string

Report aggregation field.

Enum: "day" "month"
periodStart
required
string <date-time>

Date and time when the report starts.

periodEnd
required
string <date-time>

Date and time when the report ends.

limit
integer [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offset
integer >= 0

Specifies the starting point within the collection of items to be returned.

filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

Responses
200

Report retrieved.

Response Schema: application/json
Array of objects

Cumulative subscription data.

Array
aggregationValue
string

Date in YYYY-MM format for monthly aggregation, or YYYY-MM-DD for daily aggregation.

newCount
integer

Number of new subscriptions within the aggregation.

canceledCount
integer

Number of canceled subscriptions within the aggregation.

cumulativeCount
integer

Total number of cumulative subscriptions.

This field is calculated based on: the number of cumulative subscriptions from the previous aggregation period + newCount - canceledCount.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

get/experimental/reports/cumulative-subscriptions
Request samples
const params = {
    aggregationField: 'day',
    periodStart: '2017-09-21T00:00:00Z',
    periodEnd: '2017-09-28T23:59:59Z',
    limit: 20,
    offset: 0,
    tz: 0
};
const report = await api.reports.getCumulativeSubscriptions(params);
Response samples
application/json
{
  • "data": [
    ]
}