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>"
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling"
payload = {
"returnInventoryId": 123,
"handlingCode": "<string>"
}
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-rr-apikey': '<api-key>',
'x-rr-apitoken': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({returnInventoryId: 123, handlingCode: '<string>'})
};
fetch('https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'returnInventoryId' => 123,
'handlingCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rr-apikey: <api-key>",
"x-rr-apitoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling"
payload := strings.NewReader("{\n \"returnInventoryId\": 123,\n \"handlingCode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"returnInventoryId\": 123,\n \"handlingCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"returnInventoryId\": 123,\n \"handlingCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}退货库存
更新 Return Inventory Handling
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>"
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling"
payload = {
"returnInventoryId": 123,
"handlingCode": "<string>"
}
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-rr-apikey': '<api-key>',
'x-rr-apitoken': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({returnInventoryId: 123, handlingCode: '<string>'})
};
fetch('https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'returnInventoryId' => 123,
'handlingCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rr-apikey: <api-key>",
"x-rr-apitoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling"
payload := strings.NewReader("{\n \"returnInventoryId\": 123,\n \"handlingCode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"returnInventoryId\": 123,\n \"handlingCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/ReturnInventory/UpdateReturnInventoryHandling")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"returnInventoryId\": 123,\n \"handlingCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}此页面由 AI 自动翻译。API 技术规格以英文呈现为标准。如有任何疑问,请参阅英文版本。
何时调用
- 客服或运营团队决定处理方式后。
必填字段
returnInventoryId— 长整型;必须存在且属于您的账户。在仓库登记包裹时,由newInventoryCreatedwebhook 事件推送;请在自有侧缓存以备后续操作。webhook 流是库存 ID 的真实数据源。handlingCode— 字符串,必须是 取得所有处理类型 返回的值之一。不能直接使用rsd(补寄)或tbc(待确认)——这两类有专属端点。常用值:ohd(暂存)、rtn(退回)、rst(上架)、dsp(销毁)。
handlingStatusCode 为 pending 且新处理为 ohd(暂存),调用始终允许——便于在调查期间将库存挂起。
下列情况无法更新处理:
- 库存所属行项目存在待处理的 VAS(增值服务)请求。请先透过 取得所有 VAS 与 VAS 端点取消或完成 VAS。
副作用
- 库存记录上的
handlingCode与handlingStatusCode会被更新。 - 若新处理不是
ohd或oth(其他),将锁定 RMA 映射,禁止对该库存进行 RMA 交换。
相关
- 取消退件库存处理 — 在仓库执行前撤销处理决定。
- 按退件库存 ID 创建召回 — 透过专属召回流程处理被召回的库存。
- 建立补寄订单 — 走补寄路径(同样无法直接透过本端点到达)。
- Webhooks —
newInventoryCreated、vasUpdated、库存处理完成事件与notifyUserRmaSwapped都会推送库存生命周期至您的端点。
授权
Your API key
Your API token — keep this private
请求体
application/json
响应
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.
Unique correlation ID for tracing the request through Return Helper systems.
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).
Show child attributes
Show child attributes