Get product by SEO-friendly slug
Retrieve product information using a human-readable, SEO-friendly slug.
Response Structure: Same as GET /v1/products/:
- Simple products: Flat structure with all data at root
- Multi-variant products: Hierarchical structure with product-level data + variants array
Field Filtering: Supports root-level and nested variant filtering for bandwidth optimization.
Currency: Prices returned in store’s default currency. For multi-currency support with
geographic detection, use the /v1/prices/products/{id} endpoint instead.
Documentation Index
Fetch the complete documentation index at: https://docs.tybritelabs.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
API Key Authentication
Use your API key in the Authorization header:
Authorization: Bearer tybrite_sk_live_YOUR_KEYKey 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
SEO-friendly product slug in the format {product-name}-{short-id}.
Slug Format:
- Lowercase product name with hyphens
- Short unique identifier appended
- Example:
apple-macbook-pro-d8cea
Where to Get Slugs:
- From
product_slugfield in product list responses - From product URLs in your e-commerce site
- Generated automatically when products are created
Validation:
- Must match an existing product slug
- Case-sensitive (use lowercase)
- Returns 404 if slug not found
SDK Usage:
// Use slug from product listing
const products = await client.products.listProducts({ limit: 10 });
const firstProductSlug = products.products[0].product_slug;
// Get full product details by slug
const product = await client.products.getProductBySlug(firstProductSlug);SEO Benefits:
- Readable URLs:
/products/apple-macbook-pro-d8ceavs/products/d8cea277-9bb6-4942-b9e9-2f2ac351509f - Better click-through rates in search results
- Improved social media sharing
- Enhanced user trust and memorability
1 - 200^[a-z0-9][a-z0-9-]{0,199}$Query Parameters
Comma-separated list of fields to include in the response. Supports both root-level and nested variant filtering.
Recommended Fields for PDPs:
- SEO:
seo_title,seo_description,seo_keywords,product_slug - Core:
product_id,name,description - Pricing:
price,selling_price,price_range(for multi-variant) - Media:
media,thumbnail_url - Metadata:
brand,category_name,attributes,tags - Inventory:
stock,total_stock(for multi-variant) - Variants:
variantsor nested filtering (e.g.,variants.sku,variants.selling_price)
Nested Variant Filtering: For multi-variant products, use dot notation to filter variant fields:
fields=product_id,name,description,price_range,
variants.variant_id,variants.sku,variants.selling_price,
variants.stock,variants.variant_attributesExample:
const product = await client.products.getProductBySlug(slug, {
fields: 'product_id,name,description,price_range,media,seo_title,seo_description,variants.sku,variants.selling_price,variants.stock'
});Response
Successfully retrieved product by slug with complete details including SEO metadata.
Response Structure: Same as GET /v1/products/{id}:
For Simple Products: Flat structure with all data at root level including SEO fields.
For Multi-Variant Products: Hierarchical structure with:
- Product-level data at root (including SEO fields)
- Aggregate data (total_stock, price_range)
- Clean variants array with only variant-specific fields
SEO Fields Included:
product_slug: The SEO-friendly slug used in the requestseo_title: Optimized title for search enginesseo_description: Optimized description for search enginesseo_keywords: Keywords for SEOfeatured: Whether product is featuredfeatured_order: Display order for featured products
SDK Usage:
const product = await client.products.getProductBySlug(slug);
// Use SEO fields for page metadata
document.title = product.seo_title || product.name;
document.querySelector('meta[name="description"]').content =
product.seo_description || product.description;
// Handle variants
if (product.has_variants) {
console.log(`${product.variant_count} variants available`);
console.log(`Price range: €${product.price_range.min/100} - €${product.price_range.max/100}`);
}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
Main product identifier
"d8cea277-9bb6-4942-b9e9-2f2ac351509f"
Product name (mapped from online_name or name)
"Sony WH-1000XM4"
Product description (mapped from online_description or 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://pub-...r2.dev/stores/.../primary-123.jpg"
Array of product media objects including images and videos
SEO-friendly URL slug
"sony-wh-1000xm4-abc123"
SEO optimized title
SEO optimized description
SEO keywords
Whether product is featured
Display order for featured products
Merged category/subcategory string
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
Low stock threshold
Last restock date
Variant-specific attributes (e.g., color, size)
{ "color": "Black" }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)

