getStorePurchaseLinks
获取某商品的购买与优惠券链接
铸造(或返回)本应用发给读者的短链。购买链接只属于你的应用——请原样使用,其背后的点击计数器才是结算所读。coupon_url 与 campaign 仅在活动进行中才出现。需要带 store:read scope 的应用密钥。
get
/v2/store/purchase-links/{product_id} scope
store:readAuthorization: Bearer nmk_live_…(v2 应用密钥,门户自助铸造,无需申请)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
product_id 必填 | string | path | DLsite 商品编号。RJ 为同人,VJ 为商业。 |
响应
campaignobject必填idstring必填活动 id。展示优惠时与 coupon_url 配对使用。
namestring必填可供读者展示的活动名称。不得用作判别条件。
objectstring必填类型判别字段。恒为 campaign。
枚举campaign
coupon_urlstringuri 必填 可空优惠券领取页的短链。没有进行中的活动则为 null。
objectstring必填类型判别字段。恒为 purchase_links。
枚举purchase_linksproduct_idstring必填所查询的 DLsite 作品番号,原样回显。
purchase_urlstringuri 必填发给读者的短链。它只属于你的应用;请原样使用。
请求示例
cURL
curl "https://api.nextmoe.dev/v2/store/purchase-links/value" \
-H "Authorization: Bearer nmk_live_<YOUR_KEY>"