> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clawdot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# retail_aftersale

> 售后

售后。零售售后：一个 task 办一张售后单（一张收款单里的一个订单行）。action=locate 定位（out\_trade\_no 必填，一单多行时带 line 选订单行）；action=prepare 出确认页，kind=refund 申请退款（先不带 reason 看可退金额与原因，再带 reason；标了「要说明」的原因要带 reason\_text，必须是用户自己说的原话）、kind=return 回传退货运单（carrier 只能从候选里选，invoice\_no 是用户给的真实运单号）、kind=cancel 撤销售后（撤了钱不退），确认页那一项的 ref 就是提交用的 confirm\_ref；action=progress 查售后与资金进度（任何 task 里都能调，带 order\_id 查别的售后单）；action=reconcile 提交结果不明时只读核对。

## 工具说明（与线上 tools/list 同源）

```text theme={null}
先调 create_task 拿 task_id，再带着它调本工具。
零售售后：一个 task 办一张售后单（一张收款单里的一个订单行）。action=locate 定位（out_trade_no 必填，一单多行时带 line 选订单行）；action=prepare 出确认页，kind=refund 申请退款（先不带 reason 看可退金额与原因，再带 reason；标了「要说明」的原因要带 reason_text，必须是用户自己说的原话）、kind=return 回传退货运单（carrier 只能从候选里选，invoice_no 是用户给的真实运单号）、kind=cancel 撤销售后（撤了钱不退），确认页那一项的 ref 就是提交用的 confirm_ref；action=progress 查售后与资金进度（任何 task 里都能调，带 order_id 查别的售后单）；action=reconcile 提交结果不明时只读核对。
```

## 参数

| 字段 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `task_id` | string | 是 | create\_task 返回的 task\_id |
| `action` | string | 是 | 取值：locate / prepare / progress / reconcile；各动作做什么见上面的说明。 |
| `out_trade_no` | string | 否 | 收款单号 outTradeNo（retail\_fulfillment 查到的那个）（用于 locate、progress；locate 时必填） |
| `line` | string | 否 | 订单行（locate 摆出的 ref）（用于 locate） |
| `kind` | string | 否 | refund 申请退款 / return 回传运单 / cancel 撤销售后（prepare 时必填） |
| `reason` | string | 否 | 退款原因（prepare kind=refund 摆出的 ref）（用于 prepare） |
| `reason_text` | string | 否 | 退款原因说明：用户自己说的原话（最多 200 字），原样转给上游；不要替用户编写或改写（用于 prepare） |
| `carrier` | string | 否 | 快递公司（prepare kind=return 摆出的 ref）（用于 prepare） |
| `invoice_no` | string | 否 | 退货运单号：用户给的真实单号（用于 prepare） |
| `order_id` | string | 否 | 售后单号 disputeId；不传就查本 task 自己的售后单（用于 progress） |
| `context` | object | 是 | utterance（必填）：用户这一轮的原话。phone 只在回 consent\_required 要手机号时带：\{"phone": "\<用户的手机号>"}，同样的参数重调这一步；只用来发起授权，不保存 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.