Retrieve dashboard data

Retrieves dashboard 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.

metrics
string

Comma-separated list of metrics.

segments
string

Dashboard report segments as a JSON array.

Responses
200

Report retrieved.

Response Schema: application/json
Array
metric
string

Type of metric.

Enum: "approvalRate" "salesCount" "salesValue" "refundsValue" "chargebacksCount" "chargebacksValue" "transactionsCount" "redeemedCouponsCount" "newLeadsCount" "newCustomersCount" … 36 more
humanName
string

Display name of the metric.

increaseIsGood
boolean

Specifies whether a higher value is a positive result for the merchant.

Array of objects

Segment data.

Array
name
string

Name of the segment.

value
number or null <double>

Segment value for the specified date range.

previousValue
number or null <double>

Segment value for the previous date range. This value is relative to the specified date range.

humanValue
string or null

Human readable segment value. This field is formatted with a currency sign.

changeRatio
number or null <double>

Ratio of the current value for each previous value. A null value represents infinity.

humanChangeRatio
string or null

Human readable change ratio. This field is formatted percentage sign. A null value represents infinity.

Array of objects

Time series.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

get/experimental/reports/dashboard
Request samples
$service = new Rebilly\Sdk\ReportsService($client);

$dashboard = $service->reports()->getDashboardMetrics(
    new DateTimeImmutable('2022-01-01'),
    new DateTimeImmutable('now'),
    metrics: 'approvalRate,salesCount,salesValue,refundsValue',
);
Response samples
application/json
[
  • {
    }
]