curl --request DELETE \
--url https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}/line-items/{lineItemId} \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: <x-tenant-id>'import requests
url = "https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}/line-items/{lineItemId}"
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-tenant-id': '<x-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}/line-items/{lineItemId}', 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}/line-items/{lineItemId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/line-items/{lineItemId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}/line-items/{lineItemId}")
.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}/line-items/{lineItemId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.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>"
}
]
}Delete Purchase Order Line Item
Removes one position from an existing purchase order. A hard delete, not a flag. The order must be Open or Released, and the position must not have been delivered — the underlying procedure enforces neither, so both are guarded here. Deleting the last remaining position is rejected: an order without positions is not a valid document. Returns the full re-queried order, so the caller sees the recalculated result.
curl --request DELETE \
--url https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}/line-items/{lineItemId} \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: <x-tenant-id>'import requests
url = "https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}/line-items/{lineItemId}"
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-tenant-id': '<x-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}/line-items/{lineItemId}', 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}/line-items/{lineItemId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/line-items/{lineItemId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.jtl-cloud.com/erp/v2/purchase-orders/{purchaseOrderId}/line-items/{lineItemId}")
.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}/line-items/{lineItemId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.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.
Headers
The tenant ID for the target ERP instance.
Path Parameters
ID of the purchase order the position belongs to. Der LieferantenBestellung Schlüssel.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
ID of the position to remove. It must belong to the order named in the route; a position of another order is rejected exactly like an unknown one. Der LieferantenBestellungPos Schlüssel.
"b45f6432-2462-4c6f-b00f-1d9d01000000"
Query Parameters
Indicates whether automatic workflows should be suppressed for this write. Defaults to false when omitted.
Response
The position was removed. The body is the full re-queried order, so the caller can observe the recalculated state rather than having to infer what the deletion changed.
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?