Zum Hauptinhalt springen
POST
Upsert Packaging Sizes

Autorisierungen

Authorization
string
header
erforderlich

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

Body

application/json

One size of an existing packaging unit, for POST /api/v1/ppwr/formats. Upsert key: (specInternalRef, reference). Blank-is-keep: an omitted or blank field keeps the stored value, so this endpoint can add and change size data but never clear it. Filling an empty field is automatic; changing a stored value needs overwrite: true (409 overwriteRequired otherwise, nothing written). Naming the unit's own internalRef addresses its PRIMARY size (its reference always follows the unit and is never renamed here).

specInternalRef
string
erforderlich

internalRef of an existing packaging unit in YOUR company. An unknown reference is the row error unknownUnitRef — the unit is never auto-created.

Minimum string length: 1
reference
string
erforderlich

The size's identifier, unique within your company.

Required string length: 1 - 120
gtin
string | null

GTIN of the size: 8, 12, 13 or 14 digits.

Pattern: ^(\d{8}|\d{12}|\d{13}|\d{14})$
supplierReference
string | null

The supplier's own reference for the size (at most 120 characters).

Maximum string length: 120
label
string | null

Human-readable name of the size (at most 120 characters).

Maximum string length: 120
widthMm
string | null

Width in mm.

heightMm
string | null

Height in mm.

depthMm
string | null

Depth in mm.

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 confirmation, 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, a new unit over the plan's unit quota → packagingUnitQuotaReached, …). A row refused before its write (these, and a new unit over the quota) writes nothing — not even the supplier it names; a unit written whose component or article link then failed is reported here with that link's key. 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.

suppliersCreated
string[]

Unit + component intake: names of the name-only suppliers created for supplierNames that matched no existing supplier.

unitsWithoutComponents
integer

Unit intake only: units created with neither componentCodes nor a material. They hold no component yet, so no regulated value can be recorded on them — send componentCodes, or material for single-part packaging.

mainPartsCreated
integer

Unit intake only: main-part components created from rows' material (one per unit that had no component yet).