curl --request POST \
--url https://www.merchkit.com/api/v1/products/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"attributes": {
"sku": "ARIA-DT-72",
"price": 1349
}
},
{
"attributes": {
"sku": "ARIA-DT-96",
"product_name": "Aria Oak Dining Table 96\"",
"price": 1699
}
},
{
"attributes": {
"sku": "ARIA-DT-120",
"pricee": 2199
}
}
]
}
'import requests
url = "https://www.merchkit.com/api/v1/products/batch"
payload = { "items": [{ "attributes": {
"sku": "ARIA-DT-72",
"price": 1349
} }, { "attributes": {
"sku": "ARIA-DT-96",
"product_name": "Aria Oak Dining Table 96\"",
"price": 1699
} }, { "attributes": {
"sku": "ARIA-DT-120",
"pricee": 2199
} }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{attributes: {sku: 'ARIA-DT-72', price: 1349}},
{
attributes: {sku: 'ARIA-DT-96', product_name: 'Aria Oak Dining Table 96"', price: 1699}
},
{attributes: {sku: 'ARIA-DT-120', pricee: 2199}}
]
})
};
fetch('https://www.merchkit.com/api/v1/products/batch', 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://www.merchkit.com/api/v1/products/batch",
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([
'items' => [
[
'attributes' => [
'sku' => 'ARIA-DT-72',
'price' => 1349
]
],
[
'attributes' => [
'sku' => 'ARIA-DT-96',
'product_name' => 'Aria Oak Dining Table 96"',
'price' => 1699
]
],
[
'attributes' => [
'sku' => 'ARIA-DT-120',
'pricee' => 2199
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.merchkit.com/api/v1/products/batch"
payload := strings.NewReader("{\n \"items\": [\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-72\",\n \"price\": 1349\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-96\",\n \"product_name\": \"Aria Oak Dining Table 96\\\"\",\n \"price\": 1699\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-120\",\n \"pricee\": 2199\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://www.merchkit.com/api/v1/products/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-72\",\n \"price\": 1349\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-96\",\n \"product_name\": \"Aria Oak Dining Table 96\\\"\",\n \"price\": 1699\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-120\",\n \"pricee\": 2199\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.merchkit.com/api/v1/products/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-72\",\n \"price\": 1349\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-96\",\n \"product_name\": \"Aria Oak Dining Table 96\\\"\",\n \"price\": 1699\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-120\",\n \"pricee\": 2199\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"summary": {
"total": 3,
"created": 1,
"updated": 1,
"failed": 1,
"has_errors": true
},
"data": [
{
"index": 0,
"merge_value": "ARIA-DT-72",
"id": "9b2f6c1e-8a04-4c6e-b0d3-5f2f6f7a9e21",
"status": "updated"
},
{
"index": 1,
"merge_value": "ARIA-DT-96",
"id": "3c77a1de-52b9-4f0c-8a4e-91d2c6b7e803",
"status": "created"
},
{
"index": 2,
"merge_value": "ARIA-DT-120",
"status": "error",
"error": {
"code": "validation_failed",
"retriable": false,
"message": "Unknown attribute key(s): pricee.",
"field_errors": [
{
"field": "pricee",
"issue": "not_a_defined_attribute"
}
]
}
}
]
}{
"error": {
"code": "validation_failed",
"message": "Unknown attribute key(s): colour.",
"documentation_url": "https://docs.merchkit.com/developers/errors#validation_failed",
"is_retriable": false,
"retry_after_seconds": null,
"alternative_action": "List valid attribute keys via GET /v1/attributes?type=product.",
"request_id": "req_01j9x2k8",
"field_errors": [
{
"field": "colour",
"issue": "not_a_defined_attribute"
}
]
}
}Batch create/upsert products
Up to 100 items in one call. With merge_key, every item gets upsert semantics (create-or-update by that key); without it, pure creates. Items are processed independently and the response is PER-ITEM: HTTP 200 does NOT mean every item succeeded — check each status (created | updated | error) and surface error.message/error.field_errors for failures. A 5,000-SKU ERP delta push is 50 calls with merge_key: "sku".
Scope: write:products.
curl --request POST \
--url https://www.merchkit.com/api/v1/products/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"attributes": {
"sku": "ARIA-DT-72",
"price": 1349
}
},
{
"attributes": {
"sku": "ARIA-DT-96",
"product_name": "Aria Oak Dining Table 96\"",
"price": 1699
}
},
{
"attributes": {
"sku": "ARIA-DT-120",
"pricee": 2199
}
}
]
}
'import requests
url = "https://www.merchkit.com/api/v1/products/batch"
payload = { "items": [{ "attributes": {
"sku": "ARIA-DT-72",
"price": 1349
} }, { "attributes": {
"sku": "ARIA-DT-96",
"product_name": "Aria Oak Dining Table 96\"",
"price": 1699
} }, { "attributes": {
"sku": "ARIA-DT-120",
"pricee": 2199
} }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{attributes: {sku: 'ARIA-DT-72', price: 1349}},
{
attributes: {sku: 'ARIA-DT-96', product_name: 'Aria Oak Dining Table 96"', price: 1699}
},
{attributes: {sku: 'ARIA-DT-120', pricee: 2199}}
]
})
};
fetch('https://www.merchkit.com/api/v1/products/batch', 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://www.merchkit.com/api/v1/products/batch",
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([
'items' => [
[
'attributes' => [
'sku' => 'ARIA-DT-72',
'price' => 1349
]
],
[
'attributes' => [
'sku' => 'ARIA-DT-96',
'product_name' => 'Aria Oak Dining Table 96"',
'price' => 1699
]
],
[
'attributes' => [
'sku' => 'ARIA-DT-120',
'pricee' => 2199
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.merchkit.com/api/v1/products/batch"
payload := strings.NewReader("{\n \"items\": [\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-72\",\n \"price\": 1349\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-96\",\n \"product_name\": \"Aria Oak Dining Table 96\\\"\",\n \"price\": 1699\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-120\",\n \"pricee\": 2199\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://www.merchkit.com/api/v1/products/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-72\",\n \"price\": 1349\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-96\",\n \"product_name\": \"Aria Oak Dining Table 96\\\"\",\n \"price\": 1699\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-120\",\n \"pricee\": 2199\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.merchkit.com/api/v1/products/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-72\",\n \"price\": 1349\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-96\",\n \"product_name\": \"Aria Oak Dining Table 96\\\"\",\n \"price\": 1699\n }\n },\n {\n \"attributes\": {\n \"sku\": \"ARIA-DT-120\",\n \"pricee\": 2199\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"summary": {
"total": 3,
"created": 1,
"updated": 1,
"failed": 1,
"has_errors": true
},
"data": [
{
"index": 0,
"merge_value": "ARIA-DT-72",
"id": "9b2f6c1e-8a04-4c6e-b0d3-5f2f6f7a9e21",
"status": "updated"
},
{
"index": 1,
"merge_value": "ARIA-DT-96",
"id": "3c77a1de-52b9-4f0c-8a4e-91d2c6b7e803",
"status": "created"
},
{
"index": 2,
"merge_value": "ARIA-DT-120",
"status": "error",
"error": {
"code": "validation_failed",
"retriable": false,
"message": "Unknown attribute key(s): pricee.",
"field_errors": [
{
"field": "pricee",
"issue": "not_a_defined_attribute"
}
]
}
}
]
}{
"error": {
"code": "validation_failed",
"message": "Unknown attribute key(s): colour.",
"documentation_url": "https://docs.merchkit.com/developers/errors#validation_failed",
"is_retriable": false,
"retry_after_seconds": null,
"alternative_action": "List valid attribute keys via GET /v1/attributes?type=product.",
"request_id": "req_01j9x2k8",
"field_errors": [
{
"field": "colour",
"issue": "not_a_defined_attribute"
}
]
}
}Authorizations
Workspace-scoped API key (mk_live_...). Each operation lists the scope it requires in x-required-scopes. See the Authentication guide for the full scope table and key management.
Body
Response
Per-item results, in input order, under a summary that makes "N of M failed" a single field read. Check every item — a 200 only means the batch was processed. Route retries on error.retriable, never on message text. Summaries from re-runs must not be summed (an idempotent retry reports updates for rows the first attempt created).
Batch-level counts. has_errors is the cheap "anything to look at?" check; clean batches can skip the per-item scan. Do not sum summaries across idempotent re-runs of the same batch.
Show child attributes
Show child attributes
{
"total": 3,
"created": 1,
"updated": 1,
"failed": 1,
"has_errors": true
}
Show child attributes
Show child attributes
Was this page helpful?