> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.returnhelper.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 按起始位置获取 Shipping Fees

<Warning>
  此页面由 AI 自动翻译。API 技术规格以英文呈现为标准。如有任何疑问，请参阅[英文版本](/api-reference/shipment/get-shipping-fees-from-origin-location)。
</Warning>

针对指定的起始位置（国家 + 邮编）与包裹尺寸／重量，返回可用的 **Return Service Types** 并**附带费用估算**。可作为其他 `/api/ServiceType/*` 查询的「含费用」对应，在 [创建 Return Shipment](/zh-Hans/api-reference/returnshipment/create-return-shipment) 之前预览费用。预览阶段不保证最终费率，但相同输入通常会在创建 Shipment 时产生相同费用。

此端点公开的是 **Return** 目录加上费用。**Resend** 出库服务不适用此端点 — 请改用 [按目的地获取 Resend Shipping Fees](/zh-Hans/api-reference/resend/get-resend-shipping-fees-by-destination) 预览 Resend 费用。

<h2 id="when-to-call">
  何时调用
</h2>

* 为已知尺寸与重量的包裹挑选最便宜的退货价格。
* 集成测试时，确认账户在指定国家下已开通的退件服务。

<h2 id="required-parameters">
  必要参数
</h2>

* **`fromCountryCode`** — 必填，**小写 ISO3**（例如 `usa`、`gbr`）。可用值见 [获取所有起始国家](/zh-Hans/api-reference/country/get-all-from-countries-origin-countries)。
* **`fromPostalCode`** — 必填，非空。
* **`weight`、`dimension1`、`dimension2`、`dimension3`** — 全部必填且必须 `> 0`。
* **`limit`** — 选填，上限 `50`。省略时不限制（响应会受可用服务数量限制）。

<h2 id="response-notes">
  响应说明
</h2>

* 每条记录包含 `serviceTypeCode`、`serviceType`（显示名称）、`warehouseId`（接收退件的 Warehouse）、`currencyCode` 与 `fee`。
* 列表会过滤为该起始位置下您账户已授权的退件服务。空响应表示该起始位置下没有符合该尺寸／重量的服务。
* `chargeableWeight` 是承运商实际计费的重量，可能因体积重量进位而高于实际 `weight`。

<h2 id="related">
  相关
</h2>

* [创建 Return Shipment](/zh-Hans/api-reference/returnshipment/create-return-shipment) — 使用所选 `serviceTypeCode`。
* [获取所有 Return Service Types](/zh-Hans/api-reference/servicetype/get-all-return-service-types) — 不按尺寸／重量过滤的完整退件服务列表。
* [按起始与目的国家获取 Return Service Types](/zh-Hans/api-reference/servicetype/get-service-types-by-origin-and-destination-countries) 与 [按起始国家与 Warehouse 获取 Return Service Types](/zh-Hans/api-reference/servicetype/get-service-types-by-origin-country-and-warehouse) — 不含费用估算的较窄查询。
* [获取所有国家](/zh-Hans/api-reference/country/get-all-countries) 与 [获取所有起始国家](/zh-Hans/api-reference/country/get-all-from-countries-origin-countries) — 有效国家代码。


## OpenAPI

````yaml get /api/Shipment/getShippingFeeListByFromShippingOption
openapi: 3.1.0
info:
  title: Return Helper API
  description: API documentation for Return Helper — covering User and Public endpoints.
  version: 1.0.0
servers:
  - url: https://api.returnshelper.com/uat/user
    description: Sandbox — User API
  - url: https://api.returnshelper.com/uat/public
    description: Sandbox — Public API
  - url: https://api.returnhelpercentre.com/v1/user
    description: Production — User API
  - url: https://api.returnhelpercentre.com/v1/public
    description: Production — Public API
  - url: https://api.returnhelperchina.com/user
    description: Production — User API (China)
security:
  - ApiKey: []
    ApiToken: []
paths:
  /api/Shipment/getShippingFeeListByFromShippingOption:
    get:
      tags:
        - Shipment
      summary: Get shipping fees from origin location
      operationId: ReturnUserApi_GetShippingFeeListByFromShippingOption
      parameters:
        - name: fromCountryCode
          in: query
          required: true
          schema:
            type: string
          description: ISO3 origin country code
        - name: fromPostalCode
          in: query
          required: true
          schema:
            type: string
          description: Origin postal code
        - name: weight
          in: query
          required: true
          schema:
            type: number
            format: decimal
          description: Parcel weight
        - name: dimension1
          in: query
          required: true
          schema:
            type: number
            format: decimal
          description: Length (longest dimension)
        - name: dimension2
          in: query
          required: true
          schema:
            type: number
            format: decimal
          description: Width (second longest dimension)
        - name: dimension3
          in: query
          required: true
          schema:
            type: number
            format: decimal
          description: Height (shortest dimension)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            maximum: 50
            minimum: 0
          description: Maximum number of results
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralShippingFeeSummaryReply'
        '401':
          description: >-
            Authentication failed. Returned when the `x-rr-apikey` or
            `x-rr-apitoken` header is missing or invalid. The body uses the
            standard `ApiResponse` envelope with `meta.error.message` describing
            the auth failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
      security:
        - ApiKey: []
          ApiToken: []
      servers:
        - url: https://api.returnshelper.com/uat/user
          description: Sandbox — User API
components:
  schemas:
    GeneralShippingFeeSummaryReply:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ShippingFeeSummaryReply'
          description: Shipping fee summary
    ApiResponse:
      type: object
      description: >-
        Universal response envelope. Successful responses include the business
        payload as additional top-level fields alongside `correlationId` and
        `meta`. Failed responses (auth errors, validation errors) only populate
        `correlationId` and `meta`, with `meta.errorCode` and `meta.error`
        describing the failure.
      properties:
        correlationId:
          type:
            - string
            - 'null'
          description: >-
            Unique correlation ID for tracing the request through Return Helper
            systems.
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
    ShippingFeeSummaryReply:
      type: object
      properties:
        shippingFeeDetailList:
          type: array
          items:
            type: object
            description: '(see source: ShippingFeeDetailReply)'
    ApiResponseMeta:
      type: object
      description: >-
        Application-level metadata for every API response. Inspect `status` and
        `errorCode` to detect soft-error responses (validation failures arrive
        as HTTP 200 with `meta.status: 400`).
      properties:
        status:
          type: integer
          description: >-
            Application-level status code. For successful operations this
            mirrors the HTTP status (e.g. 200). For validation failures it
            reports the logical status (e.g. 400) even though the wire HTTP
            status is 200.
        data:
          type: object
          additionalProperties:
            type: string
          description: Reserved free-form metadata key/value pairs. Usually empty.
        errorCode:
          type:
            - string
            - 'null'
          description: >-
            Machine-readable error code (e.g. `VALIDATION_FAILED`). Non-null
            only when the operation failed.
        error:
          type: object
          additionalProperties: true
          description: >-
            Field-level or message-level error detail keyed by request property
            name. Empty object on success.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-rr-apikey
      description: Your API key
    ApiToken:
      type: apiKey
      in: header
      name: x-rr-apitoken
      description: Your API token — keep this private

````