MoveOperations

[POST] .../v1/invoiceoperation/moveoperations

Transfer operations account-invoice Use this method to move a selected list of invoice operation rows from one locked account-invoice to another locked account-invoice. The request changes the document_id of the listed operations and returns row_affected plus ids of moved rows; ids is required, doc_from_id and doc_to_id are required and the source and target document ids must be different. Both source and target invoices must be locked by the current request user and every selected operation must currently belong to doc_from_id. The current request user must have invoice operation move permission; validation, permission, lock, ownership, document-state and database failures are returned as HTTP 200 ErrorResult business errors.

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

{
  "ids": [
    9101
  ],
  "doc_from_id": 5101,
  "doc_to_id": 5102
}

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,
    "ids": [
      9101
    ]
  }
}