Create a new product in your brand’s catalog. Products can include basic information, attributes like materials and environmental impact, and journey steps.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Avelero/avelero/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
apps/api/src/trpc/routers/products/index.ts:319
Request parameters
Product name (1-100 characters)Example:
"Organic Cotton T-Shirt"UUID of the brand. Must match the active brand context.Validation: Must be a valid UUID v4 format
URL-friendly identifier for the product. Used in DPP URLs:
/[brandSlug]/[productHandle]/If not provided, auto-generated from the product name.Format: Lowercase letters, numbers, and dashes only (1-100 characters)Example: "organic-cotton-tee"Product description (max 2000 characters)Example:
"A sustainable t-shirt made from 100% organic cotton."UUID of the product category
UUID of the brand season (from
brand_seasons table)UUID of the manufacturer
Storage path for the product image (max 500 characters). Not the full URL.Example:
"brand-id/products/image.jpg"Product statusValues:
"draft" or "published"Default: "draft"Array of tag UUIDs to associate with the product
Materials
Array of material compositions for the product
Journey steps
Array of production journey steps (e.g., “Design”, “Manufacturing”, “Distribution”)
Environmental data
Environmental impact metrics
Weight
Product weight information
Response
Returns the created product object.The created product
Example requests
Basic product
Product with custom handle
Product with materials and environment
Product with journey steps
Error codes
Invalid input or validation errorCommon causes:
- Product name is empty or too long
- Invalid product handle format (must be lowercase letters, numbers, and dashes)
- Product handle already exists for this brand
- Active brand does not match
brand_id - Invalid UUID format for IDs
- Materials percentage exceeds 100%
Unexpected error during product creationMessage:
"Failed to create product"Validation rules
- Product name: 1-100 characters, required
- Product handle: Must be lowercase letters, numbers, and dashes only (no leading/trailing dashes)
- Description: Max 2000 characters
- Image path: Max 500 characters
- Material percentage: Can be string or number
- Journey step operator_ids: Must have at least one operator per step
- Brand ID: Must match the active brand context
Notes
If
product_handle is not provided, it will be auto-generated from the product name using the generateProductHandle() function.Example: “Special Pants” → “special-pants”The
upid (Unique Product Identifier) is always auto-generated as a 16-character alphanumeric string. You cannot provide a custom UPID.Source code reference
- Schema definition:
apps/api/src/schemas/products.ts:221(productsDomainCreateSchema) - Implementation:
apps/api/src/trpc/routers/products/index.ts:319 - Database query:
@v1/db/queries/products(createProduct)