Get a store's statistic information in the read-only format used for reports creation in Ecwid control panel.
Access scopes
Requires the following access scope: read_store_stats
Headers
Name
Type
Description
Authorization
string
Authorize request with an access token. Format:Bearer access_token.
Example: Bearer secret_ab***cd, where secret_ab***cd is your access token.
Path parameters
Name
Type
Description
storeId
string
Ecwid store ID
report_type
string
Name of report. See all types of report below.
Report types (WIP)
Report category
Name of report (report_type)
Сhart type
Visitors
allTraffic
chart
newVsReturningVisitors not ready
piechart
visitorsByCities not ready
piechart
visitorsByCountry not ready
barchart OR piechart
visitorsByDevice not ready
piechart
visitorsByLanguage not ready
piechart
Conversions
salesFunnel
barchart
topOfCategoriesByViews not ready
table
topOfProductsByViews not ready
table
topOfProductsByAddingToCart not ready
table
Orders
allOrders not ready
chart
newOrdersVsRepeatOrders not ready
piechart
topOfProductsByOrders not ready
table
topOfCustomersByOrders not ready
table
topOfPaymentMethodsByOrders not ready
table
topOfShippingMethodsByOrders not ready
table
topOfProductsByAvailability not ready
table
Financies
allRevenue not ready
chart
allExpenses not ready
table
allProfit not ready
chart
topOfProductsByProfit not ready
table
tips not ready
table
Marketing
topOfMarketingSources not ready
piechart
abandonedCarts not ready
table
automatedEmails not ready
table
acceptMarketing not ready
piechart
mailchimpCampaigns not ready
table
topOfCouponsByOrders not ready
table
topOfDiscountsByOrders not ready
table
giftCards not ready
piechart
Query parameters
Field
Type
Description
startedFrom
number
Lower bound of time interval a report is generated for. If not set, report is generated from store creation date. Supported value: UNIX timestamp, example: 1591646400
endedAt
number
Upper bound of time interval a report is generated for. If not set, upper bound is the request creation time. Supported value: UNIX timestamp, example: 1591732800
timeScaleValue
string
Value for the time axis interval in chart. Allows to select the chart detailization level. Supported values: hour, day, week, month, year
comparePeriod
string
Period the responses will compare and calculate the periodOverPeriod metrics. Supported values:
noComparePeriod(default value)
similarPeriodInPreviousWeek
similarPeriodInPreviousMonth
similarPeriodInPreviousYear
previousPeriod
Response
A JSON object containing the statistic information with the following fields:
Field
Type
Description
reportType
string
Name of report
startedFrom
number
Lower bound of time interval passed in the request parameter
endedAt
number
Upper bound of time interval passed in the request parameter
timeScaleValue
string
Value for the time axis interval in chart passed in the request parameter
aggregatedData
<AggregatedData>
Array of objects containing metric values aggregated for the set period
dataset
<DataSet>
Array of objects containing ordered metrics
AggregatedData
Field
Type
Description
dataId
string
ID of the passed metric
dataValue
number
Metric value
DataSet
Field
Type
Description
orderBy
number
Ordinal number of graph point, segment of a pie chart or position number in the top
datapointId
string
Name of graph point, segment of a pie chart or position number in the top (time, date, date range)
Errors
In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description
HTTP codes
HTTP Status
Description
400
Request parameters are malformed
403
Access token doesn't have read_store_stats scope
404
The info is not found
405
Method not allowed. Can occur when using POST instead of GET HTTP request method
415
Unsupported content-type: expected application/json or text/json
500
Cannot retrieve the info because of an error on the server
Error response body (optional)
Field
Type
Description
errorMessage
string
Error message
Language
Click Try It! to start a request and see the response here!