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

# SKU 在庫の件数を取得

> Enterprise-only. Returns the number of warehouse-SKU rows that match the same filters accepted by Search SKU inventory. The same SKU across N warehouses counts as N rows. Use it to size pagination before walking the cursor. Accepts only the optional `warehouseIdList` and `skuList` filters — there is no `pageSize`, `cursor`, or `isForward`.

<Warning>
  このページはAIによって自動翻訳されています。API技術仕様は英語が正式です。不明点がある場合は[英語版](/api-reference/skuinventory/search-sku-inventory-total-count)を参照してください。
</Warning>

<Note>
  これは **Enterprise 専用** 機能で、Return Helper Enterprise のお客様のみ有効です。本サービスの料金については、[enterprise-solution@returnhelper.com](mailto:enterprise-solution@returnhelper.com) までお問い合わせください。
</Note>

[SKU 在庫を検索](/ja/api-reference/skuinventory/search-sku-inventory)と同じフィルタに一致する「倉庫-SKU」行の数を返します。カーソルをたどる前にページネーションの規模を見積もるために使用します。

<h2 id="what-is-counted">
  数えられる対象
</h2>

`totalNumberOfRecords` は、相異なる SKU 値の数ではなく\*\*「倉庫-SKU」行\*\*を数えます。3 つの倉庫に在庫がある SKU は 3 としてカウントされます。これは、Search SKU inventory が同じフィルタでページネーションする対象とまったく同じです。

<h2 id="related">
  関連
</h2>

* [SKU 在庫を検索](/ja/api-reference/skuinventory/search-sku-inventory) — 一致する「倉庫-SKU」行をページ送りします。


## OpenAPI

````yaml get /api/skuInventory/searchTotalCount
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/skuInventory/searchTotalCount:
    get:
      tags:
        - SkuInventory
      summary: Count SKU inventory rows
      description: >-
        Enterprise-only. Returns the number of warehouse-SKU rows that match the
        same filters accepted by Search SKU inventory. The same SKU across N
        warehouses counts as N rows. Use it to size pagination before walking
        the cursor. Accepts only the optional `warehouseIdList` and `skuList`
        filters — there is no `pageSize`, `cursor`, or `isForward`.
      operationId: ReturnUserApi_SearchSkuInventoryTotalCount
      parameters:
        - name: warehouseIdList
          in: query
          required: false
          schema:
            type: string
          description: >-
            Comma-separated list of warehouse IDs to filter by (e.g.
            `1001,1002`). Same rules as Search SKU inventory: positive integers,
            no duplicates, at most 100 entries, each owned by the authenticated
            account. Omit to count rows across all owned warehouses. Optional.
        - name: skuList
          in: query
          required: false
          schema:
            type: string
          description: >-
            Comma-separated list of SKUs to filter by (e.g. `SKU-006,SKU-001`).
            Same rules as Search SKU inventory: at most 100 entries, each
            matching the SKU pattern (alphanumerics plus `#`, `-`, `_`; maximum
            32 characters), matched after trim and uppercase normalization. Omit
            to count all SKUs. Optional.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkuInventorySearchTotalCountResponse'
        '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:
    SkuInventorySearchTotalCountResponse:
      type: object
      description: >-
        Total-count companion to Search SKU inventory. `totalNumberOfRecords` is
        returned as a top-level field alongside the standard `correlationId` and
        `meta` envelope.
      properties:
        totalNumberOfRecords:
          type: integer
          format: int32
          description: >-
            Number of matching warehouse-SKU rows for the same filters (the same
            SKU across N warehouses counts as N rows), not the number of
            distinct SKU values.
    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'
    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

````