curl --request GET \
--url https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics', 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.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics",
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.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics"
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.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics")
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{
"period": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"total_revenue": {
"value": 0,
"currency": "",
"delta_pct": 123
},
"total_views": {
"value": 0,
"delta_pct": 123
},
"total_clicks": {
"value": 0,
"delta_pct": 123
},
"avg_ctr": {
"value": 0,
"delta_pts": 123
},
"units_sold": {
"value": 0,
"delta_pct": 123
},
"avg_str": {
"value": 123,
"delta_pts": 123
},
"add_to_carts": {
"value": 0
},
"collection_views": {
"value": 0,
"delta_pct": 123
},
"dead_stock": {
"value": 0
},
"avg_stock_coverage_days": 123,
"rpm": {
"value": 0,
"currency": ""
},
"velocity": {
"value": 0
},
"auto_lift": {
"pinned_ctr": 0,
"auto_ctr": 0
},
"top_product": {
"main_product_id": "<string>",
"title": "<string>",
"image_url": "<string>",
"revenue": 123
},
"inventory_scope_unknown": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Collection Metrics Endpoint
curl --request GET \
--url https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics', 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.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics",
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.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics"
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.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/metrics")
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{
"period": {
"start": "2023-12-25",
"end": "2023-12-25"
},
"total_revenue": {
"value": 0,
"currency": "",
"delta_pct": 123
},
"total_views": {
"value": 0,
"delta_pct": 123
},
"total_clicks": {
"value": 0,
"delta_pct": 123
},
"avg_ctr": {
"value": 0,
"delta_pts": 123
},
"units_sold": {
"value": 0,
"delta_pct": 123
},
"avg_str": {
"value": 123,
"delta_pts": 123
},
"add_to_carts": {
"value": 0
},
"collection_views": {
"value": 0,
"delta_pct": 123
},
"dead_stock": {
"value": 0
},
"avg_stock_coverage_days": 123,
"rpm": {
"value": 0,
"currency": ""
},
"velocity": {
"value": 0
},
"auto_lift": {
"pinned_ctr": 0,
"auto_ctr": 0
},
"top_product": {
"main_product_id": "<string>",
"title": "<string>",
"image_url": "<string>",
"revenue": 123
},
"inventory_scope_unknown": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Rate whose value can be unknown — used by avg_str, where no member
product having a known inventory level makes the rate incomputable
(None), distinct from a genuine 0.0. Kept separate from
CollectionRateMetric so generated clients see avg_ctr.value as
non-nullable — the companion frontend change relies on that split.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Derived "Auto Lift" score: how the click-through rate of auto-sorted (non-pinned) products compares to the merchant's manually pinned products.
score is normalised to 0-100 where 50 means auto and pinned perform
equally, 100 means auto CTR is >= 2x pinned CTR, and 0 means auto
products get no clicks. Computed as clamp(50 * auto_ctr / pinned_ctr, 0, 100). It is None when the collection has no pinned products or no
auto (non-pinned) products, so there is nothing to compare. pinned_ctr
and auto_ctr are percentages (0-100); delta_pts is
auto_ctr - pinned_ctr in percentage points.
Show child attributes
Show child attributes
The highest-revenue product in a collection, for the overview table's
"Top Product" column. image_url is the product's first image (or None).
Show child attributes
Show child attributes
Was this page helpful?

