List Collection Products Endpoint
curl --request POST \
--url https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "auto",
"limit": 25,
"include_metrics": false,
"included_main_product_ids": [],
"excluded_main_product_ids": []
}
'import requests
url = "https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products"
payload = {
"mode": "auto",
"limit": 25,
"include_metrics": False,
"included_main_product_ids": [],
"excluded_main_product_ids": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: 'auto',
limit: 25,
include_metrics: false,
included_main_product_ids: [],
excluded_main_product_ids: []
})
};
fetch('https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products', 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}/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'auto',
'limit' => 25,
'include_metrics' => false,
'included_main_product_ids' => [
],
'excluded_main_product_ids' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products"
payload := strings.NewReader("{\n \"mode\": \"auto\",\n \"limit\": 25,\n \"include_metrics\": false,\n \"included_main_product_ids\": [],\n \"excluded_main_product_ids\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"auto\",\n \"limit\": 25,\n \"include_metrics\": false,\n \"included_main_product_ids\": [],\n \"excluded_main_product_ids\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"auto\",\n \"limit\": 25,\n \"include_metrics\": false,\n \"included_main_product_ids\": [],\n \"excluded_main_product_ids\": []\n}"
response = http.request(request)
puts response.read_body{
"products": [
{
"main_product_id": "<string>",
"title": "<string>",
"main_image_url": "<string>",
"hover_image_url": "<string>",
"metadata": [],
"metrics": {
"clicks": 0,
"prev_clicks": 0,
"views": 0,
"prev_views": 0,
"sold": 0,
"prev_sold": 0,
"revenue": 0,
"prev_revenue": 0,
"revenue_currency": "",
"inventory": 0,
"click_through_rate": 0,
"prev_click_through_rate": 0,
"sell_through_rate": 0,
"prev_sell_through_rate": 0,
"add_to_carts": 0,
"prev_add_to_carts": 0
},
"is_auto_hidden": false,
"sort_index": 123,
"configured_video": {
"video_urls": [
"<string>"
],
"preview_image_url": "<string>"
},
"hidden_in_markets": [],
"hidden_in_market_groups": []
}
],
"next_cursor": "<string>",
"has_more": false,
"sort_options": [],
"stats": {
"all_products": 123,
"all_out_of_stock": 123,
"all_low_stock": 123,
"total_products": 123,
"out_of_stock": 123,
"low_stock": 123,
"on_sale": 123,
"new_in": 123,
"inactive": 123,
"bestseller": 123,
"trending": 123,
"slow_mover": 123,
"star_product": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Collections
List Collection Products Endpoint
POST
/
api
/
v1
/
merchants
/
{merchant_id}
/
collections
/
{collection_id}
/
products
List Collection Products Endpoint
curl --request POST \
--url https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "auto",
"limit": 25,
"include_metrics": false,
"included_main_product_ids": [],
"excluded_main_product_ids": []
}
'import requests
url = "https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products"
payload = {
"mode": "auto",
"limit": 25,
"include_metrics": False,
"included_main_product_ids": [],
"excluded_main_product_ids": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mode: 'auto',
limit: 25,
include_metrics: false,
included_main_product_ids: [],
excluded_main_product_ids: []
})
};
fetch('https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products', 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}/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'auto',
'limit' => 25,
'include_metrics' => false,
'included_main_product_ids' => [
],
'excluded_main_product_ids' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products"
payload := strings.NewReader("{\n \"mode\": \"auto\",\n \"limit\": 25,\n \"include_metrics\": false,\n \"included_main_product_ids\": [],\n \"excluded_main_product_ids\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"auto\",\n \"limit\": 25,\n \"include_metrics\": false,\n \"included_main_product_ids\": [],\n \"excluded_main_product_ids\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/merchants/{merchant_id}/collections/{collection_id}/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"auto\",\n \"limit\": 25,\n \"include_metrics\": false,\n \"included_main_product_ids\": [],\n \"excluded_main_product_ids\": []\n}"
response = http.request(request)
puts response.read_body{
"products": [
{
"main_product_id": "<string>",
"title": "<string>",
"main_image_url": "<string>",
"hover_image_url": "<string>",
"metadata": [],
"metrics": {
"clicks": 0,
"prev_clicks": 0,
"views": 0,
"prev_views": 0,
"sold": 0,
"prev_sold": 0,
"revenue": 0,
"prev_revenue": 0,
"revenue_currency": "",
"inventory": 0,
"click_through_rate": 0,
"prev_click_through_rate": 0,
"sell_through_rate": 0,
"prev_sell_through_rate": 0,
"add_to_carts": 0,
"prev_add_to_carts": 0
},
"is_auto_hidden": false,
"sort_index": 123,
"configured_video": {
"video_urls": [
"<string>"
],
"preview_image_url": "<string>"
},
"hidden_in_markets": [],
"hidden_in_market_groups": []
}
],
"next_cursor": "<string>",
"has_more": false,
"sort_options": [],
"stats": {
"all_products": 123,
"all_out_of_stock": 123,
"all_low_stock": 123,
"total_products": 123,
"out_of_stock": 123,
"low_stock": 123,
"on_sale": 123,
"new_in": 123,
"inactive": 123,
"bestseller": 123,
"trending": 123,
"slow_mover": 123,
"star_product": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Body
application/json
Available options:
auto, search, preview Maximum string length:
256Available options:
top, similar, complementary Required range:
1 <= x <= 100Maximum array length:
2000Maximum array length:
2000Was this page helpful?
⌘I

