Write off a batch
Admin or pharmacist. Zeroes a batch and records a WRITE_OFF movement for the units removed. An unknown batch gets 404, and the rest leaves the medicine stock in the same transaction.
PUT
/api/v1/purchases/{batchId}/write-offAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Path parameters
batchIdstringrequiredThe batch being written off.
Responses
200
Batch written off
statusstringrequiredbatch_idstringrequired401
Not authenticated
detailstringrequired403
Access forbidden for this role
detailstringrequired404
Batch not found
detailstringrequired