curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v2/items/{itemId}/kit-items/components/{componentItemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"quantity": 123,
"comment": "<string>",
"position": 123
}
'import requests
url = "https://api.jtl-cloud.com/erp/v2/items/{itemId}/kit-items/components/{componentItemId}"
payload = {
"quantity": 123,
"comment": "<string>",
"position": 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({quantity: 123, comment: '<string>', position: 123})
};
fetch('https://api.jtl-cloud.com/erp/v2/items/{itemId}/kit-items/components/{componentItemId}', 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/items/{itemId}/kit-items/components/{componentItemId}",
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([
'quantity' => 123,
'comment' => '<string>',
'position' => 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/items/{itemId}/kit-items/components/{componentItemId}"
payload := strings.NewReader("{\n \"quantity\": 123,\n \"comment\": \"<string>\",\n \"position\": 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/items/{itemId}/kit-items/components/{componentItemId}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quantity\": 123,\n \"comment\": \"<string>\",\n \"position\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/items/{itemId}/kit-items/components/{componentItemId}")
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 \"quantity\": 123,\n \"comment\": \"<string>\",\n \"position\": 123\n}"
response = http.request(request)
puts response.read_body{
"componentItemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"quantity": 123,
"position": 123,
"comment": "<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>"
}
]
}{
"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 Kit Item Component
Changes a single existing component of an item’s kit in place. Fine-grained alternative to replacing the whole component list. Every field is optional - an omitted field keeps its current value, and a request that supplies no field at all succeeds with 200 without changing anything, unless the kit is controlled by a fulfillment network partner, which refuses every request with 409. Which item a component refers to cannot be changed; remove the component and add the other item instead.
curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v2/items/{itemId}/kit-items/components/{componentItemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"quantity": 123,
"comment": "<string>",
"position": 123
}
'import requests
url = "https://api.jtl-cloud.com/erp/v2/items/{itemId}/kit-items/components/{componentItemId}"
payload = {
"quantity": 123,
"comment": "<string>",
"position": 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({quantity: 123, comment: '<string>', position: 123})
};
fetch('https://api.jtl-cloud.com/erp/v2/items/{itemId}/kit-items/components/{componentItemId}', 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/items/{itemId}/kit-items/components/{componentItemId}",
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([
'quantity' => 123,
'comment' => '<string>',
'position' => 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/items/{itemId}/kit-items/components/{componentItemId}"
payload := strings.NewReader("{\n \"quantity\": 123,\n \"comment\": \"<string>\",\n \"position\": 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/items/{itemId}/kit-items/components/{componentItemId}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quantity\": 123,\n \"comment\": \"<string>\",\n \"position\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/items/{itemId}/kit-items/components/{componentItemId}")
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 \"quantity\": 123,\n \"comment\": \"<string>\",\n \"position\": 123\n}"
response = http.request(request)
puts response.read_body{
"componentItemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"quantity": 123,
"position": 123,
"comment": "<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>"
}
]
}{
"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
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Optional, client-generated key for deduplicating repeated write requests. A repeated request with the same key returns the originally recorded result instead of executing the effect again.
1 - 255The tenant ID for the target ERP instance.
Path Parameters
Unique ID of the kit item whose component is changed.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Unique ID of the component item to change. A kit component has no own single-value identifier - its identity is the pair of kit and component item - so the component item ID identifies the component.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Body
Request model for UpdateKitItemComponent command endpoint. Route parameters bind from the route, query parameters from the query string, everything else from the body.
How many units of the component item one unit of the kit consumes. When omitted the quantity stays unchanged. Must be at least 0.0000000000001 and less than 1000000000000; null is rejected, because a component cannot exist without a quantity. A component item that is not divisible additionally rejects a fractional quantity.
Free-text comment on the component. At most 255 characters. When omitted the comment stays unchanged. Send an empty string to remove the comment. An explicit null removes it as well, but the REST schema does not mark this field as nullable, so clients generated from it should send the empty string. A removed comment is stored and returned as an empty string, never null.
Zero-based position of the component within the kit's component list. When omitted the position stays unchanged; null is rejected. A value outside the list bounds is clamped to the nearest end rather than rejected. Read the Position of the response to learn where it ended up.
Response
The component was changed. The body is the full resulting component, including the fields the request left unchanged and the effective position after clamping.
Changes a single existing component of an item's kit in place. Fine-grained alternative to replacing the whole component list. Every field is optional - an omitted field keeps its current value, and a request that supplies no field at all succeeds with 200 without changing anything, unless the kit is controlled by a fulfillment network partner, which refuses every request with 409. Which item a component refers to cannot be changed; remove the component and add the other item instead. - Response
ID of the component item. A kit component has no own single-value identifier - its identity is the pair of kit and component item - so this doubles as the component's identifier.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
How many units of the component item one unit of the kit consumes.
The effective zero-based position of the component. This is the index the component actually ended up at, which differs from the requested one when the request was out of bounds and got clamped.
The comment stored on the component. Always a string, never null - a removed comment is returned as an empty string.
Was this page helpful?