Skip to main content
POST
/
api
/
products
/
{key}
/
versions
Create Product Version
curl --request POST \
  --url https://api.merchantops.ai/api/products/{key}/versions \
  --header 'Content-Type: application/json' \
  --data '
{
  "productType": {},
  "commitMessage": "<string>",
  "createdFrom": 123,
  "enrichmentScore": 123,
  "isPublished": false,
  "properties": {},
  "properties_metadata": {},
  "reinitialize_attributes": false,
  "setProduction": false,
  "status": "<string>"
}
'
{
  "id": "<string>",
  "key": "<string>",
  "productType": {},
  "source": "<string>",
  "version": 123,
  "confidence": 123,
  "createdAt": "<string>",
  "createdBy": "<string>",
  "enrichmentScore": 123,
  "enrichmentSources": [
    "<string>"
  ],
  "isPublished": false,
  "labels": [
    "<string>"
  ],
  "lakehouseMatched": true,
  "lakehousePropertiesCount": 123,
  "langfuseTraceId": "<string>",
  "properties": {},
  "properties_metadata": {},
  "propertyCount": 0,
  "scrapeWarnings": [
    {}
  ],
  "status": "<string>",
  "version_commit_message": "<string>",
  "version_created_from": 123
}

Headers

authorization
string | null
X-Organization-ID
string | null

Path Parameters

key
string
required

Cookies

stytch_session
string | null

Body

application/json

Request to create a new product version.

productType
Producttype · object
required
commitMessage
string | null

Optional message describing changes

createdFrom
integer | null

Version number this was cloned from

enrichmentScore
number | null
isPublished
boolean
default:false
properties
Properties · object

Product properties dict

properties_metadata
Properties Metadata · object
reinitialize_attributes
boolean
default:false

Reinitialize properties from the target ProductType (discards properties)

setProduction
boolean
default:false

Set 'Production' label on this version

status
string | null

Response

Successful Response

Response model for a single product version.

id
string
required

MongoDB ObjectId as string

key
string
required

Internal unique identifier (shared across versions)

productType
Producttype · object
required

Product type reference

source
string
required

Source of product data

version
integer
required

Version number

confidence
number | null

Confidence score (0-1)

createdAt
string | null

Creation timestamp

createdBy
string | null

User who created this version

enrichmentScore
number | null

Quality score (0-1)

enrichmentSources
string[] | null

Buckets that contributed to merged product

isPublished
boolean
default:false

Published status

labels
string[]

Version labels

lakehouseMatched
boolean | null

Did lakehouse_search contribute any property?

lakehousePropertiesCount
integer | null

Properties sourced from lakehouse

langfuseTraceId
string | null

Langfuse trace ID for this enrichment run

properties
Properties · object

Product data

properties_metadata
Properties Metadata · object

Per-property metadata

propertyCount
integer
default:0

Number of properties with values

scrapeWarnings
Scrapewarnings · object[] | null

Scrape-quality warnings if the brand-site scrape returned suspect content

status
string | null

Status: complete, failed, partial

version_commit_message
string | null

Commit message for this version

version_created_from
integer | null

Version this was cloned from