question

tylerparker avatar image
tylerparker asked

Add item to store via the API?

How can we add an item to a store via the API?

-without having to manually add each item via the playfab dashboard.

In-Game Economy
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

If you are using Economy V2, you can call Update Draft Item API with the Store Item Id and add new Items to the ItemReferences property to add new items to the store. If you are using Economy V1, you can call SetStoreItems and UpdateStoreItems API to set and update the Store items.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tylerparker avatar image tylerparker commented ·

After implementing the above, the "UpdateDraftItem" of the store catalog object fails due to:

'/Catalog/UpdateDraftItem: Calling Entity does not have permissions to the Item Type.'

Note, have already updated the player permission to allow the call to the above method. However, am unable to locate anywhere in the PlayFab dashboard to enable this 'type' permission?

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha tylerparker commented ·

To Update store type Items, we recommend using Title Entity to call the UpdateDraftItem instead of using Player Entity, you can use DeveloperSecretKey to call Get Entity Token with empty request body to get the Title Entity Token (DeveloperSecretKey should not be exposed to the client for hackers may use it to hack your game).

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.