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>"
}
'import requests
url = "https://api.merchantops.ai/api/pricing/batches/republish-from-variants"
payload = {
"name": "<string>",
"target_key": "<string>",
"variant_keys": ["<string>"],
"description": "<string>",
"effective_date": "2023-11-07T05:31:56Z",
"price_types": ["<string>"],
"target_env": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
target_key: '<string>',
variant_keys: ['<string>'],
description: '<string>',
effective_date: '2023-11-07T05:31:56Z',
price_types: ['<string>'],
target_env: '<string>'
})
};
fetch('https://api.merchantops.ai/api/pricing/batches/republish-from-variants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.merchantops.ai/api/pricing/batches/republish-from-variants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'target_key' => '<string>',
'variant_keys' => [
'<string>'
],
'description' => '<string>',
'effective_date' => '2023-11-07T05:31:56Z',
'price_types' => [
'<string>'
],
'target_env' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.merchantops.ai/api/pricing/batches/republish-from-variants"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"target_key\": \"<string>\",\n \"variant_keys\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"effective_date\": \"2023-11-07T05:31:56Z\",\n \"price_types\": [\n \"<string>\"\n ],\n \"target_env\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.merchantops.ai/api/pricing/batches/republish-from-variants")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"target_key\": \"<string>\",\n \"variant_keys\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"effective_date\": \"2023-11-07T05:31:56Z\",\n \"price_types\": [\n \"<string>\"\n ],\n \"target_env\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.merchantops.ai/api/pricing/batches/republish-from-variants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"target_key\": \"<string>\",\n \"variant_keys\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"effective_date\": \"2023-11-07T05:31:56Z\",\n \"price_types\": [\n \"<string>\"\n ],\n \"target_env\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Pricing
Create Republish Batch From Variants
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-records-by-variants and avoids the empty-batch state
that would block submit-for-review.
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>"
}
'import requests
url = "https://api.merchantops.ai/api/pricing/batches/republish-from-variants"
payload = {
"name": "<string>",
"target_key": "<string>",
"variant_keys": ["<string>"],
"description": "<string>",
"effective_date": "2023-11-07T05:31:56Z",
"price_types": ["<string>"],
"target_env": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
target_key: '<string>',
variant_keys: ['<string>'],
description: '<string>',
effective_date: '2023-11-07T05:31:56Z',
price_types: ['<string>'],
target_env: '<string>'
})
};
fetch('https://api.merchantops.ai/api/pricing/batches/republish-from-variants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.merchantops.ai/api/pricing/batches/republish-from-variants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'target_key' => '<string>',
'variant_keys' => [
'<string>'
],
'description' => '<string>',
'effective_date' => '2023-11-07T05:31:56Z',
'price_types' => [
'<string>'
],
'target_env' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.merchantops.ai/api/pricing/batches/republish-from-variants"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"target_key\": \"<string>\",\n \"variant_keys\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"effective_date\": \"2023-11-07T05:31:56Z\",\n \"price_types\": [\n \"<string>\"\n ],\n \"target_env\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.merchantops.ai/api/pricing/batches/republish-from-variants")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"target_key\": \"<string>\",\n \"variant_keys\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"effective_date\": \"2023-11-07T05:31:56Z\",\n \"price_types\": [\n \"<string>\"\n ],\n \"target_env\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.merchantops.ai/api/pricing/batches/republish-from-variants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"target_key\": \"<string>\",\n \"variant_keys\": [\n \"<string>\"\n ],\n \"description\": \"<string>\",\n \"effective_date\": \"2023-11-07T05:31:56Z\",\n \"price_types\": [\n \"<string>\"\n ],\n \"target_env\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Cookies
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.
Response
Successful Response