DeleteDiscount

[POST] .../v1/purchaseoperation/deletediscount

Deletes discount/allowance partner receipt document. Use this destructive method to delete a discount or allowance operation from a receipt-from-partner document when that adjustment should no longer affect totals. The request requires a positive discount operation id, the controller fills the purchase document type internally and the response returns row_affected and ids for removed records. The caller must have purchase-operation discount permission; missing body, invalid id, denied access, document state conflicts or persistent storage failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
_document_typeid Int64 Optional Service document type ID filled by the controller.
id Int64 Required Discount/allowance operation ID.

Request Example

{
  "_document_type_id_": 1,
  "id": 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
  }
}