> ## 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-Hans/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-Hans/api-reference/fbashipment/get-fba-shipment-details) — 当 webhook 提及您未缓存的 `fbaShipmentId` 时，按 ID 取得单笔记录。
* [建立 FBA 指示](/zh-Hans/api-reference/fbainstruction/create-fba-instructions) — 包裹抵达后（由 webhook 通知），指示仓库如何处置库存（销毁、召回、补货等）。
* [Webhooks](/zh-Hans/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

````