Skip to main content
POST
/
api
/
pricing
/
records
/
mass-create
Mass Create Price Records
curl --request POST \
  --url https://api.merchantops.ai/api/pricing/records/mass-create \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 123,
  "effective_from": "<string>",
  "product_key": "<string>",
  "variant_keys": [
    "<string>"
  ],
  "batch_key": "<string>",
  "batch_name": "<string>",
  "batch_strategy": "auto",
  "price_type": "map"
}
'
{
  "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

Request body for mass creating price records across variants.

Batch strategy controls whether the created records are associated with a price batch on creation. Options:

  • "auto": find-or-create an open batch keyed on (org, effective_date, brand).
  • "existing": attach to the batch identified by batch_key (must be open).
  • "new": create a new batch using batch_name (effective_date + brand inferred).
  • "none": skip batch association entirely (legacy behavior).
amount
number
required
effective_from
string
required
product_key
string
required
variant_keys
string[]
required
batch_key
string | null

Required when batch_strategy='existing'

batch_name
string | null

Required when batch_strategy='new'

batch_strategy
string
default:auto

'auto' | 'existing' | 'new' | 'none'

price_type
string
default:map

Response

Successful Response