优惠券-详细

接口信息

  • 接口地址: {your-site-url}/api/skill/coupon/info
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: GET
  • 说明: 此接口用于获取指定优惠券的详细信息。

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数 (Query String)

字段 类型 必填 说明
id int 优惠券 ID

请求示例

cURL

curl --location --request GET '{your-site-url}/api/skill/coupon/info?id=69' \
--header 'skill-access-token: {your-skill-access-token}'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": {
        "id": 69,
        "shop_id": 15,
        "status": 1,
        "title": "terry coupon",
        "code": "LX4ABQ14",
        "is_campaign": 1,
        "usage_count": 0,
        "value_type": 1,
        "value": "10.00",
        "usage_count_per_customer": 0,
        "usage_limit": 0,
        "starts_at": "2026-06-03 20:50:03",
        "ends_at": 0,
        "product_selection_type": 2,
        "entitled_product_ids": [
            {"product_id": 7042, "variant_ids": []},
            {"product_id": 7041, "variant_ids": []}
        ],
        "entitled_collection_ids": [],
        "minimum_requirements_type": 2,
        "prerequisite_subtotal": "50.00",
        "prerequisite_quantity": 0,
        "product_sort": 1,
        "banner_image": "/product/15/image/2026/05/29/430015af6d7473355e7180b97741e443.png",
        "banner_show_type": 1,
        "copywriting": {
            "color": "blue",
            "timeType": 1,
            "backgroundLeft": "rgba(255,72,72,100)",
            "backgroundRight": "rgba(255,13,125,100)",
            "fontTip": "rgba(255,255,255,100)",
            "timeBg": "rgba(255,243,203,100)",
            "timeFont": "rgba(0,0,0,100)",
            "couponBg": "rgba(255,248,227,100)",
            "couponFont": "rgba(233,5,73,100)",
            "couponBtLeft": "rgba(255,139,2,100)",
            "couponBtRight": "rgba(255,109,4,100)",
            "couponBtFont": "rgba(255,255,255,100)",
            "copyColor": "rgba(255,109,4,100)"
        },
        "is_product_page_show": 1,
        "product_image_height_type": "auto",
        "created_at": "2026-06-03 20:51:33",
        "updated_at": "2026-06-03 20:51:33"
    },
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data Object 优惠券详情数据

data 字段

字段 类型 说明
id int 优惠券 ID
shop_id int 店铺 ID
status int 状态。1 = 激活,2 = 关闭
title string 优惠券标题
code string 优惠券码
is_campaign int 是否与其他活动优惠叠加。1 = 是,2 = 否
usage_count int 已被使用的次数
value_type int 折扣类型。1 = 固定金额,2 = 百分比
value string 折扣值
usage_count_per_customer int 每顾客最大使用次数。0 = 无限制
usage_limit int 总使用次数上限。0 = 无限制
starts_at string 生效时间
ends_at int 结束时间。0 表示不限时
product_selection_type int 适用商品选择类型。1 = 全部,2 = 指定商品,3 = 指定专辑
entitled_product_ids Array[Object] 适用商品列表。variant_ids 有值为指定变体,空数组为全部变体
entitled_collection_ids Array 适用商品专辑 ID 列表
minimum_requirements_type int 最低要求类型。1 = 无限制,2 = 最低金额,3 = 最低数量
prerequisite_subtotal string 最低购买金额
prerequisite_quantity int 最低购买数量
product_sort int 商品排序方式
banner_image string Banner 图片路径。可能是相对路径或完整 URL。如果是相对路径,完整 URL = attachment_url + banner_imageattachment_url得到网站基础URL 获取)
banner_show_type int Banner 展示类型。1 = 铺满全屏,2 = 两边留白
copywriting Object 文案/UI 配色配置
is_product_page_show int 是否在产品页面展示。1 = 展示,2 = 不展示
product_image_height_type string 产品图片高度
created_at string 创建时间
updated_at string 最后更新时间

注意事项

  1. 可用于 优惠券-更新 的前置步骤,获取完整数据后进行修改
  2. banner_image 可能是完整 URL 或图片路径。如果是图片路径,需要拼接 attachment_url 得到完整 URL
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-06-03 21:53:52

results matching ""

    No results matching ""