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[] 数组,列出附加到库存对应行项目上的图片。该端点返回的是 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