Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.analytics.overview();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->analytics->overview();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.analytics.overview()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/analytics/overview \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/analytics/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/analytics/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/analytics/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"store": {
"id": "743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"name": "Northwind Keys",
"slug": "northwind"
},
"range": {
"preset": "30d",
"from": "2026-09-23",
"to": "2026-10-22",
"days": 30,
"timezone": "UTC",
"inProgress": true
},
"currencyCode": "USD",
"totals": {
"revenue": 167.98,
"orders": 5,
"completedOrders": 5,
"newCustomers": 4,
"averageOrderValue": 33.6,
"visitors": 0,
"conversionRate": 0,
"recovered": {
"revenue": 0,
"orders": 0
}
},
"previous": {
"revenue": 0,
"orders": 0,
"newCustomers": 0,
"averageOrderValue": 0,
"visitors": 0,
"conversionRate": 0
},
"change": {
"revenue": null,
"orders": null,
"newCustomers": null,
"averageOrderValue": null,
"visitors": null,
"conversionRate": null
},
"funnel": [
{
"key": "visitors",
"count": 0,
"previousCount": 0,
"rate": 0,
"previousRate": 0,
"change": null
},
{
"key": "carted",
"count": 0,
"previousCount": 0,
"rate": 0,
"previousRate": 0,
"change": null
}
],
"returningCustomers": {
"customers": 1,
"returning": 0,
"rate": 0,
"previous": {
"customers": 0,
"returning": 0,
"rate": 0
},
"change": null
},
"series": {
"bucket": "day",
"points": [
{
"at": "2026-09-23",
"revenue": 0,
"orders": 0,
"previousAt": "2026-08-24",
"previousRevenue": 0,
"previousOrders": 0
},
{
"at": "2026-09-24",
"revenue": 89,
"orders": 1,
"previousAt": "2026-08-25",
"previousRevenue": 0,
"previousOrders": 0
}
]
},
"customerSeries": {
"bucket": "day",
"points": [
{
"at": "2026-09-23",
"customers": 0,
"previousAt": "2026-08-24",
"previousCustomers": 0
},
{
"at": "2026-09-24",
"customers": 0,
"previousAt": "2026-08-25",
"previousCustomers": 0
}
]
},
"statusCounts": {
"completed": 5,
"pending": 2,
"refunded": 1,
"cancelled": 2,
"chargeback": 0
},
"statusTotals": {
"completed": {
"orders": 5,
"amount": 167.98
},
"pending": {
"orders": 2,
"amount": 109.99
},
"refunded": {
"orders": 1,
"amount": 9.99
},
"cancelled": {
"orders": 2,
"amount": 19.98
},
"chargeback": {
"orders": 0,
"amount": 0
}
},
"week": [
[
0,
0
],
[
0,
0
]
],
"topCountries": [
{
"key": "DE",
"orders": 1,
"revenue": 49,
"share": 100
}
],
"topPaymentMethods": [
{
"key": "stripe",
"orders": 1,
"revenue": 49,
"share": 20
},
{
"key": "custom_c009621ccc3e9d74",
"orders": 1,
"revenue": 9.99,
"share": 20
}
],
"topProducts": [
{
"productName": "Northwind Pro",
"units": 2,
"orders": 2,
"revenue": 58.99
},
{
"productName": "Throwaway product",
"units": 3,
"orders": 3,
"revenue": 30
}
],
"lifetime": {
"products": 1,
"orders": 10,
"customers": 4,
"categories": 1
}
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Analytics
Get the overview
A period’s headline figures (revenue, orders, customers and the rest), the same figures for the period before, and a day by day series. What the dashboard’s home page draws.
Needs the analytics.read permission (Read Analytics). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
GET
/
stores
/
{storeId}
/
analytics
/
overview
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.analytics.overview();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->analytics->overview();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.analytics.overview()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/analytics/overview \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/analytics/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/analytics/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/analytics/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"store": {
"id": "743d82fb-6aad-44bb-ab00-d54c4b0eecb7",
"name": "Northwind Keys",
"slug": "northwind"
},
"range": {
"preset": "30d",
"from": "2026-09-23",
"to": "2026-10-22",
"days": 30,
"timezone": "UTC",
"inProgress": true
},
"currencyCode": "USD",
"totals": {
"revenue": 167.98,
"orders": 5,
"completedOrders": 5,
"newCustomers": 4,
"averageOrderValue": 33.6,
"visitors": 0,
"conversionRate": 0,
"recovered": {
"revenue": 0,
"orders": 0
}
},
"previous": {
"revenue": 0,
"orders": 0,
"newCustomers": 0,
"averageOrderValue": 0,
"visitors": 0,
"conversionRate": 0
},
"change": {
"revenue": null,
"orders": null,
"newCustomers": null,
"averageOrderValue": null,
"visitors": null,
"conversionRate": null
},
"funnel": [
{
"key": "visitors",
"count": 0,
"previousCount": 0,
"rate": 0,
"previousRate": 0,
"change": null
},
{
"key": "carted",
"count": 0,
"previousCount": 0,
"rate": 0,
"previousRate": 0,
"change": null
}
],
"returningCustomers": {
"customers": 1,
"returning": 0,
"rate": 0,
"previous": {
"customers": 0,
"returning": 0,
"rate": 0
},
"change": null
},
"series": {
"bucket": "day",
"points": [
{
"at": "2026-09-23",
"revenue": 0,
"orders": 0,
"previousAt": "2026-08-24",
"previousRevenue": 0,
"previousOrders": 0
},
{
"at": "2026-09-24",
"revenue": 89,
"orders": 1,
"previousAt": "2026-08-25",
"previousRevenue": 0,
"previousOrders": 0
}
]
},
"customerSeries": {
"bucket": "day",
"points": [
{
"at": "2026-09-23",
"customers": 0,
"previousAt": "2026-08-24",
"previousCustomers": 0
},
{
"at": "2026-09-24",
"customers": 0,
"previousAt": "2026-08-25",
"previousCustomers": 0
}
]
},
"statusCounts": {
"completed": 5,
"pending": 2,
"refunded": 1,
"cancelled": 2,
"chargeback": 0
},
"statusTotals": {
"completed": {
"orders": 5,
"amount": 167.98
},
"pending": {
"orders": 2,
"amount": 109.99
},
"refunded": {
"orders": 1,
"amount": 9.99
},
"cancelled": {
"orders": 2,
"amount": 19.98
},
"chargeback": {
"orders": 0,
"amount": 0
}
},
"week": [
[
0,
0
],
[
0,
0
]
],
"topCountries": [
{
"key": "DE",
"orders": 1,
"revenue": 49,
"share": 100
}
],
"topPaymentMethods": [
{
"key": "stripe",
"orders": 1,
"revenue": 49,
"share": 20
},
{
"key": "custom_c009621ccc3e9d74",
"orders": 1,
"revenue": 9.99,
"share": 20
}
],
"topProducts": [
{
"productName": "Northwind Pro",
"units": 2,
"orders": 2,
"revenue": 58.99
},
{
"productName": "Throwaway product",
"units": 3,
"orders": 3,
"revenue": 30
}
],
"lifetime": {
"products": 1,
"orders": 10,
"customers": 4,
"categories": 1
}
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
Query Parameters
The period.
Available options:
today, yesterday, 7d, 30d, this_week, last_week, this_month, last_month, this_year The first day of a period of your own, as YYYY-MM-DD. With to, in place of range.
Its last day, as YYYY-MM-DD.
The time zone those days are in, as an IANA name. Left out, UTC.
Example:
"Europe/Berlin"

