核销用户的一张优惠券,返回核销结果
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
biz_type | String | 可选 | suning | 业务类型 | |
buyer_id | String | 可选 | 123456 | buyer_id、buyer_nick至少填一个, 都填写以id为准 | |
buyer_nick | String | 可选 | 我是测试 | buyer_id、buyer_nick至少填一个, 都填写以id为准 | |
seller_id | String | 可选 | 1111111 | 商家id | |
coupon_id | String | 可选 | 222222 | 优惠券id | |
extra | Json | 可选 | {"suning_coupon_id":33333} | 扩展字段 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
data | UseResultDo | data | |
|
|||
result_code | String | resultCode | |
error_msg | String | errorMsg |
1 2 3 4 5 6 7 8 9 10 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); TmallPromotionCouponUseRequest req = new TmallPromotionCouponUseRequest(); req.setBizType( "suning" ); req.setBuyerId( "123456" ); req.setBuyerNick( "我是测试" ); req.setSellerId( "1111111" ); req.setCouponId( "222222" ); req.setExtraString( "{\"suning_coupon_id\":33333}" ); TmallPromotionCouponUseResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 | < tmall_promotion_coupon_use_response > < data > < is_used >true</ is_used > </ data > < result_code ></ result_code > < error_msg ></ error_msg > </ tmall_promotion_coupon_use_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|