---
title: ZEPETO.Module.Shop
slug: world-sdk-guide-ch/zepetomoduleshop
docTags: 
createdAt: 2026-09-04T06:24:45.629Z
---

| 类型                                                    | 说明                                                                                        |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [ShopService](./#shopservice)                         | `ShopService` 用于执行与 World 内 ZEPETO 商店相关的操作。 该服务使玩家能够访问商店信息，例如已拥有或已加入心愿单的商品缩略图，并向其他玩家赠送礼物。 |
| [CategoryResponse](./#categoryresponse)               | `CategoryResponse` 类提供 API 调用结果以及 ZEPETO 商店的商品分类信息。                                       |
| [ContentItemListResponse](./#contentitemlistresponse) | `ContentItemListResponse` 类提供 API 调用结果以及获取到的商品列表。                                         |
| [ItemKeyword](./#itemkeyword)                         | 商品分类。                                                                                     |
| [ContentItemResponse](./#contentitemresponse)         | `ContentItemResponse` 类提供 API 调用结果以及商品信息。                                                 |
| [GiftBackgroundType](./#giftbackgroundtype)           | 用于礼物通知弹窗的背景类型。                                                                            |
| [ItemGiftResponse](./#itemgiftresponse)               | `ItemGiftResponse` 类提供商品赠送的结果。                                                            |
| [CategoryInfo](./#categoryinfo)                       | ZEPETO 商店的商品分类信息。                                                                         |
| [Category](./#category)                               | 商品分类。                                                                                     |
| [ItemRequestType](./#itemrequesttype)                 | *enum*                                                                                    |

## ShopService

`class`

`ShopService` 用于执行与 World 内 ZEPETO 商店相关的操作。
该服务使玩家能够访问商店信息，例如已拥有或已加入心愿单的商品缩略图，并向其他玩家赠送礼物。

### 方法

### DownloadItemThumbnail

`static DownloadItemThumbnail(itemCode: string) → BaseRequest<TextureResponse>`

该异步方法用于获取商品的缩略图。

| 参数       | 类型       | 说明   |
| -------- | -------- | ---- |
| itemCode | `string` | 商品代码 |

**返回值：** `BaseRequest<TextureResponse>` — 一个 `BaseRequest` 对象。异步处理完成后，可通过 `responseData` 属性访问 `TextureResponse` 对象。

### GetMyCategoryAsync

`static GetMyCategoryAsync() → BaseRequest<CategoryResponse>`

该方法从本地玩家用户账号的 ZEPETO 商店库存中获取商品分类信息。

**返回值：** `BaseRequest<CategoryResponse>` — 一个 `BaseRequest` 对象。异步处理完成后，可通过 `responseData` 属性访问 `CategoryResponse` 对象。

### GetMyContentItemListAsync

`static GetMyContentItemListAsync(itemKeyword: ItemKeyword, pageToken?: string) → BaseRequest<ContentItemListResponse>`

该异步方法用于获取各商品分类下的商品列表。

| 参数             | 类型                            | 说明                             |
| -------------- | ----------------------------- | ------------------------------ |
| itemKeyword    | [ItemKeyword](./#itemkeyword) | 商品分类。                          |
| pageToken （可选） | `string`                      | 分页令牌。首次调用该方法时，请将该参数设置为 `null`。 |

**返回值：** `BaseRequest<ContentItemListResponse>` — 一个 `BaseRequest` 对象。异步处理完成后，可通过 `responseData` 属性访问 `ContentItemListResponse` 对象。

### GetContentItemAsync

`static GetContentItemAsync(itemId: string) → BaseRequest<ContentItemResponse>`

该异步方法用于获取商品信息。

| 参数     | 类型       | 说明    |
| ------ | -------- | ----- |
| itemId | `string` | 商品代码。 |

**返回值：** `BaseRequest<ContentItemResponse>` — 一个 `BaseRequest` 对象。异步处理完成后，可通过 `responseData` 属性访问 `ContentItemResponse` 对象。

### GetMyWishContentItemListAsync

`static GetMyWishContentItemListAsync() → BaseRequest<ContentItemListResponse>`

该异步方法从本地玩家用户账号的 ZEPETO 商店心愿单中获取商品列表。

**返回值：** `BaseRequest<ContentItemListResponse>` — 一个 `BaseRequest` 对象。异步处理完成后，可通过 `responseData` 属性访问 `ContentItemListResponse` 对象。

## CategoryResponse

`class` · extends `BaseResponse`

`CategoryResponse` 类提供 API 调用结果以及 ZEPETO 商店的商品分类信息。

### 属性

| 名称       | 类型                              | 说明                |
| -------- | ------------------------------- | ----------------- |
| category | [CategoryInfo](./#categoryinfo) | ZEPETO 商店的商品分类信息。 |

## ContentItemListResponse

`class` · extends `PlayBaasResponse`

`ContentItemListResponse` 类提供 API 调用结果以及获取到的商品列表。

### 属性

| 名称            | 类型       | 说明                                                                            |
| ------------- | -------- | ----------------------------------------------------------------------------- |
| items         | `Item[]` | 商品列表。                                                                         |
| nextPageToken | `string` | 当可用条目较多时，响应中会包含 `nextPageToken`，可用于获取后续的商品列表。当没有剩余条目时，`nextPageToken` 为 null。 |

## ItemKeyword

`enum`

商品分类。

| 名称         | 值  |
| ---------- | -- |
| all        | 0  |
| hair       | 1  |
| onepiece   | 2  |
| top        | 3  |
| outwear    | 4  |
| pants      | 5  |
| skirt      | 6  |
| socks      | 7  |
| footwear   | 8  |
| headwear   | 9  |
| eyewear    | 10 |
| jewelry    | 11 |
| makeup     | 12 |
| accessory  | 13 |
| bodyfigure | 14 |
| animal     | 15 |
| none       | 16 |

## ContentItemResponse

`class` · extends `PlayBaasResponse`

`ContentItemResponse` 类提供 API 调用结果以及商品信息。

### 属性

| 名称   | 类型     | 说明  |
| ---- | ------ | --- |
| item | `Item` | 商品。 |

## GiftBackgroundType

`enum`

用于礼物通知弹窗的背景类型。

| 名称     | 值 |
| ------ | - |
| Type01 | 1 |
| Type02 | 2 |
| Type03 | 3 |
| Type04 | 4 |

## ItemGiftResponse

`class` · extends `PurchaseBaseResponse`

`ItemGiftResponse` 类提供商品赠送的结果。

### 属性

| 名称   | 类型       | 说明                        |
| ---- | -------- | ------------------------- |
| zem  | `number` | 赠送完成后本地玩家用户账号中剩余的 ZEM 余额。 |
| coin | `number` | 赠送完成后本地玩家用户账号中剩余的金币余额。    |

## CategoryInfo

`class`

ZEPETO 商店的商品分类信息。

### 属性

| 名称          | 类型                          | 说明               |
| ----------- | --------------------------- | ---------------- |
| displayName | `string`                    | 商店库存标签页的本地化显示名称。 |
| categories  | [Category\[\]](./#category) | 库存标签页下的商品分类列表。   |

## Category

`class`

商品分类。

### 属性

| 名称          | 类型                            | 说明            |
| ----------- | ----------------------------- | ------------- |
| displayName | `string`                      | 商品分类的本地化显示名称。 |
| keyword     | [ItemKeyword](./#itemkeyword) | 表示商品分类的枚举。    |

## ItemRequestType

`enum`

| 名称       | 值 |
| -------- | - |
| Purchase | 0 |
| Gift     | 1 |
