Skip to main content
POST
/
api
/
products
/
upload-csv
Upload Csv
curl --request POST \
  --url https://api.merchantops.ai/api/products/upload-csv \
  --header 'Content-Type: application/json' \
  --data '
{
  "csv_content": "<string>",
  "batch_size": 25,
  "default_product_type": "<string>",
  "enrich_product": true,
  "scrape_brand_site": true,
  "search_lakehouse": true,
  "validate": false
}
'
{
  "created": 123,
  "failed": 123,
  "total": 123,
  "errors": [
    {}
  ],
  "job_id": "<string>",
  "skipped": 0
}

Headers

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

Cookies

stytch_session
string | null

Body

application/json

Request model for CSV upload.

csv_content
string
required

CSV content as string

batch_size
integer
default:25

Batch size for processing (1-50)

Required range: 1 <= x <= 50
default_product_type
string | null

Default ProductType key

enrich_product
boolean
default:true

Run AI enrichment (description, features, attributes)

scrape_brand_site
boolean
default:true

Scrape brand website during enrichment

search_lakehouse
boolean
default:true

Search product lakehouse for existing data

validate
boolean
default:false

Validate against ProductType

Response

Successful Response

Response model for batch product creation.

created
integer
required

Number successfully created

failed
integer
required

Number that failed

total
integer
required

Total products submitted

errors
Errors · object[]

List of errors

job_id
string | null

Job ID for tracking batch progress

skipped
integer
default:0

Number unchanged (no new version created)