商业系统
促销与定价规则
Kanorio 在结账时自动应用的折扣与优惠代码。
促销活动会改变顾客在结账时的支付金额:包括满足条件时自动应用的折扣,以及顾客输入的优惠代码。促销活动指向其折扣的对象;商品本身并不拥有促销活动。
API 的运作方式
- 使用 Management API 管理促销活动:
promotions.list、promotions.get、promotions.create、promotions.update(PATCH)、promotions.archive、promotions.unarchive与promotions.delete。规则与后台相同,promotions.create支持Idempotency-Key。 - 以选择器而非商品列表指定适用品项:
kinds(PRODUCT、BOOKING、CUSTOM)、refs(商品与可选的方案、预约资源,或自定义品项的 SKU)、categoryIds与priceRange。marketIds可将促销限定在部分市场。预约与自定义品项也能纳入范围,包括满额折抵。 - Kanorio 会在托管结账过程中评估促销活动,因此您的前端无需自行计算折扣。Headless 前端可读取促销活动来显示标签,但折扣只会在 Kanorio 的结账页应用。
- 订阅
promotions.redeemed与promotions.redemption_revoked,即可得知已付款订单使用了促销、以及全额退款归还了使用次数;ec.order.paid会带promotionId与promotionCode。
下方的支持表格显示了 API 所公开的功能。
API 开放的范围
- Promotions & discount codes可用
- API
- Management API
promotions.*(list, get, create, update, archive, unarchive, delete; applied automatically at hosted checkout) - 托管网站
/marketing/promotions,/data/promotions- Webhooks
promotions.redeemed,promotions.redemption_revoked;ec.order.paidcarriespromotionId/promotionCode
API 参考
Webhook 事件
- promotions.redeemed · Fired when a paid order redeems a promotion (automatic discount or discount code). Carries the promotion, the order and how the discount was split across lines; never the buyer email.
- promotions.redemption_revoked · Fired when a full refund revokes a redemption (the promotion usage count is given back). Partial refunds do not revoke.
近期变更
- 2026-11-03 Promotions: create and manage promotions through the API; selector-based targeting
给网站所有者
如何在后台使用这项产品,请参阅帮助中心。
打开帮助中心