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": {}
}
}庫存
將庫存加入 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": {}
}
}此頁面由 AI 自動翻譯。API 技術規格以英文呈現為標準。如有任何疑問,請參閱英文版本。
returnInventoryId)和 FBA 庫存(依 FNSKU)加入 CREATED 狀態的訂單。可傳送 returnInventoryIdList、fnskuList 或兩者。請在 建立 Consolidate Shipping Order 與 確認 Consolidate Shipping Order 之間使用。
| 規則 | RMA 明細 | FNSKU 明細 |
|---|---|---|
| 每次請求 | 最多 1500 | 最多 1500,fnsku 不可重複 |
| 每張訂單 | RMA 最多 1500 | 不同 FNSKU 最多 1500 |
| 條件 | handlingCode 為 ohd 或 tbc,handlingStatusCode 為 pending,且位於訂單的 outboundWarehouseId | quantity 不可超過訂單 outboundWarehouseId 的可用庫存 |
| 再次加入 | 不允許 | 累加到現有明細:5 件的明細再加 3 件變為 8 件 |
meta.error 訊息 | 原因 |
|---|---|
Either returnInventoryIdList or fnskuList must be provided. | 兩個列表皆為空 |
Fnsku {fnsku} does not exist or not in warehouse {id} | 出貨倉庫沒有該 FNSKU 的庫存 |
Fnsku {fnsku} has {n} available in warehouse {id}, but the request takes {quantity} | 庫存不足 |
The order would hold {n} distinct fnsku, which must be less than or equal to 1500 | 達到訂單上限 |
Add inventory is only allowed if the order status is CREATED | 狀態不正確 |
授權
Your API key
Your API token — keep this private
主體
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
回應
Success
Consolidate shipping inventory ID (ULID)
ULID
可用選項:
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.