Update a custom group
curl --request PATCH \
--url https://mm-api.merchantspring.io/customGroups/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"channelId": "<string>",
"merchantId": "<string>",
"groupName": "<string>",
"addProducts": [
{
"sellerSku": "<string>"
}
],
"removeProducts": [
{
"sellerSku": "<string>"
}
],
"addBrands": [
"<string>"
],
"removeBrands": [
"<string>"
]
}
'import requests
url = "https://mm-api.merchantspring.io/customGroups/{id}"
payload = {
"channelId": "<string>",
"merchantId": "<string>",
"groupName": "<string>",
"addProducts": [{ "sellerSku": "<string>" }],
"removeProducts": [{ "sellerSku": "<string>" }],
"addBrands": ["<string>"],
"removeBrands": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
channelId: '<string>',
merchantId: '<string>',
groupName: '<string>',
addProducts: [{sellerSku: '<string>'}],
removeProducts: [{sellerSku: '<string>'}],
addBrands: ['<string>'],
removeBrands: ['<string>']
})
};
fetch('https://mm-api.merchantspring.io/customGroups/{id}', 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://mm-api.merchantspring.io/customGroups/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'channelId' => '<string>',
'merchantId' => '<string>',
'groupName' => '<string>',
'addProducts' => [
[
'sellerSku' => '<string>'
]
],
'removeProducts' => [
[
'sellerSku' => '<string>'
]
],
'addBrands' => [
'<string>'
],
'removeBrands' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://mm-api.merchantspring.io/customGroups/{id}"
payload := strings.NewReader("{\n \"channelId\": \"<string>\",\n \"merchantId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"addProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"removeProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"addBrands\": [\n \"<string>\"\n ],\n \"removeBrands\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://mm-api.merchantspring.io/customGroups/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"channelId\": \"<string>\",\n \"merchantId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"addProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"removeProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"addBrands\": [\n \"<string>\"\n ],\n \"removeBrands\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mm-api.merchantspring.io/customGroups/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channelId\": \"<string>\",\n \"merchantId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"addProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"removeProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"addBrands\": [\n \"<string>\"\n ],\n \"removeBrands\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.This response has no body data.Custom Group
Update a custom group
Add or remove products/brands and optionally rename the group. Provide at least one of addProducts, removeProducts, addBrands, removeBrands, or groupName. Cannot mix product and brand operations in the same request.
PATCH
/
customGroups
/
{id}
Update a custom group
curl --request PATCH \
--url https://mm-api.merchantspring.io/customGroups/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"channelId": "<string>",
"merchantId": "<string>",
"groupName": "<string>",
"addProducts": [
{
"sellerSku": "<string>"
}
],
"removeProducts": [
{
"sellerSku": "<string>"
}
],
"addBrands": [
"<string>"
],
"removeBrands": [
"<string>"
]
}
'import requests
url = "https://mm-api.merchantspring.io/customGroups/{id}"
payload = {
"channelId": "<string>",
"merchantId": "<string>",
"groupName": "<string>",
"addProducts": [{ "sellerSku": "<string>" }],
"removeProducts": [{ "sellerSku": "<string>" }],
"addBrands": ["<string>"],
"removeBrands": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
channelId: '<string>',
merchantId: '<string>',
groupName: '<string>',
addProducts: [{sellerSku: '<string>'}],
removeProducts: [{sellerSku: '<string>'}],
addBrands: ['<string>'],
removeBrands: ['<string>']
})
};
fetch('https://mm-api.merchantspring.io/customGroups/{id}', 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://mm-api.merchantspring.io/customGroups/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'channelId' => '<string>',
'merchantId' => '<string>',
'groupName' => '<string>',
'addProducts' => [
[
'sellerSku' => '<string>'
]
],
'removeProducts' => [
[
'sellerSku' => '<string>'
]
],
'addBrands' => [
'<string>'
],
'removeBrands' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://mm-api.merchantspring.io/customGroups/{id}"
payload := strings.NewReader("{\n \"channelId\": \"<string>\",\n \"merchantId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"addProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"removeProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"addBrands\": [\n \"<string>\"\n ],\n \"removeBrands\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://mm-api.merchantspring.io/customGroups/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"channelId\": \"<string>\",\n \"merchantId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"addProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"removeProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"addBrands\": [\n \"<string>\"\n ],\n \"removeBrands\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mm-api.merchantspring.io/customGroups/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channelId\": \"<string>\",\n \"merchantId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"addProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"removeProducts\": [\n {\n \"sellerSku\": \"<string>\"\n }\n ],\n \"addBrands\": [\n \"<string>\"\n ],\n \"removeBrands\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.This response has no body data.Authorizations
Path Parameters
Group ID
Body
application/json
At least one of groupName, addProducts, removeProducts, addBrands, or removeBrands must be provided. Use addProducts/removeProducts only for product-based groups, and addBrands/removeBrands only for brand-based groups — these cannot be mixed in the same request.
Response
Was this page helpful?
⌘I