开发指南 官网
API 2.0 > 2.5 优惠券 > 2.5.10 创建优惠券兑换活动

2.5.10 创建优惠券兑换活动

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:创建优惠券兑换活动

请求地址

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

公共参数

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

请求参数

参数 参数类型 是否必填 默认值 描述
applyStoreType string 适用门店类型:1-所有门店,2-指定门店,3-指定门店不适用
beginDate DateTime 活动开始时间
belongChannelIds int 所属渠道id
belongClientId int 所属客户id
couponType int 券码制作类型:1-电子券,2-纸质券
displayStyles string 优惠码显示样式 banner: 弹窗 Banner 图片 button_bg: 按钮背景颜色
endDate DateTime 活动结束时间
exchangeKind string 兑换形式:1- 一券一码,2-通用码
id string 活动ID
isEnable int 创建活动是否启用 1-是 其他/空-不启用
limitCount int 每人限领数量
memo string 活动备注
name string 活动名称
storeIds string 活动门店列表
templates array
 ├0 array
  ├amount string 数量
  ├saleAmount string 销售金额
  ├templateId string 券模板ID
thirdBizCode string 三方业务券编码
totalCount string 生成总量

响应参数

参数 参数类型 描述
status bool 成功或失败标识
code int 成功或失败代码
message string 描述
data array
 ├id string 活动id
 ├code string 活动code

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "coupon.coupon-activity-add",
    "Params": {
        "applyStoreType": "",
        "beginDate": "",
        "belongChannelIds": "",
        "belongClientId": "",
        "couponType": "",
        "displayStyles": "",
        "endDate": "",
        "exchangeKind": "",
        "id": "",
        "isEnable": "",
        "limitCount": "",
        "memo": "",
        "name": "",
        "storeIds": "",
        "templates": [
            {
                "amount": "",
                "saleAmount": "",
                "templateId": ""
            }
        ],
        "thirdBizCode": "",
        "totalCount": ""
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "id": "",
        "code": ""
    }
}

异常示例

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

错误码

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

免费升级

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

免费专业培训

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

7×24小时服务支持

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

 

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