curl --request GET \
--url https://api.snappy.com/public-api/v3/base-products/{baseProductId}/variants \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.snappy.com/public-api/v3/base-products/{baseProductId}/variants"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.snappy.com/public-api/v3/base-products/{baseProductId}/variants', 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.snappy.com/public-api/v3/base-products/{baseProductId}/variants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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.snappy.com/public-api/v3/base-products/{baseProductId}/variants"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
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.snappy.com/public-api/v3/base-products/{baseProductId}/variants")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snappy.com/public-api/v3/base-products/{baseProductId}/variants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "bv_x9y8z7",
"title": "<string>",
"selectedOptions": {},
"media": [
{
"type": "image",
"src": "https://media.snappy.com/image/asset123?w=1000&h=1000&q=80&f=auto"
}
],
"baseProductId": "<string>"
}
],
"links": {
"first": "/v3/collections/abc/products?page[size]=100",
"next": "/v3/collections/abc/products?page[cursor]=cursor_abc123&page[size]=100",
"prev": "<string>"
}
}{
"status": 404,
"errorCode": "404_PROD_001",
"message": "Product Not Found",
"errors": [
{
"errorCode": "404_PROD_001",
"message": "Product with id 'q1w2e3r4t5' was not found",
"path": "path.productId"
}
]
}{
"status": 404,
"errorCode": "404_PROD_001",
"message": "Product Not Found",
"errors": [
{
"errorCode": "404_PROD_001",
"message": "Product with id 'q1w2e3r4t5' was not found",
"path": "path.productId"
}
]
}{
"status": 404,
"errorCode": "404_PROD_001",
"message": "Product Not Found",
"errors": [
{
"errorCode": "404_PROD_001",
"message": "Product with id 'q1w2e3r4t5' was not found",
"path": "path.productId"
}
]
}{
"status": 404,
"errorCode": "404_PROD_001",
"message": "Product Not Found",
"errors": [
{
"errorCode": "404_PROD_001",
"message": "Product with id 'q1w2e3r4t5' was not found",
"path": "path.productId"
}
]
}Get base variants by base product ID
Returns a paginated list of base variants for a base product.
Page-number pagination (page[number], page[size]).
curl --request GET \
--url https://api.snappy.com/public-api/v3/base-products/{baseProductId}/variants \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.snappy.com/public-api/v3/base-products/{baseProductId}/variants"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.snappy.com/public-api/v3/base-products/{baseProductId}/variants', 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.snappy.com/public-api/v3/base-products/{baseProductId}/variants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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.snappy.com/public-api/v3/base-products/{baseProductId}/variants"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
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.snappy.com/public-api/v3/base-products/{baseProductId}/variants")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snappy.com/public-api/v3/base-products/{baseProductId}/variants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "bv_x9y8z7",
"title": "<string>",
"selectedOptions": {},
"media": [
{
"type": "image",
"src": "https://media.snappy.com/image/asset123?w=1000&h=1000&q=80&f=auto"
}
],
"baseProductId": "<string>"
}
],
"links": {
"first": "/v3/collections/abc/products?page[size]=100",
"next": "/v3/collections/abc/products?page[cursor]=cursor_abc123&page[size]=100",
"prev": "<string>"
}
}{
"status": 404,
"errorCode": "404_PROD_001",
"message": "Product Not Found",
"errors": [
{
"errorCode": "404_PROD_001",
"message": "Product with id 'q1w2e3r4t5' was not found",
"path": "path.productId"
}
]
}{
"status": 404,
"errorCode": "404_PROD_001",
"message": "Product Not Found",
"errors": [
{
"errorCode": "404_PROD_001",
"message": "Product with id 'q1w2e3r4t5' was not found",
"path": "path.productId"
}
]
}{
"status": 404,
"errorCode": "404_PROD_001",
"message": "Product Not Found",
"errors": [
{
"errorCode": "404_PROD_001",
"message": "Product with id 'q1w2e3r4t5' was not found",
"path": "path.productId"
}
]
}{
"status": 404,
"errorCode": "404_PROD_001",
"message": "Product Not Found",
"errors": [
{
"errorCode": "404_PROD_001",
"message": "Product with id 'q1w2e3r4t5' was not found",
"path": "path.productId"
}
]
}Authorizations
Partner API key. Finalized per partner integration agreement.
Path Parameters
Base product identifier.
Query Parameters
Optional base-product/base-variant field expansions. Comma-separated.
1-indexed page number for page-number paginated endpoints.
x >= 1Number of base variants per page (max 500, default 100).
1 <= x <= 500Response
Paginated list of base variants.
Paginated base variant list response.
Show child attributes
Show child attributes
Top-level JSON:API-style pagination links for paginated list
responses. first is always present. next is null on the final
page. prev is null on the first page (and on cursor-paginated
endpoints where backward navigation is not supported).
Show child attributes
Show child attributes
Was this page helpful?