Skip to main content
POST
/
api
/
pricing
/
batches
/
republish-from-variants
Create Republish Batch From Variants
curl --request POST \
  --url https://api.merchantops.ai/api/pricing/batches/republish-from-variants \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "target_key": "<string>",
  "variant_keys": [
    "<string>"
  ],
  "description": "<string>",
  "effective_date": "2023-11-07T05:31:56Z",
  "price_types": [
    "<string>"
  ],
  "target_env": "<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

Convenience body for the product-page "Republish selected to…" action: create a draft republish batch AND seed its referenced_record_keys from the selected variants in one round-trip. Saves the UI from chaining create → add-by-variants.

name
string
required

Human-readable batch name

target_key
string
required

e.g. 'vtex_pricing'

variant_keys
string[]
required
Minimum array length: 1
description
string | null
effective_date
string<date-time> | null
price_types
string[] | null
target_env
string | null

e.g. 'qa' / 'prod'

Response

Successful Response