MoveOperations

[POST] .../v1/purchaseoperation/moveoperations

Moves item lines between purchase receipt documents. Move selected receipt-from-partner operations from one purchase document to another during document cleanup or workflow correction. The request requires ids, doc_from_id and doc_to_id and doc_from_id must be different from doc_to_id; the response returns row_affected and ids for operations moved to the destination document. The caller must have purchase-operation movement permission; missing body, invalid document ids, identical source and destination documents, empty ids, denied access or validation failures 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
  }
}