MoveOperations

[POST] .../v1/inventoryoperation/moveoperations

Moves item lines between inventory count documents. Move selected inventory operation rows from one open inventory document to another open inventory document. The request requires the inventory operation move permission, doc_from_id and doc_to_id must be positive and different, ids must contain the operation IDs to move and both source and target documents must exist, be open and satisfy the document lock contract. The method verifies that every requested operation belongs to the source document, changes the parent document of those rows. Errors such as missing body, invalid document IDs, same source and target document, missing ids, denied access, source or target document not found, closed document state, operation/document mismatch, lock failure, storage errors or no affected rows are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
doc_from_id Int64 Required Source document ID.
doc_to_id Int64 Required Destination document ID.
ids Array of Int64 Required Operation IDs to move from the source document to the destination document.

Request Example

{
  "doc_from_id": 1,
  "doc_to_id": 1,
  "ids": [
    1
  ]
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "ids": [
      null
    ],
    "row_affected": 1
  }
}