接口 activity.voucher.get

接口说明

获取一个兑换码活动的信息

业务参数

参数名称 类型 是否必须 说明
VoucherID string Y 兑换券活动 ID,由运营商提供

返回结果

参数名称 类型 说明
title string 活动标题
skus array 可兑换的商品
deviceids array 支持兑换的设备
deadline object datetype: 1->固定时间过期
2->相对时间,领取后若干天(立即生效) 3->相对时间,领取后若干天(隔天零点生效)

返回示例

{
    "error_code": 0,
    "error_msg": "SUCCESS",
    "data": {
        "title": "2", //活动标题
        "oid": "590abb6a57f8f1d7e7eedc94",
        "updatedAt": 1500528045,
        "createdAt": 1500527946,
        "status": 1,
        "skus": [
            {
                "exchanged": 0, //已兑换
                "received": 5, //已发放
                "barcode": "6932571040007",//商品条码
                "total": 19,//总数量
                "updatedAt": 1500527946,
                "createdAt": 1500527946,
                "id": "59703d4a67d20265a300f0cc",
                "name": "味全每日C鲜橙汁300ml瓶" //商品名称
                "imageUrl":"http://xxxx"
            },
            {
                "exchanged": 0,
                "received": 0,
                "barcode": "6932394908508",
                "total": 29,
                "updatedAt": 1500527946,
                "createdAt": 1500527946,
                "id": "59703d4a67d20265a300f0cb",
                "name": "每日C鲜果橙饮品450ml",
                "imageUrl":"http://xxxx"
            }
        ],
        "deadline": {
            "date": 20,
            "datetype": 2
        },
        "deviceids": [ // 可兑换的设备ID
            "5b4ee32bc0e8fe00120c8916"
        ],
        "id": "59703d4a67d20265a300f0ca"
    }
}

错误描述

error_msg 描述
MISSING_PARAMS_VOUCHERID 缺少参数:兑换码活动 id
ERR_INVALID_VOUCHER_ID 错误:兑换码活动 id 不存在
ERR_VOUCHER_NOT_FOUND 错误:兑换码活动不存在
ERR_INVALID_OID 错误: 错误的运营商 ID
ERR_ACTIVITY_VOUCHER_DISABLED 错误:活动已被禁止
Copyright © YoPoint.com 2019 all right reserved,powered by Gitbook该文件修订时间: 2023-04-04 09:58:01

results matching ""

    No results matching ""