Skip to content

Use reward by code

Use Reward By CodeΒΆ

Description

Uses a reward by its code. This action is used to redeem a reward that was assigned to a member using a code.

Parameters

Parameter Type Format Description
Reward Code String Text The reward code to use. Must match the code of an existing reward on the member.

JavaScript API

UDF.useRewardByCode(rewardCode, callback)

Events Triggered

Generates the L2 UseRewardByCodeEvent.

Possible Errors

Error Code Error Message Description
2041 Cannot find reward with code %s The reward code wasn't found on the member.
2025 Failed to use reward "%s". It comes into effect on %s The reward isn't currently effective.
2026 Failed to use reward "%s". It has already expired on %s The reward has expired.
2027 Failed to use reward "%s". No more uses left. The reward has reached its maximum number of uses.
2071 Cannot use cancelled reward "%s" with code "%s". The reward has been cancelled.
4041 Division Access Denied for user Reported when user lacks division access for the reward.

Additional Considerations

  • The reward must be assigned to the member before it can be used
  • The reward must be within its effective dates
  • The reward must not have exceeded its maximum uses
  • The reward must not be cancelled