Top Products
curl --request GET \
--url https://api.launchmystore.io/api/v1/analytics/products/top \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/analytics/products/top"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/analytics/products/top', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/analytics/products/top",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/analytics/products/top"
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.launchmystore.io/api/v1/analytics/products/top")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/analytics/products/top")
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{
"status": 200,
"state": "success",
"message": null,
"data": {
"topProductsByUnitSold": [],
"productViewCount": 0,
"totalProductViews": 0,
"totalProductViewcount": 0,
"productViewAverage": 0,
"productCountsByDay": {},
"topRatedProductName": "",
"categoryViewCount": 0,
"totalcategoryview": 0,
"categoryViewAverage": 0,
"topRatedCategoryName": ""
},
"pagination": null
}
Analytics
Top Products
Best-selling products and product-view metrics for the requested range.
GET
/
api
/
v1
/
analytics
/
products
/
top
Top Products
curl --request GET \
--url https://api.launchmystore.io/api/v1/analytics/products/top \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/analytics/products/top"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/analytics/products/top', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/analytics/products/top",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/analytics/products/top"
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.launchmystore.io/api/v1/analytics/products/top")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/analytics/products/top")
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{
"status": 200,
"state": "success",
"message": null,
"data": {
"topProductsByUnitSold": [],
"productViewCount": 0,
"totalProductViews": 0,
"totalProductViewcount": 0,
"productViewAverage": 0,
"productCountsByDay": {},
"topRatedProductName": "",
"categoryViewCount": 0,
"totalcategoryview": 0,
"categoryViewAverage": 0,
"topRatedCategoryName": ""
},
"pagination": null
}
Top-selling products by units sold plus aggregate product/category view
metrics for the requested date range.
Required scope:
read_analytics
Query Parameters
Predefined range (same options as
/summary).Custom range start (ISO 8601).
Custom range end (ISO 8601).
Page size (1–100).
Page number.
Response
Show top products
Show top products
Sorted by units sold descending.
Distinct products viewed.
Total product page views.
Total product view events.
Avg views per product.
Map of date → product views.
Highest-rated product in range.
Distinct categories viewed.
Total category page views.
Avg views per category.
Highest-rated category in range.
{
"status": 200,
"state": "success",
"message": null,
"data": {
"topProductsByUnitSold": [],
"productViewCount": 0,
"totalProductViews": 0,
"totalProductViewcount": 0,
"productViewAverage": 0,
"productCountsByDay": {},
"topRatedProductName": "",
"categoryViewCount": 0,
"totalcategoryview": 0,
"categoryViewAverage": 0,
"topRatedCategoryName": ""
},
"pagination": null
}
⌘I