> ## 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.

# 建立 FBA Shipment

<Warning>
  此頁面由 AI 自動翻譯。API 技術規格以英文呈現為標準。如有任何疑問，請參閱[英文版本](/api-reference/fbashipment/create-fba-shipment)。
</Warning>

登記一個或多個入庫 FBA 運貨單——即告訴 Return Helper「亞馬遜已用此追蹤號將一個 Removal Order 派送至此倉庫，請準備接收。」此為中繼資料登記：不會建立面單，亦不觸發實體動作；僅讓倉庫在包裹抵達時能將之與您的 Removal Order 對應起來。

## 何時呼叫

* 在 Amazon Seller Central（或 SP-API）建立 Removal Order 後，取得承運商指派的追蹤號即可呼叫。
* 一個 Removal Order 中每個運貨單呼叫一次——亞馬遜常將單一 Removal Order 拆為多個不同追蹤號的包裹；每個追蹤號建一個 FBA 運貨單。

## 必填欄位

`createFbaShipmentPayloadList` 中每筆紀錄：

* **`trackingNumber`** — 非空、單行，必須符合公認的追蹤號格式。**全域唯一**——不可重用已存在於未過期 FBA 運貨單紀錄中的追蹤號。
* **`removalOrderId`** — 亞馬遜 Removal Order ID（例如 `WS-1234567`）。單行，格式有效。
* **`warehouseId`** — FBA 包裹寄往的倉庫，必須是您帳戶已授權的倉庫。可透過 [取得使用者可存取的所有倉庫](/zh-Hant/api-reference/warehouse/get-all-warehouses-accessible-to-user) 取得。

## 跨 payload 規則

* **同一批次內 `trackingNumber` 不可重複。**
* **同一 `removalOrderId` 在批次內必須對應同一 `warehouseId`**——不能在同一次呼叫中說「Removal Order WS-1 → 倉庫 5」又說「Removal Order WS-1 → 倉庫 7」。

## 副作用

* 每筆 payload 會建立一筆 `FbaShipment` 紀錄，將追蹤號、Removal Order 與目的倉庫連結。
* 包裹實際抵達時，倉庫會用這些紀錄進行比對並觸發 `fbaShipmentArrived` webhook。
* 不會產生面單——出貨方是亞馬遜，不是您。

## 相關

* [取得 FBA 運貨單詳情](/zh-Hant/api-reference/fbashipment/get-fba-shipment-details) — 當 webhook 提及您未快取的 `fbaShipmentId` 時，依 ID 取得單筆紀錄。
* [建立 FBA 指示](/zh-Hant/api-reference/fbainstruction/create-fba-instructions) — 包裹抵達後（由 webhook 通知），指示倉庫如何處置庫存（銷毀、召回、補貨等）。
* [Webhooks](/zh-Hant/webhooks) — FBA 運貨單生命週期（到貨、指示完成等）僅透過 webhook 推送。


## OpenAPI

````yaml post /api/Fba/FbaShipment/create
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/Fba/FbaShipment/create:
    post:
      tags:
        - FbaShipment
      summary: Create FBA shipment
      operationId: ReturnUserApi_FbaShipment_Create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreateFbaShipmentRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralList_UserCreateFbaShipmentReply'
        '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:
    UserCreateFbaShipmentRequest:
      type: object
      properties:
        createFbaShipmentPayloadList:
          type: array
          items:
            $ref: '#/components/schemas/CreateFbaShipmentPayload'
          description: List of FBA shipment creation payloads
      required:
        - createFbaShipmentPayloadList
    GeneralList_UserCreateFbaShipmentReply:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/UserCreateFbaShipmentReply'
          description: List of created FBA shipments
    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'
    CreateFbaShipmentPayload:
      type: object
      properties:
        removalOrderId:
          type: string
          description: Amazon removal order ID
        trackingNumber:
          type: string
          description: Shipment tracking number (converted to uppercase)
        warehouseId:
          type: integer
          description: Warehouse where the FBA shipment will be received
      required:
        - trackingNumber
        - warehouseId
    UserCreateFbaShipmentReply:
      type: object
      properties:
        fbaShipmentId:
          type: string
          format: uuid
        apiId:
          type: integer
          format: int32
        warehouseId:
          type: integer
          format: int32
        fbaShipmentStatusCode:
          type:
            - string
            - 'null'
        removalOrderId:
          type:
            - string
            - 'null'
        trackingNumber:
          type:
            - string
            - 'null'
        arrivalOn:
          type:
            - string
            - 'null'
          format: date-time
        createOn:
          type: string
          format: date-time
    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

````