Skip to main content
PATCH
/
api
/
products
/
{key}
/
versions
/
{version}
/
labels
Update Version Labels
curl --request PATCH \
  --url https://api.merchantops.ai/api/products/{key}/versions/{version}/labels \
  --header 'Content-Type: application/json' \
  --data '
{
  "labels": [
    "<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
version
integer
required

Cookies

stytch_session
string | null

Body

application/json

Request to update labels on a product version.

labels
string[]
required

New labels for this version

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