Skip to main content
POST
/
api
/
pricing
/
records
/
bulk-set-prices
Bulk Set Prices
curl --request POST \
  --url https://api.merchantops.ai/api/pricing/records/bulk-set-prices \
  --header 'Content-Type: application/json' \
  --data '
{
  "lines": [
    {
      "amount": 123,
      "effective_from": "<string>",
      "price_type": "<string>",
      "batch_key": "<string>"
    }
  ],
  "product_key": "<string>",
  "variant_keys": [
    "<string>"
  ]
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "ctx": {},
      "input": "<unknown>"
    }
  ]
}

Headers

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

Cookies

stytch_session
string | null

Body

application/json

Create several prices at once for a set of variants. Each line in lines becomes one price record per variant, batched by effective date (always 'auto' — same rule as mass-create). Lines may repeat a price type (e.g. two sale dates) and may share or differ in effective date.

lines
PriceLine · object[]
required
Minimum array length: 1
product_key
string
required
variant_keys
string[]
required

Response

Successful Response