代理商接口列表 (操作机具)
需要授权
代理商进行支付交易时,需绑定机具进行正常的交易。代理商可以通过该接口把已入库的机具序列号与相应的店铺进行绑定/解绑,然后通过哆啦宝平台进行交易操作!
绑定机具请求参数:
POST请求地址:
环境 |
https请求地址 |
正式环境 |
https://openapi.duolabao.com/v1/agent/machine/bind |
公共请求参数:
参数名称 |
参数类型 |
是否必填 |
最大长度 |
参数说明 |
示例值 |
agentNum |
String |
是 |
32 |
代理商编号 |
10001014809240398100002 |
customerNum |
String |
是 |
32 |
商户编号 |
10001114596730086163709 |
shopNum |
String |
是 |
32 |
店铺编号 |
10001214641783052104486 |
serialNum |
String |
是 |
32 |
机具序列号 |
V9873308000 |
请求示例:
-
1
|
{
|
2
|
"agentNum": "10001014809240398100002",
|
3
|
"customerNum": "10001114596730086163709",
|
4
|
"shopNum": "10001214513673242442196",
|
5
|
"serialNum": "V9873308000"
|
6
|
}
|
返回参数JSON格式:
参数名称 |
参数类型 |
是否必填 |
最大长度 |
参数说明 |
示例值 |
result |
String |
是 |
32 |
success表示成功,fail表示失败,error表示异常 |
success |
message |
String |
是 |
32 |
成功信息 |
bindSuccess |
响应JSON示例:
-
1
|
{
|
2
|
"data": {
|
3
|
"message": "bindSuccess"
|
4
|
},
|
5
|
"result": "success"
|
6
|
}
|
错误响应示例:
-
1
|
{
|
2
|
"error": {
|
3
|
"errorCode": "paramsError",
|
4
|
"errorMsg":"the parameters error,please check your parameters"
|
5
|
},
|
6
|
"result": "fail"
|
7
|
}
|
异常示例:
-
1
|
{
|
2
|
"error": {
|
3
|
"errorCode": "systemError",
|
4
|
"errorMsg":"错误描述"
|
5
|
},
|
6
|
"result": "error"
|
7
|
}
|
解绑机具请求参数:
POST请求地址:
环境 |
https请求地址 |
正式环境 |
https://openapi.duolabao.com/v1/agent/machine/unbind |
公共请求参数:
参数名称 |
参数类型 |
是否必填 |
最大长度 |
参数说明 |
示例值 |
agentNum |
String |
是 |
32 |
代理商编号 |
10001014809240398100002 |
customerNum |
String |
是 |
32 |
商户编号 |
10001114596730086163709 |
shopNum |
String |
是 |
32 |
店铺编号 |
10001214641783052104486 |
serialNum |
String |
是 |
32 |
机具序列号 |
V9873308000 |
请求示例:
-
1
|
{
|
2
|
"agentNum": "10001014809240398100002"
|
3
|
"customerNum": "10001114596730086163709",
|
4
|
"shopNum": "10001214513673242442196",
|
5
|
"serialNum": "V9873308000"
|
6
|
}
|
返回参数JSON格式:
参数名称 |
参数类型 |
是否必填 |
最大长度 |
参数说明 |
示例值 |
result |
String |
是 |
32 |
success表示成功,fail表示失败,error表示异常 |
success |
message |
String |
是 |
32 |
成功信息 |
unbindSuccess |
响应JSON示例:
-
1
|
{
|
2
|
"data": {
|
3
|
"message": "unbindSuccess"
|
4
|
},
|
5
|
"result": "success"
|
6
|
}
|
错误响应示例:
-
1
|
{
|
2
|
"error": {
|
3
|
"errorCode": "unbindFail",
|
4
|
"errorMsg":"unbind fail, Machine does not exist, or has been
untied"
|
5
|
},
|
6
|
"result": "fail"
|
7
|
}
|
异常示例:
-
1
|
{
|
2
|
"error": {
|
3
|
"errorCode": "systemError",
|
4
|
"errorMsg":"错误描述"
|
5
|
},
|
6
|
"result": "error"
|
7
|
}
|
错误码解释:
错误码 |
错误描述 |
解决方案 |
paramsError |
the parameters error,please check your parameters |
参数不正确,请确认参数 |
paramsIsNull |
parameters cannot be null or empty string |
参数不可为空或空字符串 |
machineNotExsit |
machine is not exist |
机具序列号不存在 |
illegalOperate |
mahine has already bind |
机具序列号已经绑定 |
machineUsing |
machine is using |
机具号已经被其他店铺使用 |