Update Stock Quantity
PUT
/api/v1/stock/masterUpdate the master stock quantity for a registered item. Call this AFTER recording the stock movement with POST /stock/io.
Requires x-api-key
http://localhost:8100/api/v1/stock/master
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Required | Your Ushuru API key |
| Content-Type | string | Required | Must be application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| itemCd | string | Required | Registered item code to update. |
| remainingQty | number | Required | New remaining stock quantity after the movement. |
| userId | string | Required | User ID performing the update. |
| userName | string | Required | Display name of the user performing the update. |
Request
{
"itemCd": "GD0000000Z001",
"remainingQty": 47,
"userId": "admin",
"userName": "System Admin"
}Response
{
"resultCd": "000",
"resultMsg": "Stock master updated",
"data": {
"itemCd": "GD0000000Z001",
"remainingQty": 47,
"modiDt": "20240115103045"
}
}curl -X PUT http://localhost:8100/api/v1/stock/master \\
-H "x-api-key: YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"itemCd": "GD0000000Z001",
"remainingQty": 47,
"userId": "admin",
"userName": "System Admin"
}'