Add and/or remove tags on a specific channel
curl --request PATCH \
--url https://mm-api.merchantspring.io/tags/channel \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"channelId": "A1234567890ABC",
"merchantId": "XXXUS @ ATVPDKIKX0DER",
"addTags": [
"north-america"
],
"removeTags": [
"org://ebay"
]
}
'import requests
url = "https://mm-api.merchantspring.io/tags/channel"
payload = {
"channelId": "A1234567890ABC",
"merchantId": "XXXUS @ ATVPDKIKX0DER",
"addTags": ["north-america"],
"removeTags": ["org://ebay"]
}
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: 'A1234567890ABC',
merchantId: 'XXXUS @ ATVPDKIKX0DER',
addTags: ['north-america'],
removeTags: ['org://ebay']
})
};
fetch('https://mm-api.merchantspring.io/tags/channel', 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/tags/channel",
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' => 'A1234567890ABC',
'merchantId' => 'XXXUS @ ATVPDKIKX0DER',
'addTags' => [
'north-america'
],
'removeTags' => [
'org://ebay'
]
]),
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/tags/channel"
payload := strings.NewReader("{\n \"channelId\": \"A1234567890ABC\",\n \"merchantId\": \"XXXUS @ ATVPDKIKX0DER\",\n \"addTags\": [\n \"north-america\"\n ],\n \"removeTags\": [\n \"org://ebay\"\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/tags/channel")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"channelId\": \"A1234567890ABC\",\n \"merchantId\": \"XXXUS @ ATVPDKIKX0DER\",\n \"addTags\": [\n \"north-america\"\n ],\n \"removeTags\": [\n \"org://ebay\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mm-api.merchantspring.io/tags/channel")
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\": \"A1234567890ABC\",\n \"merchantId\": \"XXXUS @ ATVPDKIKX0DER\",\n \"addTags\": [\n \"north-america\"\n ],\n \"removeTags\": [\n \"org://ebay\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"channelId": "A1234567890ABC",
"merchantId": "XXXUS @ ATVPDKIKX0DER",
"tags": [
"amazon",
"north-america"
]
}This response has no body data.Tag
Add and/or remove tags on a specific channel
Partially update the tags on a single channel, identified by channelId and merchantId, by supplying addTags and/or removeTags. At least one of the two must be provided, and a tag cannot appear in both lists. A maximum of 5 tags can be added in a single call. Shared tags are prefixed with ‘org://’. Returns the channel’s full tag set after the change.
PATCH
/
tags
/
channel
Add and/or remove tags on a specific channel
curl --request PATCH \
--url https://mm-api.merchantspring.io/tags/channel \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"channelId": "A1234567890ABC",
"merchantId": "XXXUS @ ATVPDKIKX0DER",
"addTags": [
"north-america"
],
"removeTags": [
"org://ebay"
]
}
'import requests
url = "https://mm-api.merchantspring.io/tags/channel"
payload = {
"channelId": "A1234567890ABC",
"merchantId": "XXXUS @ ATVPDKIKX0DER",
"addTags": ["north-america"],
"removeTags": ["org://ebay"]
}
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: 'A1234567890ABC',
merchantId: 'XXXUS @ ATVPDKIKX0DER',
addTags: ['north-america'],
removeTags: ['org://ebay']
})
};
fetch('https://mm-api.merchantspring.io/tags/channel', 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/tags/channel",
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' => 'A1234567890ABC',
'merchantId' => 'XXXUS @ ATVPDKIKX0DER',
'addTags' => [
'north-america'
],
'removeTags' => [
'org://ebay'
]
]),
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/tags/channel"
payload := strings.NewReader("{\n \"channelId\": \"A1234567890ABC\",\n \"merchantId\": \"XXXUS @ ATVPDKIKX0DER\",\n \"addTags\": [\n \"north-america\"\n ],\n \"removeTags\": [\n \"org://ebay\"\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/tags/channel")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"channelId\": \"A1234567890ABC\",\n \"merchantId\": \"XXXUS @ ATVPDKIKX0DER\",\n \"addTags\": [\n \"north-america\"\n ],\n \"removeTags\": [\n \"org://ebay\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mm-api.merchantspring.io/tags/channel")
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\": \"A1234567890ABC\",\n \"merchantId\": \"XXXUS @ ATVPDKIKX0DER\",\n \"addTags\": [\n \"north-america\"\n ],\n \"removeTags\": [\n \"org://ebay\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"channelId": "A1234567890ABC",
"merchantId": "XXXUS @ ATVPDKIKX0DER",
"tags": [
"amazon",
"north-america"
]
}This response has no body data.Authorizations
Body
application/json
Channel identifiers and the tags to add and/or remove (at least one of addTags / removeTags)
Channel (store) ID
Merchant ID of the channel
Tags to add to the channel. Non-empty strings only. Shared tags are prefixed with 'org://'.
Tags to remove from the channel. Non-empty strings only. Tags not present on the channel are ignored.
Was this page helpful?
⌘I