You can use the ZEPETO.Module.Shop API to retrieve the item information of the currently connected user by category.
Install
Window → Package Manager → Please install ZEPETO.World Package 1.21.0 version or higher first.
Then install the ZEPETO.Module package 0.3.0 version or higher.
ZEPETO.Module.Shop API
Methods
API | Description |
---|---|
public static GetMyCategoryAsync():ZEPETO_Module.BaseRequest$1 | This is an asynchronous method to retrieve the category information from ZEPETO Shop > My > Inventory. The method returns the BaseRequest object. When the asynchronous process is complete, you can access the CategoryResponse object with the responseData property. |
public static GetMyItemListAsync($itemKeyword: ZEPETO_Module_Shop_ShopService.ItemKeyword, $pageToken?: string):ZEPETO_Module.BaseRequest$1 | This is an asynchronous method to retrieve the item information for each category. ItemKeyword and PageToken are sent as parameters. The method returns the BaseRequest object. When the asynchronous process is complete, you can access the ItemResponse object with the responseData property. |
PageToken
- If there are many items, API provides the response by dividing it into multiple pages.
- PageToken represents the page that will be requested.
- Set as null when you request API for the first time.
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

ZEPETO Shop > My > Inventory Category Information Example
Class
- CategoryResponse
The CategoryResponse class provides the GetMyCategoryAsync API call result and My Item tab information.
Property | Type | Description |
---|---|---|
isSuccess | boolean | Request Status (success: true, fail: false) |
message | string | Request Result Message |
category | CategoryInfo | ZEPETO Shop > My > Inventory Category Information |
- CategoryInfo
Inventory Tab Information
Property | Type | Description |
---|---|---|
displayName | string | Inventory Tab Display Name (changes based on the device language) |
categories | Category[] | Inventory Tab Category List |
- Category
Item Category
Property | Type | Description |
---|---|---|
displayName | string | Item Category Display Name (changes based on the device language) |
categories | Category[] | Item Category Enum Code |
- ItemResponse
The ItemResponse class provides the GetMyItemListAsync API call result and My Item tab information.
Property | Type | Description |
---|---|---|
isSuccess | string | Item Category Display Name (changes based on the device language) |
categories | Category[] | Item Category Enum Code |
contentItems | ContentItem[] | Item List |
nextPageToken | string | If there are many items, nextPageToken returns the token string value for the next page. If there is no nextPage, the Null value is returned. |
- ContentItem
Property | Type | Description |
---|---|---|
id | string | Item ID |
property | ZepetoPropertyFlag | Item Part |
GetThumbnailAsync() | ZEPETO_Module.TextureRequest | This is an asynchronous method to retrieve item thumbnails. |
None = 0, Skin = 1, SkinTone = 2, SkinDetail = 3, Face = 4, Eye = 5,
EyeLens = 6, Eyebrow = 7, Beard = 8, Mustache = 9, EyeShadow = 10,
EyeLiner = 11, EyeLash = 12, Blusher = 13, Nose = 14, Mouth = 15,
Lips = 16, Hair = 17, ClothesGlasses = 18, ClothesTop = 19, ClothesBottom = 20,
ClothesShoes = 21, ClothesDress = 22, Background = 23, RoomWallpaper = 24, RoomFloor = 25,
RoomBottom = 26, RoomTopLeft = 27, RoomTopRight = 28, RoomMiddleLeft = 29, RoomMiddleRight = 30,
Point = 31, Freckles = 32, FaceHair = 33, DoubleEyelid = 34, NailArt = 35,
ClothesSocks = 36, ClothesGlove = 37, AccessoryBracelet = 38, AccessoryNecklace = 39, AccessoryEarring = 40,
AccessoryRing = 41, AccessoryHeadwear = 42, AccessoryPiercing = 43, BoothBackground = 44, LUT = 45,
AccessoryMask = 46, FacePainting = 47, AccessoryBag = 48, AccessoryWing = 49, ClothesCape = 50,
ClothesExtra = 51, MannequinFace = 52, WrinkleForehead = 53, WrinkleEye = 54, WrinkleMouth = 55,
DoubleEyelidBottom = 56, WrinkleMongo = 57, AccessoryTail = 58, AccessoryEffect = 59, ClothesDeform = 60,
HairExtensions = 61, MakeupSet = 62, FaceContouring = 63, BaseModel = 64, CreatorLens = 65
Outputting Item Information Example
- Project > Create > ZEPETO > TypeScript is created and the name is changed to MyItemList.
- Write a sample script as shown below.
import { ZepetoScriptBehaviour } from 'ZEPETO.Script'
import { ShopService, Category, ContentItem, ItemKeyword } from 'ZEPETO.Module.Shop'
import { ZepetoPropertyFlag } from 'Zepeto'
import { Texture2D, WaitUntil } from 'UnityEngine'
import { RawImage } from 'UnityEngine.UI'
export default class MyItemList extends ZepetoScriptBehaviour {
public thumbnailImage : RawImage;
Start() {
this.StartCoroutine(this.CoGetMyCategory());
}
*CoGetMyCategory() {
var requestCategory = ShopService.GetMyCategoryAsync();
yield new WaitUntil(() => requestCategory.keepWaiting == false);
if (requestCategory.responseData.isSuccess) {
let categoryInfo = requestCategory.responseData.category;
console.log(`[Category Info] ${categoryInfo.displayName} - length : ${categoryInfo.categories.Length}`);
let categories: Category[] = categoryInfo.categories;
for (const category of categories) {
console.log(`[Category displayName] ${category.displayName} `);
//Category Keyword is used as an argument in the ShopService.GetMyItemListAsync function
console.log(`[Category keyword] ${category.keyword} `);
}
}
this.StartCoroutine(this.CoGetMyItem());
}
*CoGetMyItem() {
var requestItemList = ShopService.GetMyItemListAsync(ItemKeyword.all, null);
yield new WaitUntil(() => requestItemList.keepWaiting == false);
if (requestItemList.responseData.isSuccess) {
let contentItems: ContentItem[] = requestItemList.responseData.contentItems;
// The number of items received as a result of GetMyItemListAsync().
console.log(contentItems.length);
for (let i = 0; i < contentItems.length; ++i) {
const property: ZepetoPropertyFlag = contentItems[i].property;
// Item ID and item property
console.log(`[Content Item] (id): ${contentItems[i].id} | (property): ${property}`);
// Setting the item thumbnail as the texture of a rawImage
var textureReq = contentItems[i].GetThumbnailAsync();
yield new WaitUntil(()=> textureReq.keepWaiting == false);
let thumbnailTexture:Texture2D = textureReq.responseData.texture;
this.thumbnailImage.texture = thumbnailTexture;
}
}
}
}
- Script Description
- Retrieve My Item Tab Information
- Call ShopService.GetMyCategoryAsync() to know the item categories in the My Item tab.
- When you successfully receive a response, you can access the CategoryResponse object through the responseData property.
- CategoryResponse.category.categories is browsed and the item category list in the My Item tab is outputted.
- Retrieve Item List
- Call ShopService.GetMyItemListAsync(ItemKeyword.all, null) to retrieve the item list for all categories.
- You can choose to retrieve items from only certain categories. For instance, you can use ItemKeyword.hair instead of ItemKeyword.all to retrieve only the hair items.
- The second parameter is only used if you know the next page token to request. Set it to null the first time you call the API.
- For examples related to nextPageToken, check the information below.
- When you receive a successful response, you can access the ItemResponse object through the responseData property
- ItemResponse.contentItems is browsed and the ID and the part Enum code for each item is outputted.
- Also, the item thumbnail is set as the designated rawImage.
- Call ShopService.GetMyItemListAsync(ItemKeyword.all, null) to retrieve the item list for all categories.
- Retrieve My Item Tab Information
-
After you finish writing the script, add the script to the object in Scene.
-
Pressing the Play button will show you the category list of the My Item tab and the item information of all categories.
TIP
- If you create the item thumbnail prefab and have the thumbnails to be created dynamically based on the item list, you can display the item list thumbnail on the UI.
Example to Check Owned Status of User's Certain Item
You can utilize GetMyItemListAsync() to check if someone on a World is wearing particular clothing.
The following is a simple example to display a message on the UI of a user who owns a specific item.
- Project > Create > ZEPETO > TypeScript is created and the name is changed to CheckItem.
- Write a sample script as shown below.
import { ZepetoScriptBehaviour } from 'ZEPETO.Script'
import { ShopService, ContentItem, ItemKeyword } from 'ZEPETO.Module.Shop'
import { ZepetoPropertyFlag } from 'Zepeto'
import { WaitUntil } from 'UnityEngine'
import { Text } from 'UnityEngine.UI'
export default class CheckItem extends ZepetoScriptBehaviour {
public resultText: Text;
public checkItemID: string;
Start() {
this.resultText.gameObject.SetActive(false);
this.StartCoroutine(this.CoCheckItem());
}
*CoCheckItem() {
let nextPageToken: string | null = null;
do {
const requestItemList = ShopService.GetMyItemListAsync(ItemKeyword.all, nextPageToken);
yield new WaitUntil(() => requestItemList.keepWaiting == false);
if (requestItemList.responseData.isSuccess) {
const contentItems: ContentItem[] = requestItemList.responseData.contentItems;
nextPageToken = requestItemList.responseData.nextPageToken;
for (let i = 0; i < contentItems.length; ++i) {
const property: ZepetoPropertyFlag = contentItems[i].property;
if (contentItems[i].id == this.checkItemID) {
this.ActivateMatchedItem();
break;
}
}
}
else {
break;
}
} while (nextPageToken != null);
}
ActivateMatchedItem() {
this.resultText.gameObject.SetActive(true);
this.resultText.text = "Wow, you have an item I made!";
}
}
- Script Description
- This is a script that browses the 'My Item' list (all categories) of a user who is logged in to a World and finds the matching item ID entered in the Inspector.
- If there are many items, the nextPageToken value is not null. Therefore, the process is repeated with a do-while statement until the value becomes null.
- Notice how nextPageToken was provided as the second parameter of ShopService.GetMyItemListAsync(ItemKeyword.all, nextPageToken).
- When you receive a successful response, you can access the ItemResponse object through the responseData property.
- ItemResponse.contentItems is browsed to find a match for the entered item ID.
- If a matching item is found, ActivateMatchedItem() is called to display the text on the user's screen and end the loop.
-
After you finish writing the script, add the script to the object in Scene.
-
Enter the ID of the item you wish to check if a user in a World has on the Inspector.

Item ID Input Example
- Press the Play button to run the process. Text will appear on the screen if the user logged into a World has an item that matches the entered item ID.
You can apply the example to create all sorts of interesting content.