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
string
default:"last_7_days"
Predefined range (same options as
/summary).string
Custom range start (ISO 8601).
string
Custom range end (ISO 8601).
number
default:"50"
Page size.
number
default:"1"
Page number.
Response
object
Show top products
Show top products
array
Sorted by units sold descending.
number
Distinct products viewed.
number
Total product page views.
number
Total product view events.
number
Avg views per product.
object
Map of date → product views.
string
Highest-rated product in range.
number
Distinct categories viewed.
number
Total category page views.
number
Avg views per category.
string
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
}