try out ↗

← API Index


/api/client/claimbonus

Claim a bonus reward. Deducts the required points from the customer's balance.

Parameters

Name Description Type
bonus_id the bonus campaign id to claim from int
reward_id the reward id to claim; without it, the campaign's reward valid today with the lowest points (the only one, for a single reward) 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
400 PARAMETER_ERROR Missing or invalid bonus_id parameter
403 not_eligible The customer's bonus group (customers.groupid) may not take part in this campaign (bonus.included_customertype / excluded_customertype)
400 not_enough_points Customer does not have enough points for the reward
400 wrong_reward The specified reward does not exist for this campaign, or (without reward_id) the campaign has no reward valid today
400 not_current The reward's period (start_date / end_date) does not cover today
400 pending The specified reward was already requested and must first be processed by the backend, before it can be applied for again.

Response Types

Type Version Description
BonusResult 1 Result of a bonus action (apply, claim or admin set)

OpenAPI

See claimbonus.yaml

Referenced in skills