接口说明

接口用于获取渠道优惠规则

接口地址

https:// <SQYC_DOMAIN>/carapi/partner/discountRule/getChannelDiscount

请求方式

POST

请求参数

名称 类型 是否必选 说明
名称 类型 是否必选 说明
serviceType string yes 服务类型id,参考附录8.3服务类型对照表
cityId integer yes 城市id
bookingDate long yes 预定时间(秒)
groupId string yes 用车车型,多车型用,示例“34,35”
sign string yes 参见sign生成算法
channel string yes 渠道名称,由首汽提供

返回数据

名称 类型 说明
result Integer 0:成功;非0:失败原因编号
errmsg string 失败原因描述,若成功则值为空
data object 参考下面返回示例

返回示例

{
    "result": 0,
    "errmsg": "SUCCESS",
    "data": [
        {
            "configDiscountId": 157,
            "configGroupId": 43,
            "groupId": 43,
            "description": "",
            "label": "优惠活动",
            "createBy": 0,
            "discountName": "限时优惠",
            "ladder": [ ////阶梯优惠规则
            {
                "amount": 2.5,   //扣减金额 
                "startNum": 10,  //开始金额
                "id": 421,
                "discountId": 145,
                "endNum": 20    //结束金额
            },
            {
                "amount": 4,
                "startNum": 20,
                "id": 422,
                "discountId": 145,
                "endNum": 30
            }],
           "discounts": 0, //折扣值 比如:80 表示8折
            "updateBy": 0,
            "configDiscountType": 2, //优惠类型 0-固定优惠 1-折扣优惠 2-阶梯优惠
            "beginTime": "2018-07-09 10:27:04.0", //开始时间
            "endTime": "2018-07-31 18:43:40.0", //结束时间
            "fixedAmount": 0, //固定优惠金额
            "maxPrice": 0, //折扣最大金额
            "channelId": 0
        }
    ]
}

异常示例

{
    "result": 600100,
    "errmsg": "参数校验异常:NotNull.bookingDate",
    "data": null
}
Copyright © 首约科技(北京)有限公司 2020 all right reserved,powered by Gitbook该文件修订时间: 2024-09-10 08:31:45

results matching ""

    No results matching ""