Get RMA images
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/ReturnInventory/getRmaImages \
--header 'Content-Type: application/json' \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>' \
--data '
{
"rmaList": [
"RMA-1001",
"RMA-1002",
"RMA-MISSING"
]
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnInventory/getRmaImages"
payload = { "rmaList": ["RMA-1001", "RMA-1002", "RMA-MISSING"] }
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({rmaList: ['RMA-1001', 'RMA-1002', 'RMA-MISSING']})
};
fetch('https://api.returnshelper.com/uat/user/api/ReturnInventory/getRmaImages', 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/getRmaImages",
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([
'rmaList' => [
'RMA-1001',
'RMA-1002',
'RMA-MISSING'
]
]),
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/getRmaImages"
payload := strings.NewReader("{\n \"rmaList\": [\n \"RMA-1001\",\n \"RMA-1002\",\n \"RMA-MISSING\"\n ]\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/getRmaImages")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rmaList\": [\n \"RMA-1001\",\n \"RMA-1002\",\n \"RMA-MISSING\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/ReturnInventory/getRmaImages")
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 \"rmaList\": [\n \"RMA-1001\",\n \"RMA-1002\",\n \"RMA-MISSING\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"rmaImageList": [
{
"rma": "RMA-1001",
"imageUrlList": [
"https://images.example.com/returns/front.jpg",
"https://images.example.com/returns/back.jpg"
]
},
{
"rma": "RMA-1002",
"imageUrlList": []
}
]
}
}退貨庫存
取得 RMA 圖片
POST
/
api
/
ReturnInventory
/
getRmaImages
Get RMA images
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/ReturnInventory/getRmaImages \
--header 'Content-Type: application/json' \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>' \
--data '
{
"rmaList": [
"RMA-1001",
"RMA-1002",
"RMA-MISSING"
]
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnInventory/getRmaImages"
payload = { "rmaList": ["RMA-1001", "RMA-1002", "RMA-MISSING"] }
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({rmaList: ['RMA-1001', 'RMA-1002', 'RMA-MISSING']})
};
fetch('https://api.returnshelper.com/uat/user/api/ReturnInventory/getRmaImages', 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/getRmaImages",
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([
'rmaList' => [
'RMA-1001',
'RMA-1002',
'RMA-MISSING'
]
]),
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/getRmaImages"
payload := strings.NewReader("{\n \"rmaList\": [\n \"RMA-1001\",\n \"RMA-1002\",\n \"RMA-MISSING\"\n ]\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/getRmaImages")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rmaList\": [\n \"RMA-1001\",\n \"RMA-1002\",\n \"RMA-MISSING\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/ReturnInventory/getRmaImages")
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 \"rmaList\": [\n \"RMA-1001\",\n \"RMA-1002\",\n \"RMA-MISSING\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"rmaImageList": [
{
"rma": "RMA-1001",
"imageUrlList": [
"https://images.example.com/returns/front.jpg",
"https://images.example.com/returns/back.jpg"
]
},
{
"rma": "RMA-1002",
"imageUrlList": []
}
]
}
}此頁面由 AI 自動翻譯。API
技術規格以英文呈現為標準。如有任何疑問,請參閱英文版本。
請求
在rmaList 中提供 1 至 500 個 RMA 代碼。此上限依移除重複項目之前提交的筆數計算。
比對不區分大小寫,且必須完全相符。重複的代碼(包括大小寫不同的代碼)只會回傳一次。相符的 RMA 以儲存時的大小寫,依其在請求中首次出現的順序回傳。
回應
data.rmaImageList包含已驗證帳戶中相符的 Return Inventory RMA。imageUrlList包含與相符 RMA 關聯的有效原始圖片 URL。如果相符的 RMA 沒有符合條件的圖片,其imageUrlList為空。- 不存在的 RMA 與已驗證帳戶無法存取的 RMA 會被省略。如果沒有相符項目,
rmaImageList為空。 - 結果不分頁,在一個回應中回傳。API 不會透過相關的父層或根 RMA 查找圖片。
回應範例
{
"correlationId": "example-trace-id",
"meta": {
"status": 200,
"data": {},
"errorCode": null,
"error": {}
},
"data": {
"rmaImageList": [
{
"rma": "RMA-1001",
"imageUrlList": ["https://images.example.com/returns/front.jpg"]
},
{
"rma": "RMA-1002",
"imageUrlList": []
}
]
}
}
授權
主體
application/json