Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/chemicals | List chemicals, optionally filtered by zdhcLevel |
GET | /api/v1/chemicals/{id} | Get a single chemical |
POST | /api/v1/chemicals | Create a new chemical |
PATCH | /api/v1/chemicals/{id} | Partially update a chemical |
DELETE | /api/v1/chemicals/{id} | Delete a chemical |
GET /api/v1/chemicals
| Query parameter | Type | Required | Allowed values |
|---|---|---|---|
zdhcLevel | enum | — | NOT_REGISTERED, LEVEL_1, LEVEL_2, LEVEL_3 |
Shell
curl "{{BASE_URL}}/api/v1/chemicals?zdhcLevel=LEVEL_3"
Response 200 OK — JSON array of ChemicalProductDto.
POST /api/v1/chemicals
Request body (CreateChemicalProductDto)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Commercial or common name |
casNumber | string | — | CAS Registry Number (e.g. 7732-18-5) |
description | string | — | Description / remarks |
zdhcLevel | enum | — | One of NOT_REGISTERED, LEVEL_1, LEVEL_2, LEVEL_3 |
active | boolean | — | Whether the chemical is in use (default true) |
Shell
curl -X POST {{BASE_URL}}/api/v1/chemicals \-H "Content-Type: application/json" \-d '{"name": "Reactive Dye Red B","casNumber": "12236-82-7","description": "Azo reactive dye for cellulosic fibers","zdhcLevel": "LEVEL_3","active": true}'
Response 201 Created — ChemicalProductDto.
GET /api/v1/chemicals/{id}
200 OK—ChemicalProductDto.404 Not Found— chemical does not exist in your tenant.
PATCH /api/v1/chemicals/{id}
Partial update. Fields allowed: name, casNumber, description, zdhcLevel, active.
DELETE /api/v1/chemicals/{id}
204 No Content— deleted.404 Not Found— chemical does not exist in your tenant.
Chemical schema
ChemicalProductDto:
JSON
{"id": "d4e5f6…","name": "Reactive Dye Red B","casNumber": "12236-82-7","description": "Azo reactive dye for cellulosic fibers","zdhcLevel": "LEVEL_3","active": true,"createdAt": "2026-04-21T10:00:00.000Z","updatedAt": "2026-04-21T10:00:00.000Z"}