redeem_coupon
Redeem a coupon in a checkout or POS scenario. Marks the coupon as used to prevent reuse and records the redemption for reporting.
Instructions
[WRITE] 核銷(使用)優惠券。
【用途】 在結帳或特定場景下核銷優惠券,將優惠券標記為已使用狀態。 適合 POS 場景或 API 整合的結帳流程。
【呼叫的 Shopline API】
POST /v1/coupons/redeem
【回傳結構】 dict 含 success: bool, resource_id: str, message: str, result: dict。
【副作用】
優惠券狀態變更為已使用,不可再次使用(一次性優惠券)
核銷紀錄會寫入系統,影響促銷統計報告
操作通常不可逆,請確認核銷對象與條件正確
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coupon_data | Yes | 優惠券核銷資料,通常包含 coupon_code 與訂單或客戶識別資訊 |