curl --request PUT \
--url https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attributeList": [
{
"attributeId": "12323",
"displayName": "Brand",
"isMultipleAllowed": false,
"type": "text",
"values": [
{
"value": "Beer"
},
{
"value": "Tee",
"display": "Wine"
}
],
"attributeValueValidation": "/^[0-9]{13}$/",
"conditionalMandatoryBy": [
{
"attributeId": "12323",
"attributeValues": [
"High"
]
}
],
"conditionalOptionalBy": [
{
"attributeId": "12323",
"attributeValues": [
"No Frame"
]
}
],
"required": true,
"recommended": false,
"section": "Colors and Appearance",
"sectionPosition": 0,
"isRepeatableSubSection": true,
"subSection": "Length",
"subSectionPosition": 0,
"description": null,
"isVariationDimension": true,
"enumValues": [
"Blue"
]
}
]
}
'import requests
url = "https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}"
payload = { "attributeList": [
{
"attributeId": "12323",
"displayName": "Brand",
"isMultipleAllowed": False,
"type": "text",
"values": [
{ "value": "Beer" },
{
"value": "Tee",
"display": "Wine"
}
],
"attributeValueValidation": "/^[0-9]{13}$/",
"conditionalMandatoryBy": [
{
"attributeId": "12323",
"attributeValues": ["High"]
}
],
"conditionalOptionalBy": [
{
"attributeId": "12323",
"attributeValues": ["No Frame"]
}
],
"required": True,
"recommended": False,
"section": "Colors and Appearance",
"sectionPosition": 0,
"isRepeatableSubSection": True,
"subSection": "Length",
"subSectionPosition": 0,
"description": None,
"isVariationDimension": True,
"enumValues": ["Blue"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
attributeList: [
{
attributeId: '12323',
displayName: 'Brand',
isMultipleAllowed: false,
type: 'text',
values: [{value: 'Beer'}, {value: 'Tee', display: 'Wine'}],
attributeValueValidation: '/^[0-9]{13}$/',
conditionalMandatoryBy: [{attributeId: '12323', attributeValues: ['High']}],
conditionalOptionalBy: [{attributeId: '12323', attributeValues: ['No Frame']}],
required: true,
recommended: false,
section: 'Colors and Appearance',
sectionPosition: 0,
isRepeatableSubSection: true,
subSection: 'Length',
subSectionPosition: 0,
description: null,
isVariationDimension: true,
enumValues: ['Blue']
}
]
})
};
fetch('https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}', 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://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'attributeList' => [
[
'attributeId' => '12323',
'displayName' => 'Brand',
'isMultipleAllowed' => false,
'type' => 'text',
'values' => [
[
'value' => 'Beer'
],
[
'value' => 'Tee',
'display' => 'Wine'
]
],
'attributeValueValidation' => '/^[0-9]{13}$/',
'conditionalMandatoryBy' => [
[
'attributeId' => '12323',
'attributeValues' => [
'High'
]
]
],
'conditionalOptionalBy' => [
[
'attributeId' => '12323',
'attributeValues' => [
'No Frame'
]
]
],
'required' => true,
'recommended' => false,
'section' => 'Colors and Appearance',
'sectionPosition' => 0,
'isRepeatableSubSection' => true,
'subSection' => 'Length',
'subSectionPosition' => 0,
'description' => null,
'isVariationDimension' => true,
'enumValues' => [
'Blue'
]
]
]
]),
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://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}"
payload := strings.NewReader("{\n \"attributeList\": [\n {\n \"attributeId\": \"12323\",\n \"displayName\": \"Brand\",\n \"isMultipleAllowed\": false,\n \"type\": \"text\",\n \"values\": [\n {\n \"value\": \"Beer\"\n },\n {\n \"value\": \"Tee\",\n \"display\": \"Wine\"\n }\n ],\n \"attributeValueValidation\": \"/^[0-9]{13}$/\",\n \"conditionalMandatoryBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"High\"\n ]\n }\n ],\n \"conditionalOptionalBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"No Frame\"\n ]\n }\n ],\n \"required\": true,\n \"recommended\": false,\n \"section\": \"Colors and Appearance\",\n \"sectionPosition\": 0,\n \"isRepeatableSubSection\": true,\n \"subSection\": \"Length\",\n \"subSectionPosition\": 0,\n \"description\": null,\n \"isVariationDimension\": true,\n \"enumValues\": [\n \"Blue\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"attributeList\": [\n {\n \"attributeId\": \"12323\",\n \"displayName\": \"Brand\",\n \"isMultipleAllowed\": false,\n \"type\": \"text\",\n \"values\": [\n {\n \"value\": \"Beer\"\n },\n {\n \"value\": \"Tee\",\n \"display\": \"Wine\"\n }\n ],\n \"attributeValueValidation\": \"/^[0-9]{13}$/\",\n \"conditionalMandatoryBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"High\"\n ]\n }\n ],\n \"conditionalOptionalBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"No Frame\"\n ]\n }\n ],\n \"required\": true,\n \"recommended\": false,\n \"section\": \"Colors and Appearance\",\n \"sectionPosition\": 0,\n \"isRepeatableSubSection\": true,\n \"subSection\": \"Length\",\n \"subSectionPosition\": 0,\n \"description\": null,\n \"isVariationDimension\": true,\n \"enumValues\": [\n \"Blue\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"attributeList\": [\n {\n \"attributeId\": \"12323\",\n \"displayName\": \"Brand\",\n \"isMultipleAllowed\": false,\n \"type\": \"text\",\n \"values\": [\n {\n \"value\": \"Beer\"\n },\n {\n \"value\": \"Tee\",\n \"display\": \"Wine\"\n }\n ],\n \"attributeValueValidation\": \"/^[0-9]{13}$/\",\n \"conditionalMandatoryBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"High\"\n ]\n }\n ],\n \"conditionalOptionalBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"No Frame\"\n ]\n }\n ],\n \"required\": true,\n \"recommended\": false,\n \"section\": \"Colors and Appearance\",\n \"sectionPosition\": 0,\n \"isRepeatableSubSection\": true,\n \"subSection\": \"Length\",\n \"subSectionPosition\": 0,\n \"description\": null,\n \"isVariationDimension\": true,\n \"enumValues\": [\n \"Blue\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"errorList": [
{
"code": "VAL100",
"message": "Required field sellerId not found",
"severity": "error",
"hint": "Check the field `sellerId` — it must be a non-empty string."
}
]
}{
"errorList": [
{
"code": "GEN404",
"message": "Not found",
"severity": "error",
"hint": null
}
]
}{
"errorList": [
{
"code": "GEN500",
"message": "Internal Server Error",
"severity": "error",
"hint": null
}
]
}Category Attributes
Create Attributes which are required for listings in specific category.
curl --request PUT \
--url https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attributeList": [
{
"attributeId": "12323",
"displayName": "Brand",
"isMultipleAllowed": false,
"type": "text",
"values": [
{
"value": "Beer"
},
{
"value": "Tee",
"display": "Wine"
}
],
"attributeValueValidation": "/^[0-9]{13}$/",
"conditionalMandatoryBy": [
{
"attributeId": "12323",
"attributeValues": [
"High"
]
}
],
"conditionalOptionalBy": [
{
"attributeId": "12323",
"attributeValues": [
"No Frame"
]
}
],
"required": true,
"recommended": false,
"section": "Colors and Appearance",
"sectionPosition": 0,
"isRepeatableSubSection": true,
"subSection": "Length",
"subSectionPosition": 0,
"description": null,
"isVariationDimension": true,
"enumValues": [
"Blue"
]
}
]
}
'import requests
url = "https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}"
payload = { "attributeList": [
{
"attributeId": "12323",
"displayName": "Brand",
"isMultipleAllowed": False,
"type": "text",
"values": [
{ "value": "Beer" },
{
"value": "Tee",
"display": "Wine"
}
],
"attributeValueValidation": "/^[0-9]{13}$/",
"conditionalMandatoryBy": [
{
"attributeId": "12323",
"attributeValues": ["High"]
}
],
"conditionalOptionalBy": [
{
"attributeId": "12323",
"attributeValues": ["No Frame"]
}
],
"required": True,
"recommended": False,
"section": "Colors and Appearance",
"sectionPosition": 0,
"isRepeatableSubSection": True,
"subSection": "Length",
"subSectionPosition": 0,
"description": None,
"isVariationDimension": True,
"enumValues": ["Blue"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
attributeList: [
{
attributeId: '12323',
displayName: 'Brand',
isMultipleAllowed: false,
type: 'text',
values: [{value: 'Beer'}, {value: 'Tee', display: 'Wine'}],
attributeValueValidation: '/^[0-9]{13}$/',
conditionalMandatoryBy: [{attributeId: '12323', attributeValues: ['High']}],
conditionalOptionalBy: [{attributeId: '12323', attributeValues: ['No Frame']}],
required: true,
recommended: false,
section: 'Colors and Appearance',
sectionPosition: 0,
isRepeatableSubSection: true,
subSection: 'Length',
subSectionPosition: 0,
description: null,
isVariationDimension: true,
enumValues: ['Blue']
}
]
})
};
fetch('https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}', 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://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'attributeList' => [
[
'attributeId' => '12323',
'displayName' => 'Brand',
'isMultipleAllowed' => false,
'type' => 'text',
'values' => [
[
'value' => 'Beer'
],
[
'value' => 'Tee',
'display' => 'Wine'
]
],
'attributeValueValidation' => '/^[0-9]{13}$/',
'conditionalMandatoryBy' => [
[
'attributeId' => '12323',
'attributeValues' => [
'High'
]
]
],
'conditionalOptionalBy' => [
[
'attributeId' => '12323',
'attributeValues' => [
'No Frame'
]
]
],
'required' => true,
'recommended' => false,
'section' => 'Colors and Appearance',
'sectionPosition' => 0,
'isRepeatableSubSection' => true,
'subSection' => 'Length',
'subSectionPosition' => 0,
'description' => null,
'isVariationDimension' => true,
'enumValues' => [
'Blue'
]
]
]
]),
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://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}"
payload := strings.NewReader("{\n \"attributeList\": [\n {\n \"attributeId\": \"12323\",\n \"displayName\": \"Brand\",\n \"isMultipleAllowed\": false,\n \"type\": \"text\",\n \"values\": [\n {\n \"value\": \"Beer\"\n },\n {\n \"value\": \"Tee\",\n \"display\": \"Wine\"\n }\n ],\n \"attributeValueValidation\": \"/^[0-9]{13}$/\",\n \"conditionalMandatoryBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"High\"\n ]\n }\n ],\n \"conditionalOptionalBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"No Frame\"\n ]\n }\n ],\n \"required\": true,\n \"recommended\": false,\n \"section\": \"Colors and Appearance\",\n \"sectionPosition\": 0,\n \"isRepeatableSubSection\": true,\n \"subSection\": \"Length\",\n \"subSectionPosition\": 0,\n \"description\": null,\n \"isVariationDimension\": true,\n \"enumValues\": [\n \"Blue\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"attributeList\": [\n {\n \"attributeId\": \"12323\",\n \"displayName\": \"Brand\",\n \"isMultipleAllowed\": false,\n \"type\": \"text\",\n \"values\": [\n {\n \"value\": \"Beer\"\n },\n {\n \"value\": \"Tee\",\n \"display\": \"Wine\"\n }\n ],\n \"attributeValueValidation\": \"/^[0-9]{13}$/\",\n \"conditionalMandatoryBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"High\"\n ]\n }\n ],\n \"conditionalOptionalBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"No Frame\"\n ]\n }\n ],\n \"required\": true,\n \"recommended\": false,\n \"section\": \"Colors and Appearance\",\n \"sectionPosition\": 0,\n \"isRepeatableSubSection\": true,\n \"subSection\": \"Length\",\n \"subSectionPosition\": 0,\n \"description\": null,\n \"isVariationDimension\": true,\n \"enumValues\": [\n \"Blue\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scx-sbx.api.jtl-software.com/v1/channel/attribute/category/{categoryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"attributeList\": [\n {\n \"attributeId\": \"12323\",\n \"displayName\": \"Brand\",\n \"isMultipleAllowed\": false,\n \"type\": \"text\",\n \"values\": [\n {\n \"value\": \"Beer\"\n },\n {\n \"value\": \"Tee\",\n \"display\": \"Wine\"\n }\n ],\n \"attributeValueValidation\": \"/^[0-9]{13}$/\",\n \"conditionalMandatoryBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"High\"\n ]\n }\n ],\n \"conditionalOptionalBy\": [\n {\n \"attributeId\": \"12323\",\n \"attributeValues\": [\n \"No Frame\"\n ]\n }\n ],\n \"required\": true,\n \"recommended\": false,\n \"section\": \"Colors and Appearance\",\n \"sectionPosition\": 0,\n \"isRepeatableSubSection\": true,\n \"subSection\": \"Length\",\n \"subSectionPosition\": 0,\n \"description\": null,\n \"isVariationDimension\": true,\n \"enumValues\": [\n \"Blue\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"errorList": [
{
"code": "VAL100",
"message": "Required field sellerId not found",
"severity": "error",
"hint": "Check the field `sellerId` — it must be a non-empty string."
}
]
}{
"errorList": [
{
"code": "GEN404",
"message": "Not found",
"severity": "error",
"hint": null
}
]
}{
"errorList": [
{
"code": "GEN500",
"message": "Internal Server Error",
"severity": "error",
"hint": null
}
]
}Authorizations
As a Channel Integrator you will receive a API Refresh Token. With such a Refresh Token you need to request an Access Token with a limited Lifetime (see POST /v1/auth). This Access Token must be provided as a Bearer Token in the Authorization Header with every request.
Headers
Use the Content-Encoding: gzip when sending JSON requestBody as compressed payload. This is recommended when creating huge category trees. There is a limit of 32 MB on this route.
gzip Path Parameters
Assing attributes to a former created channel category. If no categoryId is provided the attribut will be assigned to the global channel scope, which means that every offer may require such an attribute.
Channel category Id
1 - 512"Beer4711"
Body
List of attributes scoped to a single seller or to a specific category.
Show child attributes
Show child attributes
Response
Attributes received
Was this page helpful?