Retrieve a retention value report

Retrieves the total number of new customers for each aggregation period and the corresponding value for each customer over time.

SecuritySecretApiKey or JWT
Request
query Parameters
aggregationField
required
string

Report aggregation field.

Enum: "day" "month" "quarter" "year" "leadsSource" "leadsMedium" "leadsCampaign" "leadsContent" "leadsTerm" "leadsAffiliate" … 3 more
aggregationPeriod
required
string

Report aggregation period.

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

Date and time when the report starts.

periodEnd
required
string <date-time>

Date and time when the report ends.

includeRefunds
string

Specifies whether to include refunds.

Enum: "true" "false"
includeDisputes
string

Specifies whether to include disputes.

Enum: "true" "false"
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.

sort
Array of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -.

criteria
string

Criteria parameter for requesting a collection.

Responses
200

Report retrieved.

Response Headers
Pagination-Total
integer

Total number of items.

Example: 332
Pagination-Limit
integer

Maximum number of items per page.

Example: 100
Pagination-Offset
integer

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example: 2
Response Schema: application/json
Array of objects

Retention value data.

Array
aggregationValue
string

Value by which the report provides retention periods and values. Date values are displayed as follows:

  • Day: YYYY-MM-DD.
  • Month: YYYY-MM.
  • Quarter: YYYY-MM/YYYY-MM.
  • Year: YYYY.
customersCount
integer

Number of customers within the aggregation who make their first payment.

Array of objects

Periods of the specified aggregation.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

get/experimental/reports/retention-value
Request samples
const params = {
    aggregationField: 'month',
    aggregationPeriod: 'month',
    periodStart: '2016-09-01T00:00:00Z',
    periodEnd: '2017-09-01T00:00:00Z',
    includeRefunds: true,
    includeDisputes: false,
    limit: 20,
    offset: 0,
    tz: 0
};
const report = await api.reports.getRetentionValue(params);
Response samples
application/json
{
  • "data": [
    ]
}