Create Product
Create a new Product with automatic NATS event publishing.
Authentication Required: Requires product:write permission.
Query Parameters
Validate against ProductType
Publish ProductEvent to NATS for enrichment
Cookies
Body
Request model for creating a Product.
Reference to a ProductType by key, as accepted in request bodies.
typeId is REQUIRED here even though the underlying KeyReference
model (models/references.py) treats it as optional for other reference
kinds. Every existing client already sends it: the admin UI's
ManualEntryForm/NewVersionForm hardcode typeId: "product_type", and
every internal builder (CSV import, JSON import, crawl-import, variant
creation) hardcodes ReferenceTypeId.PRODUCT_TYPE.value. Meanwhile
product_to_response/_product_to_version_response unconditionally
read productType.typeId.value when building the API response — a
request that omitted typeId used to sail through validation, get
persisted, and only fail with a 500 once the response was built (or,
on the create-version path, once ReferenceTypeId(...) was called on
a mistyped default). Rejecting it here with a 422 keeps bad data out of
Mongo instead of crashing after the write.
Only typeId presence/validity is tightened relative to the old
Dict[str, Any] shape -- key keeps the same (non-empty-not-enforced)
constraint it always had, to avoid an unrequested behavior change on an
input the reported bug wasn't about.
Product properties dict
Response
Successful Response
Response model for a single Product.
MongoDB ObjectId as string
Internal unique identifier
Product type reference
Source of product data
AI-observability trace ID (PostHog $ai_trace_id; equals the Langfuse trace id while dual-running)
Confidence score (0-1)
Creation timestamp
User who created this
Enrichment completeness score (0-1)
Buckets that contributed to merged product
Error message if status=failed
DEPRECATED manual flag; superseded by publish_status
Job ID for tracking enrichment progress
Version labels
Did lakehouse_search contribute any property?
Properties sourced from lakehouse
DEPRECATED: use aiTraceId (same value). Kept for backward compatibility.
Last modification timestamp
User who last modified this
Product data keyed by PropertyDefinition key
Per-property metadata
Number of properties with values
Per-enabled-target publish chips: {target_key, target_env, name, state(in_sync|drifted|never_published), published_version, published_at}
Computed publish status: draft | live | changed
Advisory quality findings for this product's latest scoring run. null = never scored; 0 = scored and clean; >0 = scored with that many findings.
Scrape-quality warnings if the brand-site scrape returned suspect content
Status: complete, failed, partial
Version number