curl --request GET \
--url https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId} \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: <x-tenant-id>'import requests
url = "https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}"
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/purchase-orders/{purchaseOrderId}', 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/purchase-orders/{purchaseOrderId}",
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/purchase-orders/{purchaseOrderId}"
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/purchase-orders/{purchaseOrderId}")
.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/purchase-orders/{purchaseOrderId}")
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{
"purchaseOrderId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"supplierId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"status": 0,
"currencyIso": "<string>",
"currencyFactor": 123,
"isConfirmed": true,
"lineItems": [
{
"lineItemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"lineItemType": 0,
"quantity": 123,
"deliveredQuantity": 123,
"openQuantity": 123,
"netPurchasePriceAmount": 123,
"vatRatePercentage": 123,
"sortOrder": 123,
"itemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"itemNumber": "<string>",
"supplierItemNumber": "<string>",
"name": "<string>",
"supplierItemName": "<string>",
"deliveryTimeInDays": 123,
"deliveryDate": "2023-11-07T05:31:56Z",
"note": "<string>",
"packagingUnit": "<string>",
"packagingQuantity": 123,
"confirmedQuantity": 123,
"confirmedDeliveryDate": "2023-11-07T05:31:56Z",
"confirmedPrice": 123,
"isLineItemConfirmed": true
}
],
"allowancesAndCharges": [
{
"type": 6,
"vatRatePercentage": 123,
"netAmount": 123,
"note": "<string>"
}
],
"supplierName": "<string>",
"orderNumber": "<string>",
"externalOrderNumber": "<string>",
"referenceOrderNumber": "<string>",
"requestedDeliveryDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"warehouseId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"internalComment": "<string>",
"deliveryAddress": {
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"phoneNumber": "<string>",
"faxNumber": "<string>",
"mobilePhoneNumber": "<string>",
"emailAddress": "<string>"
},
"billingAddress": {
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"phoneNumber": "<string>",
"faxNumber": "<string>",
"mobilePhoneNumber": "<string>",
"emailAddress": "<string>"
},
"supplier": {
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"phoneNumber": "<string>",
"faxNumber": "<string>",
"mobilePhoneNumber": "<string>",
"emailAddress": "<string>",
"contactSalutation": "<string>",
"contactFirstName": "<string>",
"contactLastName": "<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>"
}
]
}Retrieves the full detail of a purchase order by its ID.
Retrieves the full detail of a purchase order by its ID.
curl --request GET \
--url https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId} \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: <x-tenant-id>'import requests
url = "https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}"
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/purchase-orders/{purchaseOrderId}', 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/purchase-orders/{purchaseOrderId}",
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/purchase-orders/{purchaseOrderId}"
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/purchase-orders/{purchaseOrderId}")
.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/purchase-orders/{purchaseOrderId}")
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{
"purchaseOrderId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"supplierId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"status": 0,
"currencyIso": "<string>",
"currencyFactor": 123,
"isConfirmed": true,
"lineItems": [
{
"lineItemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"lineItemType": 0,
"quantity": 123,
"deliveredQuantity": 123,
"openQuantity": 123,
"netPurchasePriceAmount": 123,
"vatRatePercentage": 123,
"sortOrder": 123,
"itemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"itemNumber": "<string>",
"supplierItemNumber": "<string>",
"name": "<string>",
"supplierItemName": "<string>",
"deliveryTimeInDays": 123,
"deliveryDate": "2023-11-07T05:31:56Z",
"note": "<string>",
"packagingUnit": "<string>",
"packagingQuantity": 123,
"confirmedQuantity": 123,
"confirmedDeliveryDate": "2023-11-07T05:31:56Z",
"confirmedPrice": 123,
"isLineItemConfirmed": true
}
],
"allowancesAndCharges": [
{
"type": 6,
"vatRatePercentage": 123,
"netAmount": 123,
"note": "<string>"
}
],
"supplierName": "<string>",
"orderNumber": "<string>",
"externalOrderNumber": "<string>",
"referenceOrderNumber": "<string>",
"requestedDeliveryDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"warehouseId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
"internalComment": "<string>",
"deliveryAddress": {
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"phoneNumber": "<string>",
"faxNumber": "<string>",
"mobilePhoneNumber": "<string>",
"emailAddress": "<string>"
},
"billingAddress": {
"salutation": "<string>",
"title": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"phoneNumber": "<string>",
"faxNumber": "<string>",
"mobilePhoneNumber": "<string>",
"emailAddress": "<string>"
},
"supplier": {
"companyName": "<string>",
"additionalCompanyLine": "<string>",
"street": "<string>",
"additionalAddressLine": "<string>",
"postalCode": "<string>",
"city": "<string>",
"state": "<string>",
"countryIso": "<string>",
"phoneNumber": "<string>",
"faxNumber": "<string>",
"mobilePhoneNumber": "<string>",
"emailAddress": "<string>",
"contactSalutation": "<string>",
"contactFirstName": "<string>",
"contactLastName": "<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.
- Authorization URL
- https://id.jtl-cloud.com/oauth/v2/authorize
- Token URL
- https://id.jtl-cloud.com/oauth/v2/token
Headers
The tenant ID for the target ERP instance.
Path Parameters
The purchase order's ID. Der LieferantenBestellung Schlüssel.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Response
Success.
The full detail of a purchase order, including its line items, addresses and the supplier snapshot.
Unique ID of the purchase order.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
ID of the supplier the order was placed with.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
The order's current status.
0, 5, 20, 30, 50, 500 ISO code of the order's currency.
Conversion factor of the order's currency.
Whether the order has been confirmed by the supplier.
The order's line items — article positions and free positions. Summing this list yields the goods value only; freight charges, discounts and minimum quantity charges are not included here and are returned under allowancesAndCharges instead.
Show child attributes
Show child attributes
Document-level allowances and charges. The document total is the goods value from lineItems plus the entries in this list — there is no header total field, so the client computes it. Rows are grouped by (type, vatRatePercentage); amounts are summed within the group; the note of the row with the lowest sort order in the group wins, ties broken by the lowest line item id. The tiebreaker is mandatory: sort order has no uniqueness guarantee within a group — an import that never sets it leaves every row at the same default. These values are the stored rows, grouped and summed — not a figure this API derives or validates. The Wawi may overwrite them the next time the order is opened and saved in the desktop client: discounts unconditionally, freight charge and minimum quantity surcharge depending on a shipping-position auto-detection setting. An order without charge rows returns an empty list, never null.
Show child attributes
Show child attributes
The supplier's current display name, resolved at read time. NULL if the supplier could not be resolved.
The order's own number.
The buyer's own order number.
A reference order number.
The delivery date requested from the supplier.
Date the order was created.
Target warehouse of the incoming goods.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
The company the order was placed for.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Internal comment on the order, not communicated to the supplier.
Delivery address of the order.
Show child attributes
Show child attributes
Billing address of the order.
Show child attributes
Show child attributes
Snapshot of the supplier's master data at the time the order was created.
Show child attributes
Show child attributes
Was this page helpful?