Get base variant by ID
curl --request GET \
--url https://api.snappy.com/public-api/v3/swag/base-variants/{baseVariantId} \
--header 'X-Api-Key: <api-key>' \
--header 'snappy-account-id: <snappy-account-id>'import requests
url = "https://api.snappy.com/public-api/v3/swag/base-variants/{baseVariantId}"
headers = {
"snappy-account-id": "<snappy-account-id>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'snappy-account-id': '<snappy-account-id>', 'X-Api-Key': '<api-key>'}
};
fetch('https://api.snappy.com/public-api/v3/swag/base-variants/{baseVariantId}', 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/swag/base-variants/{baseVariantId}",
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>",
"snappy-account-id: <snappy-account-id>"
],
]);
$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/swag/base-variants/{baseVariantId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("snappy-account-id", "<snappy-account-id>")
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/swag/base-variants/{baseVariantId}")
.header("snappy-account-id", "<snappy-account-id>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snappy.com/public-api/v3/swag/base-variants/{baseVariantId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["snappy-account-id"] = '<snappy-account-id>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "d772e853-64d4-4578-b6d2-4c00396ad6a6",
"baseProductId": "048392af-5f4c-4ddc-b0e2-7a0edf152268",
"title": "Classic Tee - Black / M",
"selectedOptions": {
"color": "Black",
"size": "M"
},
"taxable": true,
"media": [
{
"type": "image",
"src": "https://media.snappy.com/image/o1xc17wfbda6cl91hm0r6_picture-1.jpg?w=1000&h=1000&q=80&f=auto"
}
],
"shippingRequired": true
}
}{
"message": "Request validation failed.",
"errorCode": "400_PBLC_001",
"errors": [
{
"errorCode": "400_PBLC_002",
"message": "must be a supported country code",
"path": "queryStringParameters.location"
}
]
}{
"message": "Base variant not found.",
"errorCode": "404_PDCT_002",
"errors": [
{
"errorCode": "404_PDCT_002",
"message": "Base variant with id 'd772e853-64d4-4578-b6d2-4c00396ad6a6' was not found",
"path": "pathParameters.baseVariantId"
}
]
}Base Variants
Get base variant by ID
Use this endpoint to retrieve a single base variant by its UUID. Returns the same BaseVariant object shape as items in the Get base product variants list response.
Request parameters
location- required ISO 3166-1 alpha-2 country codeSnappy-Account-Idheader - required account identifier
Please note
Unknown query keys return a 400 error. This endpoint does not accept fields or include.
Permissions
- Requires:
products:read
GET
/
v3
/
swag
/
base-variants
/
{baseVariantId}
Get base variant by ID
curl --request GET \
--url https://api.snappy.com/public-api/v3/swag/base-variants/{baseVariantId} \
--header 'X-Api-Key: <api-key>' \
--header 'snappy-account-id: <snappy-account-id>'import requests
url = "https://api.snappy.com/public-api/v3/swag/base-variants/{baseVariantId}"
headers = {
"snappy-account-id": "<snappy-account-id>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'snappy-account-id': '<snappy-account-id>', 'X-Api-Key': '<api-key>'}
};
fetch('https://api.snappy.com/public-api/v3/swag/base-variants/{baseVariantId}', 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/swag/base-variants/{baseVariantId}",
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>",
"snappy-account-id: <snappy-account-id>"
],
]);
$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/swag/base-variants/{baseVariantId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("snappy-account-id", "<snappy-account-id>")
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/swag/base-variants/{baseVariantId}")
.header("snappy-account-id", "<snappy-account-id>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snappy.com/public-api/v3/swag/base-variants/{baseVariantId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["snappy-account-id"] = '<snappy-account-id>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "d772e853-64d4-4578-b6d2-4c00396ad6a6",
"baseProductId": "048392af-5f4c-4ddc-b0e2-7a0edf152268",
"title": "Classic Tee - Black / M",
"selectedOptions": {
"color": "Black",
"size": "M"
},
"taxable": true,
"media": [
{
"type": "image",
"src": "https://media.snappy.com/image/o1xc17wfbda6cl91hm0r6_picture-1.jpg?w=1000&h=1000&q=80&f=auto"
}
],
"shippingRequired": true
}
}{
"message": "Request validation failed.",
"errorCode": "400_PBLC_001",
"errors": [
{
"errorCode": "400_PBLC_002",
"message": "must be a supported country code",
"path": "queryStringParameters.location"
}
]
}{
"message": "Base variant not found.",
"errorCode": "404_PDCT_002",
"errors": [
{
"errorCode": "404_PDCT_002",
"message": "Base variant with id 'd772e853-64d4-4578-b6d2-4c00396ad6a6' was not found",
"path": "pathParameters.baseVariantId"
}
]
}Authorizations
Company Level Authentication
Include your API key in the X-Api-Key header for every request:
X-Api-Key: YOUR_API_KEY
Headers
Required. Account identifier.
Minimum string length:
1Example:
"acc123456"
Path Parameters
Base-variant UUID.
Example:
"d772e853-64d4-4578-b6d2-4c00396ad6a6"
Query Parameters
Required ISO 3166-1 alpha-2 country code.
Pattern:
^[A-Z]{2}$Example:
"US"
Response
Single base variant.
Single base variant.
Base variant.
Show child attributes
Show child attributes
Last modified on October 12, 2026
Was this page helpful?