← API Index
/api/admin/setbonus
Set bonus points for a customer. Admin only. Replaces the current point balance.
Parameters
| Name |
Description |
Type |
| bonus_id |
the bonus campaign id |
int |
| cid |
customer id to set points for |
int |
| points |
number of points to set |
int |
| oo-rf |
optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml |
String |
| oo-auth |
optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized. |
int |
Error Responses
| HTTP Status |
Error Code |
Description |
| 403 |
security_error |
User is not authenticated or not an admin |
| 400 |
PARAMETER_ERROR |
Missing or invalid bonus_id, cid or points parameter |
Response Types
| Type |
Version |
Description |
| BonusResult |
1 |
Result of a bonus action (apply, claim or admin set) |
OpenAPI
See setbonus.yaml
Referenced in skills