/api/admin/setbonus

Set bonus points for a customer. Admin only. Replaces the current point balance.

Parameters

(int) the bonus campaign id
(int) customer id to set points for
(int) number of points to set
(String) optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml
(int) 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.

Error Responses

HTTP StatusError CodeDescription
403security_errorUser is not authenticated or not an admin
400PARAMETER_ERRORMissing or invalid bonus_id, cid or points parameter

Response Types

BonusResult

BonusResult (v1) docs

Result of a bonus action (apply, claim or admin set)

Fields (2)
#FieldTypeDescription
0actionstringthe action that was performed
1resultstringthe exit/result code of the action

Data (1 record)

actionresult
Bonussecurity_error