Overview
The Products API allows store owners to manage their product catalog with full create, read, update, and delete operations. All products are associated with a specific store and category.Create Product
string
required
Product name (1-100 characters)
string
Product description (up to 1000 characters)
Id<'categories'>
required
Category ID for the product
number
required
Product price in USD
number
Product cost for profit calculations
number
Available stock quantity
number
Stock alert threshold
number
Preparation time
string
Time unit:
minutes, hours, or daysboolean
required
Product availability status
Id<'_storage'>
required
Primary product image storage ID
Array<Id<'_storage'>>
Additional product images
Update Product
Update an existing product. Only provide the fields you want to change.Id<'products'>
required
Product ID to update
string
Updated product name
string
Updated product description
number
Updated product price
number
Updated stock quantity
boolean
Updated availability status
Get Products for Store
Retrieve all products for the authenticated store owner.Get Product by ID
Retrieve a specific product by its ID.Id<'products'>
required
Product ID to retrieve
Delete Product
Delete a product owned by the authenticated store owner.Id<'products'>
required
Product ID to delete
Error Handling
Product not found
Product not found
Status Code:
404Validation errors
Validation errors
Status Code:
400Best Practices
Image Optimization
Upload images in WebP format for better performance. Use multiple sizes for responsive design.
Stock Management
Set appropriate stock alerts to avoid overselling. Update stock levels in real-time.
SEO Optimization
Use descriptive names and detailed descriptions for better search visibility.
Performance
Batch operations when possible. Use pagination for large product catalogs.
Products are automatically indexed for search functionality. Changes to product information are reflected in search results within seconds.
