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 | String | Customer ID 顧客 ID | ruby "customer_id":"58d3379401cda31bfb000000" |
user_coupon.promotion_id *Required | String | Promotion ID 優惠活動 ID | ruby "promotion_id":"58d3379401cda31bfb000000" |
mail_notify | Boolean | Do you want to notify the customer of the received coupon via email? 此優惠券發送後是否要以 email 通知顧客? - *Default:false | ruby "mail_notify": false |
sms_notify | Boolean | Do you want to notify the customer of the received coupon via SMS? 此優惠券發送後是否要以簡訊通知顧客? - *Default:false | 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 6 months ago