Remove inventory from consolidate shipping order
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/remove \
--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/remove"
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/remove', 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/remove",
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/remove"
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/remove")
.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/remove")
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{
"itemType": "RMA",
"returnInventoryId": 123,
"fnsku": "<string>",
"quantity": 123,
"handlingCode": "<string>",
"handlingStatusCode": "<string>"
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}在庫
Consolidate Shipping Order から在庫を削除
POST
/
api
/
outbound
/
consolidateShipping
/
inventory
/
remove
Remove inventory from consolidate shipping order
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/outbound/consolidateShipping/inventory/remove \
--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/remove"
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/remove', 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/remove",
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/remove"
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/remove")
.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/remove")
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{
"itemType": "RMA",
"returnInventoryId": 123,
"fnsku": "<string>",
"quantity": 123,
"handlingCode": "<string>",
"handlingStatusCode": "<string>"
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}このページはAIによって自動翻訳されています。API技術仕様は英語が正式です。不明点がある場合は英語版を参照してください。
CREATED ステータスの注文(Consolidate Shipping Order を確定 を呼び出す前)から明細を削除します。returnInventoryIdList、fnskuList、またはその両方を送信してください。
FNSKU 明細では、quantity は削除する個数です。すべて削除すると明細自体が削除されます。削除した個数は在庫に戻ります。
meta.error メッセージ | 原因 |
|---|---|
Either returnInventoryIdList or fnskuList must be provided. | 両方のリストが空 |
Fnsku: {list} not belong to Consolidate Shipping Order: {id} | その FNSKU が注文にない |
Fnsku {fnsku} has {n} on Consolidate Shipping Order {id}, but the request removes {quantity} | 明細の個数を超えている |
Remove 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
利用可能なオプション:
RMA, FNSKU RMA lines only; null on FNSKU lines
FNSKU lines only
Pieces the line still holds; 0 once the line is removed
RMA lines only
RMA lines only