新增快手电子凭证后台工具
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
kwaishop_aftersales_addRefund
|
||||
需商家授权
|
||||
售后单新增消息
|
||||
更新时间: 2024-04-22 14:25:16
|
||||
有新增售后单时触发消息发送
|
||||
系统参数
|
||||
参数名 类型 详情描述
|
||||
eventId String 消息唯一id
|
||||
msgId String 业务消息内容唯一id
|
||||
bizId Long 业务id如订单id、退款单id、商品id
|
||||
userId Long 授权用户id
|
||||
openId String 授权用户openId
|
||||
appKey String 应用id
|
||||
event String 消息标示
|
||||
info String 消息内容,业务内容Json串,详见消息文档参数
|
||||
status Integer 状态 0未知 1发送中 2发送成功 3发送失败
|
||||
createTime Long 创建时间
|
||||
updateTime Long 更新时间
|
||||
业务参数
|
||||
参数名 类型 示例值 详情描述
|
||||
orderId Long 2015612346452419 订单id
|
||||
refundId Long 32142132 售后单id
|
||||
handlingWay Integer 3 退款方式,枚举: [1, "退货退款"] [10, "仅退款"] [3, "换货"][4, "补寄"][5, "维修"]
|
||||
specialRefundType Integer 3 特殊退款类型[0, "非特殊退款"] [1, "价保"]
|
||||
status Integer 3 订单退款状态[10, "买家已经申请退款,等待卖家同意"] [12, "卖家已拒绝,等待买家处理"] [20, "协商纠纷,等待平台处理"] [30, "卖家已经同意退款,等待买家退货"] [40, "买家已经退货,等待卖家确认收货"] [45, "卖家已经发货,等待买家确认收货"] [50, "卖家已经同意退款,等待系统执行退款"] [60, "退款成功"] [70, "退款关闭"]
|
||||
createTime Long 1679035606000 售后单创建时间
|
||||
消息示例
|
||||
JSON
|
||||
{
|
||||
"eventId": "237_6341_60079475",
|
||||
"msgId": "470_60079469",
|
||||
"bizId": 23666666666666,
|
||||
"userId": 2066666666,
|
||||
"openId": "f19666666666666666666666666666666",
|
||||
"appKey": "ks66666666666666666",
|
||||
"event": "kwaishop_aftersales_addRefund",
|
||||
"info": {
|
||||
"orderId": 2015612346452419,
|
||||
"refundId": 32142132,
|
||||
"handlingWay": 3,
|
||||
"specialRefundType": 3,
|
||||
"status": 3,
|
||||
"createTime": 1679035606000
|
||||
},
|
||||
"status": 2,
|
||||
"createTime": 1691563032872,
|
||||
"updateTime": 1691567756044
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
open.seller.order.refund.pcursor.list
|
||||
需商家授权
|
||||
GET
|
||||
获取售后单列表
|
||||
更新时间: 2024-04-22 16:28:28
|
||||
查询商家售后单列表(游标方式),可根据订单id查询关联的全量售后单列表,handlingway为售后方式,status为售后状态
|
||||
系统环境
|
||||
环境 域名
|
||||
线上环境(推荐) https://openapi.kwaixiaodian.com
|
||||
线上环境(备用) https://open.kwaixiaodian.com
|
||||
系统参数
|
||||
参数名 类型 必须 详情描述
|
||||
appkey String 是 平台分配的appId
|
||||
timestamp Number 是 发起请求的Unix时间戳,单位为毫秒
|
||||
access_token String 是 访问token,所有需用户授权API使用code模式获取,不需要用户授权API使用client_credentials获取,详情参考《授权说明》文档
|
||||
version Number 是 请求的API版本号,目前版本为1
|
||||
param JSON 是 业务参数,详见下方的请求入参
|
||||
method String 是 请求的API英文名,详见各API定义
|
||||
sign String 是 API入参的签名结果参数
|
||||
signMethod String 是 签名算法,支持HMAC_SHA256和MD5,推荐使用HMAC_SHA256
|
||||
请求参数
|
||||
参数名 类型 必须 示例值 详情描述
|
||||
beginTime Long 是 1543817629000 订单生成的开始时间(单位毫秒),在当前时间的近90天内,不能大于90天,且小于截止时间
|
||||
endTime Long 是 1543817629000 订单生成的截止时间(单位毫秒)在当前时间的近90天内,不能大于90天,且大于开始时间,且与开始时间的时间范围不大于1天 (与开始时间的时间范围建议做成随时可配置,该范围可能在活动期间随时变化,比如变成小时级或者分钟级)。
|
||||
type Integer 是 8 退款单请求类型,8 等待退款 9 全部退款订单
|
||||
pageSize Integer 是 50 每次请求数量,最多一页100条
|
||||
currentPage Long 是 1 当前页码
|
||||
sort Integer 否 1 排序方式,1时间降序 2时间升序 ,默认降序
|
||||
queryType Integer 否 1 查找方式,1按创建时间查找 2按更新时间查找 ,默认创建时间
|
||||
negotiateStatus Integer 否 1 协商状态,1待商家处理 2 商家同意 3商家驳回,等待买家修改 默认返回所有数据
|
||||
pcursor String 是 1543843735000_1 游标内容,第一次传空串,之后传上一次的pcursor返回值,若返回“nomore”则标识到底
|
||||
status Integer 否 10 退款状态,枚举:[10, "买家已经申请退款,等待卖家同意"] [12, "卖家已拒绝,等待买家处理"] [20, "协商纠纷,等待平台处理"] [30, "卖家已经同意退款,等待买家退货"] [40, "买家已经退货,等待卖家确认收货"] [45, "卖家已经发货,等待买家确认收货"] [50, "卖家已经同意退款,等待系统执行退款"] [60, "退款成功"] [70, "退款关闭"]
|
||||
option RefundPageOption 否 {} 选项
|
||||
orderId Long 否 2412314120000 订单id,可根据订单id查询关联的所有售后单列表
|
||||
返回参数
|
||||
参数名 类型 示例值 详情描述
|
||||
code String 1 主返回码
|
||||
msg String success 主返回信息
|
||||
sub_code String 1 子返回码
|
||||
sub_msg String SUCCESS 子返回信息
|
||||
result Integer 1 返回码,1正确,其他返回码表示接口未执行成功
|
||||
data MerchantRefundListDataView {} 售后单列表信息
|
||||
error_msg String SUCCESS 返回码描述
|
||||
错误码
|
||||
错误码 错误类型 错误描述 解决方法
|
||||
13 参数非法 参数不合法 分页参数不符合‘nomore’ 或 ‘数字_数字’的格式,请检查
|
||||
16 系统错误 请求过于频繁 请求过于频繁,请稍后重试
|
||||
51 参数非法 pageSize 应为20 pageSize超过了100
|
||||
53 参数非法 page number 过大 page number 过大,分页参数为nomore报错
|
||||
300002 业务错误 退款单类型错误 退款单类型错误
|
||||
300003 业务错误 结束时间必须大于开始时间 结束时间必须大于开始时间
|
||||
300005 业务错误 开始时间不能大于90天前 开始时间不能大于90天前
|
||||
300019 业务错误 时间范围超限 时间范围超限
|
||||
300107 业务错误 状态无效 status参数不在RefundStatusEnum里
|
||||
300109 业务错误 退款单请求类型为等待退款时,退款单状态列表中不能包含非等待退款的状态 退款单请求类型为等待退款时,退款单状态列表中不能包含非等待退款的状态
|
||||
请求示例
|
||||
JAVA
|
||||
CURL
|
||||
package com.kuaishou.merchant.open.api.sdk.demo;
|
||||
import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
|
||||
import com.kuaishou.merchant.open.api.request.refund.OpenSellerOrderRefundPcursorListRequest;
|
||||
import com.kuaishou.merchant.open.api.response.refund.OpenSellerOrderRefundPcursorListResponse;
|
||||
import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
|
||||
|
||||
public class AccessTokenKsMerchantClientDemo {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String url = "https://openapi.kwaixiaodian.com";
|
||||
String appKey = "your appKey";
|
||||
String signSecret = "your app signSecret";
|
||||
String accessToken = "your accessToken";
|
||||
|
||||
AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(url,appKey,signSecret);
|
||||
|
||||
OpenSellerOrderRefundPcursorListRequest request = new OpenSellerOrderRefundPcursorListRequest();
|
||||
request.setAccessToken(accessToken);
|
||||
request.setApiMethodVersion(1L);
|
||||
|
||||
request.setBeginTime(1543817629000);
|
||||
request.setEndTime(1543817629000);
|
||||
request.setType(8);
|
||||
request.setPageSize(50);
|
||||
request.setCurrentPage(1);
|
||||
request.setSort(1);
|
||||
request.setQueryType(1);
|
||||
request.setNegotiateStatus(1);
|
||||
request.setPcursor("1543843735000_1");
|
||||
request.setStatus(10);
|
||||
RefundPageOption obj1 = new RefundPageOption();
|
||||
obj1.setNeedExchange(false);
|
||||
request.setOption(obj1);
|
||||
request.setOrderId(2412314120000);
|
||||
|
||||
OpenSellerOrderRefundPcursorListResponse response = client.execute(request);
|
||||
|
||||
System.out.println(GsonUtils.toJSON(response));
|
||||
}
|
||||
}
|
||||
|
||||
响应示例
|
||||
JSON
|
||||
{
|
||||
"result": 1,
|
||||
"data": {
|
||||
"currentPage": 1,
|
||||
"pageSize": 100,
|
||||
"totalPage": 10,
|
||||
"totalSize": 100,
|
||||
"beginTime": 1597248000000,
|
||||
"endTime": 1597276800000,
|
||||
"pcursor": "nomore",
|
||||
"refundOrderInfoList": [
|
||||
{
|
||||
"oid": 12020384,
|
||||
"refundId": 2016300011212478,
|
||||
"handlingWay": 1,
|
||||
"negotiateStatus": 1,
|
||||
"refundFee": 890,
|
||||
"skuId": 92381223,
|
||||
"refundReason": 1,
|
||||
"status": 10,
|
||||
"buyerId": 63523209,
|
||||
"refundType": 1298723,
|
||||
"sellerId": 92371012,
|
||||
"refundDesc": "描述",
|
||||
"submitTime": 1543843735000,
|
||||
"relItemId": 111,
|
||||
"negotiateUpdateTime": 1543843735000,
|
||||
"updateTime": 1543843735000,
|
||||
"createTime": 1543843735000,
|
||||
"relSkuId": 120823876,
|
||||
"skuNick": "111",
|
||||
"logisticsId": 1234567,
|
||||
"endTime": 1543843735000,
|
||||
"itemId": 123456,
|
||||
"receiptStatus": 1,
|
||||
"refundReasonDesc": "拍多、拍错",
|
||||
"expireTime": 1543843735000
|
||||
}
|
||||
]
|
||||
},
|
||||
"error_msg": "SUCCESS"
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
open.seller.order.refund.approve
|
||||
需商家授权
|
||||
POST
|
||||
商家同意退款
|
||||
更新时间: 2023-11-01 14:45:53
|
||||
1.售后单类型为仅退款时,调用该API完成退款操作
|
||||
2.售后单类型为退货退款时,使用open.seller.order.refund.returngoods.approve(商家同意退货API)完成同意退货操作
|
||||
系统环境
|
||||
环境 域名
|
||||
线上环境(推荐) https://openapi.kwaixiaodian.com
|
||||
线上环境(备用) https://open.kwaixiaodian.com
|
||||
系统参数
|
||||
参数名 类型 必须 详情描述
|
||||
appkey String 是 平台分配的appId
|
||||
timestamp Number 是 发起请求的Unix时间戳,单位为毫秒
|
||||
access_token String 是 访问token,所有需用户授权API使用code模式获取,不需要用户授权API使用client_credentials获取,详情参考《授权说明》文档
|
||||
version Number 是 请求的API版本号,目前版本为1
|
||||
param JSON 是 业务参数,详见下方的请求入参
|
||||
method String 是 请求的API英文名,详见各API定义
|
||||
sign String 是 API入参的签名结果参数
|
||||
signMethod String 是 签名算法,支持HMAC_SHA256和MD5,推荐使用HMAC_SHA256
|
||||
请求参数
|
||||
参数名 类型 必须 示例值 详情描述
|
||||
refundId Long 是 129230087 退款单编号
|
||||
desc String 否 说明 退款说明(预计4月中旬下线)
|
||||
refundAmount Long 是 1000 退款金额 单位:分
|
||||
status Integer 否 1 退款单当前状态
|
||||
negotiateStatus Integer 否 1 协商状态,枚举: [1, "待商家处理"] [2, "商家同意"] [3, "商家驳回,等待买家修改"]
|
||||
refundHandingWay Integer 否 1 退款方式,枚举:[0, "未知"] [1, "退货退款"] [10,"仅退款"]
|
||||
返回参数
|
||||
参数名 类型 示例值 详情描述
|
||||
code String 1 主返回码
|
||||
msg String success 主返回信息
|
||||
sub_code String 1 子返回码
|
||||
sub_msg String SUCCESS 子返回信息
|
||||
result Integer 1 返回码,1正确,其他返回码表示接口未执行成功
|
||||
error_msg String SUCCESS 返回码描述
|
||||
错误码
|
||||
错误码 错误类型 错误描述 解决方法
|
||||
16 系统错误 请求过于频繁 请求过于频繁,请稍后重试
|
||||
21 业务错误 当前退款单状态已更新 当前退款单状态已更新,请刷新后重试
|
||||
1004 系统错误 服务繁忙 服务繁忙,请稍后重试
|
||||
3616 业务错误 当前退款单状态已更新 当前退款单状态已更新,请刷新后重试
|
||||
6002 业务错误 保证金余额不足 保证金余额不足,请检查
|
||||
300009 业务错误 退款金额为0 退款金额为0,请检查
|
||||
300011 业务错误 退款单不存在 退款单不存在,请检查
|
||||
300013 业务错误 买家取消退款 买家取消退款
|
||||
300014 业务错误 退款单状态已更新 退款单状态已更新,请刷新重试
|
||||
300108 业务错误 输入的退款金额与退款单实际金额不匹配 输入的退款金额与退款单实际金额不匹配,请检查
|
||||
请求示例
|
||||
JAVA
|
||||
CURL
|
||||
package com.kuaishou.merchant.open.api.sdk.demo;
|
||||
import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
|
||||
import com.kuaishou.merchant.open.api.request.refund.OpenSellerOrderRefundApproveRequest;
|
||||
import com.kuaishou.merchant.open.api.response.refund.OpenSellerOrderRefundApproveResponse;
|
||||
import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
|
||||
|
||||
public class AccessTokenKsMerchantClientDemo {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String url = "https://openapi.kwaixiaodian.com";
|
||||
String appKey = "your appKey";
|
||||
String signSecret = "your app signSecret";
|
||||
String accessToken = "your accessToken";
|
||||
|
||||
AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(url,appKey,signSecret);
|
||||
|
||||
OpenSellerOrderRefundApproveRequest request = new OpenSellerOrderRefundApproveRequest();
|
||||
request.setAccessToken(accessToken);
|
||||
request.setApiMethodVersion(1L);
|
||||
|
||||
request.setRefundId(129230087);
|
||||
request.setDesc("说明");
|
||||
request.setRefundAmount(1000);
|
||||
request.setStatus(1);
|
||||
request.setNegotiateStatus(1);
|
||||
request.setRefundHandingWay(1);
|
||||
|
||||
OpenSellerOrderRefundApproveResponse response = client.execute(request);
|
||||
|
||||
System.out.println(GsonUtils.toJSON(response));
|
||||
}
|
||||
}
|
||||
|
||||
响应示例
|
||||
JSON
|
||||
{
|
||||
"result": 1,
|
||||
"error_msg": "SUCCESS"
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
open.seller.order.refund.disagree.refund
|
||||
需商家授权
|
||||
POST
|
||||
商家不同意退款
|
||||
更新时间: 2021-12-21 11:35:17
|
||||
商家不同意退款
|
||||
系统环境
|
||||
环境 域名
|
||||
线上环境(推荐) https://openapi.kwaixiaodian.com
|
||||
线上环境(备用) https://open.kwaixiaodian.com
|
||||
系统参数
|
||||
参数名 类型 必须 详情描述
|
||||
appkey String 是 平台分配的appId
|
||||
timestamp Number 是 发起请求的Unix时间戳,单位为毫秒
|
||||
access_token String 是 访问token,所有需用户授权API使用code模式获取,不需要用户授权API使用client_credentials获取,详情参考《授权说明》文档
|
||||
version Number 是 请求的API版本号,目前版本为1
|
||||
param JSON 是 业务参数,详见下方的请求入参
|
||||
method String 是 请求的API英文名,详见各API定义
|
||||
sign String 是 API入参的签名结果参数
|
||||
signMethod String 是 签名算法,支持HMAC_SHA256和MD5,推荐使用HMAC_SHA256
|
||||
请求参数
|
||||
参数名 类型 必须 示例值 详情描述
|
||||
refundId Long 是 129230087 退款单id
|
||||
sellerDisagreeReason Integer 是 1 商家拒绝原因,枚举:[1 商品退回后才能退款] [2 家已签收] [3 买家未举证/举证无效] [4 已发货,请买家承担运费] [5 已履行约定"] [100 其他]
|
||||
sellerDisagreeDesc String 是 不同意 商家拒绝原因说明
|
||||
sellerDisagreeImages List<String> 否 [] 拒绝图片,最多6张
|
||||
status Integer 是 10 退款单当前状态,枚举:[10, "买家仅退款申请"] [11, "买家退货退款申请"] [20, "平台介入-买家仅退款申请"] [21, "平台介入-买家退货退款申请"] [22, "平台介入-已确认退货退款"] [30, "商品回寄信息待买家更新"] [40, "商品回寄信息待卖家确认"] [50, "退款执行中"] [60, "退款成功"] [70, "退款失败"]
|
||||
negotiateStatus Integer 是 1 协商状态(以退款单信息里返回值为入参),枚举:[1,"待商家处理"] [3, "商家驳回,等待买家修改"]
|
||||
返回参数
|
||||
参数名 类型 示例值 详情描述
|
||||
code String 1 主返回码
|
||||
msg String success 主返回信息
|
||||
sub_code String 1 子返回码
|
||||
sub_msg String SUCCESS 子返回信息
|
||||
result Integer 1 返回码,1正确,其他返回码表示接口未执行成功
|
||||
error_msg String SUCCESS 返回码描述
|
||||
错误码
|
||||
错误码 错误类型 错误描述 解决方法
|
||||
暂无数据
|
||||
请求示例
|
||||
JAVA
|
||||
CURL
|
||||
package com.kuaishou.merchant.open.api.sdk.demo;
|
||||
import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
|
||||
import com.kuaishou.merchant.open.api.request.refund.OpenSellerOrderRefundDisagreeRefundRequest;
|
||||
import com.kuaishou.merchant.open.api.response.refund.OpenSellerOrderRefundDisagreeRefundResponse;
|
||||
import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
|
||||
|
||||
public class AccessTokenKsMerchantClientDemo {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String url = "https://openapi.kwaixiaodian.com";
|
||||
String appKey = "your appKey";
|
||||
String signSecret = "your app signSecret";
|
||||
String accessToken = "your accessToken";
|
||||
|
||||
AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(url,appKey,signSecret);
|
||||
|
||||
OpenSellerOrderRefundDisagreeRefundRequest request = new OpenSellerOrderRefundDisagreeRefundRequest();
|
||||
request.setAccessToken(accessToken);
|
||||
request.setApiMethodVersion(1L);
|
||||
|
||||
request.setRefundId(129230087);
|
||||
request.setSellerDisagreeReason(1);
|
||||
request.setSellerDisagreeDesc("不同意");
|
||||
List<String> list1 = new ArrayList<>();
|
||||
list1.add("");
|
||||
request.setSellerDisagreeImages(list1);
|
||||
request.setStatus(10);
|
||||
request.setNegotiateStatus(1);
|
||||
|
||||
OpenSellerOrderRefundDisagreeRefundResponse response = client.execute(request);
|
||||
|
||||
System.out.println(GsonUtils.toJSON(response));
|
||||
}
|
||||
}
|
||||
|
||||
响应示例
|
||||
JSON
|
||||
{
|
||||
"result": 1,
|
||||
"error_msg": "SUCCESS"
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
integration.callback.virtual.eticket.reverse
|
||||
需用户授权
|
||||
POST
|
||||
电子凭证冲正回调接口
|
||||
更新时间: 2022-05-11 16:25:25
|
||||
电子凭证冲正回调,后续再开放主动通知冲正接口
|
||||
系统环境
|
||||
环境 域名
|
||||
线上环境(推荐) https://openapi.kwaixiaodian.com
|
||||
线上环境(备用) https://open.kwaixiaodian.com
|
||||
系统参数
|
||||
参数名 类型 必须 详情描述
|
||||
appkey String 是 平台分配的appId
|
||||
timestamp Number 是 发起请求的Unix时间戳,单位为毫秒
|
||||
access_token String 是 访问token,所有需用户授权API使用code模式获取,不需要用户授权API使用client_credentials获取,详情参考《授权说明》文档
|
||||
version Number 是 请求的API版本号,目前版本为1
|
||||
param JSON 是 业务参数,详见下方的请求入参
|
||||
method String 是 请求的API英文名,详见各API定义
|
||||
sign String 是 API入参的签名结果参数
|
||||
signMethod String 是 签名算法,支持HMAC_SHA256和MD5,推荐使用HMAC_SHA256
|
||||
请求参数
|
||||
参数名 类型 必须 示例值 详情描述
|
||||
oid String 是 21111 订单id
|
||||
eticketType String 否 DINING_OPEN_TICKET/DEFAULT_MEDICAL_TICKET 电子凭证类型,跟商家想要入驻的类目相关联,非必传,默认DINING_OPEN_TICKET
|
||||
etickets List<ReverseETicket> 是 [] 冲正的卡券列表
|
||||
serialNum String 否 fffassaass 核销时的序列号,冲正时必填!
|
||||
reason String 否 消费者投诉 冲正原因
|
||||
ext String 否 {} 扩展信息
|
||||
token String 否 fasddda 鉴权Token,订单操作维度
|
||||
返回参数
|
||||
参数名 类型 示例值 详情描述
|
||||
code String 1 主返回码
|
||||
msg String success 主返回信息
|
||||
sub_code String 1 子返回码
|
||||
sub_msg String "success" 子返回信息
|
||||
commonResult KwaishopPlatformDigitalBaseRespInfo {} 返回码,1成功
|
||||
result Integer 1 返回码,1成功
|
||||
error_msg String "success" 错误信息
|
||||
错误码
|
||||
错误码 错误类型 错误描述 解决方法
|
||||
暂无数据
|
||||
请求示例
|
||||
JAVA
|
||||
CURL
|
||||
package com.kuaishou.merchant.open.api.sdk.demo;
|
||||
import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
|
||||
import com.kuaishou.merchant.open.api.request.virtual.IntegrationCallbackVirtualEticketReverseRequest;
|
||||
import com.kuaishou.merchant.open.api.response.virtual.IntegrationCallbackVirtualEticketReverseResponse;
|
||||
import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
|
||||
|
||||
public class AccessTokenKsMerchantClientDemo {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String url = "https://openapi.kwaixiaodian.com";
|
||||
String appKey = "your appKey";
|
||||
String signSecret = "your app signSecret";
|
||||
String accessToken = "your accessToken";
|
||||
|
||||
AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(url,appKey,signSecret);
|
||||
|
||||
IntegrationCallbackVirtualEticketReverseRequest request = new IntegrationCallbackVirtualEticketReverseRequest();
|
||||
request.setAccessToken(accessToken);
|
||||
request.setApiMethodVersion(1L);
|
||||
|
||||
request.setOid("21111");
|
||||
request.setEticketType("KFC");
|
||||
List<ReverseETicket> list1 = new ArrayList<>();
|
||||
ReverseETicket obj1 = new ReverseETicket();
|
||||
obj1.setId("123");
|
||||
list1.add(obj1);
|
||||
request.setEtickets(list1);
|
||||
request.setSerialNum("fffassaass");
|
||||
request.setReason("消费者投诉");
|
||||
request.setExt("{}");
|
||||
request.setToken("fasddda");
|
||||
|
||||
IntegrationCallbackVirtualEticketReverseResponse response = client.execute(request);
|
||||
|
||||
System.out.println(GsonUtils.toJSON(response));
|
||||
}
|
||||
}
|
||||
|
||||
响应示例
|
||||
JSON
|
||||
{
|
||||
"commonResult": {
|
||||
"code": 1,
|
||||
"message": "success"
|
||||
},
|
||||
"result": 1,
|
||||
"error_msg": "\"success\""
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
open.virtual.eticket.checkavailable
|
||||
需用户授权
|
||||
POST
|
||||
查询电子凭证校验结果
|
||||
更新时间: 2023-11-01 20:02:42
|
||||
检查电子凭证是否有效
|
||||
系统环境
|
||||
环境 域名
|
||||
线上环境(推荐) https://openapi.kwaixiaodian.com
|
||||
线上环境(备用) https://open.kwaixiaodian.com
|
||||
系统参数
|
||||
参数名 类型 必须 详情描述
|
||||
appkey String 是 平台分配的appId
|
||||
timestamp Number 是 发起请求的Unix时间戳,单位为毫秒
|
||||
access_token String 是 访问token,所有需用户授权API使用code模式获取,不需要用户授权API使用client_credentials获取,详情参考《授权说明》文档
|
||||
version Number 是 请求的API版本号,目前版本为1
|
||||
param JSON 是 业务参数,详见下方的请求入参
|
||||
method String 是 请求的API英文名,详见各API定义
|
||||
sign String 是 API入参的签名结果参数
|
||||
signMethod String 是 签名算法,支持HMAC_SHA256和MD5,推荐使用HMAC_SHA256
|
||||
请求参数
|
||||
参数名 类型 必须 示例值 详情描述
|
||||
buyerId Long 否 211 买家编号
|
||||
eticketType String 是 22 电子凭证类型
|
||||
etickets List<AvailableEticket> 是 [] 电子凭证列表
|
||||
orderId Long 否 1 订单编号
|
||||
sellerId Long 是 211 卖家编号
|
||||
返回参数
|
||||
参数名 类型 示例值 详情描述
|
||||
code String 1 主返回码
|
||||
msg String success 主返回信息
|
||||
sub_code String 1 子返回码
|
||||
sub_msg String 1 子返回信息
|
||||
etickets List<AvailableEticketDetail> [] 电子凭证校验结果
|
||||
result Integer 1 是否成功
|
||||
error_msg String 1 错误信息
|
||||
错误码
|
||||
错误码 错误类型 错误描述 解决方法
|
||||
3009 业务错误 电子凭证核销时,可用数量和平台不一致,其中一部分券不可用 电子凭证核销时,可用数量和平台不一致,其中一部分券不可用
|
||||
请求示例
|
||||
JAVA
|
||||
CURL
|
||||
package com.kuaishou.merchant.open.api.sdk.demo;
|
||||
import com.kuaishou.merchant.open.api.common.utils.GsonUtils;
|
||||
import com.kuaishou.merchant.open.api.request.industry.OpenVirtualEticketCheckavailableRequest;
|
||||
import com.kuaishou.merchant.open.api.response.industry.OpenVirtualEticketCheckavailableResponse;
|
||||
import com.kuaishou.merchant.open.api.client.AccessTokenKsMerchantClient;
|
||||
|
||||
public class AccessTokenKsMerchantClientDemo {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String url = "https://gw-merchant-staging.test.gifshow.com";
|
||||
String appKey = "your appKey";
|
||||
String signSecret = "your app signSecret";
|
||||
String accessToken = "your accessToken";
|
||||
|
||||
AccessTokenKsMerchantClient client = new AccessTokenKsMerchantClient(url,appKey,signSecret);
|
||||
|
||||
OpenVirtualEticketCheckavailableRequest request = new OpenVirtualEticketCheckavailableRequest();
|
||||
request.setAccessToken(accessToken);
|
||||
request.setApiMethodVersion(1L);
|
||||
|
||||
request.setSellerId(211);
|
||||
request.setBuyerId(211);
|
||||
request.setOrderId(112);
|
||||
request.setBizTypeCode("22");
|
||||
List<AvailableETicketReq> list1 = new ArrayList<>();
|
||||
AvailableETicketReq obj1 = new AvailableETicketReq();
|
||||
obj1.setId("111");
|
||||
obj1.setCode("112");
|
||||
obj1.setNum(2);
|
||||
list1.add(obj1);
|
||||
request.setETicketList(list1);
|
||||
|
||||
OpenVirtualEticketCheckavailableResponse response = client.execute(request);
|
||||
|
||||
System.out.println(GsonUtils.toJSON(response));
|
||||
}
|
||||
}
|
||||
|
||||
响应示例
|
||||
JSON
|
||||
{
|
||||
"result": 1,
|
||||
"error_msg": "success",
|
||||
"data": {
|
||||
"sellerId": 1,
|
||||
"buyerId": 1,
|
||||
"orderId": 1,
|
||||
"eticketType": "2"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user