Item duration display options
What's new
Items take a new optional display_options object that controls how the hub displays the item's
duration. It comes back on items everywhere they appear in responses, including items nested in
bundles, loot boxes, daily rewards, coupons, loyalty tiers, and store items.
Impact
display_options has two optional fields:
duration_largest_unit: the largest unit the hub uses when it shows the duration. One ofday,hour, orminute. Defaults today.stack_duration: a boolean,trueby default.
The field is nullable. Items that don't set it keep the default display.
Changes
| Resource | Change |
|---|---|
| create_item | Added optional display_options to the request and response |
| update_item | Added optional display_options to the request and response |
| bulk_update_items | Added optional display_options to each item in the request and response |
| bulk_create_or_update_items | Added optional display_options to each item in the request |
| get_items, get_item, translate_item | Added display_options to the response, including nested loot box, piggy bank, pick-one, and rolling items |
| get_daily_rewards, create_daily_reward, get_daily_reward, update_daily_reward, copy_daily_reward | Added display_options to reward items and their nested items in the response |
| get_coupons, create_coupon, bulk_update_coupon, get_coupon, update_coupon, get_user_coupons | Added display_options to coupon items in the response |
| get_loyalty_tiers, update_loyalty_tiers | Added display_options to tier items in the response |
| get_store_items, get_all_store_items, create_store_item, bulk_update_store_items, update_store_item | Added display_options to item, bonus_items, and dynamic_nested_items_read in the response |
Upgrade
- No action is required. Items without
display_optionsdisplay as before. - To change how an item's duration appears in the hub, set
display_optionswhen you create or update the item.
Need help?
Contact our integration team at [email protected]