Skip to main content
POST
Upsert Packaging Components

Autorisierungen

Authorization
string
header
erforderlich

API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.

Body

application/json

One packaging-component row for POST /api/ppwr/components. Upsert key: code + resolved supplier. Cells are coerced exactly as the in-app CSV/Excel importer coerces them, so a JSON-native value and its string spelling are equivalent (12 = "12", ["plastic"] = "plastic;paper_board", true = "yes"/"ja"/"1"). An empty or omitted field is a no-op — it never clears a stored value. Cross-field rules (each rejects the row with the named key): a recycledContentPct above 0 requires recycledContentSource and recycledContentMethod (recycledProvenanceRequired); foodContact requires contactSensitive (foodContactImpliesContactSensitive); the five PFAS fields are only accepted on a food-contact component (pfasOnlyFoodContact).

code
string
erforderlich

Your component code — the upsert key, compared byte-exact after trimming (KAR-01kar-01).

Maximum string length: 120
name
string
erforderlich

Component name.

materials
erforderlich

At least one material. Also accepts a ;- or ,-delimited string.

Minimum array length: 1
Verfügbare Optionen:
plastic,
paper_board,
glass,
metal,
wood,
composite,
other
supplierName
string | null

Resolved to one of your suppliers by fuzzy name match (case, umlauts, punctuation and legal-form tokens are ignored). A name that matches two or more distinct suppliers fails the row with ambiguousSupplierName — the import never guesses. A name that matches none (and a blank cell) resolves to no supplier: the record lands in your own bucket without a row error, and the supplier is never auto-created.

polymer
enum<string> | null

Polymer type (plastics only).

Verfügbare Optionen:
pet,
hdpe,
ldpe,
pp,
ps,
pvc,
other,
null
massGrams

Mass of ONE piece of this component, in grams.

recycledContentPct

Recycled content, 0–100.

recycledContentSource
enum<string> | null

pcr = post-consumer, pir = post-industrial.

Verfügbare Optionen:
pcr,
pir,
null
recycledContentMethod
enum<string> | null
Verfügbare Optionen:
physical,
mass_balance,
null
contactSensitive

Contact-sensitive packaging. Blank = false.

foodContact

Food-contact packaging. Blank = false. Implies contactSensitive.

heavyMetalsMgPerKg

Sum of the four regulated heavy metals, mg/kg.

heavyMetalsBasis
enum<string> | null

Provenance of the heavy-metals claim.

Verfügbare Optionen:
test_report,
supplier_declaration,
not_substantiated,
null
heavyMetalsMethod
string | null

Annex VII d) measurement standard (free text, e.g. CEN/CR 13695-1). Accepted on every component.

pfasCompliant

Tri-state: blank = unknown. Food-contact components only.

pfasBasis
enum<string> | null

Provenance of the PFAS claim. Food-contact components only.

Verfügbare Optionen:
test_report,
supplier_declaration,
not_substantiated,
null
pfasMethod
string | null

PFAS measurement method (free text). Food-contact components only.

pfasSumPpb

Measured PFAS sum in ppb. Food-contact components only.

pfasTotalFluorineMgPerKg

Total fluorine in mg/kg — the screening route. Food-contact components only.

notes
string | null

Free-text notes.

Antwort

Intake result (partial accept — see the schema).

Result of a synchronous PPWR intake. Partial accept: valid rows commit even when other rows are invalid or failed — the one exception is the 409 overwrite gate, which is all-or-nothing. Idempotent: replaying an identical request changes nothing (matched rows return as skipped), except unit rows without internalRef, which are always creates.

imported
integer
erforderlich

ENTITIES created (units, components, links) — never sizes.

updated
string[]
erforderlich

Identifiers of rows whose existing match changed. A size created on an existing unit appears as <unit ref> / <size ref>.

skipped
string[]
erforderlich

Identifiers of rows that matched with nothing to change.

failed
object[]
erforderlich

Rows the upsert engine rejected (unknown reference, ambiguous match, …). Its error values are stable machine keys.

invalid
object[]
erforderlich

Rows rejected by schema validation before the engine ran. Most error values are stable machine keys, but a field with no custom message falls back to the validator's own English text — match on the key, fall back to displaying the string.

sizesCreated
integer

Unit intake only: sizes created for the rows' units.

articleNumbersUnmatched
integer

Unit intake only: distinct articleNumbers no live article matched. Skipped, never a row error.

articleLinksCreated
integer

Unit intake only: unit⇄article links created from articleNumbers.

Unit intake only: unit⇄component links created from componentCodes.

componentStubsCreated
integer

Unit intake only: minimal placeholder components created for unknown componentCodes.