Get Products
curl --request GET \
--url https://api.example.com/products \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/products"
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/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/products",
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/products"
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/products")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/products")
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{
"has_more": false,
"products": [
{
"product_id": "01J51S0JYV6N7K1030CV1ZKPR1",
"description": "Sparkling Water, Lime, 12 fl oz",
"short_description": "Lime Sparkling Water",
"upc": "012345678905",
"brand_id": "01J51S0JYV6N7K1030CV1ZKBR1",
"brand_name": "Acme",
"brand_logo_url": "<string>",
"top_level_category": "BEVERAGE",
"groups": []
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Products
Get Products
List your brand catalog: every active product of the brands you subscribe to, whether or not it has been purchased, ordered by product id. Page with limit and starting_after. Pass group_id for the products in one of your product groups.
GET
/
products
Get Products
curl --request GET \
--url https://api.example.com/products \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/products"
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/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/products",
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/products"
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/products")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/products")
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{
"has_more": false,
"products": [
{
"product_id": "01J51S0JYV6N7K1030CV1ZKPR1",
"description": "Sparkling Water, Lime, 12 fl oz",
"short_description": "Lime Sparkling Water",
"upc": "012345678905",
"brand_id": "01J51S0JYV6N7K1030CV1ZKBR1",
"brand_name": "Acme",
"brand_logo_url": "<string>",
"top_level_category": "BEVERAGE",
"groups": []
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}group_id (from List product groups) for the products in one of your groups, like the dashboard’s group filter.
Call it with your API key, or with an OAuth access token that includes purchases:brand_products (which partner apps are granted). A token without it receives 403 insufficient_scope.Authorizations
PartnerOAuthApiKey
Partner OAuth: send Authorization: Bearer <access_token>, an OAuth access token from Subtotal's authorization server with the scope this endpoint needs.
Query Parameters
Only products whose description, short description or UPC contains this
Maximum string length:
256The maximum number of products to return
Required range:
1 <= x <= 100The product id of the last product you processed. The next one returned follows it.
Example:
"01J51S0JYV6N7K1030CV1ZKPR1"
Only products in this product group, a product_group_id from GET /product-groups. A group that isn't yours matches no products.