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