Get return inventory details
curl --request GET \
--url https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory"
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-rr-apikey': '<api-key>', 'x-rr-apitoken': '<api-key>'}
};
fetch('https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory', 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/GetReturnInventory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"returnInventoryId": 123
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}退貨庫存
取得 退貨庫存 詳情
GET
/
api
/
ReturnInventory
/
GetReturnInventory
Get return inventory details
curl --request GET \
--url https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory"
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-rr-apikey': '<api-key>', 'x-rr-apitoken': '<api-key>'}
};
fetch('https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory', 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/GetReturnInventory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"returnInventoryId": 123
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}此頁面由 AI 自動翻譯。API 技術規格以英文呈現為標準。如有任何疑問,請參閱英文版本。
returnInventoryId 取得單筆退件庫存記錄的完整內容。常於收到 webhook(例如 inventoryCreated)後呼叫,以讀取目前狀態。
庫存圖片
回應中包含returnRequestLineItemImages[] 陣列,列出附加到庫存對應 line item 上的圖片。此端點回傳的是 S3 key,而非 URL —— 要顯示或下載圖片,請以您所在環境的主機名稱與 key 串接出 URL。
條目結構
每筆紀錄提供同一張圖片的四種尺寸變體,方便您按 UI 用途選用:| 欄位 | 典型用途 |
|---|---|
s3SmallFileKey | 列表視圖的縮圖 |
s3MediumFileKey | 詳細視圖的預覽 |
s3LargeFileKey | 全螢幕預覽 |
s3OriginalFileKey | 原始上傳(最大;僅在需要未縮放圖時使用) |
構造 URL
依環境選擇主機名稱:| 環境 | 圖片主機名稱 |
|---|---|
| 沙箱(UAT) | rr-dev-files.returnshelper.com |
| 生產 | file.returnhelpercentre.com |
URL = "https://" + <圖片主機名稱> + "/" + <key>
s3MediumFileKey = "img/returns/202606/27_1000040536_lmpiohbx.5n3_medium.jpg"
↓ 串接
URL = "https://file.returnhelpercentre.com/img/returns/202606/27_1000040536_lmpiohbx.5n3_medium.jpg"
請將路徑視為不透明。 Return Helper 過去曾使用多種路徑前綴(例如
img/returns/... 與 images/returns/...);只有主機名稱是穩定的。請勿解析、驗證或對路徑/檔名做任何模式比對。returnRequestLineItemImages: []。
此端點回傳的是查詢當下的狀態。如需在倉庫人員新增、替換或移除圖片時即時收到通知,請訂閱
changeLineItemImage webhook,而非反覆輪詢此端點。相關
- 依 Line Item Id 取得退貨庫存 —— 回應結構相同,但以 line item ID 查詢。
- Image Updated webhook —— 圖片變更的即時通知。
- VAS Updated webhook —— VAS 結果圖片的即時通知。
⌘I