ApplyPromotionToUser
POST/v1/users/promotions/apply¶ Description
Endpoint to apply a promotion to a user based on the user id and promotion code.
¶ Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| context | ThirdPartyRequestContext | Context of this request | Y |
| user_id | string | Unique id of the user for which promotion is being applied | Y |
| promotion_code | string | The code of the promotion to be applied | Y |
¶ Response Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| user_promotion | UserPromotion | The associated user promotion entity | Y |
¶ Errors
| HTTP status | Code | Message |
|---|---|---|
| 404 | ERROR_CODE_PARTICIPANT_NOT_FOUND | One or more participants not found [value: “ |
| 403 | ERROR_CODE_INVALID_ENTITY_ACCESS | One or more of the participants are not accessible in the current environment: |
| 422 | ERROR_CODE_PROMOTION_INVALID | Promotion code is invalid |
| 422 | ERROR_CODE_PROMOTION_EXPIRED | Promotion code has expired |
| 409 | ERROR_CODE_PROMOTION_ALREADY_APPLIED | This promotion code is already applied |