Create a batch stock transfer
Admin or branch manager. Moves several medicines between two branches in one atomic request. Every line is in one transaction, so one failure rolls it back, and branches must differ.
POST
/api/v1/transfers/batchAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Request body
requiredapplication/jsonfrom_branch_idstringrequiredmin length 1
to_branch_idstringrequiredmin length 1
notesstringdefault: ""
itemsobject[]requiredmin items 1
Show propertiesHide properties
Array of
objectmedicine_idstringrequiredmin length 1
qtyintegerrequiredmin -9007199254740991 · max 9007199254740991
Responses
201
Every line moved
itemsobject[]requiredShow propertiesHide properties
Array of
objectidstringrequiredmedicine_idstringrequiredmedicine_namestringrequiredqtyintegerrequiredmin -9007199254740991 · max 9007199254740991
created_atstringrequiredtotalintegerrequiredmin -9007199254740991 · max 9007199254740991
400
A line quantity is not positive, both branches are the same, the source has insufficient stock, or no source batch is available
detailstringrequired401
Not authenticated
detailstringrequired403
Caller is not an admin, branch manager, or inventory manager
detailstringrequired404
A medicine, the source branch, or the destination branch was not found
detailstringrequired