• 开发者平台
  • >
  • 餐饮文档中心

券查询收费

(上行接口)合作方提供此接口地址,接受客如云商户pos端查询券信息的请求(满足第三方满减券、折扣券在客如云POS端核销验券场景) 注:crm2.0商户不可使用该接口

授权方式:门店授权

请求描述

HTTP请求方式:POST
HTTP请求头类型:Content-Type=application/json
URI:   《第三方提供并配置》
返回数据格式:JSON

业务参数

字段名 类型 是否必填 字段描述
coupons List<String> 待核销券码集合
shopId Long 客如云商户门店编号

示例代码(json)

{
    "coupons":["123456789012345601"],
    "shopId":810094162
    
}

响应参数

字段名 类型 是否必填 字段描述
code int 返回编码,详见 附录 2. 错误码
message string 返回信息
messageUuid string 消息uuid
result List<OpenThirdCrmCouponQueryVO> 返回响应数据,json对象或数组,可空

OpenThirdCrmCouponQueryVO

字段名 类型 是否必填 字段描述
brandId String 品牌ID
shopId String 门店ID
couponInfo CouponInfo 券信息

couponInfo

字段名 类型 是否必填 字段描述
couponNo String 优惠券编码
couponName String 券标题(第三方券名称)
couponType String 券类型(1:满减券, 2:折扣券)
status Integer 劵状态 0 不可用(其他异常状态) 1 可用(未核销状态)
statusDesc String 状态信息描述
threshold BigDecimal 使用门槛(满xx元可用) (只能填写整数,单位为“元”,不可传输“0.01元”这种格式)
faceValue BigDecimal couponType=2 → 折扣比例(比如:8.5→八五折) couponType=1 → 优惠金额(单位:元)
deductPerThreshold Boolean couponType=1并且该字段值为true时 → 代表满减可以重复计算,为false时代表不可以重复计算
startTime String 有效期开始日期(2019-08-01)
endTime String 有效期截止日期(2019-09-30),注意:不包含最后一天

示例代码(json)

{
    "code":0,
    "message":"OK",
    "messageUuid":"3b4cce269b0d45a3a2a783e91bed263a",
    "result":[
        {
            "brandId":32296,
            "shopId": 810094162,
            "couponInfo":
            {
            	"couponNo":"123456789012345601",
            	"couponName":"第三方满减券",
            	"couponType":1,
            	"status":1,
            	"statusDesc":"可用",
            	"threshold":1.0,
            	"faceValue":1.0,
            	"deductPerThreshold":1,
            	"startTime":"2019-08-01",
                "endTime":"2019-08-01"
            }
        }
    ]
}
目录