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

# 以 Seller Reference Number 搜尋 Resend

> Enterprise-only. Returns the resends whose resend shipment carries one of the supplied `sellerReferenceNumber` values.

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

<Note>
  此為 **Enterprise 專屬** 功能，僅對 Return Helper Enterprise 客戶開放。未啟用的帳戶其請求會被拒絕。如需了解更多，請聯絡 [enterprise-solution@returnhelper.com](mailto:enterprise-solution@returnhelper.com)。
</Note>

以您呼叫 [Create resend by SKU](/zh-Hant/api-reference/resend/create-resend-by-sku) 時提供的 `sellerReferenceNumber` 搜尋補寄，並回傳每筆符合結果的 `resendId`。補寄相關操作仍需使用 Return Helper 的 `resendId`——本端點正是取得該值的方式，讓您不必自行儲存 `resendId`。值採**完全比對**，不支援部分比對或萬用字元搜尋。

<h2 id="cancel-a-resend-you-only-know-by-your-own-reference">
  只知道自有參考編號時如何取消補寄
</h2>

1. 以您的 `sellerReferenceNumber` 呼叫本端點。
2. 從結果中讀取 `resendId` 與 `resendStatusCode`，挑選您要處理的補寄。
3. 以該 `resendId` 呼叫 [Cancel resend order](/zh-Hant/api-reference/resend/cancel-resend-order)。

<Note>
  `sellerReferenceNumber` **並非唯一值**。取消後重新建立補寄，會合理地產生多筆帶有相同值的補寄，因此一次搜尋可能回傳多筆結果。請務必先檢查 `resendStatusCode`，再決定要對哪個 `resendId` 執行操作。
</Note>

<h2 id="which-resends-are-searchable">
  哪些補寄可被搜尋
</h2>

以 [Create resend order](/zh-Hant/api-reference/resend/create-resend-order) 建立的補寄不帶 `sellerReferenceNumber`，因此永遠不會出現在本端點的結果中——請改以 `resendId` 透過 [Get resend order details](/zh-Hant/api-reference/resend/get-resend-order-details) 查詢。

<h2 id="matching-status-updates-to-your-own-records">
  將狀態更新對應到您自己的紀錄
</h2>

