curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v2/scx/sellers/{salesChannelId}/items/{itemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"channelCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"minimumStockLevel": 123,
"maximumStockLevel": 123
}
'import requests
url = "https://api.jtl-cloud.com/erp/v2/scx/sellers/{salesChannelId}/items/{itemId}"
payload = {
"channelCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"minimumStockLevel": 123,
"maximumStockLevel": 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({
channelCategoryId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
minimumStockLevel: 123,
maximumStockLevel: 123
})
};
fetch('https://api.jtl-cloud.com/erp/v2/scx/sellers/{salesChannelId}/items/{itemId}', 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/v2/scx/sellers/{salesChannelId}/items/{itemId}",
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([
'channelCategoryId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'minimumStockLevel' => 123,
'maximumStockLevel' => 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/v2/scx/sellers/{salesChannelId}/items/{itemId}"
payload := strings.NewReader("{\n \"channelCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"minimumStockLevel\": 123,\n \"maximumStockLevel\": 123\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/v2/scx/sellers/{salesChannelId}/items/{itemId}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channelCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"minimumStockLevel\": 123,\n \"maximumStockLevel\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/scx/sellers/{salesChannelId}/items/{itemId}")
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 \"channelCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"minimumStockLevel\": 123,\n \"maximumStockLevel\": 123\n}"
response = http.request(request)
puts response.read_body{
"salesChannelId": "<string>",
"itemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"channelCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"minimumStockLevel": 123,
"maximumStockLevel": 123
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}Update Scx Item Sales Channel Data
Changes the base data of an item for an SCX seller (sales channel): the channel category and the minimum and maximum stock level. Only the properties that are sent change; a property that is omitted keeps its value, and null is a value of its own: null for the channel category removes the category from the item, null for a stock level stores 0, which means no stock level as in the Wawi, so the item reads back 0 and not null. At least one property must be sent. The response is the base data of the item as it is now. Changing the channel category moves the attribute values of the item to the new category. Before the category changes, the attribute definitions of the new category are refreshed from the marketplace when they are outdated, as the refresh commands do; a failed refresh is not reported, the change goes ahead with the definitions already stored. If the definitions of the new category were never refreshed and the refresh fails, the change fails with the error SCX_CHANNEL_CATEGORY_DEFINITIONS_MISSING. The refresh removes the attribute definitions that the marketplace no longer lists for the category. Values stored for removed category attributes may be removed as well, for all sellers of the channel: the stored values of those attributes are deleted for every item of every seller of the channel that is assigned to the category, and this is not undone if the request is rejected afterwards. Problems found in the sent category and stock levels are reported together; a missing category definition is reported on its own. Minimum and maximum stock level are not compared with each other. The error codes are: SALES_CHANNEL_ID_INVALID (SalesChannelId is not a valid sales channel id), SCX_PATCH_REQUEST_EMPTY (no property was sent), SCX_CHANNEL_CATEGORY_NOT_IN_CHANNEL (the category does not belong to the marketplace channel of the seller), SCX_CHANNEL_CATEGORY_NOT_ASSIGNABLE (the category cannot be assigned, because it is not listable or is deprecated), SCX_CHANNEL_CATEGORY_DEFINITIONS_MISSING (the attribute definitions of the new category were never refreshed and the refresh failed), SCX_STOCK_LEVEL_INVALID (a stock level is negative or, rounded to 13 decimal places, exceeds 999999999999.9999999999999), SCX_SALES_CHANNEL_NOT_FOUND (no SCX seller exists for the sales channel id, or the seller is deleted or deactivated) and SCX_ITEM_NOT_FOUND (the item does not exist).
curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v2/scx/sellers/{salesChannelId}/items/{itemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"channelCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"minimumStockLevel": 123,
"maximumStockLevel": 123
}
'import requests
url = "https://api.jtl-cloud.com/erp/v2/scx/sellers/{salesChannelId}/items/{itemId}"
payload = {
"channelCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"minimumStockLevel": 123,
"maximumStockLevel": 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({
channelCategoryId: 'b45f6432-2462-4c6f-b00f-1d9d01000000',
minimumStockLevel: 123,
maximumStockLevel: 123
})
};
fetch('https://api.jtl-cloud.com/erp/v2/scx/sellers/{salesChannelId}/items/{itemId}', 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/v2/scx/sellers/{salesChannelId}/items/{itemId}",
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([
'channelCategoryId' => 'b45f6432-2462-4c6f-b00f-1d9d01000000',
'minimumStockLevel' => 123,
'maximumStockLevel' => 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/v2/scx/sellers/{salesChannelId}/items/{itemId}"
payload := strings.NewReader("{\n \"channelCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"minimumStockLevel\": 123,\n \"maximumStockLevel\": 123\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/v2/scx/sellers/{salesChannelId}/items/{itemId}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channelCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"minimumStockLevel\": 123,\n \"maximumStockLevel\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/scx/sellers/{salesChannelId}/items/{itemId}")
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 \"channelCategoryId\": \"b45f6432-2462-4c6f-b00f-1d9d01000000\",\n \"minimumStockLevel\": 123,\n \"maximumStockLevel\": 123\n}"
response = http.request(request)
puts response.read_body{
"salesChannelId": "<string>",
"itemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"channelCategoryId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"minimumStockLevel": 123,
"maximumStockLevel": 123
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}{
"type": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"instance": "/api/route",
"traceId": "0HMPNHL0JHL76:00000001",
"detail": "<string>",
"errors": [
{
"name": "Error or field name",
"reason": "Error reason",
"code": "<string>",
"severity": "<string>"
}
]
}Authorizations
Scopes
Headers
Path Parameters
Body
Request model for UpdateScxItemSalesChannelData command endpoint. Route parameters bind from the route, query parameters from the query string, everything else from the body.
ID of the channel category to assign the item to. The category must belong to the marketplace channel of the seller and must be assignable. Omit to keep the category, send null to remove it. The REST schema does not mark this property as nullable, so clients generated from it may not be able to send null.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Response
The base data of the item as it is now.
The base data of an item for an SCX seller (sales channel): the channel category and the minimum and maximum stock level. It is also returned when no base data has been stored for the item yet; the category and both stock levels are null in that case.
Was this page helpful?