查询CPS信息
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/api/trade/basic/v1/developer/order/query_cps
错误码
错误码 | 错误提示 | 建议解决方案 |
---|---|---|
10000 | 参数错误 | 对照错误提示和接口字段定义,检查对应的参数 |
11001 | 访问未授权 | 1. 订单不属于该小程序,无法查询到该订单信息,检查订单是否属于该小程序 2. 没有该接口的请求权限,需要接入通用交易解决方案开通接口权限 |
13000 | 系统错误 | 请重试,若多次重试仍然报错,请联系oncall |
20000 | 订单不存在 | 查不到该订单,请检查订单号是否传错,是否把order_id 当 out_order_no 传入 |
20004 | 订单不属于cps订单 | 不是CPS订单的原因,请查看是否有设置CPS |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/api/trade/basic/v1/developer/order/query_cps' \
--header 'access-token: clt.xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"order_id" : "motb52726742593307630520652",
"out_order_no" : "ext_order_123"
}'
响应示例响应示例
200 - 成功示例
{
"data": {
"order_id": "motb52726742593307630520652",
"out_order_no": "ext_order_123",
"total_commission_amount": 1,
"cps_item_list": [
{
"commission_rate": 10,
"commission_amount": 1,
"source_type": 1,
"item_id": 12323123,
"sell_amount": 1000,
"status": 1,
"item_order_id": "motb52726742593307630520952",
"commission_user_nickname": "小毛驴",
"commission_user_douyinid": "ax81nd873",
"task_id": "41235132"
}
]
},
"err_no": 0,
"err_msg": "success",
"log_id": "2022092115392201020812109511046"
}
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/json
access-token
string
必需
示例值:
clt.xxx
Body 参数application/json