• Sign Up Login
  • Features
    • Game Services
    • Real-time Analytics
    • LiveOps
    • Add-ons
  • Game Services
  • Real-time Analytics
  • LiveOps
  • Add-ons
  • Games
  • Pricing
  • Blog
  • Support
    • Docs
    • Forums
    • Contact
  • Docs
  • Forums
  • Contact
  • Sign Up Login
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Shaun Peoples · May 17 at 03:16 PM ·

In correct documentation for GrantItemsToUser

Comment

People who like this

0 Show 4
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Shaun Peoples · May 17 at 01:33 PM 0
Share

Okay, so now that I've posted the title...here's what's up:

In the documentation for GrantItemsToUser, the returned value for GrantItemsToUserResult should contain an array of GrantedItemInstance. These are stated to contain values for UnitPrice and CustomData, but they don't.

I've stringified the resulting JSON objects and those fields simply don't exist. Since that's the case, I then have to spend another API call to request the user inventory again to simply get these values. Anyway those return values could be fully fleshed out?

Alternatively, maybe I'm missing something along the way, but I don't think so. The documentation is pretty clear, it's just that it seems to be inaccurate.

Thanks,

Shaun

avatar image Shaun Peoples · May 17 at 01:34 PM 0
Share

Specific link I'm looking at for GrantItemsToUser: https://docs.microsoft.com/en-us/rest/api/playfab/server/player-item-management/grantitemstouser?view=playfab-rest#grantediteminstance

avatar image Shaun Peoples · May 17 at 01:49 PM 0
Share

May be worth adding the same type of note (also, maybe in bold or some other color to stand out) that exists in https://docs.microsoft.com/en-us/rest/api/playfab/server/player-item-management/getuserinventory?view=playfab-rest#iteminstance :

A unique instance of an item in a user's inventory. Note, to retrieve additional information for an item instance (such as Tags, Description, or Custom Data that are set on the root catalog item), a call to GetCatalogItems is required. The Item ID of the instance can then be matched to a catalog entry, which contains the additional information. Also note that Custom Data is only set here from a call to UpdateUserInventoryItemCustomData.

Also would be good to expand this comment to include all fields that aren't actually returned/populated, such as UnitPrice, which is also the case for ItemInstance returned via GetCatalogItems.

avatar image Shaun Peoples · May 17 at 01:51 PM 0
Share

And while we're on it, having to either build a lookup structure or linearly traverse the resulting catalog items seems less than idea when you're having to cross reference and itemid returned from either of the GrantItemsToUser or GetInventory calls. :)

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by SethDu · May 21 at 07:31 AM

We have noticed this issue and will have a discussion with our team about expected behavior of GrantItemsToUserResult.

Comment

People who like this

0 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image FranklinChen ♦ · Aug 08 at 01:47 AM 0
Share

This issue as some fields' value of GrantedItemInstance is missing in the response of GrantItemsToUser API should have been fixed, please let us know if it still exists

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    • PlayFab

      • Features
      • Games
      • Pricing
      • Blog
    • Engineers

      • Documentation
      • Quickstarts
      • API Reference
      • SDKs
      • Usage Limits
    • Support

      • Forums
      • Videos
      • Contact
      • Service Health
      • Terms of Service
    • Social

      • Facebook
      • Twitter
      • LinkedIn
      • YouTube
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • About Microsoft
    • Jobs
    • Accessibility
    • Diversity & inclusion
    • Security
    • Company news
    • © Microsoft 2019
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Post an idea
    • Create an article
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges