question

Alexander Wieser avatar image
Alexander Wieser asked

How to use the GetItems endpoint

Hi there,

I am currently trying to setup some server code to fetch items PlayFab. I am assuming this is the correct method

https://docs.microsoft.com/en-us/rest/api/playfab/economy/catalog/get-items?view=playfab-rest

The payload required for the request looks like this:

export interface GetItemsRequest {
    AlternateIds: CatalogAlternateId[];
    CustomTags?: object;
    Entity: EntityKey;
    Ids: string[];
}

Both properties "CustomTags" and "Ids" are self explanatory.
I have no clue, however, what to do enter as the "EntityKey" or what the "AlternateIds" are?

Any help is greatly appreciated.

Alex

apissdks
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

GetItems API is design for UGC service. If you want to get UGC items’ info, then only parameter Ids is required, and other parameters are optional. If an item has an alternative id then you can also use it to call this API. The Entity should look like below.

"Entity": {
	"Id": "30CFB3A45DBF7681",
	"Type": "title_player_account"
}

If you want to get common catalog items’ info, please use API GetCatalogItems.

10 |1200

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

Alexander Wieser avatar image
Alexander Wieser answered

Thank you for the clarification!

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.