---
title: ZEPETO.Inventory
slug: world-sdk-guide-ja/zepetoinventory
docTags: 
createdAt: 2026-09-04T05:58:54.807Z
---

| 型                                                   | 説明                                                              |
| --------------------------------------------------- | --------------------------------------------------------------- |
| [InventoryListResponse](./#inventorylistresponse)   | `InventoryListResponse` クラスは、API 呼び出しの結果と、商品インベントリ情報のリストを提供します。 |
| [InventoryRecord](./#inventoryrecord)               | インベントリ内の商品の情報。                                                  |
| [InventoryResponse](./#inventoryresponse)           | `InventoryResponse` クラスは、API 呼び出しの結果と、取得したインベントリ商品の情報を提供します。    |
| [InventoryService](./#inventoryservice)             | `InventoryService` は、プレイヤーの World 内商品インベントリに関連する操作を管理します。       |
| [CheckInventoryRequest](./#checkinventoryrequest)   | ユーザーのインベントリに特定の商品が存在するかどうかを確認するためのクラス。                          |
| [CheckInventoryResponse](./#checkinventoryresponse) | インベントリ内に商品が存在するかどうかの確認に対するレスポンスを表すクラス。                          |
| [InventoryError](./#inventoryerror)                 | インベントリ関連のリクエストが失敗した理由を示すエラーコード。                                 |

## InventoryListResponse

`class` · extends `ProductBaseResponse`

`InventoryListResponse` クラスは、API 呼び出しの結果と、商品インベントリ情報のリストを提供します。

### プロパティ

| 名前       | 型                                         | 説明              |
| -------- | ----------------------------------------- | --------------- |
| products | [InventoryRecord\[\]](./#inventoryrecord) | 商品インベントリ情報のリスト。 |

## InventoryRecord

`class`

インベントリ内の商品の情報。

### プロパティ

| 名前        | 型        | 説明                 |
| --------- | -------- | ------------------ |
| productId | `string` | 商品の ID。            |
| quantity  | `bigint` | 商品の数量。             |
| createdAt | `Date`   | 商品がインベントリに追加された日時。 |
| updatedAt | `Date`   | 商品情報が最後に更新された日時。   |

## InventoryResponse

`class` · extends `ProductBaseResponse`

`InventoryResponse` クラスは、API 呼び出しの結果と、取得したインベントリ商品の情報を提供します。

### プロパティ

| 名前      | 型                                     | 説明             |
| ------- | ------------------------------------- | -------------- |
| product | [InventoryRecord](./#inventoryrecord) | インベントリ内の商品の情報。 |

## InventoryService

`class`

`InventoryService` は、プレイヤーの World 内商品インベントリに関連する操作を管理します。

### メソッド

### GetListAsync

`static GetListAsync() → BaseRequest<InventoryListResponse>`

プレイヤーのインベントリ商品情報のリストを非同期で取得するメソッドです。

**戻り値:** `BaseRequest<InventoryListResponse>` — `BaseRequest` オブジェクト。非同期処理が完了すると、`responseData` プロパティから `InventoryListResponse` オブジェクトにアクセスできます。

### GetAsync

`static GetAsync(productId: string) → BaseRequest<InventoryResponse>`

指定された商品 ID に基づいて、プレイヤーのインベントリ商品情報を非同期で取得するメソッドです。

| パラメーター    | 型        | 説明          |
| --------- | -------- | ----------- |
| productId | `string` | 取得する商品の ID。 |

**戻り値:** `BaseRequest<InventoryResponse>` — `BaseRequest` オブジェクト。非同期処理が完了すると、`responseData` プロパティから `InventoryResponse` オブジェクトにアクセスできます。

### HasAsync

`static HasAsync(productId: string) → CheckInventoryRequest`

プレイヤーのインベントリに商品が存在するかどうかを非同期で確認するメソッドです。

| パラメーター    | 型        | 説明          |
| --------- | -------- | ----------- |
| productId | `string` | 確認する商品の ID。 |

**戻り値:** [CheckInventoryRequest](./#checkinventoryrequest) — `CheckInventoryRequest` オブジェクト。非同期処理が完了すると、`responseData` プロパティから `CheckInventoryResponse` オブジェクトにアクセスできます。

## CheckInventoryRequest

`class` · extends `BaseAPIRequest`

ユーザーのインベントリに特定の商品が存在するかどうかを確認するためのクラス。

### プロパティ

| 名前           | 型                                                   | 説明                                |
| ------------ | --------------------------------------------------- | --------------------------------- |
| responseData | [CheckInventoryResponse](./#checkinventoryresponse) | CheckInventoryResponse のレスポンスデータ。 |

## CheckInventoryResponse

`class` · extends `ProductBaseResponse`

インベントリ内に商品が存在するかどうかの確認に対するレスポンスを表すクラス。

### プロパティ

| 名前      | 型         | 説明                                 |
| ------- | --------- | ---------------------------------- |
| isExist | `boolean` | 特定の商品がユーザーのインベントリに存在するかどうかを示すブール値。 |

## InventoryError

`enum`

インベントリ関連のリクエストが失敗した理由を示すエラーコード。

| 名前           | 値  | 説明                                  |
| ------------ | -- | ----------------------------------- |
| Unknown      | -1 | エラー: 不明なエラー。                        |
| NetworkError | 0  | エラー: 接続の切断や不安定な接続など、ネットワークに関連するエラー。 |
