LootLocker
The BasicsGame SystemsContent ManagementPlayer Management
LootLocker
  • 📌The Basics
    • Getting Started
    • What is LootLocker?
    • Core Concepts
      • Players
      • Assets
      • Character Classes
      • API Types
      • Web Console
      • Stage & Live Environments
      • Glossary
    • Unity Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • Unreal Quick Start
      • Install & Configure the SDK
        • Older versions
      • Authenticate Your First Player
    • Godot Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • SDKs
    • Samples
      • Authentication Samples
      • Leaderboard Samples
      • Progression Samples
      • Player Samples
    • Launching Your Game
    • Support
      • Error Codes
      • Unreal Marketplace Plugin Support
  • 🎭Players
    • Overview
    • Authentication
      • How To
        • Guest Login
        • Steam
        • Apple
        • Apple Game Center
        • Google
        • Epic Games
        • PlayStation
        • Meta / Oculus
        • Xbox
        • Nintendo Switch
    • Files
      • How To
        • Manage Files in Web Console
        • Work with Files In-Game
    • Inventory
      • How To
        • Work with Player Inventory
    • Messages
      • How To
        • Configure Messages in Web Console
    • Names
      • How To
        • Work with Player Names
    • Player Manager
      • How To
        • Manage Players through Web Console
        • Manage Players In-Game
        • Use Player Operations
    • Unified Player Accounts
      • How To
        • Configure UPA in Web Console
        • Use Remote Login In-Game
        • Connect Identiy Provider to Player
        • External Provider Linking
        • Transition from Guest Login to Other Provider
        • Disconnect Identity Provider from Player
    • White Label Login
      • How To
        • Configure White Label Login
        • Create a New White Label User
        • Request User Verification
        • Handle Returning Users
        • Start a White Label Session
  • 🪙Commerce
    • Overview
    • Catalogs
      • How To
        • Configure Catalogs in LootLocker Console
        • List all Catalogs
        • Use Catalogs In-Game
        • Setup In-Game Store
    • Currencies
      • How To
        • Configure a Currency in Web Console
        • Use Currencies In-Game
    • DLC Management
      • How To
        • Configure DLC in Web Console
        • Use DLC In-Game
    • Entitlements
      • How To
        • Work with Entitlements In-Game
    • Real Money Purchases
      • How To
        • Configure In-App Purchase in Web Console
        • Make Purchases through Google Play Store
        • Make Purchases through Apple Store
        • Make Purchases through Steam Store
    • Virtual Purchases
    • Wallets
      • How To
        • Manage a Wallet in Web Console
        • Use Wallets In-Game
  • ⚔️Content
    • Overview
    • Assets
      • How To
        • Create & Configure an Asset
        • Organize & Search for Assets
        • Retrieve Assets In-Game
        • Set up Asset Storage Template
        • Check Grant Notifications
        • Set up a Game Config Asset
        • Create a Loot Box
        • Work with Loot Boxes In-Game
        • Create a Drop Table
        • Work with Drop Tables In-Game
        • Create a Rental Asset
        • Work with Rental Assets In-Game
    • User Generated Content (UGC)
      • How To
        • Create UGC In-Game
    • Twitch Drops
  • 🕹️Game Systems
    • Overview
    • Classes & Heroes
      • How To
        • Base Classes
        • Hero Classes
        • Implement Classes In-Game
        • Implement Heroes In-Game
    • Leaderboards
      • How To
        • Configure Leaderboard in Web Console
        • Use Player Leaderboards
        • Use Generic Leaderboards
        • Use Metadata to Store Additional Information
        • Use Scheduled Reset with Rewards
        • Use Leaderboards for Time Based Rankings
      • Leaderboard FAQ
      • GameMaker References
    • Feedback
      • How To
        • Manage Feedback Categories
        • Create Player Feedback
        • Create UGC Feedback
        • Create Game Feedback
        • View and Manage Feedback
    • Progressions
      • How To
        • Create a Progression
        • Game Progressions
        • Player Progressions
        • Class Progressions
        • Asset Instance Progressions
    • Triggers
      • How To
        • Setup a trigger in the Web Console
        • Invoke trigger from game
  • ⛓️Shared Systems
    • Overview
    • Metadata
      • How To
        • Add Metadata in Console
        • Fetch a Single Metadata In-Game
        • Fetch Metadata In-Game by Tags
        • Fetch Metadata In-Game from Multiple Sources
    • Notifications
      • How To
        • List Notifications and Mark as Read In-Game
  • 🗝️Admin
    • Settings
    • User Settings
    • Organization Settings
    • CORS Allowlist
  • 🖥️Server
    • Overview
    • Unreal Server SDK
      • How To
        • Starting a Server Session
  • ⭕️ Legacy
    • Deprecations
      • Unity SDK Deprecation Log
        • Version 2.1.5 - Migration to Open UPM
        • Version 2.0.0
      • Unreal SDK Deprecation Log
        • Version 4.0.0
        • Version 3.0.0
    • Legacy Storage
    • Legacy Triggers
      • Activate a trigger
      • Create a trigger
    • Legacy Progressions
      • Create a Progression System
      • Use a Progression System In-Game
Powered by GitBook
On this page
  • Retrieve Inventory in Game
  • Gift an Asset
  • Refund an Order
  1. Players
  2. Inventory
  3. How To

Work with Player Inventory

PreviousHow ToNextMessages

Last updated 6 months ago

Retrieve Inventory in Game

To retrieve the inventory of player in game use the following SDK code

LootLockerSDKManager.GetInventory((response) =>
{
    if (response.success)
    {
        Debug.Log("Successfully retrieved player inventory: " + response.inventory.Length);
    } else
    {
        Debug.Log("Error getting player inventory");
    }
});

To copy and paste the above example into your editor, look here.

Input

You need to exchange the white empty event for whatever event you want to use to trigger this flow.

Output

We recommend branching the completed events on the success flag in the response, and if you do this, you will probably want to add error handling in case the request fails as well as what (if any) continued actions you want on success.

curl -X GET "https://api.lootlocker.io/game/v1/player/inventory/list" \
  -H "x-session-token: your_token_here"

Example response:

{
    "success": true,
    "inventory": [
        {
            "instance_id": 538,
            "variation_id": 45,
            "rental_option_id": null,
            "acquisition_source": "grant_default_loadout",
            "acquisition_date": "2022-05-30T07:57:58+00:00",
            "asset": {...},
            "rental": {
                "is_rental": false,
                "time_left": null,
                "duration": null,
                "is_active": null
            }
        }
    ]
}

Gift an Asset

Gifting is the ability to grant a specific Asset to a player directly through the LootLocker Management Console.

To gift an Asset to a player, click the Give Asset button in the Player Manager interface. Search for and select an Asset from the popup Asset list. This will immediately grant the player the Asset. A list of all granted Assets can be found in the Orders tab in the Player Manager interface.

Refund an Order

Refunds can be used in case a player purchases an Asset unintentionally or needs to be refunded their purchase for other reasons. Refunding an Order in LootLocker is an easy and simple process.

To refund an Order, navigate to the Inventory tab in the Player Manager interface. Find the Asset in question and use the Refund button to refund the Asset. This will immediately refund the purchased Assets and return the Currency to the player’s wallet. If the player purchased an Asset Package, you will need to refund all Assets from that package for the Currency to be returned to the player's wallet.

Only purchased Assets can be refunded. Assets granted through other LootLocker systems cannot be refunded.

🎭
Blueprint example of retrieving the players inventory