[POST] .../v1/stock/edit
Updates a stock. Use this method to update stock reference data such as name, address, area or description while preserving document history. It returns row_affected and validates positive id, required name, string lengths, optional area and current-user context before saving. The caller must have stock edit permission; missing body, invalid fields, invalid current user, denied access, missing records, related-data restrictions and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| address | String | Optional | Stock address. Maximum length is 255 characters. |
| area | Decimal | Optional | Stock area. If specified, the value must be greater than 0. |
| description | String | Optional | Stock description or note. Maximum length is 1024 characters. |
| id | Int64 | Required | Stock ID. |
| name | String | Required | Stock name. Maximum length is 150 characters. |
Request Example
{
"id": 8,
"name": "Main retail store",
"address": "Tashkent, Buyuk Ipak Yuli 12",
"area": 125.000,
"description": "Updated retail stock"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1
}
}