SetAmountDiscount
[POST] .../v1/pos/doccheque/setamountdiscount
Applies a fixed amount discount to a POS cheque. Apply a fixed amount discount or allowance to the whole POS cheque. The request requires uuid and value greater than zero, locks the cheque by uuid, checks the current request user, requires retail discount permission and returns row_affected after the cheque totals are recalculated. The operation expects an editable cheque with positions and enough amount for the requested discount; missing fields, denied permission, missing accepted cash register, invalid cheque state, invalid amount and storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| uuid | String | Required | Cash register cheque UUID. |
| value | Decimal | Required | Discount amount value. |
Request Example
{
"uuid": "00000000-0000-0000-0000-000000000000",
"value": 1.0
}
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
}
}