Query Restock Suggestions
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>"
}
]
}Procurement
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.
GET
/
v2
/
procurements
/
restock-suggestions
Query Restock Suggestions
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
oauth2-authorization-codeoauth2-client-credentials
Scopes
Query Parameters
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.
Response
Success.
Was this page helpful?