跳转到主要内容
POST
/
api
/
ReturnInventory
/
UpdateReturnInventoryHandling
Update return inventory handling
curl --request POST \
  --url https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling \
  --header 'Content-Type: application/json' \
  --header 'x-rr-apikey: <api-key>' \
  --header 'x-rr-apitoken: <api-key>' \
  --data '
{
  "returnInventoryId": 123,
  "handlingCode": "<string>"
}
'
{
  "correlationId": "<string>",
  "meta": {
    "status": 123,
    "data": {},
    "errorCode": "<string>",
    "error": {}
  }
}
此页面由 AI 自动翻译。API 技术规格以英文呈现为标准。如有任何疑问,请参阅英文版本
更新单条退件库存记录的处理决定——告诉仓库该如何处置已收到的包裹。多在仓库登记包裹后调用;从此库存便会沿着所选处理路径(上架、销毁、召回、补寄等)继续。

何时调用

  • 客服或运营团队决定处理方式后。

必填字段

  • returnInventoryId — 长整型;必须存在且属于您的账户。在仓库登记包裹时,由 newInventoryCreated webhook 事件推送;请在自有侧缓存以备后续操作。webhook 流是库存 ID 的真实数据源。
  • handlingCode — 字符串,必须是 取得所有处理类型 返回的值之一。不能直接使用 rsd(补寄)或 tbc(待确认)——这两类有专属端点。常用值:ohd(暂存)、rtn(退回)、rst(上架)、dsp(销毁)。
特殊例外:若当前 handlingStatusCodepending 且新处理为 ohd(暂存),调用始终允许——便于在调查期间将库存挂起。 下列情况无法更新处理:
  • 库存所属行项目存在待处理的 VAS(增值服务)请求。请先透过 取得所有 VAS 与 VAS 端点取消或完成 VAS。

副作用

  • 库存记录上的 handlingCodehandlingStatusCode 会被更新。
  • 若新处理不是 ohdoth(其他),将锁定 RMA 映射,禁止对该库存进行 RMA 交换。

相关

授权

x-rr-apikey
string
header
必填

Your API key

x-rr-apitoken
string
header
必填

Your API token — keep this private

请求体

application/json
returnInventoryId
integer<int64>
必填

Return inventory ID to update handling for

handlingCode
string
必填

Handling code to apply

响应

Success

Universal response envelope. Successful responses include the business payload as additional top-level fields alongside correlationId and meta. Failed responses (auth errors, validation errors) only populate correlationId and meta, with meta.errorCode and meta.error describing the failure.

correlationId
string | null

Unique correlation ID for tracing the request through Return Helper systems.

meta
object

Application-level metadata for every API response. Inspect status and errorCode to detect soft-error responses (validation failures arrive as HTTP 200 with meta.status: 400).