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

E065: Create material

POST /api/materials

Creates a new raw-material record. Triggered from the Materials page, "New material".

Authentication

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

Request

{ "code": "MAT-001", "name": "...", "materialTypeId": "uuid", "unit": "kg" }

Response — 201 Created

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

Errors

HTTPcodeCondition
404not_foundMaterial type not found.
422validation_failedDuplicate code, or shape invalid.

Workflow

Calls W065 Create material.