> ## Documentation Index
> Fetch the complete documentation index at: https://docs.closient.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Product Substances of Concern

> Add, update, list, and delete a product's substances of concern (regulated substances under REACH, RoHS, Proposition 65, TSCA or FDA, with concentration and threshold) -- the programmatic equivalent of the dashboard's substances-of-concern page.

Programmatic equivalent of the dashboard's `products/<gtin>/substances-of-concern/` page
(and its add, edit and delete sub-pages).

## When to use

* A brand owner needs to declare the regulated substances a product contains: which
  substance, under which regulation, at what concentration, against what threshold, and
  whether it is above that threshold.
* The source is the brand's own disclosure (label, safety data sheet, Proposition 65
  warning, compliance declaration), never an inference from an ingredient list.

## 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

```
GET    /substances/api/v1/substances?q=<name or CAS number>   (find the substance id)
GET    /sustainability/api/v1/substances-of-concern
POST   /sustainability/api/v1/substances-of-concern
PATCH  /sustainability/api/v1/substances-of-concern/{record_id}
DELETE /sustainability/api/v1/substances-of-concern/{record_id}
```

* **Find the substance** -- every row names a substance from the catalog by `substance_id`.
  Search the catalog by name or CAS number and use the matching item's `id`. A substance
  the catalog does not have cannot be recorded through the API; report it instead.
* **List** -- paginated; filter with `?gtin=` (and `?organization_id=`). Read the list
  first: it shows which substances are recorded and which fields are empty.
* **Create** -- the body names the product with `gtin` and the substance with
  `substance_id`; `component_id` optionally ties the row to one of the product's
  components. Fields are listed in the OpenAPI document at
  `/sustainability/api/v1/openapi.json`. Returns `201`; a second row for the same
  substance and component (or both without a component) returns `409`.
* **Update** -- `PATCH` only the fields to change; `null` clears an optional field. The
  substance cannot change: delete and recreate.
* **Delete** -- removes one row.
* **Read back** -- every write returns the saved row; `GET` the list again to confirm it
  shows the change.

Returns `403` for a read-only key, `404` for a product, substance, component or row the
caller cannot see, `409` for a duplicate, `422` for an invalid value.

## Notes

API writes go through the audited `@org_action` sustainability record services, and each
one bumps the product's passport version. Fields a brand can write are defined once on the
model (`SubstanceOfConcern.BRAND_EDITABLE_FIELDS`); the dashboard form writes the same
columns and picks the substance with a catalog search.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.