products/<gtin>/end-of-life/ page
(and its add, edit and delete sub-pages).
When to use
- A brand owner needs to tell consumers how to dispose of, recycle or return a product (or one of its components) at end of life.
Auth
X-API-Key header or OAuth token. The caller must be a member of the product’s
organization with the contribute role (Editor or Manager); a read-only key is refused
with 403. A product the caller cannot see, or that another organization owns, answers
404.
Flow
- List — paginated; filter with
?gtin=(and?organization_id=). Read the list first: it shows which rows exist and which fields are empty. - Create — the body names the product with
gtin; fields are listed in the OpenAPI document at/sustainability/api/v1/openapi.json. Returns201. - Update —
PATCHonly the fields to change;nullclears an optional field. - Delete — removes one row; the id must belong to a product the caller can edit.
- Read back — every write returns the saved row;
GETthe list again to confirm it shows the change.
403 for a read-only key, 404 for a product or row the caller cannot see,
422 for an invalid value.
Notes
Writes go through the audited@org_action sustainability record services: the dashboard
page and this API share one write path and one audit record. Fields a brand can write are
defined once on the model (BRAND_EDITABLE_FIELDS).