curl --request POST \
--url https://api.merchantops.ai/api/catalog/batches/{key}/records \
--header 'Content-Type: application/json' \
--data '
{
"product_keys": [
"<string>"
],
"product_versions": {}
}
'import requests
url = "https://api.merchantops.ai/api/catalog/batches/{key}/records"
payload = {
"product_keys": ["<string>"],
"product_versions": {}
}
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({product_keys: ['<string>'], product_versions: {}})
};
fetch('https://api.merchantops.ai/api/catalog/batches/{key}/records', 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/catalog/batches/{key}/records",
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([
'product_keys' => [
'<string>'
],
'product_versions' => [
]
]),
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/catalog/batches/{key}/records"
payload := strings.NewReader("{\n \"product_keys\": [\n \"<string>\"\n ],\n \"product_versions\": {}\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/catalog/batches/{key}/records")
.header("Content-Type", "application/json")
.body("{\n \"product_keys\": [\n \"<string>\"\n ],\n \"product_versions\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.merchantops.ai/api/catalog/batches/{key}/records")
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 \"product_keys\": [\n \"<string>\"\n ],\n \"product_versions\": {}\n}"
response = http.request(request)
puts response.read_body{
"added": 123,
"skipped_existing": 123,
"skipped_not_found": 123,
"total_items": 123,
"not_found_keys": [
"<string>"
],
"records": [
{}
],
"skipped_already_in_batch": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Add Batch Records
curl --request POST \
--url https://api.merchantops.ai/api/catalog/batches/{key}/records \
--header 'Content-Type: application/json' \
--data '
{
"product_keys": [
"<string>"
],
"product_versions": {}
}
'import requests
url = "https://api.merchantops.ai/api/catalog/batches/{key}/records"
payload = {
"product_keys": ["<string>"],
"product_versions": {}
}
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({product_keys: ['<string>'], product_versions: {}})
};
fetch('https://api.merchantops.ai/api/catalog/batches/{key}/records', 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/catalog/batches/{key}/records",
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([
'product_keys' => [
'<string>'
],
'product_versions' => [
]
]),
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/catalog/batches/{key}/records"
payload := strings.NewReader("{\n \"product_keys\": [\n \"<string>\"\n ],\n \"product_versions\": {}\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/catalog/batches/{key}/records")
.header("Content-Type", "application/json")
.body("{\n \"product_keys\": [\n \"<string>\"\n ],\n \"product_versions\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.merchantops.ai/api/catalog/batches/{key}/records")
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 \"product_keys\": [\n \"<string>\"\n ],\n \"product_versions\": {}\n}"
response = http.request(request)
puts response.read_body{
"added": 123,
"skipped_existing": 123,
"skipped_not_found": 123,
"total_items": 123,
"not_found_keys": [
"<string>"
],
"records": [
{}
],
"skipped_already_in_batch": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Path Parameters
Cookies
Body
Response
Successful Response
Response for POST /api/catalog/batches/{key}/records.
Catalog is a PUBLIC API tag, so this route is in the published
OpenAPI spec and the vendored SDK. The route was previously an
untyped passthrough returning {added, skipped_already_in_batch, skipped_not_found, records}; typing it renamed one field and
dropped another, which would have silently broken external
SDK/curl consumers. Both legacy fields are retained here as
deprecated duplicates of the new ones so the change is genuinely
additive.
200DEPRECATED — the catalog batch records created by this call, retained for backwards compatibility with pre-existing API consumers. Prefer GET /api/catalog/batches/{key}/records, which paginates; this field is unbounded and echoes every newly created record (the request accepts up to 10,000 keys). Empty when no new records were created.
DEPRECATED — the original name of this field, retained for backwards compatibility with pre-existing API consumers. Always equal to skipped_existing; use that instead.