开发指南 官网
API 2.0 > 2.5 优惠券 > 2.5.2 获取会员优惠券详情

2.5.2 获取会员优惠券详情

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:根据企迈云商优惠券ID,查询优惠券基本信息。

请求地址

请求方式 版本信息 请求地址
POST V2 http://openapi.zvcms.com/api/v2

公共参数

参数 参数类型 是否必填 默认值 描述
OpenId string 密钥Id
GrantCode string 授权code
Token string 签名,参考《数字签名sign》
Timestamp string 当前时间戳
Nonce string 随机正整数
Action string user.user-coupons-detail 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
ids string 优惠券id,(字符串以,隔开)

响应参数

参数 参数类型 描述
data array
 ├id array
  ├id int 优惠券id
  ├title string 优惠券名称
  ├total int 优惠券总数量 0-不限制
  ├number int 已领取的数量
  ├used int 已使用的数量
  ├amount int 优惠券金额/折扣
  ├coupon_type int 优惠形式 0-指定金额 1-折扣券
  ├min_amount_use int 最低使用金额, 0 -不限制
  ├number_of_user int 每人限领多少张 0-不限制
  ├goods_range_type int 可使用的商品\r\n0-所有商品 \r\n1-指定分类可用 \r\n2-指定商品可用 \r\n3-指定商品不可用
  ├expire_type int 有效期类型0-固定日期 1-领到券当日开始N天内生效 2-领到券次日开始N天内生效
  ├start_at int 开始时间
  ├end_at int 结束时间
  ├expire_days int N天内生效的N
  ├desc string 使用说明
  ├status int 状态,是否可用
  ├created_at int 创建时间
  ├updated_at int 更新时间
  ├show_page int 是否显示在商品详情页
  ├auto_dispatch_config array
   ├0 array
    ├type array
     ├0 int 自动发放设置
    ├pay_config array
     ├pay_money Money(分) 自动发放设置,支付钱数
     ├pay_num int 自动发放设置,支付数量
  ├shop_range_type int 适用门店\r\n0-所有门店 \r\n1-指定门店可用 \r\n2-指定门店不可用
  ├is_view int 是否显示:1是0否
  ├is_share int 是否共享:0否1是
  ├user_receive_type int 用户获取方式,1:领取,2:兑换(兑换码)
  ├use_scene int 使用场景 0 全部 1 线上 2 线下
  ├condition string 满多少元可用文本表示
  ├discounts_content string 满多少折可用文本表示
  ├apply_stores_text string 适用门店文本表示
  ├apply_goods_text string 适用商品文本表示
  ├poly_status int poly_status
  ├expire_date string 时间段
  ├expire_date_text string 时间段
  ├expire_date_text2 string 时间段
  ├use_scene_text string 适用场景文本表示

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "user.user-coupons-detail",
    "Params": {
        "ids": "1,2,3,4"
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "data": {
            "id": {
                "id": "",
                "title": "",
                "total": "",
                "number": "",
                "used": "",
                "amount": "",
                "coupon_type": "",
                "min_amount_use": "",
                "number_of_user": "",
                "goods_range_type": "",
                "expire_type": "",
                "start_at": "",
                "end_at": "",
                "expire_days": "",
                "desc": "",
                "status": "",
                "created_at": "",
                "updated_at": "",
                "show_page": "",
                "auto_dispatch_config": [
                    {
                        "type": [
                            "2"
                        ],
                        "pay_config": {
                            "pay_money": "",
                            "pay_num": ""
                        }
                    }
                ],
                "shop_range_type": "",
                "is_view": "",
                "is_share": "",
                "user_receive_type": "",
                "use_scene": "",
                "condition": "",
                "discounts_content": "",
                "apply_stores_text": "",
                "apply_goods_text": "",
                "poly_status": "0",
                "expire_date": "",
                "expire_date_text": "",
                "expire_date_text2": "",
                "use_scene_text": ""
            }
        }
    }
}

异常示例

{
    "status": true,
    "code": "异常编码,根据不同的业务返回编码",
    "message": "异常说明:查询的信息不存在"
}

错误码

{
    "status": false,
    "code": "系统错误编码:详见全局返回编码",
    "message": "系统错误说明"
}

请求地址

请求方式 版本信息 请求地址
POST V2 http://openapi.zvcms.com/api/v2

公共参数

