Get product by ID or variant ID
Retrieve complete details for a single product using either its product ID or variant ID.
Response Structure:
- Simple products (no variants): Flat structure with all data at root level
- Multi-variant products: Hierarchical structure with:
- Product-level data at root (name, description, brand, media, etc.)
- Aggregate data (total_stock, price_range using selling_price)
- Clean variants array with only variant-specific fields (no redundancy)
Field Filtering: Supports both root-level and nested variant filtering:
- Root filtering: ~ 38% bandwidth reduction
- Nested filtering: ~ 52% bandwidth reduction
- Example:
fields=name,price_range,variants.sku,variants.selling_price,variants.stock
Currency: Prices returned in store’s default currency. For multi-currency support with
geographic detection, use the /v1/prices/products/{id} endpoint instead.
Authorizations
API Key Authentication
Use your API key in the Authorization header:
Key Types:
Secret Keys (Server-Side Only):
- Format:
tybrite_sk_live_*(production) ortybrite_sk_test_*(sandbox) - Full read/write access to all endpoints
- ⚠️ NEVER expose in client-side code or public repositories
- Required for: write operations, authentication, payment verification, AI recommendations
Publishable Keys (Client-Safe):
- Format:
tybrite_pk_live_*(production) ortybrite_pk_test_*(sandbox) - Read-only access (GET requests only, plus POST semantic search)
- ✅ Safe for client-side JavaScript, mobile apps, and public code
- Allowed for: browsing products, search, CMS content, pricing queries
Endpoint-Specific Requirements:
- Authentication endpoints (
/v1/auth/*): Secret key required - Payment verification (
POST /v1/payments/verify): Secret key required - AI Recommendations (
POST /v1/recommendations): Secret key required - Semantic Search (
POST /v1/search): Both key types allowed (read-only operation) - All write operations: Secret key required
- All read operations: Both key types allowed
Using a publishable key for restricted operations returns 403 Forbidden.
Path Parameters
Product ID or Variant ID. This endpoint accepts both types of IDs, providing flexible product retrieval.
Accepted ID Types:
- Product ID: The main product identifier (e.g.,
715b8c10-eb11-4289-8c0e-2966e78cf9a5) - Variant ID: A specific variant identifier (e.g.,
15ca5a86-4b1b-47c3-8762-a1aa43941565)
Why This Matters:
- Simplifies API usage - no need to know if you have a product or variant ID
- Useful for barcode scanning where you might have variant IDs
- Consistent behavior regardless of ID type
Validation:
- Must be a valid UUID format
- Must exist in your store's product catalog
- Returns 404 if product/variant not found
SDK Usage:
Query Parameters
Comma-separated list of fields to include in the response. Supports both root-level and nested variant filtering for maximum bandwidth optimization.
Root-Level Fields:
- Core:
product_id,variant_id,name,sku,description - Pricing:
price,selling_price,sale_price,price_range,display_currency,currency_symbol - Inventory:
stock,total_stock,last_restocked(last_restockedis not in the default response — request it explicitly) - Media:
media,thumbnail_url - Metadata:
brand,category_name,subcategory_name,attributes.* - Flags:
has_variants,variant_count,is_default - Variants:
variants(includes all variant fields)
Nested Variant Filtering (52% bandwidth reduction): Use dot notation to filter specific fields within the variants array:
variants.variant_id- Variant identifiervariants.sku- Variant SKUvariants.selling_price- Customer-facing pricevariants.stock- Stock quantityvariants.variant_attributes- Variant attributes (color, size, etc.)variants.variant_name- Variant display namevariants.is_default- Default variant flagvariants.*- All variant fields (same as justvariants)
Bandwidth Savings:
- Full product: ~1720 bytes (baseline)
- Root filtering:
1060 bytes (38% reduction) - Nested filtering:
830 bytes (52% reduction)
Examples:
Root-level filtering (~ 38% reduction):
Nested variant filtering (~ 52% reduction):
Minimal cart validation:
SDK Usage:
Performance Impact:
- Nested filtering excludes non-default fields like last_restocked
- Perfect for mobile apps and bandwidth-constrained environments
- Recommended for product cards and listing pages
Response
Successfully retrieved product with complete details.
Response Structure:
For Simple Products (has_variants=false): Returns flat structure with all data at root level:
- All product fields (name, description, brand, media, etc.)
- All variant fields (variant_id, sku, price, stock, etc.)
- No variants array
For Multi-Variant Products (has_variants=true): Returns hierarchical structure:
- Product-level fields at root (name, description, brand, media, etc.)
- Aggregate data: total_stock, price_range (using selling_price)
- Flags: has_variants=true, variant_count
- Clean variants array with only variant-specific fields:
- variant_id, sku, price, sale_price, selling_price
- stock (last_restocked available via fields=variants.last_restocked)
- variant_attributes (color, size, etc.)
- variant_name, is_default
Field Filtering:
- Root-level: Exclude unnecessary fields (~ 38% reduction)
- Nested: Filter variant fields using dot notation (~ 52% reduction)
- Example:
fields=name,price_range,variants.sku,variants.selling_price,variants.stock
SDK Usage:
Represents a product in the catalog. Response structure varies based on endpoint and variant configuration:
List Endpoint (GET /v1/products):
- Returns flat structure with default variant data only
- No variants array (keeps payload small for browsing)
- Includes has_variants flag to indicate if detail fetch needed
Detail Endpoints (GET /v1/products/:id, GET /v1/products/by-slug/:slug):
- Multi-variant products: Hierarchical structure with product-level data at root + variants array
- Simple products: Flat structure with all data at root (no variants array)
Field Filtering:
- Root-level filtering: Reduce top-level fields
- Nested filtering: Filter specific variant fields using dot notation
- Example: fields=name,price_range,variants.sku,variants.selling_price,variants.stock
Product identifier. Identical to product_id.
"d8cea277-9bb6-4942-b9e9-2f2ac351509f"
Product identifier. Identical to id.
"d8cea277-9bb6-4942-b9e9-2f2ac351509f"
Product name
"Sony WH-1000XM4"
Product description
"Wireless noise-cancelling headphones"
Category UUID
Category display name
"Electronics"
Subcategory UUID
Subcategory display name
"Headphones"
Product brand
"Sony"
Primary image URL for list views
"https://cdn.tybritelabs.com/stores/.../primary-123.jpg"
Array of product media objects including images and videos
SEO-friendly URL slug
"sony-wh-1000xm4-abc123"
SEO title for the product detail page
"Sony WH-1000XM4 Wireless Noise-Cancelling Headphones"
SEO meta description for the product detail page
"Industry-leading noise cancellation with 30-hour battery life. Shop the Sony WH-1000XM4 today."
SEO keywords for the product
Whether product is featured
Display order for featured products
Product tags
Product-level attributes (not variant-specific)
Shipping dimensions and weight
Product creation timestamp
Last update timestamp
Whether product is active
Variant identifier (only present for simple products or list endpoint)
"cc35d16b-fca5-4faa-8699-d3d5d3521bca"
Stock Keeping Unit (only present for simple products or list endpoint)
"SNY-WH1000"
Base price in cents (only present for simple products or list endpoint)
36999
Sale price in cents if on sale
Actual customer-facing price (considers sale_price)
34999
Available stock quantity (only present for simple products or list endpoint)
40
Last restock date. Not included in the default list response — request it explicitly with fields=last_restocked.
Variant-specific attributes (e.g., color, size)
Variant display name
Whether this is the default variant
Sum of stock across all variants (only present for multi-variant products)
85
Price range across variants using selling_price (only present for multi-variant products)
Whether product has multiple variants
true
Number of variants (only present for multi-variant products)
3
Store's default currency code
"EUR"
Currency symbol
"€"
Array of product variants (only present for multi-variant products in detail endpoints)

