> ## 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 を作成](/ja/api-reference/returnshipment/create-return-shipment) を呼び出す前のプレビューに使用します。プレビュー時点の料金は保証されませんが、同じ入力なら通常は Shipment 作成時に同じ料金になります。

このエンドポイントは **Return** カタログに料金を付与したものを返します。**Resend** の出庫サービスにはこのエンドポイントは適用されません — 代わりに [宛先ごとに Resend Shipping Fees を取得](/ja/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`）。有効な値は [すべての発送元国を取得](/ja/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 を作成](/ja/api-reference/returnshipment/create-return-shipment) — 選択した `serviceTypeCode` を使用。
* [Return Service Types をすべて取得](/ja/api-reference/servicetype/get-all-return-service-types) — サイズ／重量でフィルタしない完全な返品サービス一覧。
* [発送元国／宛先国で Return Service Types を取得](/ja/api-reference/servicetype/get-service-types-by-origin-and-destination-countries) と [発送元国と Warehouse で Return Service Types を取得](/ja/api-reference/servicetype/get-service-types-by-origin-country-and-warehouse) — 料金見積りを伴わないより絞り込んだルックアップ。
* [すべての国を取得](/ja/api-reference/country/get-all-countries) と [すべての発送元国を取得](/ja/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

````