/api/client/applybonus

Apply for a bonus campaign. The customer opts into a campaign that requires explicit application.

Parameters

(int) the bonus campaign id to apply for
(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
400PARAMETER_ERRORMissing or invalid bonus_id parameter
403not_eligibleThe customer's bonus group (customers.groupid) may not take part in this campaign (bonus.included_customertype / excluded_customertype)

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