Get store reports

Get store stats used for creating reports in Ecwid admin.

GET https://app.ecwid.com/api/v3/{storeId}/reports/{reportType}

Access scopes

Your app must have the following access scopes to make this request: read_store_stats

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

reportType

string reportType

Report type that defines what data will be received in response. Find the full list of available reports below.

reportType

A list of available reports. Chart types include:

  • Chart — Default line chart.

  • Piechart — Sliced round chart.

  • Table — Table with the data.

  • Barchart — Vertical bar chart.

Visitors:

reportType
Сhart type

allTraffic

chart

newVsReturningVisitors

piechart

visitorsByCities

piechart Not available yet

visitorsByCountry

barchart OR piechart

visitorsByDevice

piechart

visitorsByLanguage

piechart

siteEmailActivity

chart

Conversions:

reportType
Сhart type

salesFunnel

barchart

topOfCategoriesByViews

table Not available yet

topOfProductsByViews

table Not available yet

topOfProductsByAddingToCart

table Not available yet

Orders:

reportType
Сhart type

allOrders

chart

newOrdersVsRepeatOrders

piechart

topOfProductsByOrders

table Not available yet

topOfCustomersByOrders

table Not available yet

topOfPaymentMethodsByOrders

table

topOfShippingMethodsByOrders

table

topOfProductsByAvailability

table Not available yet

Finances:

reportType
Сhart type

allRevenue

chart

allExpenses

table

allProfit

chart Not available yet

topOfProductsByProfit

table

tips

table Not available yet

Marketing:

reportType
Сhart type

topOfMarketingSources

piechart

abandonedCarts

table Not available yet

automatedEmails

table Not available yet

acceptMarketing

piechart Not available yet

mailchimpCampaigns

table Not available yet

topOfCouponsByOrders

table Not available yet

topOfDiscountsByOrders

table Not available yet

giftCards

piechart Not available yet

Query params

All query params are optional.

Name
Type
Description

startedFrom

number

Lower bound of a time interval for report generation. If not specified, report will be generated from the store creation date. Supported value: UNIX timestamp, for example: 1591646400

endedAt

number

Upper bound of a time interval for report generation. If not specified, report will be generated up to the request date and time. Supported value: UNIX timestamp, for example: 1591679000

timeScaleValue

string

Time scale of the chart in response. Must be one of: hour, day, week, month, year.

comparePeriod

string

Period for comparing and calculating the period-over-period metrics in a received report. If not specified, no such metric will be added to the report.

Must be one of:

  • noComparePeriod

  • similarPeriodInPreviousWeek

  • similarPeriodInPreviousMonth

  • similarPeriodInPreviousYear

  • previousPeriod

Headers

The Authorization header is required.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Response JSON

A JSON object with the following fields:

Name
Type
Description

reportType

string

Type of the received report.

startedFrom

number

Lower bound of time interval used for report generation. Only present if it was passed as a request query param.

endedAt

number

Upper bound of time interval used for report generation. Only present if it was passed as a request query param.

timeScaleValue

string

Time scale of the chart in response. Only present if it was passed as a request query param.

firstDayOfWeek

string

First day of the week used in the report. One of: MONDAY, SUNDAY.

comparePeriod

string

Compare period for the report.

One of:

PREVIOUS_PERIOD,

SIMILAR_PERIOD_IN_PREVIOUS_WEEK,

SIMILAR_PERIOD_IN_PREVIOUS_MONTH,

SIMILAR_PERIOD_IN_PREVIOUS_YEAR,

NO_COMPARE_PERIOD.

aggregatedData

array of objects aggregatedData

Metric values aggregated for the set period.

dataset

array of objects dataSet

Part of the report defined by the time/device/region/etc. that depends on the report type (except table chart type).

comparePeriodAggregatedData

object comparePeriodAggregatedData

Metric values aggregated for the specified compare period. Requires any comparePeriod except for the NO_COMPARE_PERIOD.

comparePeriodDataset

object comparePeriodDataset

Partial report defined by the compare period and the report type. (except table chart type). Requires any reportType except for the table and any comparePeriod except for the NO_COMPARE_PERIOD.

aggregatedData

Name
Type
Description

dataId

string

ID of the passed metric.

dataValue

number

Metric value.

dataSet

Name
Type
Description

orderBy

number

Sorting number for the datasets in the report.

datapointId

string

Name of the graph, pie segment, or position at the top that describes the data inside. Example 1: "Mobile" and "Desktop" are two IDs for the visitorsByDeviceReport report. Example 2: "June 1, 2024" and "June 2, 2024" are IDs for the allTraffic report.

startTimeStamp

number

Starting datetime of the specific dataset. Available only for the chart chart type.

endTimeStamp

number

Final datetime of the specific dataset. Available only for the chart chart type.

percentage

number

Percentage of the "slice" in the report. Available only for the piechart report type.

data

array of objects

Aggregated data for the specific dataset in the report. Matches its structure with the aggregatedData field.

Last updated

Was this helpful?