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 技术规格以英文呈现为标准。如有任何疑问,请参阅英文版本。
CREATED 状态的订单加入 Return Inventory(按 returnInventoryId)和 FBA 库存(按 FNSKU)。可发送 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.