Get shipping fees from origin location
curl --request GET \
--url https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption"
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-rr-apikey': '<api-key>', 'x-rr-apitoken': '<api-key>'}
};
fetch('https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption', 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/Shipment/getShippingFeeListByFromShippingOption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"shippingFeeDetailList": [
{}
]
}
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}退件運貨單
依起始位置取得 Shipping Fees
GET
/
api
/
Shipment
/
getShippingFeeListByFromShippingOption
Get shipping fees from origin location
curl --request GET \
--url https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption"
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-rr-apikey': '<api-key>', 'x-rr-apitoken': '<api-key>'}
};
fetch('https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption', 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/Shipment/getShippingFeeListByFromShippingOption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/Shipment/getShippingFeeListByFromShippingOption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"shippingFeeDetailList": [
{}
]
}
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}此頁面由 AI 自動翻譯。API 技術規格以英文呈現為標準。如有任何疑問,請參閱英文版本。
/api/ServiceType/* 查詢的「含費用」對應,在 建立 Return Shipment 之前預覽費用。預覽階段不保證最終費率,但相同輸入通常會在建立 Shipment 時產生相同費用。
此端點公開的是 Return 目錄加上費用。Resend 出庫服務不適用此端點 — 請改用 依目的地取得 Resend Shipping Fees 預覽 Resend 費用。
何時呼叫
- 為已知尺寸與重量的包裹挑選最便宜的退貨價格。
- 整合測試時,確認帳戶在指定國家下已開通的退件服務。
必要參數
fromCountryCode— 必填,小寫 ISO3(例如usa、gbr)。可用值見 取得所有起始國家。fromPostalCode— 必填,非空。weight、dimension1、dimension2、dimension3— 全部必填且必須> 0。limit— 選填,上限50。省略時不設限制(回應由可用服務數量限制)。
回應備註
- 每筆紀錄包含
serviceTypeCode、serviceType(顯示名稱)、warehouseId(接收退件的 Warehouse)、currencyCode與fee。 - 列表會過濾為該起始位置下您帳戶已授權的退件服務。空回應表示該起始位置下沒有符合該尺寸/重量的服務。
chargeableWeight為承運商實際計費的重量,可能因材積重量進位而高於實際weight。
相關
- 建立 Return Shipment — 使用所選
serviceTypeCode。 - 取得所有 Return Service Types — 不依尺寸/重量篩選的完整退件服務列表。
- 依起始與目的國家取得 Return Service Types 與 依起始國家與 Warehouse 取得 Return Service Types — 不含費用估算的較窄查詢。
- 取得所有國家 與 取得所有起始國家 — 有效國家代碼。
授權
Your API key
Your API token — keep this private
查詢參數
ISO3 origin country code
Origin postal code
Parcel weight
Length (longest dimension)
Width (second longest dimension)
Height (shortest dimension)
Maximum number of results
必填範圍:
0 <= x <= 50回應
Success
Shipping fee summary
Show child attributes
Show child attributes