curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v1/items/{itemId}/specialprices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"IsActive": true,
"SpecialPrice": [
{
"IsActive": true,
"CustomerGroupId": 123,
"NetPrice": 123,
"SalesChannelId": "<string>"
}
],
"StartDate": "2023-11-07T05:31:56Z",
"EndDateActive": true,
"EndDate": "2023-11-07T05:31:56Z",
"TillAmountActive": true,
"TillAmountInStockSmallerThan": 123
}
'import requests
url = "https://api.jtl-cloud.com/erp/v1/items/{itemId}/specialprices"
payload = {
"IsActive": True,
"SpecialPrice": [
{
"IsActive": True,
"CustomerGroupId": 123,
"NetPrice": 123,
"SalesChannelId": "<string>"
}
],
"StartDate": "2023-11-07T05:31:56Z",
"EndDateActive": True,
"EndDate": "2023-11-07T05:31:56Z",
"TillAmountActive": True,
"TillAmountInStockSmallerThan": 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({
IsActive: true,
SpecialPrice: [
{
IsActive: true,
CustomerGroupId: 123,
NetPrice: 123,
SalesChannelId: '<string>'
}
],
StartDate: '2023-11-07T05:31:56Z',
EndDateActive: true,
EndDate: '2023-11-07T05:31:56Z',
TillAmountActive: true,
TillAmountInStockSmallerThan: 123
})
};
fetch('https://api.jtl-cloud.com/erp/v1/items/{itemId}/specialprices', 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/{itemId}/specialprices",
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([
'IsActive' => true,
'SpecialPrice' => [
[
'IsActive' => true,
'CustomerGroupId' => 123,
'NetPrice' => 123,
'SalesChannelId' => '<string>'
]
],
'StartDate' => '2023-11-07T05:31:56Z',
'EndDateActive' => true,
'EndDate' => '2023-11-07T05:31:56Z',
'TillAmountActive' => true,
'TillAmountInStockSmallerThan' => 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/{itemId}/specialprices"
payload := strings.NewReader("{\n \"IsActive\": true,\n \"SpecialPrice\": [\n {\n \"IsActive\": true,\n \"CustomerGroupId\": 123,\n \"NetPrice\": 123,\n \"SalesChannelId\": \"<string>\"\n }\n ],\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDateActive\": true,\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"TillAmountActive\": true,\n \"TillAmountInStockSmallerThan\": 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/v1/items/{itemId}/specialprices")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"IsActive\": true,\n \"SpecialPrice\": [\n {\n \"IsActive\": true,\n \"CustomerGroupId\": 123,\n \"NetPrice\": 123,\n \"SalesChannelId\": \"<string>\"\n }\n ],\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDateActive\": true,\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"TillAmountActive\": true,\n \"TillAmountInStockSmallerThan\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v1/items/{itemId}/specialprices")
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 \"IsActive\": true,\n \"SpecialPrice\": [\n {\n \"IsActive\": true,\n \"CustomerGroupId\": 123,\n \"NetPrice\": 123,\n \"SalesChannelId\": \"<string>\"\n }\n ],\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDateActive\": true,\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"TillAmountActive\": true,\n \"TillAmountInStockSmallerThan\": 123\n}"
response = http.request(request)
puts response.read_body{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}{
"ErrorCode": "<string>",
"ValidationErrors": {},
"Errors": {},
"ErrorMessage": "<string>",
"Stacktrace": "<string>"
}Update Item Special Price
Update the special prices for a specific item
curl --request PATCH \
--url https://api.jtl-cloud.com/erp/v1/items/{itemId}/specialprices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"IsActive": true,
"SpecialPrice": [
{
"IsActive": true,
"CustomerGroupId": 123,
"NetPrice": 123,
"SalesChannelId": "<string>"
}
],
"StartDate": "2023-11-07T05:31:56Z",
"EndDateActive": true,
"EndDate": "2023-11-07T05:31:56Z",
"TillAmountActive": true,
"TillAmountInStockSmallerThan": 123
}
'import requests
url = "https://api.jtl-cloud.com/erp/v1/items/{itemId}/specialprices"
payload = {
"IsActive": True,
"SpecialPrice": [
{
"IsActive": True,
"CustomerGroupId": 123,
"NetPrice": 123,
"SalesChannelId": "<string>"
}
],
"StartDate": "2023-11-07T05:31:56Z",
"EndDateActive": True,
"EndDate": "2023-11-07T05:31:56Z",
"TillAmountActive": True,
"TillAmountInStockSmallerThan": 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({
IsActive: true,
SpecialPrice: [
{
IsActive: true,
CustomerGroupId: 123,
NetPrice: 123,
SalesChannelId: '<string>'
}
],
StartDate: '2023-11-07T05:31:56Z',
EndDateActive: true,
EndDate: '2023-11-07T05:31:56Z',
TillAmountActive: true,
TillAmountInStockSmallerThan: 123
})
};
fetch('https://api.jtl-cloud.com/erp/v1/items/{itemId}/specialprices', 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/{itemId}/specialprices",
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([
'IsActive' => true,
'SpecialPrice' => [
[
'IsActive' => true,
'CustomerGroupId' => 123,
'NetPrice' => 123,
'SalesChannelId' => '<string>'
]
],
'StartDate' => '2023-11-07T05:31:56Z',
'EndDateActive' => true,
'EndDate' => '2023-11-07T05:31:56Z',
'TillAmountActive' => true,
'TillAmountInStockSmallerThan' => 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/{itemId}/specialprices"
payload := strings.NewReader("{\n \"IsActive\": true,\n \"SpecialPrice\": [\n {\n \"IsActive\": true,\n \"CustomerGroupId\": 123,\n \"NetPrice\": 123,\n \"SalesChannelId\": \"<string>\"\n }\n ],\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDateActive\": true,\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"TillAmountActive\": true,\n \"TillAmountInStockSmallerThan\": 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/v1/items/{itemId}/specialprices")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"IsActive\": true,\n \"SpecialPrice\": [\n {\n \"IsActive\": true,\n \"CustomerGroupId\": 123,\n \"NetPrice\": 123,\n \"SalesChannelId\": \"<string>\"\n }\n ],\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDateActive\": true,\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"TillAmountActive\": true,\n \"TillAmountInStockSmallerThan\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v1/items/{itemId}/specialprices")
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 \"IsActive\": true,\n \"SpecialPrice\": [\n {\n \"IsActive\": true,\n \"CustomerGroupId\": 123,\n \"NetPrice\": 123,\n \"SalesChannelId\": \"<string>\"\n }\n ],\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDateActive\": true,\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"TillAmountActive\": true,\n \"TillAmountInStockSmallerThan\": 123\n}"
response = http.request(request)
puts response.read_body{
"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 tenant ID for the target ERP instance.
The User-Id (int or uuid) on whose behalf the request is executed. Requires scope 'Application.RunAs'.
Path Parameters
The id of the item that the special price belongs to.
Body
The special price details of the item to update.
Model Class: UpdateItemSpecialPrice
Indicates if the special price is active.
List of all special prices for JTL-Wawi and the sales channel with the type online shop and JTL-POS.
Show child attributes
Show child attributes
The date when the special price should start.
If set, the special price will end on a given date. In this case, the field EndDate is required.
This is required if EndDateActive is set. In this case, the special price ends on this date.
Indicates that the special price ends when a certain amount is reached. The field TillAmountInStockSmallerThan is required in this case.
If this amount of stock for the item is reached, the special price ends. Only applies if TillAmountActive is true.
Response
Was this page helpful?