Skip to main content
POST
/
api
/
products
/
{product_key}
/
variants
/
generate-matrix
Generate Matrix
curl --request POST \
  --url https://api.merchantops.ai/api/products/{product_key}/variants/generate-matrix \
  --header 'Content-Type: application/json' \
  --data '
{
  "axes": {},
  "same_for_all_defaults": {}
}
'
{
  "preview": [
    {}
  ],
  "total_count": 123
}

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 generating a variant matrix preview.

axes
Axes · object
required

Property key to list of values for cross-product generation

same_for_all_defaults
Same For All Defaults · object

Default values for SameForAll properties

Response

Successful Response

Response model for variant matrix preview.

preview
Preview · object[]
required

Preview array of variant dicts (not yet persisted)

total_count
integer
required

Total number of variants in the preview