[重寄狀態更新 webhook](/zh-Hant/webhooks#resend-status-update)（`category: resend` / `action: updateResendStatus`）會在 `resendShipmentList[]` 中帶上 `sellerReferenceNumber`。請訂閱該事件，並在事件送達時與您自己的訂單紀錄比對——這才是追蹤補寄生命週期的建議做法。本搜尋端點則適用於即時查詢，例如在取消前立即查找。

<h2 id="pagination">
  分頁
</h2>

此端點採用**游標式分頁**。每個回應都包含 `nextCursor` 與 `previousCursor`：

* `nextCursor` 是下一頁的游標；已到最後一頁時為 `null`。
* `previousCursor` 是上一頁的游標；在第一頁時為 `null`。

若要向前翻頁，將 `nextCursor` 的值作為 `cursor` 查詢參數傳回，並帶上 `isForward=true`。在同一個分頁序列中，請保持相同的 `pageSize` 與篩選條件。

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

* [以 SKU 建立 Resend](/zh-Hant/api-reference/resend/create-resend-by-sku) — `sellerReferenceNumber` 於此提供。
* [取消補寄訂單](/zh-Hant/api-reference/resend/cancel-resend-order) — 以本端點查得的 `resendId` 取消。
* [Webhooks](/zh-Hant/webhooks) — 重寄狀態更新事件，會一併帶上 `sellerReferenceNumber`。


## OpenAPI

````yaml get /api/Resend/searchResendBySellerReferenceNumber
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/Resend/searchResendBySellerReferenceNumber:
    get:
      tags:
        - Resend
      summary: Search resend by seller reference number
      description: >-
        Enterprise-only. Returns the resends whose resend shipment carries one
        of the supplied `sellerReferenceNumber` values.
      operationId: ReturnUserApi_SearchResendBySellerReferenceNumber
      parameters:
        - name: sellerReferenceNumberList
          in: query
          required: true
          schema:
            type: string
          description: >-
            Comma-separated list of seller reference numbers to match (e.g.
            `ORDER-0001,ORDER-0002`). Required, at least one value. Each value
            must be non-empty, single-line, and 1–50 characters. The number of
            entries must not exceed 100.
        - name: pageSize
          in: query
          required: true
          schema:
            type: integer
            minimum: 1
            maximum: 1000
          description: >-
            Number of resends to return per page. Required. Minimum 1, maximum
            1000.
        - name: resendStatusCode
          in: query
          required: false
          schema:
            type: string
            enum:
              - pending
              - canceled
              - in-progress
              - completed
              - failed
              - queued
              - label-success
          description: >-
            Filter to a single resend status. Not a list. Omit to return resends
            in every status. Optional.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: >-
            Opaque, versioned cursor token. Pass the `nextCursor` (or
            `previousCursor`) from a previous response to fetch the adjacent
            page. Omit to fetch the first page. Optional.
        - name: isForward
          in: query
          required: false
          schema:
            type: boolean
          description: >-
            Pagination direction. Set `true` to page forward through results
            using the returned `nextCursor`. Defaults to `false` when omitted.
            Optional.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SearchResendBySellerReferenceNumberResponse
        '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:
    SearchResendBySellerReferenceNumberResponse:
      type: object
      description: >-
        Cursor-paginated list of resends matching the supplied seller reference
        numbers. The business payload (`nextCursor`, `previousCursor`, `data`)
        is returned as top-level fields alongside the standard `correlationId`
        and `meta` envelope.
      properties:
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Cursor token for the next page, or `null` when there is no next
            page. Pass it back as `cursor` with `isForward=true` to page
            forward.
        previousCursor:
          type:
            - string
            - 'null'
          description: >-
            Cursor token for the previous page, or `null` when there is no
            previous page.
        data:
          type: array
          items:
            $ref: '#/components/schemas/SearchResendBySellerReferenceNumberReply'
          description: Resends for the current page
    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'
    SearchResendBySellerReferenceNumberReply:
      type: object
      properties:
        resendId:
          type: integer
          format: int64
          description: Resend identifier. Pass this to Cancel resend order.
        resendStatusCode:
          type:
            - string
            - 'null'
          description: >-
            Current resend status: `pending`, `canceled`, `in-progress`,
            `completed`, `failed`, `queued`, or `label-success`.
        description:
          type:
            - string
            - 'null'
          description: Free-text description set when the resend was created
        remarks:
          type:
            - string
            - 'null'
          description: Merchant remarks/notes set when the resend was created
        resendShipmentList:
          type: array
          items:
            $ref: '#/components/schemas/ResendShipmentPayload'
          description: Resend shipments belonging to this resend
    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.
    ResendShipmentPayload:
      type: object
      properties:
        resendShipmentId:
          type: integer
          format: int64
        resendId:
          type: integer
          format: int64
        warehouseId:
          type: integer
          format: int32
        resendShipmentNumber:
          type:
            - string
            - 'null'
        sellerReferenceNumber:
          type:
            - string
            - 'null'
          description: >-
            The reference you supplied when creating the resend through Create
            resend by SKU. Not unique — cancelling and re-creating a resend
            produces more than one resend carrying the same value. `null` for
            resends created any other way.
        shipmentServiceType:
          type:
            - string
            - 'null'
        shipmentCountryCode:
          type:
            - string
            - 'null'
          description: Lowercase ISO3
        shipmentName:
          type:
            - string
            - 'null'
        shipmentPhone:
          type:
            - string
            - 'null'
        shipmentFax:
          type:
            - string
            - 'null'
        shipmentEmail:
          type:
            - string
            - 'null'
        shipmentStreet1:
          type:
            - string
            - 'null'
        shipmentStreet2:
          type:
            - string
            - 'null'
        shipmentStreet3:
          type:
            - string
            - 'null'
        shipmentState:
          type:
            - string
            - 'null'
        shipmentCity:
          type:
            - string
            - 'null'
        shipmentPostalCode:
          type:
            - string
            - 'null'
        trackingNumber:
          type:
            - string
            - 'null'
        error:
          type:
            - string
            - 'null'
  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

````