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 明細 |
|---|---|---|
| 1 リクエストあたり | 最大 1500 | 最大 1500、fnsku の重複不可 |
| 1 注文あたり | 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.