SetPriceByPriceType

[POST] .../v1/wholesaleoperation/setpricebypricetype

Sets wholesale shipment line prices using a price type. Recalculate price and price2 on editable item lines of a DocWholeSale shipment document from the selected catalog price type. The request body must contain document_id and price_type_id; the document must be locked by the current user, must be a shipment-to-partner document and must have editable, not posted operations. The current request user must have shipment operation edit permission; missing ids, unknown price_type_id, denied access, lock conflicts, missing document price type or currency data, no changed operations or persistence errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
document_id Int64 Required Document ID for setting operation prices by price type. The supported document kind depends on the controller route.
price_type_id Int64 Required Price type ID.

Request Example

{
  "document_id": 4601,
  "price_type_id": 7
}

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
    ]
  }
}