curl --request GET \
--url https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: <x-tenant-id>'import requests
url = "https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions"
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-tenant-id': '<x-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions', 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/procurements/restock-suggestions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"itemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"supplierId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"warehouseId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"orderQuantity": 123,
"totalDemand": 123,
"awaitingDeliveryConsidered": 123,
"awaitingDeliveryAllWarehouses": 123,
"awaitingDeliveryTotal": 123,
"stockTotal": 123,
"consumptionXDays": 123,
"demand30Days": 123,
"demandXDays": 123,
"dailyConsumption": 123,
"openOrderQuantity": 123,
"supplierStock": 123,
"minimumStock": 123,
"maximumStock": 123,
"purchaseListQuantity": 123,
"availabilityRequests": 123,
"isDefaultSupplier": true,
"itemNumber": "<string>",
"itemName": "<string>",
"productGroup": "<string>",
"shippingClass": "<string>",
"manufacturerPartNumber": "<string>",
"gtin": "<string>",
"manufacturer": "<string>",
"supplierItemNumber": "<string>",
"supplierNote": "<string>",
"warehouseName": "<string>",
"demandSource": "<string>",
"supplySource": "<string>",
"availableTotal": 123,
"shortageTotal": 123,
"minimumStockGlobal": 123,
"permissibleOrderQuantity": 123,
"minimumOrderQuantity": 123,
"blockedForDelivery": 123,
"reservedExternal": 123,
"averagePurchasePrice": 123,
"lastPurchasePrice": 123,
"supplierPurchasePrice": 123,
"daysWithStock": 123,
"consumptionXDaysWithoutPeaks": 123,
"averageOrderCount": 123,
"percentageSurcharge": 123,
"manualDemand": 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>"
}
]
}Query Restock Suggestions
Generates restock suggestions for a given supplier and time frame. The calculation is performed synchronously and returns the same data the on-prem Wawi shows under Beschaffung - Bestellvorschlaege.
curl --request GET \
--url https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: <x-tenant-id>'import requests
url = "https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions"
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-tenant-id': '<x-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions', 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/procurements/restock-suggestions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jtl-cloud.com/erp/v2/procurements/restock-suggestions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"itemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"supplierId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"warehouseId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"orderQuantity": 123,
"totalDemand": 123,
"awaitingDeliveryConsidered": 123,
"awaitingDeliveryAllWarehouses": 123,
"awaitingDeliveryTotal": 123,
"stockTotal": 123,
"consumptionXDays": 123,
"demand30Days": 123,
"demandXDays": 123,
"dailyConsumption": 123,
"openOrderQuantity": 123,
"supplierStock": 123,
"minimumStock": 123,
"maximumStock": 123,
"purchaseListQuantity": 123,
"availabilityRequests": 123,
"isDefaultSupplier": true,
"itemNumber": "<string>",
"itemName": "<string>",
"productGroup": "<string>",
"shippingClass": "<string>",
"manufacturerPartNumber": "<string>",
"gtin": "<string>",
"manufacturer": "<string>",
"supplierItemNumber": "<string>",
"supplierNote": "<string>",
"warehouseName": "<string>",
"demandSource": "<string>",
"supplySource": "<string>",
"availableTotal": 123,
"shortageTotal": 123,
"minimumStockGlobal": 123,
"permissibleOrderQuantity": 123,
"minimumOrderQuantity": 123,
"blockedForDelivery": 123,
"reservedExternal": 123,
"averagePurchasePrice": 123,
"lastPurchasePrice": 123,
"supplierPurchasePrice": 123,
"daysWithStock": 123,
"consumptionXDaysWithoutPeaks": 123,
"averageOrderCount": 123,
"percentageSurcharge": 123,
"manualDemand": 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>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
The tenant ID for the target ERP instance.
Query Parameters
The ID of the supplier to generate suggestions for.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Start of the consumption history window used for the demand forecast, inclusive (alternative to TimeFrameDays).
End of the consumption history window used for the demand forecast, inclusive (alternative to TimeFrameDays).
Days of consumption history used for the demand forecast, counted back from today (alternative to TimeFrameFrom/TimeFrameTo). The measured consumption is projected onto the next 30 days and added to the open demand, so sales orders still open inside the window count towards both.
Optional warehouse to scope the calculation to. When set, demand is calculated for exactly this warehouse instead of the default target area. When omitted, the default target area is used.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Response
Success.
Item ID.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Supplier ID.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Warehouse ID.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Suggested order quantity.
Total demand.
Awaiting delivery quantity considered for this warehouse.
Awaiting delivery quantity across all warehouses.
Total awaiting delivery quantity (complete).
Total stock on hand.
Consumption over X days.
Demand over 30 days.
Demand over X days.
Daily consumption rate.
Open order quantity (reserved for orders).
Supplier stock level.
Local minimum stock level.
Maximum stock level.
Quantity on purchase list.
Number of open customer availability requests for this item (pending demand not yet converted to orders).
Whether this is the default supplier for the item.
Stock keeping unit (item number).
Item name.
Product group.
Shipping class.
Manufacturer part number (HAN).
Global Trade Item Number (GTIN, formerly EAN).
Manufacturer name.
Supplier-specific SKU.
Supplier note or remark.
Warehouse name.
Demand source description.
Supply source description.
Total available quantity.
Total shortage quantity.
Global minimum stock level.
Permissible order quantity (step-size/multiple for supplier orders).
Minimum order quantity (supplier).
Quantity blocked for delivery.
Externally reserved quantity.
Average purchase price.
Last purchase price.
Purchase price from this supplier.
Number of days with stock.
Consumption over X days excluding order peaks.
Average order count.
Percentage surcharge applied.
Manual demand quantity.
Was this page helpful?