Skip to main content
POST
/
api
/
products
/
{product_key}
/
variants
/
upload-csv
Upload Variants Csv
curl --request POST \
  --url https://api.merchantops.ai/api/products/{product_key}/variants/upload-csv \
  --header 'Content-Type: application/json' \
  --data '
{
  "csv_content": "<string>",
  "batch_size": 25
}
'
{
  "created": 123,
  "errors": [
    {}
  ]
}

Headers

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

Path Parameters

product_key
string
required

Cookies

stytch_session
string | null

Body

application/json

Request model for uploading variants from CSV.

csv_content
string
required

CSV content as string

batch_size
integer
default:25

Batch size for processing (1-50)

Required range: 1 <= x <= 50

Response

Successful Response

Response model for batch variant operations.

created
integer
required

Number of variants successfully created

errors
Errors · object[]

List of errors for failed variants