获取优惠券详情2.0

拥有此API的权限集
营销码券管理-查询

请求方式及url

  • 请求方式:POST
  • 请求头:Content-Type:application/json
  • 接口地址:https://api.xiaoe-tech.com/xe.coupon.detail/2.0.0
  • 频率限制:10秒500次

在线调试工具

请求

响应

请求参数

参数名 必选 类型 说明 备注(示例)
access_token string 专属token ...
coupon_id string 优惠券id xx

请求示例

{
    "access_token": "xe_xxxxx",
    "coupon_id": "xx"
}

返回参数

参数名 必选 类型 说明
code int 请求结果码
msg string 描述信息
data object 数据

数据列表data

参数名 必选 类型 说明 备注(示例)
id string 优惠券id
app_id string 店铺id
activity_id string 营销活动id
title string 优惠券标题 xxxxx
type int 优惠券类型 0-指定商品可用 1-全部商品可用 2-指定商品不可用
spread_type int 推广方式 0-用户领取 1-商家发放 2-兑换码兑换 3-不限方式
discount_way int 折扣方式,1-满减 2-折扣
discount_percent int 优惠券打几折,折扣力度百分比 【0-100】
discount_limit_price int 折扣上限, 最多优惠金额0-表示不限制
valid_after int 领取后多久后生效,单位: 天, 0-立即生效 ;-1-使用优惠券设置的有效期
valid_day int 优惠券有效期开始时间
can_use_with_activity int 允许与指定营销活动(秒杀、拼团、限时折扣等)叠加使用 1-允许 0-不允许
copy_from string 被复制的优惠券id
is_show int 详情页是否显示 1-显示 0-不显示
valid_at string 开始有效期
invalid_at string 开始无效期
manual_stop_at string 手动结束领取时间
price int 满减券抵扣金额,单位:分 1000
receive_rule int 每人限领
require_price int 最低消费金额
bind_res_count int 绑定资源数
count int 发行总量
has_received int 已领取总数
has_used int 已使用数量
can_share int 是否可以进行分享 1-可以 0-不可以
is_show_stock int 是否展示库存:0-不展示,1-展示
promote_goods_set int 推荐商品类型:1-最新商品, 2-指定商品
is_delete int 是否删除 0-不删除 1-已删除
is_hide int 是否在B端隐藏优惠券,0-不隐藏;1-隐藏
created_at string 创建时间
updated_at string 更新时间
coupon_type int 优惠券类型 1-通用优惠券,2-专属优惠券,3-员工优惠券
receive_limit_type int 限制身份领取类型 ,0-不限制,1-超级会员,2-用户人群,3-用户标签
receive_limit_ids string 领取限制关联ID,(json)id=关联id,title=冗余标题,is_free_vip=会员特殊逻辑,体验会员
instructions string 优惠券使用说明
plans array 定向计划
resource array 只有type=0时才会返回,优惠券所包含的资源信息
bind_resources array 只有type=1和type=2时才会返回,当type=2时返回,表示里面的商品不可用,当type=1时,bing_resources为空
unsupport_resource array 指定商品不可用 当type=2时才会返回 []

优惠券所包含的资源信息resource&指定商品不可用unsupport_resource

参数名 类型 说明
id string id
spu_id string spu id
goods_id string 商品id
resource_id string 资源id
sku_id string sku id
title string 标题
summary string 简介
org_content string 原始HTML内容
descrb string 专栏描述(Json格式, type:0-文字 1-图片)
img_url string 封面图片url
img_url_compressed string 封面压缩图片url
count string 数量
price int 价格
stock int 库存
high_price int 最高价
low_price int 最低价
line_price int 划线价
is_package int true表示实物带货商品
created_at string 创建时间
enough_price int 是否足够金额消费 1-满足 0-不满足
resource_type int 资源类型
sku array 规格相关信息 ``
sku[].sku_id string 规格id ``
sku[].sku_price int 规格价格,单位:分 ``

绑定的资源bind_resources

参数名 类型 说明
resource_id string 资源ID
resource_type int 资源类型
cou_id int 优惠券ID

返回示例

{
    "code": 0,
    "msg": "获取优惠券详情成功",
    "data": {
        "id": "cou_xxxx",
        "app_id": "appxxx",
        "activity_id": "ma_cu_xxxx",
        "title": "20210809专属优惠卷",
        "type": 0,
        "spread_type": 3,
        "discount_way": 1,
        "discount_percent": 0,
        "discount_limit_price": 0,    
        "valid_after": 0,
        "valid_day": 20
        "can_use_with_activity": 1,
        "copy_from": "",
        "is_show": 0,
        "valid_at": null,
        "invalid_at": null,
        "manual_stop_at": null,
        "price": 11200,
        "receive_rule": 0,
        "require_price": 0,
        "bind_res_count": 1,
        "count": 200,
        "has_received": 0,
        "has_used": 0,    
        "can_share": 1,
        "is_show_stock": 0,    
        "promote_goods_set": 0,    
        "is_delete": 0,
        "is_hide": 0,
        "created_at": "2021-08-12 18:15:19",
        "updated_at": "2021-08-12 18:15:19",
        "coupon_type": 1,
        "receive_limit_type": 0,
        "receive_limit_ids": "",
        "instructions": "",
        "bind_resources": [],
        "unsupport_resource": [],
        "resource": [
            {
                "id": "SPU_xxxx",
                "spu_id": "SPU_xxxx",
                "goods_id": "SPU_xxxx",
                "resource_id": "g_xxx",
                "sku_id": "SKU_xxxx",
                "title": "寄到海外",
                "summary": "",
                "org_content": "",
                "descrb": "",
                "img_url": "http://xxxx.gif",
                "img_url_compressed": "http://xxx.gif",
                "count": "",
                "price": 11100,
                "stock": 1231,
                "high_price": 11100,
                "low_price": 11100,
                "line_price": 0,
                "is_package": 0,
                "created_at": "2021-08-12 16:53:21",
                "enough_price": 1,
                "resource_type": 21,
                "sku": [
                    {
                        "sku_id": "SKU_ENT_6290959917748LkTBQ58",
                        "sku_price": 1100
                    }
                 ],

            }
        ],
        "plans": []
    }
}

results matching ""

    No results matching ""