参数 参数类型 是否必填 默认值 描述
OpenId string 密钥Id
GrantCode string 授权code
Token string 签名,参考《数字签名sign》
Timestamp string 当前时间戳
Nonce string 随机正整数
Action string user.user-coupons-detail 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
user_id int 用户id
user_coupon_id string 用户优惠券id

响应参数

参数 参数类型 描述
status bool 成功或失败
code int 成功/错误编码
message string 成功/错误描述
data array
 ├coupon_id int 券id
 ├status int 状态 0-未使用 1-已使用
 ├user_id int 用户id
 ├start_at int 开始时间
 ├end_at int 结束时间
 ├type_id int 类型 0-领取 1-满减/送 2 会员卡赠送 3 签到送
 ├coupon array
  ├id int 券id
  ├type int 优惠券所属平台 1微信 2 口碑
  ├title string 优惠券名称
  ├total int 优惠券总数量 0-不限制
  ├number int 优惠券金额/折扣
  ├used int 已使用的数量
  ├coupon_type int 优惠形式 0-指定金额 1-折扣券
  ├min_amount_use int 最低使用金额, 0 -不限制
  ├number_of_user int 每人限领多少张 0-不限制
  ├goods_range_type int 可使用的商品 0-所有商品 1-指定商品
  ├expire_type int 有效期类型 0-固定日期 1-领到券当日开始N天内生效 2-领到券次日开始N天内生效
  ├start_at int 开始时间
  ├end_at Int 结束时间
  ├expire_days int N天内生效的N
  ├desc string 使用说明
  ├status int 状态,是否可用
  ├created_at int 创建时间
  ├updated_at int 更新时间
  ├show_page int 适用场景 1-外卖 2-堂食 3-外卖+堂食 4-买单 5-外卖+买单 6-堂食+买单 7-通用
  ├only_coupon int 是否只享受优惠券优惠: 0 不是 1是
  ├use_per_person_per_day int 人每天使用次数: 默认值 0 代表不限制
  ├is_receive int 是否可领用: 1 可领用 0 不可领用
  ├is_use_time_range int 是否使用 时间段: 0 不使用 1使用
  ├is_koubei int 是否支持口碑: 0 不支持 1支持
  ├category int 0现金券 1买赠券 2限制数量免单券
  ├max_num int 免单最高金额的几件商品
  ├min_num int 免单最低金额的几件商品
  ├min_num_use int 订单满几件商品可用 min_amount_use和min_num_use同时满足表示不限制
  ├multi_range_type int 适用门店 0-所有门店 1-指定门店可用 2-指定门店不可用
  ├shop_ids int 指定的门店ID
  ├expire string 有效期说明
  ├scene_type_desc string 使用场景描述
  ├coupon_title string 历史字段,已废弃

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "user.user-coupons-detail",
    "Params": {
        "user_id": "",
        "user_coupon_id": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "coupon_id": "",
        "status": "",
        "user_id": "",
        "start_at": "",
        "end_at": "",
        "type_id": "",
        "coupon": {
            "id": "",
            "type": "",
            "title": "",
            "total": "",
            "number": "",
            "used": "",
            "coupon_type": "",
            "min_amount_use": "",
            "number_of_user": "",
            "goods_range_type": "",
            "expire_type": "",
            "start_at": "",
            "end_at": "",
            "expire_days": "",
            "desc": "",
            "status": "",
            "created_at": "",
            "updated_at": "",
            "show_page": "",
            "only_coupon": "",
            "use_per_person_per_day": "",
            "is_receive": "",
            "is_use_time_range": "",
            "is_koubei": "",
            "category": "",
            "max_num": "",
            "min_num": "",
            "min_num_use": "",
            "multi_range_type": "",
            "shop_ids": "",
            "expire": "",
            "scene_type_desc": "",
            "coupon_title": ""
        }
    }
}

异常示例

{
    "status": true,
    "code": "异常编码,根据不同的业务返回编码",
    "message": "异常说明:查询的信息不存在"
}

错误码

{
    "status": false,
    "code": "系统错误编码:详见全局返回编码",
    "message": "系统错误说明"
}

免费升级

营销功能、插件持续每月更新开发升级

免费专业培训

每月建站、微信营销、电商等互联网增值培训

7×24小时服务支持

400电话、QQ、微信、在线等多渠道售后支持

 

安徽智迈科技股份有限公司 版权所有 Copyright 2009-2018 皖公网安备 34019202000074号 增值电信业务经营许可证:皖B2-20170075