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