Delete Material Tonnage
curl --request DELETE \
--url https://app.polygon-one.com/api/v1/ppwr/tonnage \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.polygon-one.com/api/v1/ppwr/tonnage"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.polygon-one.com/api/v1/ppwr/tonnage', 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://app.polygon-one.com/api/v1/ppwr/tonnage",
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>"
],
]);
$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://app.polygon-one.com/api/v1/ppwr/tonnage"
req, _ := http.NewRequest("DELETE", url, nil)
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://app.polygon-one.com/api/v1/ppwr/tonnage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/v1/ppwr/tonnage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "Validation failed",
"details": [
{
"origin": "string",
"code": "too_small",
"minimum": 1,
"inclusive": true,
"path": [
"address",
"street"
],
"message": "Address is required."
}
]
}{
"error": "Invalid or expired API key"
}{
"error": "Forbidden"
}{
"error": "Resource not found"
}{
"error": "This category's figure was entered in the app; remove it there.",
"code": "manualOverridePresent"
}{
"error": {
"code": "rate_limited",
"message": "…"
}
}{
"error": "Internal server error"
}PPWR – Mengen & Mengenmeldung
Tonnage löschen
Remove one tonnage row, addressed by the same key POST upserts on: zsvrCategory, periodYear and market as query parameters. Until it is removed, the row replaces the figure derived from your packaging units for that category; afterwards the derived figure counts again. A row a human entered in the app is not removed: 409 with code: manualOverridePresent — delete it in the app. A key with no row answers 404, so repeating a successful delete is a 404 that changes nothing. Requires packaging:write; customer workspace with the PPWR module enabled — see the guide.
DELETE
/
api
/
v1
/
ppwr
/
tonnage
Delete Material Tonnage
curl --request DELETE \
--url https://app.polygon-one.com/api/v1/ppwr/tonnage \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.polygon-one.com/api/v1/ppwr/tonnage"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.polygon-one.com/api/v1/ppwr/tonnage', 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://app.polygon-one.com/api/v1/ppwr/tonnage",
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>"
],
]);
$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://app.polygon-one.com/api/v1/ppwr/tonnage"
req, _ := http.NewRequest("DELETE", url, nil)
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://app.polygon-one.com/api/v1/ppwr/tonnage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/v1/ppwr/tonnage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "Validation failed",
"details": [
{
"origin": "string",
"code": "too_small",
"minimum": 1,
"inclusive": true,
"path": [
"address",
"street"
],
"message": "Address is required."
}
]
}{
"error": "Invalid or expired API key"
}{
"error": "Forbidden"
}{
"error": "Resource not found"
}{
"error": "This category's figure was entered in the app; remove it there.",
"code": "manualOverridePresent"
}{
"error": {
"code": "rate_limited",
"message": "…"
}
}{
"error": "Internal server error"
}Autorisierungen
API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.
Abfrageparameter
Erforderlicher Bereich:
2000 <= x <= 2100Pattern:
^[A-Z]{2}$Verfügbare Optionen:
10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000 Antwort
Deleted successfully
Always true on success.