Skip to main content
Version: v1.0.0(int)

E068: Update material

PATCH /api/materials/:id

Edits a material's header fields. Triggered from Material Detail.

Authentication

Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member.

Request

{ "name": "...", "materialTypeId": "uuid", "unit": "kg", "isActive": true }

Passing isActive archives (false) or reactivates (true) the material; all fields are optional.

Response — 200 OK

{ "id": "uuid", "code": "MAT-001", "name": "...", "materialTypeId": "uuid", "unit": "kg", "isActive": true, "createdAt": "..." }

Errors

HTTPcodeCondition
404not_foundNo such material.
422validation_failedShape invalid.

Workflow

Calls W068 Update material.