[POST] .../v1/movementoperation/add
Creates operation movement. Use this method to add one or more item lines to a DocMovement stock transfer document before the document is posted. The request body is a JSON array batch; every operation must contain document_id, item_id, positive quantity up to 999999999, optional order and optional description up to 300 characters and all array items must reference the same document_id. The parent DocMovement must be locked by the current user, must not be posted, deleted or marked for deletion and the item must be an active non-compound leaf item; each added movement line creates sender and receiver stock operation rows. Null, empty or oversized arrays, invalid values, mixed document_ids, denied access or document/item state conflicts are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| description | String | Optional | Operation note. Maximum length is 300 characters. |
| document_id | Int64 | Required | Movement document ID that receives the operation. |
| item_id | Int64 | Required | Item ID to move between stocks. |
| order | Int64 | Optional | Operation order. NULL means not set and is stored as NULL in the database. Ignored for database versions earlier than 363. |
| quantity | Decimal | Required | Item quantity to move. Must be greater than zero and no greater than 999999999. |
Request Example
[
{
"document_id": 4301,
"item_id": 1001,
"quantity": 5,
"order": 10,
"description": "Transfer to warehouse B"
}
]
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": 2,
"ids": [
8201,
8202
]
}
}