Get return inventory by line item ID
curl --request GET \
--url https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventoryByLineItemId \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventoryByLineItemId"
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/GetReturnInventoryByLineItemId', 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/GetReturnInventoryByLineItemId",
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/GetReturnInventoryByLineItemId"
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/GetReturnInventoryByLineItemId")
.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/GetReturnInventoryByLineItemId")
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": {}
}
}ReturnInventory
Get return inventory by line item ID
GET
/
api
/
ReturnInventory
/
GetReturnInventoryByLineItemId
Get return inventory by line item ID
curl --request GET \
--url https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventoryByLineItemId \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.returnshelper.com/uat/user/api/ReturnInventory/GetReturnInventoryByLineItemId"
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/GetReturnInventoryByLineItemId', 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/GetReturnInventoryByLineItemId",
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/GetReturnInventoryByLineItemId"
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/GetReturnInventoryByLineItemId")
.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/GetReturnInventoryByLineItemId")
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": {}
}
}Fetches return inventory record(s) tied to a specific return-request line item ID. Use this when you have the line-item reference from a return request and need the inventory state.
Formula:
Production example:
The key already contains the full S3 path. Constructed URLs are publicly fetchable, require no authentication header, and do not expire. URLs and content are safe to cache client-side.
Empty state:
Inventory photos
The response includes areturnRequestLineItemImages[] array of photos attached to the line item. The endpoint returns S3 keys, not URLs — to display or fetch a photo, build a URL by concatenating the environment-specific hostname with the key.
Entry shape
Each entry exposes four resized variants of the same photo, so you can pick the right one for your UI:| Field | Typical use |
|---|---|
s3SmallFileKey | Thumbnails in list views |
s3MediumFileKey | Preview in detail views |
s3LargeFileKey | Full-screen preview |
s3OriginalFileKey | Original upload (largest; only when you need the unscaled image) |
URL construction
Hostname per environment:| Environment | Photo hostname |
|---|---|
| Sandbox (UAT) | rr-dev-files.returnshelper.com |
| Production | file.returnhelpercentre.com |
URL = "https://" + <photo hostname> + "/" + <key>
s3MediumFileKey = "img/returns/202606/27_1000040536_lmpiohbx.5n3_medium.jpg"
↓ concatenate
URL = "https://file.returnhelpercentre.com/img/returns/202606/27_1000040536_lmpiohbx.5n3_medium.jpg"
Treat the path as opaque. Return Helper has historically used multiple path prefixes (e.g.
img/returns/... and images/returns/...); only the hostname is guaranteed stable. Never parse, validate, or pattern-match the path or filename.returnRequestLineItemImages: null for this endpoint (compared to [] on Get Return Inventory). Treat both as “no photos”.
This endpoint reflects the current state at query time. For real-time notifications when warehouse staff add, replace, or remove photos, subscribe to the
changeLineItemImage webhook rather than polling.Related
- Get Return Inventory — same response shape, queryable by inventory ID.
- Image Updated webhook — real-time photo change notifications.
- VAS Updated webhook — real-time VAS result photo notifications.