Add inventory to consolidate shipping order
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/add \
--header 'Content-Type: application/json' \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>' \
--data '
{
"consolidateShippingOrderId": "<string>",
"returnInventoryIdList": [
123
],
"fnskuList": [
{
"fnsku": "<string>",
"quantity": 2
}
]
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/add"
payload = {
"consolidateShippingOrderId": "<string>",
"returnInventoryIdList": [123],
"fnskuList": [
{
"fnsku": "<string>",
"quantity": 2
}
]
}
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({
consolidateShippingOrderId: '<string>',
returnInventoryIdList: [123],
fnskuList: [{fnsku: '<string>', quantity: 2}]
})
};
fetch('https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/add', 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/outbound/consolidateShipping/inventory/add",
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([
'consolidateShippingOrderId' => '<string>',
'returnInventoryIdList' => [
123
],
'fnskuList' => [
[
'fnsku' => '<string>',
'quantity' => 2
]
]
]),
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/outbound/consolidateShipping/inventory/add"
payload := strings.NewReader("{\n \"consolidateShippingOrderId\": \"<string>\",\n \"returnInventoryIdList\": [\n 123\n ],\n \"fnskuList\": [\n {\n \"fnsku\": \"<string>\",\n \"quantity\": 2\n }\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/outbound/consolidateShipping/inventory/add")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"consolidateShippingOrderId\": \"<string>\",\n \"returnInventoryIdList\": [\n 123\n ],\n \"fnskuList\": [\n {\n \"fnsku\": \"<string>\",\n \"quantity\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/add")
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 \"consolidateShippingOrderId\": \"<string>\",\n \"returnInventoryIdList\": [\n 123\n ],\n \"fnskuList\": [\n {\n \"fnsku\": \"<string>\",\n \"quantity\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"consolidateShippingInventoryId": "<string>",
"consolidateShippingOrderId": "<string>",
"itemType": "RMA",
"returnInventoryId": 123,
"rma": "<string>",
"fnsku": "<string>",
"quantity": 123,
"consolidateShippingInventoryStatus": "<string>"
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}Inventory
Add inventory to consolidate shipping order
POST
/
api
/
outbound
/
consolidateShipping
/
inventory
/
add
Add inventory to consolidate shipping order
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/add \
--header 'Content-Type: application/json' \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>' \
--data '
{
"consolidateShippingOrderId": "<string>",
"returnInventoryIdList": [
123
],
"fnskuList": [
{
"fnsku": "<string>",
"quantity": 2
}
]
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/add"
payload = {
"consolidateShippingOrderId": "<string>",
"returnInventoryIdList": [123],
"fnskuList": [
{
"fnsku": "<string>",
"quantity": 2
}
]
}
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({
consolidateShippingOrderId: '<string>',
returnInventoryIdList: [123],
fnskuList: [{fnsku: '<string>', quantity: 2}]
})
};
fetch('https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/add', 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/outbound/consolidateShipping/inventory/add",
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([
'consolidateShippingOrderId' => '<string>',
'returnInventoryIdList' => [
123
],
'fnskuList' => [
[
'fnsku' => '<string>',
'quantity' => 2
]
]
]),
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/outbound/consolidateShipping/inventory/add"
payload := strings.NewReader("{\n \"consolidateShippingOrderId\": \"<string>\",\n \"returnInventoryIdList\": [\n 123\n ],\n \"fnskuList\": [\n {\n \"fnsku\": \"<string>\",\n \"quantity\": 2\n }\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/outbound/consolidateShipping/inventory/add")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"consolidateShippingOrderId\": \"<string>\",\n \"returnInventoryIdList\": [\n 123\n ],\n \"fnskuList\": [\n {\n \"fnsku\": \"<string>\",\n \"quantity\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/add")
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 \"consolidateShippingOrderId\": \"<string>\",\n \"returnInventoryIdList\": [\n 123\n ],\n \"fnskuList\": [\n {\n \"fnsku\": \"<string>\",\n \"quantity\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"consolidateShippingInventoryId": "<string>",
"consolidateShippingOrderId": "<string>",
"itemType": "RMA",
"returnInventoryId": 123,
"rma": "<string>",
"fnsku": "<string>",
"quantity": 123,
"consolidateShippingInventoryStatus": "<string>"
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}Adds return inventory (by
returnInventoryId) and FBA inventory (by FNSKU) to an order in CREATED status. Send returnInventoryIdList, fnskuList, or both. Use this between Create consolidate shipping order and Confirm consolidate shipping order.
| Rule | RMA lines | FNSKU lines |
|---|---|---|
| Per request | Up to 1500 | Up to 1500, no duplicate fnsku |
| Per order | Up to 1500 RMAs | Up to 1500 distinct FNSKUs |
| Eligibility | handlingCode ohd or tbc, handlingStatusCode pending, in the order’s outboundWarehouseId | quantity must not exceed the available stock in the order’s outboundWarehouseId |
| Adding again | Not allowed | Adds to the existing line: a line of 5 becomes 8 after adding 3 |
meta.error message | Cause |
|---|---|
Either returnInventoryIdList or fnskuList must be provided. | Both lists are empty |
Fnsku {fnsku} does not exist or not in warehouse {id} | No stock of that FNSKU in the outbound warehouse |
Fnsku {fnsku} has {n} available in warehouse {id}, but the request takes {quantity} | Not enough stock |
The order would hold {n} distinct fnsku, which must be less than or equal to 1500 | Order limit reached |
Add inventory is only allowed if the order status is CREATED | Wrong status |
Authorizations
Your API key
Your API token — keep this private
Body
application/json
Consolidate shipping order ID (ULID)
Return inventory IDs (RMA lines). Send this, fnskuList, or both.
Maximum array length:
1500FNSKU lines. No duplicate fnsku. Send this, returnInventoryIdList, or both.
Maximum array length:
1500Show child attributes
Show child attributes
Response
Success
Consolidate shipping inventory ID (ULID)
ULID
Available options:
RMA, FNSKU RMA lines only; null on FNSKU lines
RMA lines only
FNSKU lines only
Pieces the line holds after the add. Always 1 for RMA lines.