Skip to main content
POST
/
api
/
products
/
batch-enrich
Batch Enrich Products
curl --request POST \
  --url https://api.merchantops.ai/api/products/batch-enrich \
  --header 'Content-Type: application/json' \
  --data '
{
  "product_keys": [
    "<string>"
  ],
  "enrich_product": true,
  "enrich_source": "<string>",
  "filter_by_labels": false,
  "label_keys": [
    "<string>"
  ],
  "latest_version_only": true,
  "reinitialize_attributes": false,
  "scrape_brand_site": true,
  "search_lakehouse": true
}
'
{
  "failed_products": 123,
  "job_id": "<string>",
  "message": "<string>",
  "queued_products": 123,
  "results": [
    {
      "product_key": "<string>",
      "source": "<string>",
      "success": true,
      "version": 123,
      "error": "<string>"
    }
  ],
  "total_products": 123
}

Headers

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

Cookies

stytch_session
string | null

Body

application/json

Request model for batch enriching multiple products.

product_keys
string[]
required

List of product keys to enrich

enrich_product
boolean
default:true

Run AI enrichment (description, features, attributes)

enrich_source
string | null

When set, baseline enrichment on the latest version of this source (e.g. 'merchant_input', 'brand_site', 'ai_generated', 'lakehouse', 'merged'). None = latest version regardless of source.

filter_by_labels
boolean
default:false

Filter versions by specific labels

label_keys
string[] | null

Label keys to filter by (when filter_by_labels is True)

latest_version_only
boolean
default:true

Enrich only the latest version of each product

reinitialize_attributes
boolean
default:false

Clear and reinitialize attributes from ProductType before enrichment

scrape_brand_site
boolean
default:true

Scrape brand website during enrichment

search_lakehouse
boolean
default:true

Search product lakehouse for existing data

Response

Successful Response

Response model for batch enrich request.

failed_products
integer
required

Number of products that failed to queue

job_id
string
required

Job ID for tracking enrichment progress

message
string
required

Status message

queued_products
integer
required

Number of products successfully queued

results
BatchEnrichProductResult · object[]
required

Results for each product

total_products
integer
required

Total products requested