开发指南 官网
API 2.0 > 5.2 会员查询 > 5.2.3 用户优惠券列表

5.2.3 用户优惠券列表

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:获取企迈云商当前会员优惠券列表。此接口也支持订单结算时,拉取当前会员可用优惠券列表。

请求地址

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

公共参数

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

请求参数

参数 参数类型 是否必填 默认值 描述
user_id int 会员id
from_pay_page int 是否买单页面,1:是,0:否
shopping int 是否购物的0- 否 1- 是
checked string 商品筛选 shopping == 1 时必传。bar_code:商品标识,offline_price:价格,buy_num:购买数量[{\"bar_code\":\"P5C503FB51B4843301\",\"offline_price\":120,\"buy_num\":2},{\"bar_code\":\"P5C503FB51C2F96986\",\"offline_price\":20,\"buy_num\":2}]
expire string shopping=0时可用此字段筛选优惠券状态 used 已使用 ; canuse :未使用 expired: 已过期
amount int shopping=0时可用此字段筛选优惠券,如满100元可用。(shopping=1时是使用checked字段筛选的)
multi_store_sn string 多门店标识码

响应参数

参数 参数类型 描述
status bool 请求成功或者失败
code int 成功/错误编码
message string 成功/错误描述
data array
 ├item_list array
  ├0 array
   ├id int ID
   ├coupon_id int 优惠券ID
   ├start_at string 有效期开始时间
   ├end_at string 有效期结束时间
   ├status int 状态 0-未使用 1-已使用
   ├verify_code string 核销码
   ├is_lock int 是否锁定 1-正常 2-锁定
   ├date_time string 状态展示字段
   ├coupon array
    ├id int ID
    ├title string 优惠券名称
    ├coupon_type int 优惠形式 0-指定金额 1-折扣券
    ├min_amount_use int 最低使用金额, 0 -不限制,单位分
    ├desc string 描述

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "coupon.user-coupon-list",
    "Params": {
        "user_id": "",
        "from_pay_page": "",
        "shopping": "",
        "checked": "[{\"bar_code\":\"P5C503FB51B4843301\",\"offline_price\":120,\"buy_num\":2},{\"bar_code\":\"P5C503FB51C2F96986\",\"offline_price\":20,\"buy_num\":2}]",
        "expire": "",
        "amount": "",
        "multi_store_sn": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "item_list": [
            {
                "id": "",
                "coupon_id": "",
                "start_at": "1552924800",
                "end_at": "1553183999",
                "status": "",
                "verify_code": "",
                "is_lock": "",
                "date_time": "已过期",
                "coupon": {
                    "id": "",
                    "title": "",
                    "coupon_type": "",
                    "min_amount_use": "",
                    "desc": ""
                }
            }
        ]
    }
}

异常示例

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

错误码

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

免费升级

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

免费专业培训

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

7×24小时服务支持

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

 

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