CopyOperationsFromDocOrderFromPartner

[POST] .../v1/wholesaleoperation/copyoperationsfromdocorderfrompartner

Copies operations from an order-from-partner document to a shipment-to-partner document. Use this method to fill a DocWholeSale shipment document from an order-from-partner document when shipment lines should follow ordered items and quantities. The request body must contain doc_from_id of the order-from-partner document and doc_to_id of the target shipment document; both documents must exist and be locked as required by their document lock services. The caller must have shipment operation add permission; missing ids, denied access, missing source or target documents, lock conflicts, no copied rows or persistence errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
doc_from_id Int64 Required Source document ID to copy operations from.
doc_to_id Int64 Required Destination document ID to copy operations into.

Request Example

{
  "doc_from_id": 4701,
  "doc_to_id": 4601
}

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": [
      8601
    ]
  }
}