- 授权
- 商品
- 地址
- 价格
- 库存
- 订单
- 售后
- 物流
- 发票
- 类目
- 员工
9.1 售后单申请
POST
/api/v2/aftersale/create
AfterSale
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
channel
string
可选
默认值:
benlai
shopId
string
商城id
默认值:
123
Body 参数application/json
申请模型
do_id
string
本网出库单号
>= 10 字符<= 32 字符
type
string
服务类型
REFUND : 退货
>= 6 字符<= 10 字符
description
string
问题描述
>= 0 字符<= 200 字符
description_img
array[string]
问题图片
contact
string
售后订单联系人
>= 1 字符<= 20 字符
phone
string
售后订单联系人手机号
正则匹配:
^[1][0-9]{10}$
telephone
string
售后订单联系人电话
province
string
省
>= 1 字符<= 20 字符
city
string
市
>= 1 字符<= 20 字符
county
string
县(区)
>= 1 字符<= 20 字符
receive_address
string
收货地址
>= 1 字符<= 50 字符
product_list
array[object (Benlai.Open.Models.AfterSale.CreateProductInfo) {2}]
退换货商品列表
product_id
string
商品编号
>= 10 字符<= 32 字符
quantity
integer <int32>
商品数量
out_rma_id
string
外部售后单号
示例
{
"out_rma_id": "RMAa7f3c562731645069e1687d21a4bc128",
"do_id": "D661027264519",
"type": "REFUND",
"description": "商品包装破损",
"description_img": [
"http://example.com/img1.jpg",
"http://example.com/img2.jpg"
],
"contact": "张三",
"phone": "13800138000",
"telephone": null,
"province": "北京市",
"city": "北京市",
"county": "朝阳区",
"receive_address": "科技园南区",
"product_list": [
{
"product_id": "P0000122741",
"quantity": 1
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open-agent-branch.benlai.com/api/v2/aftersale/create' \
--header 'channel: benlai' \
--header 'shopId: 123' \
--header 'Content-Type: application/json' \
--data-raw '{
"out_rma_id": "RMAa7f3c562731645069e1687d21a4bc128",
"do_id": "D661027264519",
"type": "REFUND",
"description": "商品包装破损",
"description_img": [
"http://example.com/img1.jpg",
"http://example.com/img2.jpg"
],
"contact": "张三",
"phone": "13800138000",
"telephone": null,
"province": "北京市",
"city": "北京市",
"county": "朝阳区",
"receive_address": "科技园南区",
"product_list": [
{
"product_id": "P0000122741",
"quantity": 1
}
]
}'
返回响应
🟢200成功
text/plain
Body
退换货结果
rma_id
string
售后单号
>= 10 字符<= 32 字符
out_rma_id
string
外部售后单号
示例
{
"code": 0,
"msg": "success",
"value": {
"rma_id": "8002098466"
}
}