question

faniram243@gmail.com avatar image
faniram243@gmail.com asked

i am unable to update a ugc item with price ?

Hi, i followed quick start of catalog and tried to update price of ugc item, but getting the error as shown in image. Thanks for answers !!6167-1.png6171-2.png

apis
1.png (204.5 KiB)
2.png (23.5 KiB)
10 |1200

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

faniram243@gmail.com avatar image
faniram243@gmail.com answered

hi, can the title_player_account modify the prices section ? in ugc item i created, i did not add any price section. I created a currency and pasted that id in prices section as shown in pic in my 1st question, and call update draft item.

It says, title_player_account not allowed to set prices. 400 bad request. Thanks for answers!

4 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.

Neils Shi avatar image Neils Shi commented ·

As mentioned in the error message, title_player_account cannot set the item price. To set the item price, you need to use title level entity. Players can use Azure Function with title level entity to set the price of item.

0 Likes 0 ·
faniram243@gmail.com avatar image faniram243@gmail.com Neils Shi commented ·

Hi, okay and is it possible to create draft item with price options also ? i'm trying in various ways but same error that title_player_account cannot set prices comes. It's like i want to create ugc item as a title_player along with price so that i want other players to purchase this with their currency.

0 Likes 0 ·
Neils Shi avatar image Neils Shi faniram243@gmail.com commented ·

Whether the UGC project is published or drafted, title_player_account cannot set the price section, only the title level entity can set the price. If you want to let player set the price of ugc so that other players can purchase it with their currency, you should use Azure Function to implement it. Players can use Azure Function with title level entity to set the price of item.

1 Like 1 ·
Show more comments
kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

Sorry. The code side of this example is wrong. I'll work with someone to get it fixed.

In general, when updating you should do the following.

  1. Call GetDraftItem to get the item you want to modify

  2. Modify the properties you want to change (like PriceOptions)

  3. Call UpdateDraftItem and pass the modified item in the request body

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.