文档中心 > JSSDK文档

中奖纪录

更新时间:2018/06/22 访问次数:1745

隐私接口,请联系运营小二开通权限后使用

代码示例

/**
* 我的中奖纪录接口
* doc:https://lark.alipay.com/tmall-marketing-tools/benefit-helps/avqrb7#pr8icc
* @params options
* newBPActivityCodes 活动code,list,由权益平台生成(必填)
    benefitId         权益ID(非必填)
    extraData         Map,扩展字段
    mark              标记,对应opensearch中的一列名,中奖纪录中若写入则可查询
*/
Tida.myrecord({
    newBPActivityCodes: "[75DC75DC75DC]",
    benefitId: "123xxx"
}, function (e) {
    $("#api-result textarea").text('myrecord:' + JSON.stringify(e));
}, function (e) {
    $("#api-result textarea").text('error:' + JSON.stringify(e));
});

        

正确返回结果

{
    "api": "mtop.tmw.benefit.myrecord",
    "data": {
        "succ":true,
        "code": "0",
        "data": {
            "responseData": [
                {
                    "activityId": "16001",
                    "benefitId": "18003",
                    "benefitName": "天猫烘焙节50",
                    "benefitPoolId": "31001",
                    "benefitTemplateId": "23001",
                    "benefitType": "tmallCoupon",
                    "feature": ";startDate:2017-03-29 00#3B00#3B00;campaignId:41428002;channelId:41172001;endDate:2017-03-31 23#3B59#3B59;resourceCode:268937720337;couponId:964660917;creator:潭月;amount:50;sellerId:2548224779;subType:brandCoupon;name:烘焙节专用;startFee:500;uuid:5334c744f1eb4be8a595682606e2b0c2;",
                    "featureMap": {
                        "amount": "50",
                        "startDate": "2017-03-29 00:00:00",
                        "subType": "brandCoupon",
                        "name": "烘焙节专用",
                        "startFee": "500",
                        "endDate": "2017-03-31 23:59:59",
                        "canGrowth": null,
                        "effectDay": null
                    },
                    "gmtCreate": "2017-03-26 00:07:50",
                    "id": "3800001",
                    "init": "false",
                    "nick": "wujianglin_ok",
                    "status": "over",
                    "success": "true",
                    "userId": "134278517"
                },
                {
                    "activityId": "16001",
                    "benefitId": "18003",
                    "benefitName": "天猫烘焙节50",
                    "benefitPoolId": "31001",
                    "benefitTemplateId": "23001",
                    "benefitType": "interactCoupon",
                    "featureMap": {
                        "amount": "5",      //面额
                        "sellerId": "2024713423",    //商家id
                        "startFee": "10",     //门槛
                        "shopId":"113669204",    //店铺id
                        "shopName":"B2C小店86",    //店铺名称
                        "startDate":"2016-07-05 00:00:00",     //有效期开始时间
                        "endDate":"2016-07-09 23:59:59"     //有效期结束时间
                    },
                    "gmtCreate": "2017-03-26 00:07:50",
                    "id": "3800001",
                    "init": "false",
                    "nick": "wujianglin_ok",
                    "status": "over",
                    "success": "true",
                    "userId": "134278517"
                },
                {
                    "activityId": "16001",
                    "benefitId": "18003",
                    "benefitName": "天猫烘焙节50",
                    "benefitPoolId": "31001",
                    "benefitTemplateId": "23001",
                    "benefitType": "tmcsBrandCoupon",
                    "featureMap": {
                        "amount": "5",      //面额
                        "sellerId": "2024713423",    //商家id
                        "startFee": "10",     //门槛
                        "shopId":"113669204",    //店铺id
                        "shopName":"B2C小店86",    //店铺名称
                        "startDate":"2016-07-05 00:00:00",     //有效期开始时间
                        "endDate":"2016-07-09 23:59:59"     //有效期结束时间
                    },
                    "gmtCreate": "2017-03-26 00:07:50",
                    "id": "3800001",
                    "init": "false",
                    "nick": "wujianglin_ok",
                    "status": "over",
                    "success": "true",
                    "userId": "134278517"
                }
            ]
        },
        "msg": "SUCCESS",
        "retry": "false"
    },
    "ret": [
        "SUCCESS::调用成功"
    ],
    "v": "1.0"
}
        

错误返回结果

{
    "api": "mtop.tmw.benefit.myrecord",
    "data": {
        "succ":"false",
        "code": "-1",
        "msg": "SYS_ERR",
        "retry": "false"
    },
    "ret": [
        "UNKNOWN_FAIL_CODE::UNKNOWN_FAIL_MSG"
    ],
    "v": "1.0"
}

FAQ

关于此文档暂时还没有FAQ
返回
顶部