question

Ruben Ornelas avatar image
Ruben Ornelas asked

Economy V2 SearchItems API is not working properly

Hi!

We are using PlayFab together with Unity and want to retrieve the Store items in order to setup the store on the client side. With Economy V1 it was as simple as GetStoreItems. Now, if I am not mistaken, we need to use SearchItems, passing in the StoreReference. However, no matter what we pass as StoreReference, it gives us all the items available on the catalog, instead of the ones listed inside the store.

Are we doing something wrong here? The documentation is very vague, lacking a lot of code samples on Economy V2 as a whole. A lot of explaining on how to setup, but not much info on how to use it.

apisunity3d
10 |1200

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

kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

We identified the issue. We'll get the patch out this week.

10 |1200

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

Gosen Gao avatar image
Gosen Gao answered

In my test, to get the store items, SearchItems API works with request

{
  "Store":{
      "Id":"StoreId"
  }
}

Could you please give a try?

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.

acyace2020 avatar image acyace2020 commented ·

Not OP but i can confirm that the SearchItems API does NOT work properly.

Setting store id like the one you did has no effect of the result with POSTMAN, it returns everything instead, just like if the option doesn't exist at all.

Moreover, Select does not work either, it shows error when something was wrong, but not when it's correct; even the example as stated in the documentation page doesn't make any difference.

ExpandReferencedItems has no effect.

The only way I could get price from store is to search for the store directly instead, get the price, and locally map the id to the item, which obviously is not a solution nor how it suppose to be.

In other words, when I use the request as you suggested here, it returns everything up to the Count, price being the default one. Sure the store is listed in there with the prices as one of the items, but I doubt that's how this suppose to work.

0 Likes 0 ·
Ruben Ornelas avatar image Ruben Ornelas commented ·

Just like @acyace2020 mentioned. It does NOT work properly. Setting up the store Id has no effect on the results, returning everything inside the catalog.

In order to replicate, just create a few items/currencies/bundles and add just some of them to a store. Then use the SearchItems API with the store reference.

0 Likes 0 ·
kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

Thanks for the report. We'll take a look at this one.

10 |1200

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

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.