Retrieve transaction histogram report data

Retrieves transaction histogram report data.

SecuritySecretApiKey or JWT
Request
query Parameters
periodStart
required
string <date-time>

Date and time when the report starts.

periodEnd
required
string <date-time>

Date and time when the report ends.

aggregationPeriod
required
string

Aggregation period of the report.

Enum: "hour" "day" "month"
metric
required
string

Metric on which the report is based.

Enum: "approval" "auth_approval" "avg_sales" "refunds" "refunds_count" "sales" "sales_count" "all_sales_count" "auth_approval_count" "disputes_count" … 4 more
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

Transaction report retrieved.

Response Schema: application/json
Array of objects

Histogram data.

Array
date
string

Date and time of data entry.

value
number

Data entry value.

403

Access forbidden.

get/experimental/histograms/transactions
Request samples
const params = {
    periodStart: '2017-09-21T00:00:00Z',
    // seven day period
    periodEnd: '2017-09-28T23:59:59Z',
    aggregationField: 'website',
    aggregationPeriod: 'day',
    metric: 'approval'
};
const report = await api.histograms.getTransactionHistogramReport(params);
console.log(report.fields.data);
Response samples
application/json
{
  • "data": [
    ]
}