Skip to main content
POST
/
api
/
pricing
/
batches
Create Batch
curl --request POST \
  --url https://api.merchantops.ai/api/pricing/batches \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "brand_key": "<string>",
  "depends_on_catalog_batch_key": "<string>",
  "description": "<string>",
  "due_date": "2023-11-07T05:31:56Z",
  "effective_date": "<string>",
  "source_type": "<string>",
  "target_env": "<string>",
  "target_key": "<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

Request body for creating a price batch.

source_type defaults to "new_prices" (the legacy behavior where records are CREATED by the batch through the proposals flow or the per-product Create-new-price dialog). Pass "republish" to create a batch that REFERENCES existing price records via referenced_record_keys — the worker fan-out reads via resolve_dispatch_records so the same NATS payload flows downstream regardless of source type.

target_key / target_env are required at approve time for republish batches (catch surfaced as 400 Bad Request); they can be left blank on draft creation and edited later.

name
string
required
brand_key
string | null
depends_on_catalog_batch_key
string | null
description
string | null
due_date
string<date-time> | null
effective_date
string | null
source_type
string | null

'new_prices' (default) or 'republish'.

target_env
string | null
target_key
string | null

Response

Successful Response