Update existing products in your catalog. This endpoint supports both single product updates and bulk operations.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:373
Operation modes
The update endpoint supports two modes based on the input structure:- Single product update: Provide
idto update one product with full field access - Bulk update: Provide
selectionto update multiple products with limited fields
Single product update
Request parameters
UUID of the product to update
UUID of the brand (must match active brand if provided)
Product name (1-100 characters)
URL-friendly identifier. Can be set to
null to clear.Format: Lowercase letters, numbers, and dashes onlyProduct description. Set to
null to clear.Category UUID. Set to
null to clear.Season UUID. Set to
null to clear.Manufacturer UUID. Set to
null to clear.Storage path for product image. Set to
null to clear.Product status (
"draft" or "published"). Set to null to clear.Array of tag UUIDs
Array of material compositions (same structure as create)
Array of journey steps (same structure as create)
Environmental impact metrics (same structure as create)
Product weight (same structure as create)
Response
The updated product object with all fields
Example
Bulk update
Update multiple products at once. Only specific fields are available for bulk updates.Request parameters
Defines which products to update
Brand UUID (must match active brand if provided)
Available bulk update fields
Product status to apply to all selected products
Category UUID to apply. Set to
null to clear category for all selected products.Season UUID to apply. Set to
null to clear season for all selected products.Bulk updates only support
status, category_id, and season_id. For updating other fields, use single product updates.Response
Always
true on successNumber of products updated
Examples
Update specific products
Update all products matching filter
Update with search
Update with materials and environment
Clear nullable fields
Set fields tonull to clear their values:
Publishing behavior
For single product updates:Cache revalidation
For single product updates, the DPP cache is automatically revalidated:Error codes
Invalid input or validation errorCommon causes:
- Product not found for active brand
- Active brand does not match provided
brand_id - Invalid product handle format
- Product handle already exists for another product
- Invalid UUID format
- Empty
idsarray in explicit mode
Unexpected error during updateMessage:
"Failed to update product"Validation rules
Single update
- Only fields explicitly provided in the input are updated
- Nullable fields can be set to
nullto clear them - All validation rules from create apply (product handle format, string lengths, etc.)
Bulk update
- At least one product ID required in explicit mode
- Only
status,category_id, andseason_idcan be bulk updated - Filters and search use the same
FilterStatestructure as list queries
Source code reference
- Schema definition:
apps/api/src/schemas/products.ts:355(unifiedUpdateSchema) - Implementation:
apps/api/src/trpc/routers/products/index.ts:373 - Database queries:
- Single:
@v1/db/queries/products(updateProduct) - Bulk:
bulkUpdateProductsByIds,bulkUpdateProductsByFilter
- Single: