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

E100: Dispose inventory

POST /api/materials-inventory/disposals

Records the permanent removal of materials — write-off, damage, scrap, miscount-down. Triggered from the Materials Inventory page, "Dispose". Distinct from E099 Adjust so reporting can separate loss from positive corrections.

Authentication

Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Admin. Also reachable with an org-scoped PAT.

Request

{
"materialId": "uuid",
"locationId": "uuid",
"quantity": 5,
"notes": "spoilage",
"eventDate": "2026-06-10T00:00:00Z"
}

quantity must be positive (the DISPOSE event type encodes the outflow). notes and eventDate are optional.

Response — 201 Created

{
"id": "uuid",
"code": "MIL-004",
"materialId": "uuid",
"locationId": "uuid",
"eventType": "DISPOSE",
"quantity": "5",
"ref": null,
"sourceType": null,
"sourceId": null,
"createdAt": "2026-06-10T00:00:00Z"
}

A manual DISPOSE row; ref is null and the row carries no provenance.

Errors

HTTPcodeCondition
404not_foundMaterial or location not found.
422validation_failedquantity is not positive.

Workflow

Calls W100 Dispose inventory.