Send Coupon
Function
To send coupon to user
發送領取型優惠券給指定顧客
(發送優惠券表示由系統直接代顧客領取該優惠券,會直接綁定該顧客帳戶並顯示於會員中心優惠券中)
URL
POST <<api_domain>>/v1/user_coupons
Request Parameters
Parameter | Type | Description | Example |
|---|---|---|---|
user_coupon.customer_id *Required |
| Customer ID | |
user_coupon.promotion_id |
| Promotion ID | |
mail_notify |
| Do you want to notify the customer of the received coupon via email?
| |
sms_notify |
| Do you want to notify the customer of the received coupon via SMS?
| ruby "sms_notify": true |
Request Example
curl -X POST \
<<api_domain>>/v1/user_coupons \
--header 'Authorization: Bearer access_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_coupon":{
"customer_id":"625d37140f2f2d5ad631a741",
"promotion_id":"62f070e6b3f309003e6c2ef7"
}
}'Error Code List
| Error Code | Meaning |
|---|---|
| NOT_ELIGIBLE | 優惠券不適用 |
| ALREADY_TAKEN | 優惠券已被使用 |
| EXPIRED | 優惠券已過期 |
| FULLED | 優惠券已達使用次數 |
| CREATED_FAILED | 優惠券創建失敗 |
Updated 13 days ago