import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.analytics.report();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->analytics->report();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.analytics.report()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/analytics/report \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/analytics/report"
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/report")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/analytics/report")
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": {
"sessions": 0,
"visitors": 0,
"pageViews": 0,
"orders": 5,
"revenue": 167.98,
"visitOrders": 0,
"visitRevenue": 0,
"viewsPerSession": 0,
"avgEngagedSeconds": 0,
"measuredSessions": 0,
"bounceRate": 0,
"cartRate": 0,
"conversionRate": 0
},
"previous": {
"sessions": 0,
"visitors": 0,
"pageViews": 0,
"orders": 0,
"revenue": 0,
"visitOrders": 0,
"visitRevenue": 0,
"viewsPerSession": 0,
"avgEngagedSeconds": 0,
"measuredSessions": 0,
"bounceRate": 0,
"cartRate": 0,
"conversionRate": 0
},
"change": {
"sessions": null,
"visitors": null,
"pageViews": null,
"orders": null,
"revenue": null,
"visitOrders": null,
"visitRevenue": null,
"viewsPerSession": null,
"avgEngagedSeconds": null,
"bounceRate": null,
"cartRate": null,
"conversionRate": null
},
"series": {
"bucket": "day",
"points": [
{
"at": "2026-09-23",
"sessions": 0,
"views": 0,
"previousAt": "2026-08-24",
"previousSessions": 0,
"previousViews": 0
},
{
"at": "2026-09-24",
"sessions": 0,
"views": 0,
"previousAt": "2026-08-25",
"previousSessions": 0,
"previousViews": 0
}
]
},
"pages": {
"rows": [],
"distinct": 0,
"views": 0,
"coversFrom": "2026-09-23",
"retentionDays": 90
},
"landing": {
"rows": [],
"distinct": 0
},
"exit": {
"rows": [],
"distinct": 0
},
"channels": {
"rows": [],
"distinct": 0
},
"referrers": {
"rows": [],
"distinct": 0
},
"devices": {
"rows": [],
"distinct": 0
},
"browsers": {
"rows": [],
"distinct": 0
},
"systems": {
"rows": [],
"distinct": 0
},
"campaigns": {
"rows": [],
"distinct": 0
},
"sources": {
"rows": [],
"distinct": 0
},
"campaignSales": [],
"engines": {
"rows": [],
"sessions": 0
},
"affiliates": [],
"countries": {
"rows": [],
"distinct": 0
},
"cities": {
"rows": []
}
}
}{
"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": {}
}Get the visits report
A period’s visits and what they went on to buy: visitors, where they came from by channel, website, campaign and affiliate, the pages they landed on, countries and devices. A sale is given to the last visit its buyer began before it, within 30 days. An order with no visit behind it (one made by hand, an invoice) counts in the totals and in none of the lists that say where sales came from.
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.
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.analytics.report();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->analytics->report();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.analytics.report()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/analytics/report \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/analytics/report"
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/report")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/analytics/report")
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": {
"sessions": 0,
"visitors": 0,
"pageViews": 0,
"orders": 5,
"revenue": 167.98,
"visitOrders": 0,
"visitRevenue": 0,
"viewsPerSession": 0,
"avgEngagedSeconds": 0,
"measuredSessions": 0,
"bounceRate": 0,
"cartRate": 0,
"conversionRate": 0
},
"previous": {
"sessions": 0,
"visitors": 0,
"pageViews": 0,
"orders": 0,
"revenue": 0,
"visitOrders": 0,
"visitRevenue": 0,
"viewsPerSession": 0,
"avgEngagedSeconds": 0,
"measuredSessions": 0,
"bounceRate": 0,
"cartRate": 0,
"conversionRate": 0
},
"change": {
"sessions": null,
"visitors": null,
"pageViews": null,
"orders": null,
"revenue": null,
"visitOrders": null,
"visitRevenue": null,
"viewsPerSession": null,
"avgEngagedSeconds": null,
"bounceRate": null,
"cartRate": null,
"conversionRate": null
},
"series": {
"bucket": "day",
"points": [
{
"at": "2026-09-23",
"sessions": 0,
"views": 0,
"previousAt": "2026-08-24",
"previousSessions": 0,
"previousViews": 0
},
{
"at": "2026-09-24",
"sessions": 0,
"views": 0,
"previousAt": "2026-08-25",
"previousSessions": 0,
"previousViews": 0
}
]
},
"pages": {
"rows": [],
"distinct": 0,
"views": 0,
"coversFrom": "2026-09-23",
"retentionDays": 90
},
"landing": {
"rows": [],
"distinct": 0
},
"exit": {
"rows": [],
"distinct": 0
},
"channels": {
"rows": [],
"distinct": 0
},
"referrers": {
"rows": [],
"distinct": 0
},
"devices": {
"rows": [],
"distinct": 0
},
"browsers": {
"rows": [],
"distinct": 0
},
"systems": {
"rows": [],
"distinct": 0
},
"campaigns": {
"rows": [],
"distinct": 0
},
"sources": {
"rows": [],
"distinct": 0
},
"campaignSales": [],
"engines": {
"rows": [],
"sessions": 0
},
"affiliates": [],
"countries": {
"rows": [],
"distinct": 0
},
"cities": {
"rows": []
}
}
}{
"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.
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.
"Europe/Berlin"

