CreateManualOutcomeOperation
[POST] .../v1/promobonus/createmanualoutcomeoperation
Creates a manual write-off operation for a customer card Use this method to immediately write off bonuses from an enabled retail card linked to the requested promotion. The request requires card_id, promo_id and positive value; description can be supplied for the created manual operation. The method requires the manual bonus outcome permission, locks the card_id, checks that the card is active for the promotion, verifies that the current bonus balance covers the requested value, creates an already performed outcome operation, distributes the withdrawn value across active expiring bonus income operations, emits a webhook and returns row_affected. Business errors such as a missing request body, invalid identifiers or value, denied access, missing or disabled card, insufficient balance, database errors, missing active row or persistence failures are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| card_id | Int64 | Required | Customer card ID. |
| description | String | Optional | Additional description. |
| exp_date | Int64 | Optional | Bonus accrual end date as Unix time in seconds. |
| promo_id | Int64 | Required | Promotion ID. |
| value | Decimal | Required | Withdrawal amount. |
Request Example
{
"card_id": 1,
"description": "string",
"exp_date": 1,
"promo_id": 1,
"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
}
}