Declare a pack level of a catalogue item (DeclarePackLevel)
PUT/catalog-items/:catalogItemId/packaging/:level
Declares the pack level (EACH, INNER, CASE or PALLET) identified by a GS1 GTIN and publishes CatalogItemPackagingDeclared (ADR 0006). unitsPerPack is in eaches: 1 for EACH, at least 2 above it and at least twice the child's. A level above EACH names the childGtin of an active lower level of the same item. The unitsPerPack of a GTIN is immutable: re-declaring an active GTIN with another count is 409 pack-quantity-immutable (a new count is a new GTIN). Declaring a NEW GTIN at a level that has an active one retires the old level (CatalogItemPackLevelRetired, then CatalogItemPackagingDeclared, one aggregate version). The identical declaration changes nothing and publishes nothing; new dimsMm or grossWeightG on an active GTIN are updated in place. A GTIN identifies one item or pack level, forever (409 gtin-already-assigned). A DISCONTINUED item takes no packaging change (409 illegal-transition).
Request
Responses
- 200
- 400
- 404
- 409
- 413
- 422
- 500
The item with its packaging.
idempotency-key-required or idempotency-key-invalid (state-changing routes); invalid-limit, invalid-cursor or unknown-query-parameter (list reads); malformed-request-body (bad JSON, an unknown field, a wrong type, an empty body, trailing data or a NUL character) or malformed-request-query (a NUL character).
not-found (ErrNotFound): an unknown catalogItemId or feedId.
gtin-already-assigned, pack-quantity-immutable, illegal-transition (the item is DISCONTINUED) or concurrent-update after one automatic retry.
request-body-too-large: the request body is over 64 KiB.
invalid-gtin, invalid-pack-level, invalid-pack-quantity, pack-level-order, invalid-pack-dimensions or validation-failed.
internal-error: an unmapped failure; the detail never leaks the internal message.