question

itsnicow avatar image
itsnicow asked

GetInventoryItems Filter returns Bad Request

Hey! :>

I am currently trying to retrieve currencies in a player's inventory and am struggling to use Filters. Here is what it looks like now:

 PlayFabEconomyAPI.GetInventoryItems(new GetInventoryItemsRequest { Filter = "ContentType eq 'items'" }, (result) => OnGotUserInventory(result, "items"), OnError);

I've tried using "type", "Type", "ContentType", but none of it seems to work. I've also checked the documentation and it seems like the right way to do it. Could anyone indicate to me where I am mistaken?

In-Game EconomyPlayer Inventory
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

The type of Currency should be “currency”. If you want to retrieve currencies in a player's inventory, the Filter parameter in the GetInventoryItems API should be "Type eq 'currency'". Also, only 'type', 'id', 'stackId' and 'eq'(not case sensitive) are supported in the GetInventoryItems API Filter.

10 |1200

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