curl --request GET \
--url https://app.polygon-one.com/api/ppwr/units/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.polygon-one.com/api/ppwr/units/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.polygon-one.com/api/ppwr/units/{id}', 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/ppwr/units/{id}",
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>"
],
]);
$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/ppwr/units/{id}"
req, _ := http.NewRequest("GET", 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.get("https://app.polygon-one.com/api/ppwr/units/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/ppwr/units/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"internalRef": "<string>",
"packagingType": "sales",
"role": "manufacturer",
"placedUnderOwnBrand": true,
"modifiesConformity": true,
"isProducer": true,
"reusable": true,
"marketMemberStates": [
"<string>"
],
"formats": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"packagingSpecId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"isPrimary": true,
"sortOrder": 123,
"gtin": "<string>",
"label": "<string>",
"widthMm": "<string>",
"heightMm": "<string>",
"depthMm": "<string>"
}
],
"components": [
{
"linkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"componentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"name": "<string>",
"materials": [
"plastic"
],
"contactSensitive": true,
"foodContact": true,
"heavyMetalsRecycledGlassDerogation": true,
"completeness": "complete",
"missingFields": [
"heavyMetalsMgPerKg"
],
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"polymer": "pet",
"massGrams": "<string>",
"recycledContentPct": "<string>",
"recycledContentSource": "pcr",
"recycledContentMethod": "physical",
"heavyMetalsMgPerKg": "<string>",
"heavyMetalsBasis": "test_report",
"pfasCompliant": true,
"pfasBasis": "test_report",
"pfasTotalFluorineMgPerKg": "<string>",
"pfasSumPpb": "<string>"
}
],
"createdByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"format": "<string>",
"recyclabilityGrade": "A",
"gradeSource": "declared",
"targetRotations": 123,
"averageRotations": "<string>",
"averageRotationMethod": "measured",
"reconditioningProcess": "<string>",
"recyclabilityReference": "<string>",
"notes": "<string>",
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"supplierRoleOverride": "component_supplier",
"reuseSystemMemberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z",
"retentionUntil": "2023-11-07T05:31:56Z",
"gtin": "<string>",
"widthMm": "<string>",
"heightMm": "<string>",
"depthMm": "<string>",
"supplierCountry": "<string>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}Verpackungseinheit abrufen
Retrieve one packaging unit with its stored fields, all of its sizes (formats, primary first) and its bill of materials (components). A unit of another company, a soft-deleted unit and an id that is not a UUID all answer 404 — never 403, which would confirm that the id exists somewhere. Requires packaging:read (a packaging:write key satisfies it); customer workspace with the PPWR module enabled.
curl --request GET \
--url https://app.polygon-one.com/api/ppwr/units/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.polygon-one.com/api/ppwr/units/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.polygon-one.com/api/ppwr/units/{id}', 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/ppwr/units/{id}",
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>"
],
]);
$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/ppwr/units/{id}"
req, _ := http.NewRequest("GET", 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.get("https://app.polygon-one.com/api/ppwr/units/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/ppwr/units/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"internalRef": "<string>",
"packagingType": "sales",
"role": "manufacturer",
"placedUnderOwnBrand": true,
"modifiesConformity": true,
"isProducer": true,
"reusable": true,
"marketMemberStates": [
"<string>"
],
"formats": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"packagingSpecId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"isPrimary": true,
"sortOrder": 123,
"gtin": "<string>",
"label": "<string>",
"widthMm": "<string>",
"heightMm": "<string>",
"depthMm": "<string>"
}
],
"components": [
{
"linkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"componentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"name": "<string>",
"materials": [
"plastic"
],
"contactSensitive": true,
"foodContact": true,
"heavyMetalsRecycledGlassDerogation": true,
"completeness": "complete",
"missingFields": [
"heavyMetalsMgPerKg"
],
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"polymer": "pet",
"massGrams": "<string>",
"recycledContentPct": "<string>",
"recycledContentSource": "pcr",
"recycledContentMethod": "physical",
"heavyMetalsMgPerKg": "<string>",
"heavyMetalsBasis": "test_report",
"pfasCompliant": true,
"pfasBasis": "test_report",
"pfasTotalFluorineMgPerKg": "<string>",
"pfasSumPpb": "<string>"
}
],
"createdByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"format": "<string>",
"recyclabilityGrade": "A",
"gradeSource": "declared",
"targetRotations": 123,
"averageRotations": "<string>",
"averageRotationMethod": "measured",
"reconditioningProcess": "<string>",
"recyclabilityReference": "<string>",
"notes": "<string>",
"supplierId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"supplierRoleOverride": "component_supplier",
"reuseSystemMemberId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z",
"retentionUntil": "2023-11-07T05:31:56Z",
"gtin": "<string>",
"widthMm": "<string>",
"heightMm": "<string>",
"depthMm": "<string>",
"supplierCountry": "<string>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}Autorisierungen
API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.
Pfadparameter
Antwort
Packaging unit details
One packaging unit as GET /api/ppwr/units/{id} returns it: the stored unit fields, the identity of its PRIMARY size folded in (gtin and the three dimensions), its supplier's country, all of its sizes and its bill of materials.
Your company — a key never reads another company's data.
The upsert key of POST /api/ppwr/units, generated as PU-<n> when a row sent none.
sales, grouped, transport, ecommerce, service manufacturer, importer, distributor, authorised_representative, supplier, fulfilment_service_provider Art. 11 reusable packaging.
ISO alpha-2 codes of the member states the unit is placed on the market in.
Every size of the unit, primary first. Empty for a unit created before sizes existed.
Show child attributes
Show child attributes
The unit's bill of materials, ordered by component code.
Show child attributes
Show child attributes
Packaging form (free text).
A, B, C, non_recyclable, null Where the grade came from. An imported grade is stored as declared.
declared, manual, engine, null Decimal string.
measured, estimated, null Description and intended use of the packaging.
component_supplier, external_manufacturer, upstream_operator, null Set when the unit is managed inside a re-use system pool.
Always null here — this route never returns a soft-deleted unit.
Set only on a deleted unit, so always null here.
GTIN of the unit's PRIMARY size.
Width of the primary size in mm, as a decimal string.
Height of the primary size in mm, as a decimal string.
Depth of the primary size in mm, as a decimal string.
Country of the unit's supplier, null when it has none.