Skip to main content
GET
Get product by SEO-friendly slug

Authorizations

Authorization
string
header
required

API Key Authentication

Use your API key in the Authorization header:

Key Types:

Secret Keys (Server-Side Only):

  • Format: tybrite_sk_live_* (production) or tybrite_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) or tybrite_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

slug
string
default:apple-macbook-pro-9b2bb-715b8c10
required

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-9b2bb-715b8c10

Where to Get Slugs:

  • From product_slug field 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:

SEO Benefits:

  • Readable URLs: /products/apple-macbook-pro-9b2bb-715b8c10 vs /products/715b8c10-eb11-4289-8c0e-2966e78cf9a5
  • Better click-through rates in search results
  • Improved social media sharing
  • Enhanced user trust and memorability
Required string length: 1 - 200
Pattern: ^[a-z0-9][a-z0-9-]{0,199}$

Query Parameters

fields
string

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: variants or nested filtering (e.g., variants.sku,variants.selling_price)

Nested Variant Filtering: For multi-variant products, use dot notation to filter variant fields:

Example:

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 request
  • seo_title: Optimized title for search engines
  • seo_description: Optimized description for search engines
  • seo_keywords: Keywords for SEO
  • featured: Whether product is featured
  • featured_order: Display order for featured products

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
id
string<uuid>

Product identifier. Identical to product_id.

Example:

"d8cea277-9bb6-4942-b9e9-2f2ac351509f"

product_id
string<uuid>

Product identifier. Identical to id.

Example:

"d8cea277-9bb6-4942-b9e9-2f2ac351509f"

name
string

Product name

Example:

"Sony WH-1000XM4"

description
string

Product description

Example:

"Wireless noise-cancelling headphones"

category_id
string<uuid> | null

Category UUID

category_name
string | null

Category display name

Example:

"Electronics"

subcategory_id
string<uuid> | null

Subcategory UUID

subcategory_name
string | null

Subcategory display name

Example:

"Headphones"

brand
string | null

Product brand

Example:

"Sony"

thumbnail_url
string<uri> | null

Primary image URL for list views

Example:

"https://cdn.tybritelabs.com/stores/.../primary-123.jpg"

media
object[]

Array of product media objects including images and videos

product_slug
string | null

SEO-friendly URL slug

Example:

"sony-wh-1000xm4-abc123"

seo_title
string | null

SEO title for the product detail page

Example:

"Sony WH-1000XM4 Wireless Noise-Cancelling Headphones"

seo_description
string | null

SEO meta description for the product detail page

Example:

"Industry-leading noise cancellation with 30-hour battery life. Shop the Sony WH-1000XM4 today."

seo_keywords
string[] | null

SEO keywords for the product

Example:

Whether product is featured

Display order for featured products

tags
string[] | null

Product tags

attributes
object | null

Product-level attributes (not variant-specific)

shipping_info
object | null

Shipping dimensions and weight

created_at
string<date-time> | null

Product creation timestamp

updated_at
string<date-time> | null

Last update timestamp

is_active
boolean | null

Whether product is active

variant_id
string<uuid> | null

Variant identifier (only present for simple products or list endpoint)

Example:

"cc35d16b-fca5-4faa-8699-d3d5d3521bca"

sku
string | null

Stock Keeping Unit (only present for simple products or list endpoint)

Example:

"SNY-WH1000"

price
number | null

Base price in cents (only present for simple products or list endpoint)

Example:

36999

sale_price
number | null

Sale price in cents if on sale

selling_price
number | null

Actual customer-facing price (considers sale_price)

Example:

34999

stock
integer | null

Available stock quantity (only present for simple products or list endpoint)

Example:

40

last_restocked
string<date> | null

Last restock date. Not included in the default list response — request it explicitly with fields=last_restocked.

variant_attributes
object | null

Variant-specific attributes (e.g., color, size)

Example:
variant_name
string | null

Variant display name

is_default
boolean | null

Whether this is the default variant

total_stock
integer | null

Sum of stock across all variants (only present for multi-variant products)

Example:

85

price_range
object | null

Price range across variants using selling_price (only present for multi-variant products)

has_variants
boolean

Whether product has multiple variants

Example:

true

variant_count
integer | null

Number of variants (only present for multi-variant products)

Example:

3

display_currency
string

Store's default currency code

Example:

"EUR"

currency_symbol
string

Currency symbol

Example:

"€"

variants
object[] | null

Array of product variants (only present for multi-variant products in detail endpoints)