curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v1/items/salesChannels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"ApplyToAllChildItems": true,
"Items": [
123
],
"ActivateSalesChannels": [
123
],
"DeactivateSalesChannels": [
123
]
}
'import requests
url = "https://api.jtl-cloud.com/erp/v1/items/salesChannels"
payload = {
"ApplyToAllChildItems": True,
"Items": [123],
"ActivateSalesChannels": [123],
"DeactivateSalesChannels": [123]
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ApplyToAllChildItems: true,
Items: [123],
ActivateSalesChannels: [123],
DeactivateSalesChannels: [123]
})
};
fetch('https://api.jtl-cloud.com/erp/v1/items/salesChannels', 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.jtl-cloud.com/erp/v1/items/salesChannels",
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([
'ApplyToAllChildItems' => true,
'Items' => [
123
],
'ActivateSalesChannels' => [
123
],
'DeactivateSalesChannels' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.jtl-cloud.com/erp/v1/items/salesChannels"
payload := strings.NewReader("{\n \"ApplyToAllChildItems\": true,\n \"Items\": [\n 123\n ],\n \"ActivateSalesChannels\": [\n 123\n ],\n \"DeactivateSalesChannels\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.patch("https://api.jtl-cloud.com/erp/v1/items/salesChannels")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ApplyToAllChildItems\": true,\n \"Items\": [\n 123\n ],\n \"ActivateSalesChannels\": [\n 123\n ],\n \"DeactivateSalesChannels\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v1/items/salesChannels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ApplyToAllChildItems\": true,\n \"Items\": [\n 123\n ],\n \"ActivateSalesChannels\": [\n 123\n ],\n \"DeactivateSalesChannels\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"NotActivatedForJtlPosItems": [
{
"Item": 123,
"SalesChannel": "<string>"
}
],
"NotActivatedForScxDueToPartialItems": [
{
"Item": 123,
"SalesChannel": "<string>"
}
],
"NotActivatedForScxForMissingChildItems": [
{
"Item": 123,
"SalesChannel": "<string>"
}
],
"NotActivatedBecauseInactiveItems": [
{
"Item": 123,
"SalesChannel": "<string>"
}
]
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}Update Item Sales Channels
Update the state of the sales channels for the given item
curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v1/items/salesChannels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"ApplyToAllChildItems": true,
"Items": [
123
],
"ActivateSalesChannels": [
123
],
"DeactivateSalesChannels": [
123
]
}
'import requests
url = "https://api.jtl-cloud.com/erp/v1/items/salesChannels"
payload = {
"ApplyToAllChildItems": True,
"Items": [123],
"ActivateSalesChannels": [123],
"DeactivateSalesChannels": [123]
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ApplyToAllChildItems: true,
Items: [123],
ActivateSalesChannels: [123],
DeactivateSalesChannels: [123]
})
};
fetch('https://api.jtl-cloud.com/erp/v1/items/salesChannels', 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.jtl-cloud.com/erp/v1/items/salesChannels",
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([
'ApplyToAllChildItems' => true,
'Items' => [
123
],
'ActivateSalesChannels' => [
123
],
'DeactivateSalesChannels' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.jtl-cloud.com/erp/v1/items/salesChannels"
payload := strings.NewReader("{\n \"ApplyToAllChildItems\": true,\n \"Items\": [\n 123\n ],\n \"ActivateSalesChannels\": [\n 123\n ],\n \"DeactivateSalesChannels\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.patch("https://api.jtl-cloud.com/erp/v1/items/salesChannels")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ApplyToAllChildItems\": true,\n \"Items\": [\n 123\n ],\n \"ActivateSalesChannels\": [\n 123\n ],\n \"DeactivateSalesChannels\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v1/items/salesChannels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ApplyToAllChildItems\": true,\n \"Items\": [\n 123\n ],\n \"ActivateSalesChannels\": [\n 123\n ],\n \"DeactivateSalesChannels\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"NotActivatedForJtlPosItems": [
{
"Item": 123,
"SalesChannel": "<string>"
}
],
"NotActivatedForScxDueToPartialItems": [
{
"Item": 123,
"SalesChannel": "<string>"
}
],
"NotActivatedForScxForMissingChildItems": [
{
"Item": 123,
"SalesChannel": "<string>"
}
],
"NotActivatedBecauseInactiveItems": [
{
"Item": 123,
"SalesChannel": "<string>"
}
]
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
The User-Id (int or uuid) on whose behalf the request is executed. Requires scope 'Application.RunAs'.
The tenant ID for the target ERP instance.
Body
The sales channels to update
Model Class: UpdateItemSalesChannels
Specifies if sales channel activation should be applied to all child items.
The IDs of the items for which sales channels should be updated.
The IDs of the sales channels that should be activated. Only specific sales channels are allowed for this operation and are specified in the sales channel endpoint (GET).
The ID of the sales channel for this description. Only specific sales channels are allowed for this operation and are specified in the sales channel endpoint (GET).
Response
The Update Saleschannels.
Model Class: UpdateItemSalesChannelsResponse
The IDs of the items for which JTL-POS sales channels could not be activated.
Show child attributes
Show child attributes
The IDs of the items for which sales channels cuold not be activated because they are partial items.
Show child attributes
Show child attributes
The IDs of the items for which sales channels cuold not be activated because they are parent items without children.
Show child attributes
Show child attributes
The IDs of the items for which sales channels cuold not be activated because they are inactive items.
Show child attributes
Show child attributes
Was this page helpful?