NAV
shell

Introduction

Welcome to the LootLocker Admin API Documentation.

We do our best to keep this documentation up to date, but if you find any issues, please reach out to us at hello@lootlocker.io or join our Discord server.

Authentication

Initial Authentication Request

curl -X POST "https://api.lootlocker.io/admin/v1/session" \
  -H "Content-Type: application/json" \
  -d "{\"email\": \"hector@lootlocker.io\", \"password\": \"super_secret_password\"}"

The initial login request is simple in that it just requires the users email and password sent in a POST request.

The response can vary depending if the user has Two-Factor Authentication enabled or not. See examples for more detail.

If the user has Two-Factor Authentication enabled, the mfa_key, sent back has en expiry time of 5 minutes. If the user does not manage to input the MFA token during this time, you should present them with the login form again.

Example response with Two-Factor Authentication enabled.

{
  "success": true,
  "mfa_key": "c1b7e16b5ea72c0b2ea2d383f6a329a4483bd763"
}

Example response without Two-Factor Authentication enabled.

{
    "success": true,
    "auth_token": "2068c2a0c56bca8d058a311f727d89f7233ccf24",
    "user": {
        "id": 12345,
        "name": "Andreas Stokholm",
        "email": "andreas@lootlocker.io",
        "signed_up": 1606730113,
        "organisations": [
            {
                "id": 2,
                "name": "LootLocker",
                "games": [
                    {
                        "id": 1,
                        "is_demo": false,
                        "name": "Rabbidt",
                        "badge_url": null,
                        "logo_url": null,
                        "development": {
                            "id": 2,
                            "is_demo": false,
                            "name": "Rabbidt",
                            "badge_url": null,
                            "logo_url": null
                        }
                    },
                    {
                        "id": 3,
                        "is_demo": false,
                        "name": "Kingfall",
                        "badge_url": null,
                        "logo_url": null,
                        "development": {
                            "id": 4,
                            "is_demo": false,
                            "name": "Kingfall",
                            "badge_url": null,
                            "logo_url": null
                        }
                    }
                ]
            }
        ]
    }
}

In case of an error, the response will have the success property set to false, and there will be an error property with a human readable error message.

Two-Factor Authentication Code Verification

curl -X POST "https://api.lootlocker.io/admin/v1/2fa" \
  -H "Content-Type: application/json"
  -d "{\"mfa_key\": \"c1b7e16b5ea72c0b2ea2d383f6a329a4483bd763\", \"secret\": 123456}"

When the user has Two-Factor Authentication enabled, you need to request a code from the user, using the Google Authenticator standard.

To submit the code, you need to send the mfa_key you got in the Initial Authentication Request, along with the secret you got from the user.

This request requires a JSON request body, and thus it the Content-Type header set to application/json.

The successful response from this endpoint is the same as what you will get from the Initial Authentication Request, if Two-Factor Authentication is not enabled for the user.

In case the user is using a recovery token, you will not handle anything differently, but you can not limit the input to 6 characters since the recovery code is 27 characters long.

Example of a successful verification

{
    "success": true,
    "auth_token": "2068c2a0c56bca8d058a311f727d89f7233ccf24",
    "user": {
        "name": "Andreas Stokholm",
        "email": "andreas@lootlocker.io",
        "signed_up": 1606730113,
        "organisations": [
            {
                "id": 2,
                "name": "LootLocker",
                "games": [
                    {
                        "id": 1,
                        "is_demo": false,
                        "name": "Rabbidt",
                        "badge_url": null,
                        "logo_url": null,
                        "development": {
                            "id": 2,
                            "is_demo": false,
                            "name": "Rabbidt",
                            "badge_url": null,
                            "logo_url": null
                        }
                    },
                    {
                        "id": 3,
                        "is_demo": false,
                        "name": "Kingfall",
                        "badge_url": null,
                        "logo_url": null,
                        "development": {
                            "id": 4,
                            "is_demo": false,
                            "name": "Kingfall",
                            "badge_url": null,
                            "logo_url": null
                        }
                    }
                ]
            }
        ]
    }
}

In case of an error, the response will have the success property set to false, and there will be an error property with a human readable error message.

Subsequent requests

# Example of a subsequent call using header for auth token
curl -X GET "https://api.lootlocker.io/admin/v1/games" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Your subsequent requests should have a header property called x-auth-token, with the auth_token you got from either the Initial Authentication Request or the Two-Factor Authentication Code Verification request.

Games

Get All Games to the Current User

curl -X GET "https://api.lootlocker.io/admin/v1/games" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To get all games, you have to send a request to /admin/games. From here a JSON object will be returned containing simple information about a game.

Example response

{
  "success": true,
  "games": [
    {
      "id": 1,
      "name": "SquirrelChaser",
      "sandbox_mode": true,
      "logo_url": null,
      "badge_url": null,
      "development": {
          "id": 2,
          "name": "SquirrelChaser",
          "sandbox_mode": true,
          "logo_url": null,
          "badge_url": null
      }
    }
  ]
}

Creating A Game

curl -X POST "https://api.lootlocker.io/admin/v1/game" \
    -H "x-auth-token: c72d54b4d7675de27e8e03e5e0015a4f1c456f1a" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"My Game\", \"organisation_id\": 1, \"genre\": 1}"

To create a game, you must send a POST request to /admin/game with the game information.

The body of the request have to be in JSON format, and you must supply a Content-Type: application/json header with the request.

Valid fields:

Field Type Info Required
name string Max length: 100 required
organisation_id integer ID of the organisation to create the game under required
genre integer ID of the genre the game is not required

To get the genres, see the List Genres API call.

This call will return a full game object, as documented in Get detailed information about a game.

Get Detailed Information About a Game

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Using the /admin/game/{game_id} endpoint, you can fetch additional information about a game, there will be one game object, holding all information relevant to the game requested. Currently this will hold the following:

Field Type Value
id integer Game id
name string Game name
game_key string The games API key
sandbox_mode boolean If the game is in sandbox mode or not
created_at string The date the game was created in ISO8601 format
updated_at string The date the game was last updated in ISO8601 format

Example Response

{
  "success": true,
  "game": {
    "id": 1,
    "name": "SNOW Test",
    "game_key": "ka3ad899dc00258r42eb761f7654cc40f03cb271",
    "sandbox_mode": true,
    "created_at": "2015-01-26T14:01:51+0000",
    "updated_at": "2015-01-26T14:01:51+0000"
  }
}

Updating Information About a Game

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"SNOW Test 2\"}"

Updating game information happens at the /admin/game/{game_id} endpoint, with a PATCH request.

It is important to note that updating these values does not affect data at Steam, PSN or any other platforms.

Fields you are allowed to update are:

Field Type Info
name string Max length: 100
game_key string SHA1 hash, length: 40
sandbox_mode boolean

Any other fields sent will simply be ignored.

The body of the request have to be in JSON format, and you must supply a Content-Type: application/json header with the request.

The response from this request will return a full game object as explained in Get detailed information about a game.

Deleting games

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Deleting a game is done by hitting the /admin/game/{game_id} endpoint with a DELETE request. This is not completely permanent, but there is no API method for undoing this action.

Example Response

{
  "success": true
}

List Genres

curl -X GET "https://api.lootlocker.io/admin/v1/genres" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

List the genres LootLocker knows about using this api call.

Example Response

{
    "success": true,
    "genres": [
        {
            "id": 1,
            "name": "Other"
        },
        {
            "id": 2,
            "name": "Action / Adventure"
        },
        {
            "id": 3,
            "name": "Arcade"
        }
    ]
}

API Keys

Here are the endpoints for managing API keys for the game and server APIs.

Get API Keys

curl -X GET "https://api.lootlocker.io/admin/game/100/api_keys"

Get list of API keys.

URL Structure

/admin/game/<game_id>/api_keys

Example Response

{
  "api_keys": [
    {
      "id": "01GH960JB7A7ZS6ZN2CE9NVZGP",
      "game_id": 1,
      "api_key": "prod_7ea64274ada14674905bc3683208e618",
      "api_type": "game",
      "name": "Production API key",
      "created_at": "2022-11-07T13:55:53Z",
      "updated_at": "2022-11-07T13:55:53Z"
    }
  ]
}

URL Parts

Part Description
game_id ID of the game

Create API key

curl -X POST "https://api.lootlocker.io/admin/game/100/api_keys" \
-H "Content-Type: application/json" \
-d "{\"name\": \"Production API key\", \"api_type\": \"game\"}"

Create a new API key.

URL Structure

/admin/game/<game_id>/api_keys

Example Response

{
  "id": "01GH9643C4DWZPHN9YT8G8S06N",
  "game_id": 1,
  "api_key": "prod_7ea64274ada14674905bc3683208e618",
  "api_type": "game",
  "name": "Production API key",
  "created_at": "2022-11-07T14:57:48.548656525+01:00",
  "updated_at": "2022-11-07T14:57:48.548656525+01:00"
}

URL Parts

Part Description
game_id ID of the game

Available input fields

All fields are required.

Field Description
name Optional, name of your API key, used for making it easier to recognise
api_type Which API to create the key for, either game or server

Delete API key

curl -X DELETE "https://api.lootlocker.io/admin/game/100/api_key/01GH9643C4DWZPHN9YT8G8S06Ns"

Deletes the API key. This action cannot be undone, and will cause any users of the API to no longer be able to make requests.

Will return 204 NO CONTENT on success.

URL Structure

/admin/game/<game_id>/api_keys/<key_id>

URL Parts

Part Description
game_id ID of the game
key_id ID of the API key

Players

Listing Players

curl -X GET "https://api.lootlocker.io/admin/game/{game_id}/player/list?count=10&after=1234" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint allows you to list your players, with the newest players first.

Use the count parameter to set how many records you want returned per page.

Use the after to put a cursor from the pagination object in, and get the next or previous page.

You can filter players by their environment by including the query env with a value of either live or stage.

Example Response

{
  "pagination": {
    "total": 7,
    "next_cursor": 24,
    "previous_cursor": null
  },
  "items": [
    {
      "player_id": 1,
      "name": "YourBestFriend",
      "public_uid": "R2JCN6CG",
      "first_party_ids": [
        {
          "value": "0a014e44-ded7-4f91-9c8e-2e5053b9f6d1",
          "platform": "guest"
        }
      ],
      "last_seen": "2022-09-26T14:11:00Z",
      "first_seen": "2022-09-26T11:18:11Z",
      "environment": "live"
    }
  ]
}

Searching For Players

curl -X GET "https://api.lootlocker.io/admin/game/{game_id}/player/search?query=76561198023004363" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To search for players, see the example, and add your query in the query url parameter.

The query can be any unique identifier for the player. The search is performed on the identifier used to register a session, as well as Public UID's and the players set name.

This endpoint uses pagination. Each page returns 50 rows.

Example Response

{
    "players": [
      {
        "player_id": 760746,
        "name": "a player",
        "public_uid": "",
        "first_party_ids": [
          {
            "value": "a player",
            "platform": "psn"
          }
        ],
        "last_seen": "2022-04-27T14:05:28Z",
        "first_seen": "2016-10-22T07:29:03Z",
        "environment": "live"
      }
    ]
}

Getting Total Player Count

curl -X GET "https://api.lootlocker.io/admin/game/{game_id}/player/count" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will allow you to get the total number of players for a game. The response is a single integer in a JSON object.

If you wish to get the count for the stage version of a game, use the stage game's id instead of the live in the url.

Example Response

{
  "count": 5
}

Get Player Information

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/player/7" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To get detailed information for a player, see the example, using the players ID (obtainable from the Searching For Players endpoint).

Example Response

{
  "success": true,
  "players": [
    {
      "id": 24,
      "steamId": "76561198103370330",
      "psn_account_id": null,
      "last_seen": "2016-06-10 01:34:37",
      "creation_date": "2015-04-03 00:18:48",
      "banned": false,
      "public": true
    }
  ]
}

Get Player Score

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/player/7/score" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To get the players current score and level, see the example.

Example Response

{
  "success": true,
  "score": 60991,
  "last_level_up": "2016-05-18 20:35:37"
}

Add Player Score

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/players/7/score" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"score\": 100}"

You can add XP to a players account using the example. This will add the XP and trigger all the same events as when the player is gaining XP through normal ways, meaning that rewards will be granted and they will level up.

Example Response

{
  "success": true,
  "score": 61091,
  "last_level_up": "2016-05-18 20:35:37"
}

Reset Player Score

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/players/7/score" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

You can reset a players XP and Level using this endpoint. Beware that this will not reset previous rewards from leveling up, and other XP events.

Example Response

{
  "success": true,
  "score": 0,
  "last_level_up": "2016-05-18 20:35:37"
}

Get Player Steam Profile Info

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/steam/76561198023004363" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This is a proxy method for getting information on steam users.

Example Response

{
  "success": true,
  "player": {
    "name": "MrQ",
    "avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/50/502b0dd96b2163bbe4dcd3714800a8694e2254ea_full.jpg",
    "profile_url": "http://steamcommunity.com/id/stkhlm/"
  }
}

Get Player Inventory

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/player/7/inventory" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will let you get the players inventory, along with a few other pieces of information, such as if an item is refundable or not.

Example Response

{
  "success": true,
  "inventory": [
    {
      "id": "944",
      "player_id": "24",
      "asset_id": "16",
      "game_id": "2",
      "asset_variation_id": "28",
      "reserved": "0",
      "source": null,
      "updated_at": "2015-03-10 19:10:55",
      "variation_name": "poppermost-founder",
      "refundable": false
    },
    {
      "id": "945",
      "player_id": "24",
      "asset_id": "47",
      "game_id": "2",
      "asset_variation_id": "98",
      "reserved": "1",
      "source": null,
      "updated_at": "2015-03-10 19:10:55",
      "variation_name": "poppermost-13-tophat-founder",
      "refundable": true
    }
  ]
}

Refund Player Purchase

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/player/7/inventory/5713" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will issue a return of a an item to a player.

The return can only be done if the item is refundable (meaning it's been purchased with soft currency, through the Game API). When refunding, the players account balance will be refunded, and the asset will disappear from their inventory.

Example Response

{
  "success": true,
  "inventory": [
    {
      "id": "944",
      "player_id": "24",
      "asset_id": "16",
      "game_id": "2",
      "asset_variation_id": "28",
      "reserved": "0",
      "source": null,
      "updated_at": "2015-03-10 19:10:55",
      "variation_name": "poppermost-founder",
      "refundable": false
    }
  ]
}

Get Currencies To Player (Legacy)

This endpoint is part of the legacy economy system. If you are working with the new system please refer to List Balances.

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/player/7/currencies" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will return the currencies a player has and the balances they have for each currency.

Example Response

{
  "success": true,
  "currencies": [
    {
      "name": "Credits",
      "balance": "15952"
    }
  ]
}

Get Orders To Player

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/player/7/orders" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint returns a players orders and the products in them.

{
  "success": true,
  "orders": [
    {
      "id": "8077496",
      "player_id": "7",
      "game_id": "2",
      "status": "2",
      "created_at": "2016-06-26 12:28:52",
      "updated_at": "2016-06-26 12:28:52",
      "deleted_at": null,
      "status_name": "succeeded",
      "type": "asset_grant",
      "value": "0",
      "items": [
        {
          "id": "8777231",
          "player_id": "7",
          "asset_id": "988",
          "game_id": "2",
          "asset_variation_id": null,
          "reserved": "0",
          "source": "reward_trigger"
        }
      ]
    },
    {
      "id": "8077495",
      "player_id": "7",
      "game_id": "2",
      "status": "2",
      "created_at": "2016-06-26 07:28:37",
      "updated_at": "2016-06-26 07:28:38",
      "deleted_at": null,
      "status_name": "succeeded",
      "type": "asset_grant",
      "value": "0",
      "items": [
        {
          "id": "8777230",
          "player_id": "7",
          "asset_id": "984",
          "game_id": "2",
          "asset_variation_id": null,
          "reserved": "0",
          "source": "reward_trigger"
        }
      ]
    }
  ]
}

Set A Players Profile Private

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/player/public" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Players profiles are by default public.

A public profile means that the players inventories will be displayed on steam, and they will be able to use the market and trading features. The same goes for future 3rd party implementations. They will all respect the privacy setting.

Example Response

{
  "success": true
}

Set A Players Profile Public

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/player/public" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint sets a players profile to public.

Example Response

{
  "success": true
}

Delete a Players Profile

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/player/{player_id}" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint drops all references to the player, and effectively deletes the players account, in compliance with GDPR.

Example Response

{
  "success": true
}

List Players Persistent Storage

curl -X GET "https://api.lootlocker.io/admin/v1/game/1234/player/5678/storage" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

If you want to list a players persistent player storage, this call will return it for you.

There are three properties on player persistent storage:

Example Response

{
  "success": true,
  "storage": [
    {
      "key": "totalDeaths",
      "value": "171",
      "is_public": false
    }
  ]
}
Property Data Type Explanation
key string The key of the persistent storage entry
value string The value of the persistent storage entry
is_public boolean A boolean denoting if other players can read this persistent storage entry

Update Players Persistent Storage

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/1234/player/5678/storage" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -d "{\"payload\":[{\"key\":\"totalDeaths\",\"value\":\"171\",\"is_public\":true}]}"

When updating a players persistent storage, the format is the same as the output when listing, inside the storage property.

Note the payload outer property. You can omit that if your use case does not require a JSON object at the root level.

Example Response

{
  "success": true,
  "storage": [
    {
      "key": "totalDeaths",
      "value": "171",
      "is_public": true
    }
  ]
}

Delete Players Persistent Storage

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/1234/player/5678/storage?key=user.key" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Calling this endpoint will delete an entry associated with the supplied key from a players persistent storage.

Example Response

{
  "success": true,
  "storage": [
    {
      "key": "totalDeaths",
      "value": "171",
      "is_public": true
    }
  ]
}

Lookup multiple player names using IDs

curl -G "https://api.lootlocker.io/admin/game/1234/player/lookup/name" \
    -d player_id=1 \
    -d player_id=2 \
    -d player_public_uid=JARL7PGR \
    -d player_guest_login_id=a270686a-7dd7-482f-89b6-9b2a634f46fb \
    -d steam_id=9465748036854778475 \
    -d psn_id=1234567890 \
    -d xbox_id=E51D19530BBE721286F75C03B934E5EB7CA23B99 \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will return the names of the players on their last active platform.

Example Response

{
  "players": [
    {
      "player_id": 1,
      "player_public_uid": "6DDXH947",
      "name": "Player 1 Name",
      "last_active_platform": "xbox_one"
    },
    {
      "player_id": 2,
      "player_public_uid": "4FDGF738",
      "name": "Player 2 Name",
      "last_active_platform": "xbox_one"
    },
    {
      "player_id": 3,
      "player_public_uid": "JARL7PGR",
      "name": "Player 3 Name",
      "last_active_platform": "guest"
    },
    {
      "player_id": 4,
      "player_public_uid": "9HDK4F5Y",
      "name": "Player 4 PSN Name",
      "last_active_platform": "psn",
      "platform_player_id": "1234567890"
    },
    {
      "player_id": 5,
      "player_public_uid": "3XTMHFS3",
      "name": "Player 5 Steam Name",
      "last_active_platform": "steam",
      "platform_player_id": "9465748036854778475"
    },
    {
      "player_id": 6,
      "player_public_uid": "9RKPSRRT",
      "name": "Player 6 XBox Name",
      "last_active_platform": "xbox_one",
      "platform_player_id": "E51D19530BBE721286F75C03B934E5EB7CA23B99"
    },
    {
      "player_id": 7,
      "player_public_uid": "T4HV7G5D",
      "name": "Player 7 GuestLogin Name",
      "last_active_platform": "guest",
      "platform_player_id": "a270686a-7dd7-482f-89b6-9b2a634f46fb"
    }
  ]
}

Player Files

Player Files is a feature where you can store files for players in LootLocker's storage system, where they will then be distributed through our CDN for fast retrieval by your players. This feature can be used for any files you wish to save to LootLocker in a players scope, such as Cloud Saves, Avatars or any other reason you can come up with.

Limitations

There are two limitations on Player Files:

List Files

curl -X GET 'https://api.lootlocker.io/admin/game/:game_id/player/:player_id/files' \
    -H 'x-auth-token: 5995a0ce1afe87ac9dd49c509bd2fcae6f7d79ab' \
    -H "LL-Version: 2021-03-01"

Use this endpoint for listing the files a player owns.

The url_expires_at timestamp will let you know when you need to renew the URL for the download to work. URL's are valid for 6 hours.

Example Response

{
    "items": [
        {
            "id": 318,
            "revision_id": "01GPNZHCVEF6F0QGA3V2B7CN44",
            "name": "smol.jpg",
            "size": 7056,
            "purpose": "SAVE_GAME",
            "public": false,
            "url": "https://cdn.lootlocker.io/2/892/oJnNPGsiuzytMOJPatwtPilfsfykSBGp.jpg?Expires=1635369933&Signature=Wp-PUZdoh3XdqQNOnPP80-q81ftGpLVJ3oub3RajnfjaP15rHzVWCCJ8e8lzpzrzdilu1gxoTiK1NT7iZayJXV~1XvcagCbkLCsrLkHlDZ0ms17C1YL5iNu1crBCJOhOhpwhknDmgt95NWa2GjLydylj7-0mqjALoURAMzpWvmbXUClUhtzIgGsBIEn2jy~syplWtMstTHE13EHmsxqfbAr8fkp91JGHaLFqSJL5YvlnIe5WoVNeBII8tjBb6YtEEF2dyliLyJOk8RaGtCDodKMmwOlwAlw-~lyfPrUOxH62c87-vkn8~uPQgAxcX0kp6NDudFrO5uiyESyOymIscw__&Key-Pair-Id=APKAIIBA3IODTCVA4BKQ",
            "url_expires_at": "2021-10-27T21:25:33.339117882Z",
            "created_at": "2021-10-27T14:20:31Z"
        }
    ]
}

Update a File

curl -X PUT 'https://api.lootlocker.io/admin/game/:game_id/player/:player_id/files/:file_id' \
  -H 'x-auth-token: 5995a0ce1afe87ac9dd49c509bd2fcae6f7d79ab' \
  -H "LL-Version: 2021-03-01" \
  -F 'file=@"path/to/your/file"'

Use this endpoint to update a player file, updating a player file will create a new revision of that file. The system will keep last few revisions so you can rollback to a previous one if desired.

Successful upload example response

{
  "id": 318,
  "revision_id": "01GPNZHCVEF6F0QGA3V2B7CN44",
  "name": "save_game_1.zip",
  "size": 7056,
  "purpose": "SAVE_GAME_SLOT_1",
  "public": false,
  "url": "https://cdn.lootlocker.io/2/892/oJnNPGsiuzytMOJPatwtPilfsfykSBGp.jpg?Expires=1635366031&Signature=Z7MG~WgUyqpBNlXRePXxuV2uFbI0fEkAa3chk-3YO2XlWyd1veSl5V2dmFyVM1CndY6cfHo9ds3ilthwY~NjUiFmrx6ycfG3GJ5Z~kqzuyyMpH~LXTh~tIwnZpJpKScFUeBz5PpkSQPfOo4nuWktQBmpIgOhLlD2cWKOlQllBaIhjFvUh1HGIs-1u2-DiX9eDIgBDYzP4k0aMGH0aKjKF8Wb1jbAwaAcvQBeiPC~B~DgjlsHy6UjS59nYLCI-3EMheivk7H5-z-R65Au8VGg1koP89QtEjViy2HKbMKId~tQ3-cJg-ylRGHbE7jGlRyFC9CQLfeJXqx-IgaKfjVZCQ__&Key-Pair-Id=APKAIIBA3IODTCVA4BKQ",
  "url_expires_at": "2021-10-27T20:20:31.433987069Z",
  "created_at": "2021-10-27T14:20:31.428496822Z"
}

The url_expires_at timestamp will let you know when you need to renew the URL for the download to work. URL's are valid for 6 hours after uploading, or using any endpoint that returns the files.

Exceeded file size example response

{
  "message": "file too large",
  "request_id": "req_6eb044d0-5b1e-45cc-8651-f72b3ee44985"
}

List File Revisions

curl -X GET 'https://api.lootlocker.io/admin/game/:game_id/player/:player_id/files/:file_id/revisions' \
    -H 'x-auth-token: 5995a0ce1afe87ac9dd49c509bd2fcae6f7d79ab' \
    -H "LL-Version: 2021-03-01"

This endpoint lists all revisions for the file, revisions are populated as the player file is updated.

Example Response

{
  "file": {
    "id": 6951,
    "name": "smol.jpg",
    "purpose": "SAVE_GAME",
    "public": false,
    "created_at": "2021-10-24T14:20:31Z"
  },
  "current_revision_id": "01GPNZHCQ3119Q6K4VRS16V3HB",
  "revisions": [
    {
      "id": "01GPNZHCQ3119Q6K4VRS16V3HB",
      "size": 7056,
      "url": "https://cdn.lootlocker.io/10700/7604/bTyIgBowZuWeZDlhlpCwnbSgvOWmONmB.jpg?Expires=1673631081&Signature=UtS0H3XDdZc72aZhDF6~lB-~XOxYc7n9borwGrgZLrAFZ2Baqq5V0Iy-vsTKeS3JyLHmtBfDxE6ZmQdxCY0GRBL8R8iSvdvufftKr~6HWq~UXxKbNxg6hePXk-r8gJ5rL58zv5aSO8vrOZwfvKtdjmo-buOICrum~cq1MQembbfe9i0qP9drhX2xLkiCIxysVgVqCok8~DC9ymvOAKDK1vrKTIPmZBKre~sWsG1z3kOP0fH~jQpb6s8b7bnywIsky8MFOHJjJ-zpqyOZOXNNf2ysu1lDfslC13sbYO-FFjzFYUqjDPnnJAuHl5W9J0y7icrZ0n-AzEDHs6IBQqTlFQ__&Key-Pair-Id=APKAIIBA3IODTCVA4BKQ",
      "created_at": "2021-10-27T14:20:31Z"
    },
    {
      "id": "01GPNZHCVEF6F0QGA3V2B7CN44",
      "size": 7056,
      "url": "https://cdn.lootlocker.io/10700/7604/gTwDtqxVpEmetTuuryfVRDttqGjQSwQn.jpg?Expires=1673631081&Signature=hVF-3Ah~2KtlUq35k9oLd8SYsiMhIab3wGJ06euxj-PerwkJlOfb3RtFx1P2viV8zcqKVkJ2Wm2eIII23F9AzMjU12LENojke7Q5jiwuCjPFRoq-5bxE~mc4Dol9mdbUNstkfnO4faV9OUaKAlMuWAndbgZNrVca78kTZgA~TReq3Ov5a-4W5eWZO5THN4w78ZKo9OJY~MVu0hfjV3FAKoCFCPDl3GvDjarEdFgDkPWktTysYP4dfLv6W0C1JahOmhDSnSsVnQyf3WgKOLaIa1Cz~Dg-qd3m0uinZjsZh-MQXvcKHDfq9NpUlESjoPuXxLOyMz0d1NKJAewp3Ep0IQ__&Key-Pair-Id=APKAIIBA3IODTCVA4BKQ",
      "created_at": "2021-10-27T14:20:31Z"
    }
  ]
}

Tag Revision As Current

curl -X POST "https://api.lootlocker.io/admin/game/:game_id/player/:player_id/files/:file_id/revisions/:revision_id/current" \
    -H 'x-auth-token: 5995a0ce1afe87ac9dd49c509bd2fcae6f7d79ab' \
    -H "LL-Version: 2021-03-01"

This endpoint will tag the desired file revision as current, and that file revision will be served on all endpoints as the current one.

This endpoint will not have a body, being a 204 No Content HTTP response.

Delete File

curl -X DELETE "https://api.lootlocker.io/admin/game/:game_id/player/:player_id/files/:file_id" \
    -H 'x-auth-token: 5995a0ce1afe87ac9dd49c509bd2fcae6f7d79ab' \
    -H "LL-Version: 2021-03-01"

If you need to delete a file, this endpoint will allow you to do that.

This endpoint requires a parameter in the URL, holding the ID of the file you wish to obtain. You will get the ID of files when you upload them, or call the list endpoint.

This endpoint will not have a body, being a 204 No Content HTTP response.

The file will be deleted immediately and the action can not be reversed.

Player Progressions

Player progression API is used to track your player's progress on your game's progressions.

You can also add or subtract points, reset or delete player's progressions using this API.

Starting a player on a progression is as easy as just starting to add points to it.

Get Player Progressions

curl -X GET "https://api.lootlocker.io/admin/game/100/player/1/progressions?count=10&after=01GJN6J46DM00Z88WR225Y9P77"

Get list of progressions the specified player is currently on. Results are always sorted by ID.

URL Structure

/admin/game/<game_id>/player/<player_id>/progressions

Example Response

{
  "pagination": {
    "next_cursor": null,
    "previous_cursor": null,
    "total": 2
  },
  "items": [
  {
    "id": "01GJN6J46DM00Z88WR225Y9P77",
    "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
    "progression_key": "fighter",
    "progression_name": "fighter",
    "step": 1,
    "points": 200,
    "previous_threshold": 0,
    "next_threshold": null,
    "last_level_up": null
  },
  {
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "mage",
    "progression_name": "mage",
    "step": 3,
    "points": 1300,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z"
  }
  ]
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player

Query Parameters:

Field Description
after Cursor for pagination, a cursor will be returned in the response
count Number of progressions returned per page. Max 500 is allowed

Get Player Progression By ID

curl -X GET "https://api.lootlocker.io/admin/game/100/player/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF"

Get a single player progression by ID.

URL Structure

/admin/game/<game_id>/player/<player_id>/progressions/<progression_id>

Example Response

{
  "id": "01GJN6J46DM00Z88WR225Y9P77",
  "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
  "progression_key": "fighter",
  "progression_name": "fighter",
  "step": 1,
  "points": 200,
  "previous_threshold": 0,
  "next_threshold": null,
  "last_level_up": null
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
progression_id ID of the progression

Add points to a player progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/points/add" \
-d "{\"amount\": 1000 }" \
-H "Content-Type: application/json"

Adds specified amount of points to a player progression. If the player is not on that progression it will be automatically started.

If the player leveled up, awarded_tiers fields will contain acquired rewards.

URL Structure

/admin/game/<game_id>/player/<player_id>/progressions/<progression_id>/points/add

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "mage",
    "progression_name": "mage",
    "step": 3,
    "points": 1300,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z",
    "awarded_tiers": [
        {
            "id": "01GJ34GY6XD0NGRHXV6HHVJYM9",
            "step": 2,
            "points_threshold": 400,
            "rewards": {
                "progression_points_rewards": [
                    {
                        "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
                        "progression_name": "fighter",
                        "progression_key": "fighter",
                        "amount": 100
                    }
                ],
                "progression_reset_rewards": [
                    {
                        "progression_id": "01GJ34K7QBEB124MVE8BCFPAMG",
                        "progression_name": "rogue",
                        "progression_key": "rogue"
                    }
                ],
                "asset_rewards": [
                    {
                        "asset_id": 2,
                        "asset_variation_id": null,
                        "asset_rental_option_id": null
                    }
                ],
                "currency_rewards": [
                    {
                        "currency_id": "01HEJHRJ85PB157YV2GMHP79W1",
                        "currency_name": "Gold",
                        "currency_code": "GLD",
                        "amount": "100"
                    }
                ]
            }
        },
        {
            "id": "01GJ34H31MKHQD09K12WFEEQ4A",
            "step": 3,
            "points_threshold": 1000,
            "rewards": {
                "progression_points_rewards": [],
                "progression_reset_rewards": [],
                "asset_rewards": [],
                "currency_rewards": []
            }
        }
    ]
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
progression_id ID of the progression

Available input fields

amount is required.

Field Description
amount Amount of points to be added to the player's progression.

Subtract points from a player progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/points/subtract" \
-d "{\"amount\": 10 }" \
-H "Content-Type: application/json"

Subtracts specified amount of points from a player progression. The player cannot go down a progression step, the points will be set to the previous_threshold if too many points are being subtracted.

URL Structure

/admin/game/<game_id>/player/<player_id>/progressions/<progression_id>/points/subtract

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "mage",
    "progression_name": "mage",
    "step": 3,
    "points": 1290,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z",
    "awarded_tiers": []
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
progression_id ID of the progression

Available input fields

amount is required.

Field Description
amount Amount of points to be subtracted from the player's progression.

Reset a player progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/reset" \
-H "Content-Type: application/json"

Resets a player progression. This endpoint sets the player progression points to 0, so it still shows up as an active progression.

URL Structure

/admin/game/<game_id>/player/<player_id>/progressions/<progression_id>

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "mage",
    "progression_name": "mage",
    "step": 1,
    "points": 0,
    "previous_threshold": 0,
    "next_threshold": 1000,
    "last_level_up": null,
    "awarded_tiers": []
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
progression_id ID of the progression

Delete a player progression

curl -X DELETE "https://api.lootlocker.io/admin/game/100/player/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF" \
-H "Content-Type: application/json"

Deletes a player progression. It won't show up in player's active progression list.

URL Structure

/admin/game/<game_id>/player/<player_id>/progressions/<progression_id>

Example Response

This endpoint will not have a body, being a 204 No Content HTTP response.

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
progression_id ID of the progression

Assets

Getting all assets to a game

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/assets" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To get all assets to a game, call /admin/game/{game_id}/assets and you will get an array back with simple information about a games assets.

This call can be sped up by utilizing pagination for large datasets. By adding a page parameter to the end of the url, you will be requesting chunks of 100 assets per page. When you get an empty response, you've fetched all assets.

Example Response

{
  "success": true,
  "assets": [
    {
      "id": 1,
      "uuid": "8b860287-5d50-4948-8661-75dbe87b6506",
      "active": true,
      "purchasable": false,
      "tradable": false,
      "marketable": false,
      "name": "Head",
      "context": "Head",
      "last_changed": "2016-08-07T05:08:01+0000",
      "price": 0,
      "sales_price": 0,
      "filters": [],
      "thumbnail": "attachments/head...",
      "variations": [
        {
          "id": "1",
          "asset_id": "1",
          "name": "Default",
          "primary_color": null,
          "secondary_color": null,
          "created_at": "2015-02-20 21:53:34",
          "updated_at": "2015-02-20 21:53:34",
          "deleted_at": null
        }
      ],
      "rental_options": null,
      "storage": null,
      "flagged": null
    },
    {
      "id": 3,
      "uuid": "79838f0f-cc37-4854-a81f-eedf7be469b8",
      "active": true,
      "purchasable": true,
      "tradable": false,
      "marketable": false,
      "name": "Credits",
      "context": "Credits",
      "last_changed": "2016-08-07T05:08:01+0000",
      "price": 1000,
      "sales_price": 0,
      "filters": [
        {
          "name": "filter-test",
          "value": "great success"
        }
      ],
      "thumbnail": "https://cdn.lootlocker.io/...",
      "variations": [],
      "rental_options": null,
      "storage": null,
      "flagged": null
    }
  ]
}

You can filter the response to only contain certain contexts by supplying a GET parameter in the URL named context_id, containing the ID of the context you wish returned.

You can also search for assets using this endpoint. The search term will match asset names and context names. The parameter for searching is a GET style url parameter named search. Eg: https://api.lootlocker.io/admin/v1/game/{game_id}/assets?search=rocket.

You can optionally include the following list of flags in the fields parameter to return other fields in this result too. The fields parameter is a comma separated list of the flag values from the below table, in a get style parameter named fields. Eg: https://api.lootlocker.io/admin/v1/game/{game_id}/assets?fields=unique,context_id.

Flag Field Type Value
unique is_unique_instance boolean A boolean if an asset is marked as unique instance or not
rarity rarity_id integer An integer containing the id of the rarity of the asset
context_id context_id integer An integer with the ID of the context the asset belongs to
global is_global boolean A boolean denoting if the asset is currently global/universal or not
global_schedule global_schedule array of objects An array of all scheduled global/universal times for this asset. See Global Assets for data structure.

Getting a list of assets to a game

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/assets/1,2,3,4,916" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This call will return the same response format as getting all assets to a game will, but only data for the specific assets id's you've supplied in the url.

Get detailed asset information

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/asset/1" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This call will return a lot of information about an asset, and should only be used when listing detailed asset information.

Example Response

{
  "success": true,
  "asset": {
    "id": 5,
    "uuid": "4785e978-09f9-4e07-83bd-ed36600930d4",
    "active": true,
    "purchasable": true,
    "name": "Sven",
    "last_changed": "2016-08-07T05:08:01+0000",
    "price": 39,
    "sales_price": 0,
    "on_steam": true,
    "languages": {
      "1": {
        "id": 1,
        "name": "US English"
      }
    },
    "context_id": 4,
    "global": null,
    "featured": null,
    "activation_errors": [],
    "min_game_version_id": 0,
    "rarity": null,
    "popular": false,
    "popularity_score": 0,
    "unique_instance": false,
    "external_identifiers": null,
    "contexts": [
      {
        "id": 1,
        "name": "Head"
      },
      {
        "id": 2,
        "name": "Flashlight"
      },
      {
        "id": 58,
        "name": "Feature Unlocks"
      }
    ],
    "background_color": "",
    "name_color": "089AEF",
    "tradable": false,
    "marketable": false,
    "market_name": "Test 1",
    "market_hash_name": "Test 1",
    "market_fee": "0.30",
    "links": [],
    "link_types": {
      "1": {
        "id": 1,
        "name": "Steam Square",
        "type": 0
      },
      "2": {
        "id": 2,
        "name": "Steam Big",
        "type": 0
      },
      "3": {
        "id": 3,
        "name": "In-game Thumbnail",
        "type": 1
      },
      "8": {
        "id": 8,
        "name": "In-game Square",
        "type": 1
      }
    },
    "game_versions": [
      {
        "id": 2,
        "version": "0.5.1.569095"
      },
      {
        "id": 3,
        "version": "0.5.2.571294"
      }
    ],
    "is_package": false,
    "variations": [
      {
        "id": 3,
        "name": "lo2-gloves-13-sven",
        "default": true,
        "primary_color": "818987",
        "secondary_color": "EE8D29",
        "links": [
          {
            "id": 1,
            "url": "CharacterAttachments/Item Thumbnails/hands/lo2/thumb_lo2-13-sven.tif",
            "type_id": 3
          },
          {
            "id": 449,
            "url": "https://pm-game-files.s3.amazonaws.com/2/54eefc7c704bc.png",
            "type_id": 1
          },
          {
            "id": 456,
            "url": "https://pm-game-files.s3.amazonaws.com/2/54eefc7fe4111.png",
            "type_id": 2
          }
        ],
        "properties": [
          {
            "material_path": "CharacterAttachments/hands/lo2/lo2-gloves-13-sven/lo2-gloves-13-sven.mtl",
            "binding_path": "CharacterAttachments/hands/shared-meshes/gloves-a/gloves-a.skin",
            "bone_id": 12,
            "min_game_version_id": null
          },
          {
            "material_path": "CharacterAttachments/hands/lo2/lo2-gloves-13-sven/lo2-gloves-13-sven.mtl",
            "binding_path": "characterattachments/hands/shared-meshes/gloves-a/gloves_a_geo.skin",
            "bone_id": 12,
            "min_game_version_id": 20
          }
        ]
      }
    ],
    "filters": {
      "1": {
        "name": "Brand",
        "id": "1",
        "value": {
          "value": "lo2",
          "url": null
        }
      },
      "2": {
        "name": "Season",
        "id": "2",
        "value": {
          "value": "13/14",
          "url": null
        }
      },
      "5": {
        "name": "Drop Point Category",
        "id": "5",
        "value": null
      }
    },
    "bones": [
      {
        "id": 12,
        "name": "arms"
      },
      {
        "id": 7,
        "name": "bindings_left"
      },
      {
        "id": 8,
        "name": "bindings_right"
      }
    ],
    "boneParameters": [
      {
        "name": "type",
        "value": "CA_SKIN",
        "bone_id": "12"
      },
      {
        "name": "rotation",
        "value": "1,0,0,0",
        "bone_id": "7"
      },
      {
        "name": "position",
        "value": "-0.16281861,0.007631816,-0.93363667",
        "bone_id": "7"
      },
      {
        "name": "boneName",
        "value": "Bip01 L Foot",
        "bone_id": "7"
      },
      {
        "name": "flags",
        "value": "0",
        "bone_id": "7"
      },
      {
        "name": "type",
        "value": "CA_BONE",
        "bone_id": "7"
      }
    ],
    "package_contents": [],
    "drop_table_groups": [],
    "drop_table_max_picks": null,
    "drop_table_roll_count": null,
    "simple_asset": false
  }
}

For a table structure of a full response, please see the Asset Data Structures section of this documentation.

Create asset

# Creating an asset, setting only some information
curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/asset" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"
    -H "Content-Type: application/json"
    -d "{\"context_id\": 1, \"name\": \"Energy Drink Deluxe\", \"actions\": [{\"url\": \"http://www.snowthegame.com\", \"name\": \"Game website\", \"owner_only\": false}]}"

There are only a few required fields, but you can only activate an asset when it's complete.

Required fields: context_id and name.

The response from this call will be equal to a response from Get Detailed Asset Information.

For a full list of properties that can be set when creating an asset, please refer to the Asset Data Structures.

Update asset

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/asset/4" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

When you wish to update an asset, use this endpoint. It takes the same input as the Create Asset endpoint, and returns the same response.

For a full list of properties that can be set when updating an asset, please refer to the Asset Data Structures.

Delete asset

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/asset/4" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint allows you to delete an asset, removing it from the admin interface. The asset will need to be deactivated before deletion.

The endpoint can only be used to delete stage assets. Once deletion is complete, you can merge the change to the live environment via the Management Console.

Checking If An Asset Can Be Activated

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/asset/4/can/activate" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This call will return a boolean called can_activate telling you if an asset can be activated or not. If it can not, you will also see an errors property, which will be an array containing the reasons an asset can not be activated. In the example response you see an error. In case of a success, the error property will not be present, and the can_activate will hold the value true.

Example Error Response

{
  "success": false,
  "can_activate": false,
  "errors": ["No context have been assigned to this asset."]
}

Example Success Response

{
  "success": true,
  "can_activate": true
}

Activating An Asset

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/asset/4/activate" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Issuing this call will activate the asset id you've provided.

In case of an error, you will get a response identical to what Checking If An Asset Can Be Activated returns. In case of a success, you will simply have a success property with the value true.

Example Response

{
  "success": true
}

Deactivating An Asset

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/asset/4/deactivate" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -d "{\"reason\": \"Here is a good reason for deactivating this asset\", \"replacement_asset_id\": 5}"

This is what an example deactivation call could be, it takes a JSON input, with one or two properties: reason and replacement_asset_id. You can supply both, and you must supply at least one of them. The reason will be displayed to players as a notification when they boot the game, and the replacement_asset_id will be silent.

In case you get any errors back from this call, there will be an error property in the payload which will hold an array of text errors. See example.

Example Error Response

{
  "success": false,
  "error": [
    "When not supplying a replacement asset, you must give a reason for deactivating the asset.",
    "When not supplying a reason for deactivating an asset, you must supply a replacement asset."
  ]
}

When you get successful response, you will simply see a success property with the value true.

Get Contexts

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/assets/contexts" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To list the contexts configured for the current game, call this endpoint.

Example Response

{
  "success": true,
  "contexts": [
    {
      "id": 1,
      "uuid": "20914798-d428-4a11-99a1-64ebac1c8d60",
      "name": "Head",
      "friendly_name": null,
      "detachable": false,
      "user_facing": false,
      "characters": {
        "skier": true,
        "snowboarder": true
      },
      "dependent_asset_id": false,
      "editable": true
    },
    {
      "id": 6,
      "uuid": "8b860287-5d50-4948-8661-75dbe87b6506",
      "name": "Goggles",
      "friendly_name": "Eyes",
      "detachable": true,
      "user_facing": true,
      "characters": {
        "skier": true,
        "snowboarder": true
      },
      "dependent_asset_id": false,
      "editable": true
    }
  ],
  "unlock_assets": [
    {
      "id": 1405,
      "name": "Snowmobile Unlock"
    }
  ]
}

The field friendly_name is what will be showed in integrations and other external places.

detachable denotes if this context can be unequipped without equipping a new asset in it's place. Eg; Goggles can be unequipped, pants can not.

The user_facing field is a boolean indicating whether the context should be shown in integrations, such as Steam.

The characters field is an array of character type names, if the value is true, the character type can interact with this context.

dependent_asset_id denotes if this context is unlocked by the player owning a specific asset.

The editable boolean is there to let you know if this is an editable context or not. A few default contexts will have this set to false. Any context you create will always be editable.

The unlock_assets at the end of the data is the assets which qualify for being passed in to dependent_asset_id. In simpler terms, it's assets which context is Feature Unlocks.

Update Contexts

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/assets/contexts" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "[{\"name\": \"New Context\"}, {\"id\": 1, \"name\": \"Existing Context\"}]"

Updating contexts is done by updating them all at the same time. This is suboptimal, and is scheduled to be fixed in the future.

For the time being, you simply send the same format in as you get from the list, and change the values you want updated. If you want to create a new context, simply skip sending the id field along, and it will be created as a new context. Contexts can not currently be deleted.

The response from this endpoint is the same as is returned from the Get Contexts call.

Grant Asset To Player

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/player/{player_id}/inventory/grant" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -H "Content-Type: application/json" \
    -d "{\"asset_id\": 1, \"asset_variation_id\": 2}"

To grant an asset to a player through the admin API, you can use this endpoint. The asset_id is required, and the asset_variation_id and asset_rental_option_id fields are optional.

If your asset has variations, not providing an asset_variation_id will grant the default variation. If your asset is a rental asset, the asset_rental_option_id is required. Failing to provide it will cause an error.

If you do not want the granting of the asset to notify the player, you can add a silent boolean to the request body. This will prevent the player from receiving a notification about the granted asset.

Example Response

{
  "success": true,
  "assets": [] // array of granted assets
}

Asset Data Structures

This section holds tables that describe data structures surrounding assets.

Asset Root Object

The asset root object is a representation of the Asset Object. Single value root level properties will be described here, while any sub structure will have it's own table.

There are only two required fields for creating an asset, everything else is optional, but might need to be set for the asset to be activated (sent to your game). The required fields are context_id and name.

JSON Object with all arrays and objects set to their empty states

{
  "id": 2,
  "uuid": "64ba8834-e95c-46be-9de7-3acbef07001b",
  "live_asset_id": 1,
  "dev_asset_id": null,
  "active": true,
  "purchasable": false,
  "name": "Asset Name",
  "last_changed": "2021-01-21T12:41:48+00:00",
  "price": 0,
  "sales_price": 0,
  "on_steam": false,
  "languages": [],
  "context_id": 4,
  "global": null,
  "featured": null,
  "activation_errors": [],
  "min_game_version_id": 0,
  "rarity": null,
  "popular": false,
  "popularity_score": 0,
  "unique_instance": false,
  "external_identifiers": {
    "psn": null,
    "apple_app_store": null,
    "google_play": null
  },
  "rental_options": null,
  "loot_box_content": null,
  "drop_table_groups": null,
  "drop_table_max_picks": null,
  "drop_table_roll_count": null,
  "filters": [],
  "links": [],
  "is_package": false,
  "is_loot_box": false,
  "is_rental": false,
  "is_drop_table": false,
  "bones": [],
  "package_contents": [],
  "simple_asset": false,
  "flagged": null
}
Field Type Value
id integer The ID of the Asset
uuid string This is a UUID v4 assigned to the Asset automatically by LootLocker. It is consistent across live and stage versions of your Asset.
live_asset_id integer The ID of the live Asset if the current Asset is a dev version
dev_asset_id integer The ID of the dev Asset if the current Asset is a live version
name string The Asset name
last_changed string The date when this Asset was last changed
price integer The price of the Asset in cents or virtual currency
sales_price integger Sets the Asset on sale, overriding the price in any transactions if bigger than 0 or null
purchasable boolean Can this Asset be purchased?
context_id integer The ID of the Context this Asset belongs to
unique_instance boolean Can players own multiple or only one of this Asset?
on_steam boolean A boolean referencing if this Asset is exposed to Steam
background_color string HEX color. Used in Steam inventory.
name_color string HEX color. Used in Steam inventory.
tradable boolean Tradable on steam
marketable boolean Marketable on steam
market_name string Asset name in steam market
market_hash_name string Asset name used for grouping in steam market
market_fee double Percent from 0 to 1 to charge for steam market trades
featured object or null Dates for featured, or null if not featured.
global object or null Dates for global, or null if not global. See global Assets
storage object An array of objects with two properties: key (string) and value (string).
storage_templates array of objects An array of objects with Asset Storage Templates. See storage templates
min_game_version_id integer The id of the lowest version of the game that supports this Asset.
popular boolean Is this Asset popular?
popularity_score integer A score of how popular this Asset is
flagged boolean or null Applies only to UGC assets, and is null for all other Assets
simple_asset boolean If this Asset's complexity is considered simple by LootLocker (No variations or special logic)
drop_table_max_picks int or null An integer denoting how many dropped items the player is allowed to pick from a drop table. 0 and null = no limit
drop_table_roll_count int or null An integer denoting how many times the configured drop table groups should be evaluated for drops. Default 1.
activation_errors array An array of strings holding human readable errors that need to be corrected before the Asset can be activated.
external_identifiers array See asset external identifiers
drop_table_groups array See asset drop table groups
loot_box_content array See asset loot box content
variations array See asset variations
rarity object See asset rarities
links array See asset images
descriptions array See asset descriptions
tags array See asset tags
actions array See asset actions
is_package boolean A boolean representing if this Asset is a package of Assets
is_loot_box boolean A boolean representing if this Asset is a loot box
is_rental boolean A boolean representing if this Asset is a rental Asset
is_drop_table boolean A boolean representing if this Asset is a drop table
package_contents array See asset package contents
rental_options array See asset rental options

Global Assets

Global assets can either be null or be an object with a start and end date of the Assets global status. Note that the end date can also be null if there is no end set for the global status.

JSON Object

{
  "start_date": "2021-02-05 23:00:00",
  "end_date": null
}
Field Type Value
start_date string The UTC time zone date and time from when the Asset is global
end_date string or null The UTC time zone date and time from when the Asset is no longer global. Can also be null.

Storage Templates

Storage Templates are used to add many key/value storage entries to multiple Assets easily. Multiple templates can be applied to the same Asset, where the order is used to apply the templates from least significant to most significant. The key/value pairs set directly on the Asset override anything set in a template.

JSON Object

{
  "storage_templates": [
    {
      "id": 1,
      "order": 1
    }
  ]
}

If you wish to remove one or more templates from an Asset, send the storage_template property with only the template entries you wish to keep. LootLocker will automatically delete any entries that have not been sent along in the call.

Field Type Value
id integer The ID of the asset storage template
order integer The order the templates are applied in when returned through the Game and Server APIs

Asset External Identifiers

External Identifiers is how we map Assets to external services such as PSN, Apple's App Store and Google Play.

JSON Object

{
  "external_identifiers": {
    "psn": {
      "entitlement_id": "entitlement id",
      "product_id": "product id"
    },
    "apple_app_store": {
      "product_id": "product id"
    },
    "google_play": {
      "product_id": "product id"
    }
  }
}
Field Type Value
psn object An object holding the data necessary to map an asset to PSN
psn.entitlement_id string The entitlement ID set up on PSN
psn.product_id string The product ID set up on PSN
apple_app_store object An object holding the data necessary to map an asset to Apple's App Store
apple_app_store.product_id string The product ID set up on the App Store
google_play object An object holding the data necessary to map an asset to Google Play
google_play.product_id string The product ID set up on Google Play

Asset Drop Table Groups

Asset Drop Table Groups allows the configuration of drop tables in LootLocker.

JSON Object

{
  "id": 374,
  "name": "My Group Name",
  "weight": [70],
  "tags": ["skeleton", "mage"],
  "force_select": [false],
  "min_drop_count": 1,
  "max_drop_count": 4,
  "grants": [],
  "prevent_duplicate_drops": false
}
Field Type Value
id int The id of the drop table group
name string A free form name you can give to your group for identification purposes. It's never exposed outside of the Admin API.
weight array of int The weight representation of the group, starting from roll 1 going upwards
tags string array Any tags associated with the group
force_select array of boolean A boolean to force this group to drop loot (if not excluded by tags), starting from roll 1 going upwards
min_grant_count int A minimum number of drops from this group
max_grant_count int A maximum number of drops from this group
grants array See asset drop table group grants
prevent_duplicate_drops boolean Toggles prevention of duplicate drops from the same group if the same group is chosen in multiple rolls of the drop table.

Tags in both Drop Table Groups and Drop Table Group Grants can be used to influence the selection of which assets get granted to the player. For example, if you play a specific level as a specific character (skeleton), you might want to make sure you only drop loot that the character can use, so tagging any items with skeleton would allow you to only select those to be considered for granting. This applies to both groups and grants.

Asset Drop Table Group Grants

Asset Drop Table Group Grants is the grants that a drop table will select from when triggered.

JSON Object

{
  "drop_table_group_id": 1,
  "weight": 2,
  "force_select": false,
  "asset_id": 3,
  "asset_variation_id": 4,
  "asset_rental_option_id": null,
  "tags": ["skeleton"],
  "child_asset": {
    "name": "Skeleton Sword",
    "thumbnail": "https://cdn.lootlocker.io/...",
    "variation_name": "Excaliburs Underwear",
    "rental_option_name": null,
    "price": 5,
    "context": "Swords"
  }
}
Field Type Value
drop_table_group_id integer The id of the Asset Drop Table Group this grant belongs to
weight integer The weight representation of the grant
force_select boolean A boolean to force this grant to drop (if not excluded by tags)
asset_id integer The ID of the contained Asset
asset_variation_id integer The id of the variation of the contained Asset or null
asset_rental_option_id integer The id of the rental option of the contained Asset or null
tags string array Any tags associated with the grant
child_asset object An object with data to help represent the contained Asset
child_asset.name string The name of the contained Asset
child_asset.thumbnail string A url to a thumbnail for the contained Asset (Relative to the variation if present)
child_asset.variation_name string The potential name of the variation of the contained Asset
child_asset.rental_option_name string The potential name of the rental option of the contained Asset
child_asset.price integer The price of the contained Asset
child_asset.context string The name of the context the contained Asset belongs to

Asset Loot Box Content

Asset Loot Box Content is an array of assets contained inside a Loot Box asset, represented in a simplified structure, which provides what is necessary to render a preview.

JSON Object

{
  "asset_id": 1,
  "asset_variation_id": null,
  "asset_rental_option_id": null,
  "weight": 1,
  "group": 1,
  "child_asset": {
    "name": "Rail Gun",
    "thumbnail": "url or path",
    "variation_name": "Destroyer of Ships",
    "rental_option_name": null,
    "price": 100,
    "context": "guns"
  }
}
Field Type Value
asset_id integer The ID of the contained Asset
asset_variation_id integer The id of the variation of the contained Asset or null
asset_rental_option_id integer The id of the rental option of the contained Asset or null
weight integer The weight representation of the grant
group integer The group this grant belongs to
child_asset object An object with data to help represent the contained Asset
child_asset.name string The name of the contained Asset
child_asset.thumbnail string A url to a thumbnail for the contained Asset (Relative to the variation if present)
child_asset.variation_name string The name of the variation of the contained Asset
child_asset.rental_option_name string The name of the rental option of the contained Asset
child_asset.price integer The price of the contained Asset
child_asset.context string The name of the context the contained Asset belongs to

Asset Variations

Variations are used to allow sharing of properties between Assets that are very similar, such as hats that only vary in color or pattern, but otherwise are identical.

JSON Object with arrays set to default empty state

{
  "id": 374,
  "name": "Default",
  "default": true,
  "primary_color": null,
  "secondary_color": null,
  "links": [],
  "properties": []
}
Field Type Value
id integer Variation ID
name string The name of the variation
default boolean If this is the assets default variation. This is used to select the variation if it is not provided specifically in other calls
links array See asset images
properties array See asset variation properties

Asset Variation Properties

The properties of a variation can be used to let your game client know where to find the material and binding, which attachment (bone_id) it belongs to and to set a minimum game version this variation should be returned to.

JSON Object

{
  "material_path": "file path",
  "binding_path": "file_path",
  "bone_id": 79,
  "min_game_version_id": null
}
Field Type Value
material_path string A path to a material stored in your game
binding_path string A path to a binding stored in your game
bone_id integer The id of the bone (Attachment) this variation belongs to
min_game_version_id integer The id of the minimum game version this variation should be returned to

Asset Descriptions

Descriptions show up in steam and other relevant places. Colors are used exclusively in steam for now.

JSON Object with arrays set to default empty state

{
  "id": 1,
  "active": true,
  "owner_only": false,
  "type": "text",
  "color": "336699",
  "label": "Gun: ",
  "values": []
}
Field Type Value
id integer ID of description
active boolean Is this description active?
owner_only boolean Switch for showing publicly or only for owner
type enum Possible values: text, html, image
color string HEX color to display text type in
label string Prefix before value
values array See asset description values

Asset Description Values

JSON Object

{
  "id": 1,
  "language_id": 1,
  "value": "High speed rail gun"
}
Field Type Value
id integer ID of the value
language_id integer ID of the language
value string The actual value (Max length: 500)

Asset Tags

Tags are used as filtering options in steam.

JSON Object with arrays set to default empty state

{
  "id": 1,
  "internal_name": "Gun tags",
  "internal_category": "guns",
  "tag_names": [],
  "category_names": []
}
Field Type Value
id integer ID of the tag
internal_name string Identifier for tag. Not user facing.
tag_names array See asset tag names below
internal_category string A category used by steam to group tags. Not user facing.
category_names array See asset category names

Asset Tag names

These are the translated variants of the tag. These are shown to the user.

JSON Object

{
  "id": 1,
  "language_id": 1,
  "value": "localized tag name"
}
Field Type Value
id integer ID of the tag name
language_id integer ID of the language
value string Translated string (Max length: 100)

Asset Category names

These are the translated variants of the category. They are shown to the user.

JSON Object

{
  "id": 1,
  "language_id": 1,
  "value": "localized category name"
}
Field Type Value
id integer ID of the category name
language_id integer ID of the language
value string Translated string (Max length: 100)

Asset Actions

Actions is a steam concept, and shows up as buttons in the steam inventory.

Steam helps with these and replaces the urls %assetid%, %contextid%, and %appid%, with the asset's ID, context ID, and owning app ID, respectively.

JSON Object

{
  "id": 1,
  "url": "https://yourwebsite.com/assets/%assetid%",
  "name": "See Asset",
  "owner_only": true
}
Field Type Value
id integer Action ID
url string URL endpoint for action
name string The name of the action
owner_only boolean Only show action for owner

Asset Images

For legacy reasons images are referenced as links in LootLocker at the moment.

Asset links can be present both on the root of an Asset, and on Asset Variations.

JSON Object

{
  "id": 1,
  "url": "url or file path",
  "type_id": 1
}
Field Type Value
id integer Link ID
url string A CDN url or in-game file path to the linked file
type_id integer A reference to the type of link this is.

Asset Rarities

Asset Rarities is an object holding information about the rarity of an asset. The object has 3 properties, which are all optional.

JSON Object

{
  "id": 1,
  "name": "Ultra Rare",
  "short_name": "UR",
  "color": "c6c891"
}
Field Type Value
id integer The ID of the rarity
name string A name of the rarity, eg: Legendary
short_name string A short version of the name, eg: L
color string A HEX color for the rarity, eg: c6c891

Asset Package Contents

Package Content is an array of assets contained inside another asset, represented in a simplified structure, which provides what is necessary to render a preview. Packages can not contain other packages, so there will never be a nesting level deeper or a circular reference.

JSON Object

{
  "asset_id": 1,
  "asset_variation_id": 2,
  "quantity": 1337,
  "child_asset": {
    "name": "Rail Gun",
    "thumbnail": "url or path",
    "variation_name": "Destroyer of Ships",
    "price": 100,
    "context": "guns"
  }
}
Field Type Value
asset_id integer The ID of the contained Asset
asset_variation_id integer The id of the variation of the contained Asset or null
quantity integer The quantity of the contained asset
child_asset object An object with data to help represent the contained Asset
child_asset.name string The name of the contained Asset
child_asset.thumbnail string A url to a thumbnail for the contained Asset (Relative to the variation if present)
child_asset.variation_name string The name of the variation of the contained Asset
child_asset.price integer The price of the contained Asset
child_asset.context string The name of the context the contained Asset belongs to

Asset Rental Options

Rental Options is the different pricing tiers and rental durations associated with a rental asset. They are represented in an array of objects.

JSON Object

{
  "rental_options": [
    {
      "id": 1,
      "name": "1 Day",
      "duration": 86400,
      "price": 500,
      "sales_price": null,
      "links": [
        {
          "id": 2,
          "url": "https://cdn.lootlocker.io/...",
          "type_id": 3
        }
      ]
    }
  ]
}
Field Type Value
id integer The ID of the Rental Option
name string The name of the Rental Option
duration integer The duration of the Rental Option, in seconds
price integer The price of the Rental Option
sales_price integer The sales_price of the Rental Option
links array of objects Any images associated with the Rental Option
links.id integer The ID of the link
links.url string The URL/Path to the link (can be both CDN hosted by LootLocker, or a local path in your game)
links.type_id integer A reference to the type of link this is

Asset Instance Progressions

Asset Instance progression API is used to track progressions of asset instances.

You can also add or subtract points, reset or delete asset instance progressions using this API.

Starting an asset instance progression is as easy as just starting to add points.

Get Asset Instance Progressions

curl -X GET "https://api.lootlocker.io/admin/game/100/player/1/assets/instances/1/progressions?count=10&after=01GJN6J46DM00Z88WR225Y9P77"

Get list of progressions the specified asset instance is currently on. Results are always sorted by ID.

URL Structure

/admin/game/<game_id>/player/<player_id>/assets/instances/asset_instance_id/progressions

Example Response

{
  "pagination": {
    "next_cursor": null,
    "previous_cursor": null,
    "total": 2
  },
  "items": [
  {
    "id": "01GJN6J46DM00Z88WR225Y9P77",
    "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
    "progression_key": "spring_battle_pass",
    "progression_name": "Spring Battle Pass",
    "step": 1,
    "points": 200,
    "previous_threshold": 0,
    "next_threshold": null,
    "last_level_up": null
  },
  {
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "summer_battle_pass",
    "progression_name": "Summer Battle Pass",
    "step": 3,
    "points": 1300,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z"
  }
  ]
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
asset_instance_id ID of the asset instance

Query Parameters:

Field Description
after Cursor for pagination, a cursor will be returned in the response
count Number of progressions returned per page. Max 500 is allowed

Get Asset Instance Progression By ID

curl -X GET "https://api.lootlocker.io/admin/game/100/player/1/assets/instances/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF"

Get a single asset instance progression by ID.

URL Structure

/admin/game/<game_id>/player/<player_id>/assets/instances/asset_instance_id/progressions/<progression_id>

Example Response

{
  "id": "01GJN6J46DM00Z88WR225Y9P77",
  "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
  "progression_key": "spring_battle_pass",
  "progression_name": "Spring Battle Pass",
  "step": 1,
  "points": 200,
  "previous_threshold": 0,
  "next_threshold": null,
  "last_level_up": null
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
asset_instance_id ID of the asset instance
progression_id ID of the progression

Add points to an asset instance progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/assets/instances/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/points/add" \
-d "{\"amount\": 1000 }" \
-H "Content-Type: application/json"

Adds specified amount of points to an asset instance progression. If the asset instance is not on that progression it will be automatically started.

If the asset instance leveled up, awarded_tiers fields will contain acquired rewards.

URL Structure

/admin/game/<game_id>/player/<player_id>/assets/instances/asset_instance_id/progressions/<progression_id>/points/add

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "summer_battle_pass",
    "progression_name": "Summer Battle Pass",
    "step": 3,
    "points": 1300,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z",
    "awarded_tiers": [
        {
            "id": "01GJ34GY6XD0NGRHXV6HHVJYM9",
            "step": 2,
            "points_threshold": 400,
            "rewards": {
                "progression_points_rewards": [
                    {
                        "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
                        "progression_name": "paragon",
                        "progression_key": "Paragon",
                        "amount": 100
                    }
                ],
                "progression_reset_rewards": [
                    {
                        "progression_id": "01GJ34K7QBEB124MVE8BCFPAMG",
                        "progression_name": "bonus_xp",
                        "progression_key": "Bonus XP"
                    }
                ],
                "asset_rewards": [
                    {
                        "asset_id": 2,
                        "asset_variation_id": null,
                        "asset_rental_option_id": null
                    }
                ],
                "currency_rewards": [
                    {
                        "currency_id": "01HEJHRJ85PB157YV2GMHP79W1",
                        "currency_name": "Gold",
                        "currency_code": "GLD",
                        "amount": "100"
                    }
                ]
            }
        },
        {
            "id": "01GJ34H31MKHQD09K12WFEEQ4A",
            "step": 3,
            "points_threshold": 1000,
            "rewards": {
                "progression_points_rewards": [],
                "progression_reset_rewards": [],
                "asset_rewards": [],
                "currency_rewards": []
            }
        }
    ]
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
asset_instance_id ID of the asset instance
progression_id ID of the progression

Available input fields

amount is required.

Field Description
amount Amount of points to be added to the asset instance's progression.

Subtract points from an asset instance progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/assets/instances/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/points/subtract" \
-d "{\"amount\": 10 }" \
-H "Content-Type: application/json"

Subtracts specified amount of points from an asset instance progression. Progression cannot go down a level, the points will be set to the previous_threshold if too many points are being subtracted.

URL Structure

/admin/game/<game_id>/player/<player_id>/assets/instances/asset_instance_id/progressions/<progression_id>/points/subtract

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "summer_battle_pass",
    "progression_name": "Summer Battle Pass",
    "step": 3,
    "points": 1290,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z",
    "awarded_tiers": []
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
asset_instance_id ID of the asset instance
progression_id ID of the progression

Available input fields

amount is required.

Field Description
amount Amount of points to be subtracted from the asset instance's progression.

Reset an asset instance progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/assets/instances/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/reset" \
-H "Content-Type: application/json"

Resets an asset instance progression. This endpoint sets the asset instance progression points to 0, so it still shows up as an active progression.

URL Structure

/admin/game/<game_id>/player/<player_id>/assets/instances/asset_instance_id/progressions/<progression_id>

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "summer_battle_pass",
    "progression_name": "Summer Battle Pass",
    "step": 1,
    "points": 0,
    "previous_threshold": 0,
    "next_threshold": 1000,
    "last_level_up": null,
    "awarded_tiers": []
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
asset_instance_id ID of the asset instance
progression_id ID of the progression

Delete an asset instance progression

curl -X DELETE "https://api.lootlocker.io/admin/game/100/player/1/assets/instances/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF" \
-H "Content-Type: application/json"

Deletes an asset instance progression. It won't show up in the progression list.

URL Structure

/admin/game/<game_id>/player/<player_id>/assets/instances/asset_instance_id/progressions/<progression_id>

Example Response

This endpoint will not have a body, being a 204 No Content HTTP response.

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
asset_instance_id ID of the asset instance
progression_id ID of the progression

Asset Image Types

Asset Image Types lets you create images for use with your game, the LootLocker interface and external services such as Steam.

There are two Default Types for the Asset Image Types. They are used to determine if the file is hosted by LootLocker on our CDN or if it's a self-hosted or in-game file.

Type Meaning Example
0 LootLocker CDN hosted file https://cdn.lootlocker.io/your/file/here.png
1 Self-hosted or in-game file Characters/MyTexture.tif

A Note About Steam Integration

To enable images for Steam Inventory Service, there needs to be two Asset Image Types with specific names and their types set to 0.

The Admin interface in LootLocker will prompt you to create them if you have Steam enabled as a platform and none of them exist. If you do not want to create them that way you can use the table below to create them using the endpoints listed here.

Name Type
Steam Square 0
Steam Big 0

List Asset Image Types

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/links"

This endpoint lists the Asset Image Types for the game you are requesting them from.

Example Response

{
    "success": true,
    "items": [
        {
            "id": 1,
            "name": "My Image Type",
            "type": 0,
            "is_thumbnail": true
        }
    ]
}

Get Asset Image Type

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/links/{image_type_id}"

This endpoint can be used to get a specific Asset Image Type.

{
    "success": true,
    "item": {
        "id": 1,
        "name": "My Image Type",
        "type": 0,
        "is_thumbnail": true
    }
}

Create Asset Image Type

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/links" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"Image\", \"type\": 0, \"is_thumbnail\": true}"

This endpoint will create a new Asset Image Type. It takes a JSON body, with three properties.

If the is_thumbnail property is set to true, this new Image Type will be used as the thumbnail for assets moving forward, and any existing will be set to false.

{
    "success": true,
    "item": {
        "id": 1,
        "name": "Image",
        "type": 0,
        "is_thumbnail": true
    }
}

Update Asset Image Type

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/links/{image_type_id}" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"Image\", \"type\": 0, \"is_thumbnail\": true}"

This endpoint will let you update an Asset Image Type. It takes the same request body as the Create Asset Image Type endpoint.

If the is_thumbnail property is set to true, this new Image Type will be used as the thumbnail for assets moving forward, and any existing will be set to false.

{
    "success": true,
    "item": {
        "id": 1,
        "name": "My Image Type",
        "type": 0,
        "is_thumbnail": true
    }
}

Delete Asset Image Type

To delete an Asset Image Type, the type must have no images relying on it. If you try to delete it and it has dependents, you will get a 400 Bad Request error and an error message you can use to display in your UI.

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/links/{image_type_id}"

Example Response

{
    "success": true
}

Asset Storage Templates

Asset Storage Templates is a feature that can be used to easily add additional and shared key/value storage to your Assets. Multiple templates can be applied to the same Asset, where the least significant template is the first in the order.

List Asset Storage Templates

curl -X GET "https://api.lootlocker.io/admin/game/1/assets/templates" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To list all Asset Storage Templates, call /admin/game/{game_id}/assets/templates. This will return a list of templates in the format seen in the example response.

You can also opt to have data returned with the Asset Storage Template list. To do so, simply add ?includeData=true to the end of the URL. Any Asset Storage Templates that do not have data will return an empty array.

Example Response without data

{
    "items": [
        {
            "id": 2,
            "game_id": 1,
            "name": "Template Name",
        }
    ]
}

Example Response with data

{
    "items": [
        {
            "id": 2,
            "game_id": 1,
            "name": "Template Name",
            "data": [
                {
                    "key": "The Key of this entry",
                    "value": "The Value of this entry"
                }
            ]
        }
    ]
}

Get Asset Storage Template

curl -X GET "https://api.lootlocker.io/admin/game/1/assets/templates/2" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To get a specific Asset Storage Template, call /admin/game/{game_id}/assets/templates/{template_id}. This will return a detailed representation of the Asset Storage Template. See the example response for details.

Example Response

{
  "id": 2,
  "game_id": 1,
  "name": "Template Name",
  "data": [
    {
      "key": "The Key of this entry",
      "value": "The Value of this entry"
    },
  ]
}

Create Asset Storage Template

curl -X POST "https://api.lootlocker.io/admin/game/1/assets/templates" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"Template Name\", \"data\": [{\"key\": \"A key\", \"value\": \"A value\"}]}"

To create an Asset Storage Template, use a POST request to call /admin/game/{game_id}/assets/templates, with the payload needed to create a new template.

Field Required Value
name Yes The name of your Asset Storage Template. Used to identify it throughout LootLocker.
data No An optional array of objects with a key and value property in each for setting the data on the Asset Storage Template.

Example Response

{
  "id": 2,
  "game_id": 1,
  "name": "Template Name",
  "data": [
    {
      "key": "The Key of this entry",
      "value": "The Value of this entry"
    },
  ]
}

Update Asset Storage Template

curl -X PATCH "https://api.lootlocker.io/admin/game/1/assets/templates/2" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"Template Name\", \"data\": [{\"key\": \"Another key\", \"value\": \"Another value\"}]}"

To update an Asset Storage Template, use a PATCH request to call https://api.lootlocker.io/admin/game/{game_id}/assets/templates/{template_id}. The response will reflect the updated resource.

If you want to delete a KV pair, simply omit it. If you want to delete all KV pairs, send an empty array.

Example Response

{
    "id": 2,
    "game_id": 1,
    "name": "Template Name",
    "data": [
        {
            "key": "The Key of this entry",
            "value": "The Value of this entry"
        },
        {
            "key": "Another key",
            "value": "Another value"
        }
    ]
}

Delete Asset Storage Template

curl -X DELETE "https://api.lootlocker.io/admin/game/1/assets/templates/2" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To delete an Asset Storage Template, use a DELETE request to call /admin/game/{game_id}/assets/templates/{template_id}. The response will be a 204 No Content with no response body.

You can not delete templates on the live version of your game.

Rarities

List Asset Rarities

curl -X "https://api.lootlocker.io/admin/v1/game/{game_id}/rarity"

This endpoint will return a list of all rarities defined for your game.

The color property is a HEX code, used to color the rarities and borders when assets are exposed to the Steam inventory and other services, as well as in the LootLocker management interface.

Example Response

{
    "success": true,
    "rarities": [
        {
            "id": 16,
            "name": "Common",
            "short_name": "C",
            "color": "ABCDEF"
        }
    ]
}

Create Asset Rarity

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/rarity" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"Legendary\", \"short_name\": \"L\", \"color\": \"ABCDEF\"}"

This endpoint will create a rarity for use with your games assets. All fields are optional and default to an empty value if not set.

Example Response

{
    "success": true,
    "rarity": {
        "id": 18,
        "name": "Legendary",
        "short_name": "L",
        "color": "ABCDEF"
    }
}

Update Asset Rarity

curl -X "https://api.lootlocker.io/admin/v1/game/{game_id}/rarity/{rarity_id}" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"Legendary\", \"short_name\": \"L\", \"color\": \"FEDBCA\"}"

This endpoint is used to update a rarity. Any changes will immediately propagate to all Assets using this rarity.

{
    "success": true,
    "rarity": {
        "id": 18,
        "name": "Legendary",
        "short_name": "L",
        "color": "FEDBCA"
    }
}

Delete Asset Rarity

curl -X "https://api.lootlocker.io/admin/v1/game/{game_id}/rarity/{rarity_id}"

This endpoint is used when you want to delete a rarity. A rarity must be empty (meaning not Assets reference it) before it can be deleted.

Example Response

{
    "success": true
}

User Generated Content

Get Candidates

curl -X GET "https://api.lootlocker.io/admin/v1/game/4/assets/candidates?count=20" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Get list of asset candidates pending moderation.

Optional fields

Field Type Value
count number Number of records that should be returned
after number Cursor for pagination, a cursor will be returned in the response
order string Either asc or desc for ascending and descending respectively. Defaults to asc.

Example success Response

{
    "items": [
        {
            "id": 16,
            ...
        }
    ],
    "pagination": {
        "total": 7,
        "next_cursor": 16
    }
}

Update Candidate

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/4/assets/candidate/10" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"
    -H "Content-Type: application/json"
    -d "{\"status\": \"approve\"}"

Update asset candidate moderation status.

Fields

Field Type Value
status string Required: approve or deny
comment string Optional comment, only used when denying an asset candidate

Example success Response

{
  "success": true
}

Characters

Characters are a core concept in LootLocker, and each player needs to have at least one to be able to equip assets. Characters can also be extended with extra functionality through the Heroes feature.

Through the Admin API you can configure your Character Classes.

There is currently a bit of confusion in the naming for Character Classes, as they were previously called Character Types in LootLocker, so any references to Character Types actually refer to Character Classes too. This will be fixed in upcoming v2 endpoints.

List Character Classes

curl -X GET "https://api.lootlocker.io/admin/v1/game/1234/loadout/default" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

To list all Character Classes configured for a game, call this endpoint, substituting 1234 for your games ID.

Example Response

{
    "success": true,
    "character_types": [
        {
            "default": false,
            "name": "Medic",
            "id": 3,
            "contexts": [],
            "storage": []
        },
        {
            "default": true,
            "name": "Heavy",
            "id": 1,
            "contexts": [
                {
                    "name": "Barks",
                    "default_loadout_asset": {
                        "name": "Quick Angry",
                        "image": null,
                        "variation_name": ""
                    }
                }
            ],
            "storage": [
                {
                    "key": "custom_data",
                    "value": "value"
                }
            ]
        }
    ]
}

Under the character_types property of a successful response, you will find the following structure:

Property Meaning
default Is this the default character class for newly created characters
name The name of your character class
id The ID of the character class
contexts An array of contexts this character class can equip assets from
contexts.name The name of the context
contexts.default_loadout_asset Structure for presenting asset information
contexts.default_loadout_asset.name The name of the default asset for this context
contexts.default_loadout_asset.image A URL to an image for this asset if one exists
contexts.default_loadout_asset.variation_name The variation name for this asset if it exists and was selected
storage An array of key/value pairs
storage.key The key of the pair
storage.value The value of the pair

Update Character Type

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/1234/loadout/default/5678" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -d "{\"name\": \"Heavy\", \"default\": false}"

To update a Character Type or it's default loadout, send a request to this endpoint, substituting 1234 for your games ID, and 5678 for the Character Type's ID.

If you wish to delete the default_loadout_asset, simply update with that key's value set to null.

If you wish to change or set the default_loadout_asset, instead set two properties: asset_id and variation_id if the asset has variations.

When changing a Default Character Type, using the default boolean, you do not need to both remove and add the status to both Character Types. LootLocker will automatically ensure that only the newly appointed default Character Type is default.

Creating a new Character Type is done by setting the Character Type ID to new instead of an integer.

Example Payload

{
    "default":true,
    "name":"Heavy",
    "contexts":[
        {
            "name":"Barks",
            "default_loadout_asset": {
                "asset_id":2,
                "variation_id":null,
            }
        }
    ]
}

The response from this call is the same as from List Character Classes.

Delete Character Type

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/1234/loadout/default/5678"

Character Types can only be deleted if they haven't been used to create a player character in your game. If player characters exist in your game, you will see the error in the Example Error Response.

A successful deletion will immediately remove the Character Type, as well as any Default Loadout that may have been configured for it.

Example Error Response

{
    "success": false,
    "error": "Instances of this character type exists, and because of that it can't be deleted"
}

Example Success Response

{
    "success": true
}

Character Progressions

Character progression API is used to track your player's specific characters progress on your game's progressions.

You can also add or subtract points, reset or delete character's progressions using this API.

Starting a character on a progression is as easy as just starting to add points to it.

Get Character Progressions

curl -X GET "https://api.lootlocker.io/admin/game/100/player/1/characters/1/progressions?count=10&after=01GJN6J46DM00Z88WR225Y9P77"

Get list of progressions the specified character is currently on. Results are always sorted by ID.

URL Structure

/admin/game/<game_id>/player/<player_id>/characters/<character_id>/progressions

Example Response

{
  "pagination": {
    "next_cursor": null,
    "previous_cursor": null,
    "total": 2
  },
  "items": [
  {
    "id": "01GJN6J46DM00Z88WR225Y9P77",
    "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
    "progression_key": "fighter",
    "progression_name": "fighter",
    "step": 1,
    "points": 200,
    "previous_threshold": 0,
    "next_threshold": null,
    "last_level_up": null
  },
  {
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "mage",
    "progression_name": "mage",
    "step": 3,
    "points": 1300,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z"
  }
  ]
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
character_id ID of the character

Query Parameters:

Field Description
after Cursor for pagination, a cursor will be returned in the response
count Number of progressions returned per page. Max 500 is allowed

Get Character Progression By ID

curl -X GET "https://api.lootlocker.io/admin/game/100/player/1/characters/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF"

Get a single character progression by ID.

URL Structure

/admin/game/<game_id>/player/<player_id>/characters/<character_id>/progressions/<progression_id>

Example Response

{
  "id": "01GJN6J46DM00Z88WR225Y9P77",
  "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
  "progression_key": "fighter",
  "progression_name": "fighter",
  "step": 1,
  "points": 200,
  "previous_threshold": 0,
  "next_threshold": null,
  "last_level_up": null
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
character_id ID of the character
progression_id ID of the progression

Add points to a character progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/characters/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/points/add" \
-d "{\"amount\": 1000 }" \
-H "Content-Type: application/json"

Adds specified amount of points to a character progression. If the character is not on that progression it will be automatically started.

If the character leveled up, awarded_tiers fields will contain acquired rewards.

URL Structure

/admin/game/<game_id>/player/<player_id>/characters/<character_id>/progressions/<progression_id>/points/add

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "mage",
    "progression_name": "mage",
    "step": 3,
    "points": 1300,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z",
    "awarded_tiers": [
        {
            "id": "01GJ34GY6XD0NGRHXV6HHVJYM9",
            "step": 2,
            "points_threshold": 400,
            "rewards": {
                "progression_points_rewards": [
                    {
                        "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
                        "progression_name": "fighter",
                        "progression_key": "fighter",
                        "amount": 100
                    }
                ],
                "progression_reset_rewards": [
                    {
                        "progression_id": "01GJ34K7QBEB124MVE8BCFPAMG",
                        "progression_name": "rogue",
                        "progression_key": "rogue"
                    }
                ],
                "asset_rewards": [
                    {
                        "asset_id": 2,
                        "asset_variation_id": null,
                        "asset_rental_option_id": null
                    }
                ],
                "currency_rewards": [
                    {
                        "currency_id": "01HEJHRJ85PB157YV2GMHP79W1",
                        "currency_name": "Gold",
                        "currency_code": "GLD",
                        "amount": "100"
                    }
                ]
            }
        },
        {
            "id": "01GJ34H31MKHQD09K12WFEEQ4A",
            "step": 3,
            "points_threshold": 1000,
            "rewards": {
                "progression_points_rewards": [],
                "progression_reset_rewards": [],
                "asset_rewards": [],
                "currency_rewards": []
            }
        }
    ]
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
character_id ID of the character
progression_id ID of the progression

Available input fields

amount is required.

Field Description
amount Amount of points to be added to the character's progression.

Subtract points from a character progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/characters/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/points/subtract" \
-d "{\"amount\": 10 }" \
-H "Content-Type: application/json"

Subtracts specified amount of points from a character progression. The character cannot go down a progression step, the points will be set to the previous_threshold if too many points are being subtracted.

URL Structure

/admin/game/<game_id>/player/<player_id>/characters/<character_id>/progressions/<progression_id>/points/subtract

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "mage",
    "progression_name": "mage",
    "step": 3,
    "points": 1290,
    "previous_threshold": 1000,
    "next_threshold": 2000,
    "last_level_up": "2022-11-24T16:12:41Z",
    "awarded_tiers": []
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
character_id ID of the character
progression_id ID of the progression

Available input fields

amount is required.

Field Description
amount Amount of points to be subtracted from the character's progression.

Reset a character progression

curl -X POST "https://api.lootlocker.io/admin/game/100/player/1/characters/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF/reset" \
-H "Content-Type: application/json"

Resets a character progression. This endpoint sets the character progression points to 0, so it still shows up as an active progression.

URL Structure

/admin/game/<game_id>/player/<player_id>/characters/<character_id>/progressions/<progression_id>

Example Response

{
    "id": "01GJN6JGK3AV0N8YJ9GHSCJ4D3",
    "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
    "progression_key": "mage",
    "progression_name": "mage",
    "step": 1,
    "points": 0,
    "previous_threshold": 0,
    "next_threshold": 1000,
    "last_level_up": null,
    "awarded_tiers": []
}

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
character_id ID of the character
progression_id ID of the progression

Delete a character progression

curl -X DELETE "https://api.lootlocker.io/admin/game/100/player/1/characters/1/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF" \
-H "Content-Type: application/json"

Deletes a character progression. It won't show up in character's active progression list.

URL Structure

/admin/game/<game_id>/player/<player_id>/characters/<character_id>/progressions/<progression_id>

Example Response

This endpoint will not have a body, being a 204 No Content HTTP response.

URL Parts

Part Description
game_id ID of the game
player_id ID of the player
character_id ID of the character
progression_id ID of the progression

Heroes

Heroes are an extension of the Characters functionality, which add extra functionality on top.

List Heroes

curl -X GET "https://api.lootlocker.io/admin/v1/game/2/heroes" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Listing heroes to a game is done by calling this endpoint. Very little information about each hero is returned here. Only what's needed to build a simple interface where you can inspect a hero more closely later, using the Get Hero endpoint.

Example Response

{
  "success": true,
  "heroes": [
    {
      "name": "Rick Astley",
      "hero_id": 3,
      "asset_id": 5,
      "character_type_id": 4,
      "character_type_name": "Medic",
      "exception_count": 0,
      "default_loadout": [
          {
              "id": 3,
              "live_hero_default_loadout_id": 2,
              "hero_id": 2,
              "asset_id": 298778,
              "asset_variation_id": null,
              "created_at": "2023-09-13 17:18:37",
              "updated_at": "2023-09-13 17:18:37",
              "thumbnail": "https://cdn.lootlocker.io/..."
          }
      ]
    }
  ]
}

Get Hero

curl -X GET "https://api.lootlocker.io/admin/v1/game/2/heroes/3" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint lets you get more information about a hero, than you get when you list them all.

This endpoint also returns the default loadout and equipping exceptions a hero has set up.

Example Response

{
  "success": true,
  "hero": {
    "name": "Rick Astley",
    "hero_id": 3,
    "asset_id": 5,
    "character_type_id": 4,
    "character_type_name": "Medic",
    "default_loadout": [
      {
        "id": 4,
        "asset_id": 2,
        "asset_variation_id": null,
        "thumbnail": "https://cdn.lootlocker.io/...",
        "created_at": "Mon Nov 30 2020 15:28:41 GMT+0000",
        "updated_at": "Mon Nov 30 2020 15:28:41 GMT+0000"
      }
    ],
    "exceptions": []
  }
}

Create Hero

curl -X POST "https://api.lootlocker.io/admin/v1/game/2/heroes" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -d "{\"name\": \"David Hasselhoff\", \"character_type_id\": 2}"

Example Response

{
  "success": true,
  "hero": {
    "name": "David Hasselhoff",
    "hero_id": 3,
    "asset_id": 4,
    "character_type_id": 2,
    "character_type_name": "Medic",
    "default_loadout": [],
    "exceptions": []
  }
}

Update Hero

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/2/heroes/3" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -d "{\"name\": \"Rick Astley\"}"

Example Response

{
  "success": true,
  "hero": {
    "name": "Rick Astley",
    "hero_id": 3,
    "asset_id": 4,
    "character_type_id": 2,
    "character_type_name": "Medic",
    "default_loadout": [],
    "exceptions": []
  }
}

Delete Hero

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/2/heroes/3"

Deleting a hero can be done by calling this endpoint.

Example Response

{
  "success": true
}

Adding an Asset to a Heroes Default Loadout

curl -x POST "https://api.lootlocker.io/admin/v1/game/2/heroes/3/defaults" \
    -d "{\"asset_id\": 2, \"asset_variation_id\": 4}"
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

When adding to a heroes default loadout, you can supply only an asset_id, or an asset_id with a corresponding asset_varaiation_id. If no asset_variation_id is supplied, the default variation for the asset is used, if it has any variations, however, the property is left empty, and the default variation is evaluated when the player creates the hero.

Example Response

{
  "success": true,
  "hero": {
    "name": "Rick Astley",
    "hero_id": 3,
    "asset_id": 5,
    "character_type_id": 4,
    "character_type_name": "Medic",
    "default_loadout": [
      {
        "id": 4,
        "asset_id": 2,
        "asset_variation_id": null,
        "thumbnail": "https://cdn.lootlocker.io/...",
        "created_at": "Mon Nov 30 2020 15:28:41 GMT+0000",
        "updated_at": "Mon Nov 30 2020 15:28:41 GMT+0000"
      }
    ],
    "exceptions": []
  }
}

Removing an Asset from a Heroes Default Loadout

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/2/heroes/3/defaults/4" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Example Response

{
  "success": true,
  "hero": {
    "name": "Rick Astley",
    "hero_id": 3,
    "asset_id": 5,
    "character_type_id": 4,
    "character_type_name": "Medic",
    "default_loadout": [],
    "exceptions": []
  }
}

Adding an Asset or a Context to a Heroes Exception List

curl -X POST "https://api.lootlocker.io/admin/v1/heroes/3/exceptions" \
    -d "" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

The exception list for a Hero is a list that can be used to make exceptions to the Hero's default equippable items (inherited from the Character Type).

Example Response

{
  "success": true,
  "hero": {
    "name": "Rick Astley",
    "hero_id": 5,
    "character_type_id": 2,
    "default_loadout": [],
    "exceptions": [
      {
        "id": 2,
        "asset_id": 2,
        "context_id": null,
        "can_equip": true,
        "created_at": "Tue Dec 1 2020 09:10:41 GMT+0000",
        "updated_at": "Tue Dec 1 2020 09:10:41 GMT+0000"
      }
    ]
  }
}

Removing an Asset or a Context from a Heroes Exception List

curl -X DELETE "https://api.lootlocker.io/admin/v1/heroes/3/exceptions/1234" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Example Response

{ "success": true }

Leaderboards

In the context of the admin API, leaderboards can be used to create/update/delete leaderboards but also moderate scores and members. To read more about leaderboards in general you can read our Leaderboard Product Documentation.

An entry on a leaderboard is called a member. Since it's possible to have leaderboards for all kinds of cases it doesn't make sense to use players here. Because of that member_id can be whatever you want as long as it makes sense in your game. For lots of cases using the players ID will make good sense, but you can imagine a case where you would rank different clans/guilds against each other for example. In that case you would use clan/guild ID as member_id.

When using a leaderboard ID in any url it's possible to replace this with the key set on the leaderboard instead.

Leaderboard Types

Generic leaderboards

Use this if you want do not want the extended player details from the player type leaderboard. This type allows you to create leaderboards not meant for players (guild/clan for example), or if your player data is not stored in LootLocker.

Player leaderboards

Meant for LootLocker players leaderboards. When submitting scores you must use player_id as member_id, but when retrieving data LootLocker will automatically attach player data such as name.

Metadata

Sometimes you want to store more data alongside the score for each entry on the leaderboard.

To accomplish this you can enable metadata on the leaderboard at the time of creation.

When submitting scores to that leaderboard you can send the metadata property with a string value in the request and that value will be automatically returned for that score entry.

Get Leaderboards

curl -X GET "https://api.lootlocker.io/admin/game/100/leaderboards?count=10&after=1"

Get list of leaderboards. Results are always sorted by ID.

URL Structure

/admin/game/<game_id>/leaderboards?count=10&after=0

Example Response

{
  "pagination": {
    "total": 20,
    "next_cursor": 2,
    "previous_cursor": null
  },
  "items": [
    {
      "id": 1,
      "key": "some key",
      "created_at": "2021-03-11T08:53:06Z",
      "updated_at": "2021-03-11T08:53:06Z",
      "direction_method": "descending",
      "enable_game_api_writes": true,
      "overwrite_score_on_submit": false,
      "has_metadata": true,
      "game_id": 100,
      "name": "Player Leaderboard",
      "type": "player"
    },
    {
      "id": 2,
      "key": "some_other_key",
      "created_at": "2021-03-11T13:29:25Z",
      "updated_at": "2021-03-11T13:29:25Z",
      "direction_method": "ascending",
      "enable_game_api_writes": false,
      "overwrite_score_on_submit": false,
      "has_metadata": false,
      "game_id": 100,
      "name": "Guild Leaderboard",
      "type": "generic"
    }
  ]
}

URL Parts

Part Description
game_id ID of the game

Query Parameters:

Field Description
after Cursor for pagination, a cursor will be returned in the response
count Number of leaderboards returned per page. Max 500 is allowed

Get Leaderboard By ID

curl -X GET "https://api.lootlocker.io/admin/game/100/leaderboards/1"

Get a single leaderboard by ID.

URL Structure

/admin/game/<game_id>/leaderboards/<leaderboard_id>

Example Response

{
  "id": 1,
  "key": "some key",
  "created_at": "2021-03-11T08:53:06Z",
  "updated_at": "2021-03-11T08:53:06Z",
  "direction_method": "descending",
  "enable_game_api_writes": true,
  "overwrite_score_on_submit": false,
  "has_metadata": true,
  "game_id": 100,
  "name": "Player Leaderboard",
  "type": "player"
}

URL Parts

Part Description
game_id ID of the game
leaderboard_id ID of the leaderboard

Create Leaderboard

curl -X POST "https://api.lootlocker.io/admin/game/100/leaderboards" \
-d "{\"name\": \"Global Leaderboard\", \"key\": \"some_third_key\", \"direction_method\": \"descending\", \"enable_game_api_writes\": false, \"overwrite_score_on_submit\": false, \"has_metadata\": true, \"type\": \"generic\"}" \
-H "Content-Type: application/json"

Create a new leaderboard.

URL Structure

/admin/game/<game_id>/leaderboards

Example Response

{
  "id": 3,
  "key": "some_third_key",
  "created_at": "2021-03-16T09:08:46.387539986Z",
  "updated_at": "2021-03-16T09:08:46.387539986Z",
  "direction_method": "descending",
  "enable_game_api_writes": false,
  "overwrite_score_on_submit": false,
  "has_metadata": true,
  "game_id": 100,
  "name": "Global Leaderboard",
  "type": "generic"
}

URL Parts

Part Description
game_id ID of the game

Available input fields

All fields are required.

Field Description
name Name of your leaderboard, used primarily in admin
key Optional unique key, can be used to retrieve the leaderboard later
type player/generic depending on your use case
direction_method Can only be ascending/descending, based on whether higher rank is lowest or highest number
enable_game_api_writes Enable Game API to submit scores
overwrite_score_on_submit Submitting a new score for member will always overwrite their existing score on leaderboard
has_metadata Enable submitting metadata along side the score for more data on each entry. Not possible to change later.

Update Leaderboard

curl -X PUT "https://api.lootlocker.io/admin/game/100/leaderboards/3" \
-d "{\"name\": \"Global Leaderboard 2\", \"key\": \"some_third_key\", \"direction_method\": \"ascending\", \"enable_game_api_writes\": true, \"overwrite_score_on_submit\": true}" \
-H "Content-Type: application/json"

URL Structure

/admin/game/<game_id>/leaderboards/<leaderboard_id|leaderboard_key>

Example Response

{
  "id": 3,
  "key": "some_third_key",
  "created_at": "2021-03-16T09:08:46.387539986Z",
  "updated_at": "2021-03-16T09:11:32.031258686Z",
  "direction_method": "ascending",
  "enable_game_api_writes": true,
  "overwrite_score_on_submit": true,
  "has_metadata": true,
  "game_id": 100,
  "name": "Global Leaderboard 2",
  "type": "generic"
}

URL Parts

Part Description
game_id ID of the game
leaderboard_id ID of the leaderboard
leaderboard_key key of the leaderboard

Available input fields

All fields are optional.

Field Description
name Name of your leaderboard, used primarily in admin
key Optional unique key, can be used to retrieve the leaderboard later
type player/generic depending on your use case
direction_method Can only be ascending/descending, based on whether higher rank is lowest or highest number
enable_game_api_writes Enable Game API to submit scores
overwrite_score_on_submit Submitting a new score for member will always overwrite their existing score on leaderboard

Delete Leaderboard

curl -X DELETE "https://api.lootlocker.io/admin/game/100/leaderboards/3"

Soft delete a leaderboard. It will no longer be possible to submit scores to that leaderboard.

URL Structure

/admin/game/<game_id>/leaderboards/<leaderboard_id|leaderboard_key>

Example Response

Versions after 2021-06-01 will return a 204 status code with no response body

Versions prior to 2021-06-01:

{
  "id": 3,
  "key": "some_third_key",
  "created_at": "2021-03-16T09:08:46.387539986Z",
  "updated_at": "2021-03-16T09:11:32.031258686Z",
  "direction_method": "ascending",
  "enable_game_api_writes": true,
  "overwrite_score_on_submit": true,
  "has_metadata": true,
  "game_id": 100,
  "name": "Global Leaderboard 2",
  "type": "generic"
}

URL Parts

Part Description
game_id ID of the game
leaderboard_id ID of the leaderboard
leaderboard_key key of the leaderboard

Delete Member

curl -X DELETE "https://api.lootlocker.io/admin/game/1/leaderboards/5/member/game_test_player_id"

Permanently removes a member from a leader board. Their entry + score will be removed. They can still submit new scores to that leaderboard.

URL Structure

/admin/game/<game_id>/leaderboards/<leaderboard_id|leaderboard_key>/member/<member_id>

Example Response

{
  "success": true
}

URL Parts

Part Description
game_id ID of the game
leaderboard_id ID of the leaderboard
leaderboard_key key of the leaderboard
member_id player_id if player type leaderboard, otherwise id used when submitting the score

Update Member Score

curl -X PUT "https://api.lootlocker.io/admin/game/1/leaderboards/5/member/1" \
-d "{\"score\": 1233}" \
-H "Content-Type: application/json"

Update the score for a member of a leaderboard. This ignores overwrite_score_on_submit on the leaderboard and overwrites the score no matter what.

If metadata is enabled for the leaderboard, that will be returned in the response.

URL Structure

/admin/game/<game_id>/leaderboards/<leaderboard_id|leaderboard_key>/member/<member_id>

Example Response

{
  "member_id": "1",
  "rank": 3,
  "score": 1233,
  "metadata": "some metadata"
}

URL Parts

Part Description
game_id ID of the game
leaderboard_id ID of the leaderboard
leaderboard_key key of the leaderboard
member_id player_id if player type leaderboard, otherwise id used when submitting the score

Get Member Rank

curl -X GET "https://api.lootlocker.io/admin/game/1/leaderboards/5/member/1"

Get rank for single member for a leaderboard. If leaderboard is of type player a player will also be in the response.

If metadata is enabled for the leaderboard, that will be returned in the response.

URL Structure

/admin/game/<game_id>/leaderboards/<leaderboard_id|leaderboard_key>/member/<member_id>

Example Response

{
  "member_id": "1",
  "rank": 3,
  "score": 3004,
  "player": {
    "id": 1,
    "public_uid": "TSEYDXD8",
    "name": "Player Name"
  },
  "metadata": "some metadata"
}

URL Parts

Part Description
game_id ID of the game
leaderboard_id ID of the leaderboard
leaderboard_key key of the leaderboard
member_id player_id if player type leaderboard, otherwise id used when submitting the score

Get All Member Ranks

curl -X GET "https://api.lootlocker.io/admin/game/1/leaderboards/member/4?count=1

Get all leaderboards with member information on the ones the member is on, with rank and score, as well as player information if the leaderboard is of type player.

If metadata is enabled for the leaderboard, that will be returned in the response.

URL Structure

/admin/game/<game_id>/leaderboards/member/<member_id>?count=1&after=0

Example Response

{
  "leaderboards": [
    {
      "rank": {
        "rank": 1,
        "member_id": "4",
        "score": 134076416,
        "player": {
          "name": "Player Name",
          "id": 4,
          "public_uid": "ABCD1234"
        },
        "metadata": "some metadata"
      },
      "leaderboard_id": 1,
      "leaderboard_key": "LeaderboardKey"
    }
  ],
  "pagination": {
    "total": 100,
    "next_cursor": "2",
    "previous_cursor": null
  }
}

URL Parts

Part Description
game_id ID of the game
member_id player_id if player type leaderboard, otherwise id used when submitting the score

Query Parameters

Field Description
after Cursor for pagination, a cursor will be returned in the response
count Number of members returned per page

Get Score List

curl -X GET "https://api.lootlocker.io/admin/game/1/leaderboards/10/list?count=3"

Get list of members in rank range.

Maximum allowed members to query for at a time is currently 500.

If leaderboard is of type player a player will also be in the response.

If metadata is enabled for the leaderboard, that will be returned in the response.

URL Structure

/admin/game/<game_id>/leaderboards/<leaderboard_id|leaderboard_key>/list?count=3&after=0

Example Response

{
  "pagination": {
      "total": 5,
      "next_cursor": "3",
      "previous_cursor": null
  },
  "items": [
    {
      "member_id": "1",
      "rank": 1,
      "score": 10000,
      "player": {
        "id": 1,
        "public_uid": "TSEYDXD8",
        "name": "Player Name"
      },
      "metadata": "some metadata"
    },
    {
      "member_id": "2",
      "rank": 2,
      "score": 9999,
      "player": {...},
      "metadata": "some metadata"
    },
    {
      "member_id": "3",
      "rank": 3,
      "score": 7500,
      "player": {...},
      "metadata": "some metadata"
    }
  ]
}

URL Parts

Part Description
game_id ID of the game
leaderboard_id ID of the leaderboard
leaderboard_key key of the leaderboard

Query Parameters

Field Description
after Cursor for pagination, a cursor will be returned in the response
count Number of members returned per page

Progressions

Progressions API allows you to create new progressions, update existing progressions, as well as their progression tiers and rewards.

Progressions can be used to track player progress, ranging from player levels, class levels, achievements, battle passes and everything in between.

Your game can have as many progressions as you need and your players can progress through as many as your game requires them to, possibilities are endless.

Get All Progressions

curl -X GET "https://api.lootlocker.io/admin/game/100/progressions?count=10&after=01GJ34JX0VKJKM4P6X9JHZ8FDF"

Get a list of all progressions. Results are always sorted by ID.

URL Structure

/admin/game/<game_id>/progressions

Example Response

{
  "pagination": {
    "total": 20,
    "next_cursor": null,
    "previous_cursor": null
  },
  "items": [
    {
      "id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
      "key": "warrior",
      "name": "warrior",
      "game_id": 100,
      "active": true,
      "allow_game_writes": true
    },
    {
      "id": "01GJ34969HM62X7DWTQ0QWEXVP",
      "key": "mage",
      "name": "mage",
      "game_id": 100,
      "active": true,
      "allow_game_writes": true
    }
  ]
}

URL Parts

Part Description
game_id ID of the game

Query Parameters:

Field Description
after Cursor for pagination, a cursor will be returned in the response
count Number of progressions returned per page. Max 500 is allowed

Get Progression By ID

curl -X GET "https://api.lootlocker.io/admin/game/100/progressions/01GJ34JX0VKJKM4P6X9JHZ8FDF"

Get a single progression by ID.

URL Structure

/admin/game/<game_id>/progressions/<progression_id>

Example Response

{
  "id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
  "key": "warrior",
  "name": "warrior",
  "game_id": 100,
  "active": true,
  "allow_game_writes": true
}

URL Parts

Part Description
game_id ID of the game
progression_id ID of the progression

Create a progression

curl -X POST "https://api.lootlocker.io/admin/game/100/progressions" \
-d "{\"name\": \"rogue\", \"key\": \"rogue\", \"active\": true, \"allow_game_writes\": true }" \
-H "Content-Type: application/json"

Create a new progression.

URL Structure

/admin/game/<game_id>/progressions

Example Response

{
  "id": "01GJ34K7QBEB124MVE8BCFPAMG",
  "key": "rogue",
  "name": "rogue",
  "game_id": 100,
  "active": true,
  "allow_game_writes": true
}

URL Parts

Part Description
game_id ID of the game

Available input fields

If name or key are not sent, we will generate them for the progression, you can always change them later.

Field Description
name Name of your progression, can be used for displaying a prettified name in your Game UI.
key Unique key, used for interacting with progression from the Game and Server APIs.
active Inactive progressions cannot be used from the Game and Server APIs.
allow_game_writes Controls if Game API is allowed to interact with the progression from the game Client

Update progression

Update an existing progression.

curl -X PUT "https://api.lootlocker.io/admin/game/100/progressions/3" \
-d "{\"name\": \"rogue\", \"key\": \"rogue\", \"active\": true, \"allow_game_writes\": true }" \
-H "Content-Type: application/json"

URL Structure

/admin/game/<game_id>/progressions/<progression_id|progression_key>

Example Response

{
  "id": "01GJ34K7QBEB124MVE8BCFPAMG",
  "key": "rogue",
  "name": "rogue",
  "game_id": 100,
  "active": true,
  "allow_game_writes": true
}

URL Parts

Part Description
game_id ID of the game
progression_id ID of the progression

Available input fields

If name or key are not sent, we will generate them for the progression, you can always change them later.

Field Description
name Name of your progression, can be used for displaying a prettified name in your Game UI.
key Unique key, used for interacting with progression from the Game and Server APIs.
active Inactive progressions cannot be used from the Game and Server APIs.
allow_game_writes Controls if Game API is allowed to interact with the progression from the game Client

Get Progressions Tiers

curl -X GET "https://api.lootlocker.io/admin/game/100/progressions/01GJ34969HM62X7DWTQ0QWEXVP/tiers?count=10&after=1"

Get list of tiers for the progression and their rewards. Results are always sorted by progression tier step in ascending order.

Note that for pagination the step is used as the cursor instead of the ID.

URL Structure

/admin/game/<game_id>/progressions/<progression_id>?count=10&after=0

Example Response

{
  "pagination": {
    "next_cursor": null,
    "previous_cursor": null,
    "total": 5
  },
  "items": [
    {
      "id": "01GJ34969N84J32MG8WHTBYM84",
      "step": 1,
      "points_threshold": 0,
      "rewards": {
        "progression_points_rewards": [],
        "progression_reset_rewards": [],
        "asset_rewards": []
      }
    },
    {
      "id": "01GJ34GY6XD0NGRHXV6HHVJYM9",
      "step": 2,
      "points_threshold": 1000,
      "rewards": {
        "progression_points_rewards": [
          {
            "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
            "progression_key": "fighter",
            "progression_name": "fighter",
            "amount": 100
          }
        ],
        "progression_reset_rewards": [
          {
            "progression_id": "01GJ34K7QBEB124MVE8BCFPAMG",
            "progression_key": "rogue",
            "progression_name": "rogue"
          }
        ],
        "asset_rewards": [
          {
            "asset_id": 2,
            "asset_variation_id": null,
            "asset_rental_option_id": null
          }
        ],
        "currency_rewards": [
          {
            "currency_id": "01HEJHRJ85PB157YV2GMHP79W1",
            "currency_name": "Gold",
            "currency_code": "GLD",
            "amount": "100"
          }
        ]
      }
    },
    {
      "id": "01GJ34H31MKHQD09K12WFEEQ4A",
      "step": 3,
      "points_threshold": 3000,
      "rewards": {
        "progression_points_rewards": [],
        "progression_reset_rewards": [],
        "asset_rewards": [
          {
            "asset_id": 3,
            "asset_variation_id": null,
            "asset_rental_option_id": null
          }
        ],
        "currency_rewards": []
      }
    },
    {
      "id": "01GJ34H54CVVRXHX44C4VXSBCX",
      "step": 4,
      "points_threshold": 5000,
      "rewards": {
        "progression_points_rewards": [
          {
            "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
            "progression_key": "fighter",
            "progression_name": "fighter",
            "amount": 100
          }
        ],
        "progression_reset_rewards": [],
        "asset_rewards": [],
        "currency_rewards": []
      }
    },
    {
      "id": "01GJ34H686XFZDFR205BPXXZHH",
      "step": 5,
      "points_threshold": 10000,
      "rewards": {
        "progression_points_rewards": [],
        "progression_reset_rewards": [],
        "asset_rewards": [],
        "currency_rewards": []
      }
    }
  ]
}

URL Parts

Part Description
game_id ID of the game
progression_id ID of the progression

Query Parameters:

Field Description
after Cursor for pagination, a cursor will be returned in the response
count Number of progressions returned per page. Max 500 is allowed

Get Progression Tier By ID

curl -X GET "https://api.lootlocker.io/admin/game/100/progressions/01GJ34969HM62X7DWTQ0QWEXVP/tiers/01GJ34GY6XD0NGRHXV6HHVJYM9"

Get a single progression tier by ID including it's rewards.

URL Structure

/admin/game/<game_id>/progressions/<progression_id>/tiers/<progression_tier_id>

Example Response

{
  "id": "01GJ34GY6XD0NGRHXV6HHVJYM9",
  "step": 2,
  "points_threshold": 1000,
  "rewards": {
    "progression_points_rewards": [
      {
        "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
        "progression_key": "fighter",
        "progression_name": "fighter",
        "amount": 100
      }
    ],
    "progression_reset_rewards": [
      {
        "progression_id": "01GJ34K7QBEB124MVE8BCFPAMG",
        "progression_key": "rogue",
        "progression_name": "rogue"
      }
    ],
    "asset_rewards": [
      {
        "asset_id": 2,
        "asset_variation_id": null,
        "asset_rental_option_id": null
      }
    ],
    "currency_rewards": [
      {
        "currency_id": "01HEJHRJ85PB157YV2GMHP79W1",
        "currency_name": "Gold",
        "currency_code": "GLD",
        "amount": "100"
      }
    ]
  }
}

URL Parts

Part Description
game_id ID of the game
progression_id ID of the progression
progression_tier_id ID of the progression tier

Create progression tier

curl -X POST "https://api.lootlocker.io/admin/game/100/progressions/01GJ34969HM62X7DWTQ0QWEXVP/tiers/" \
-d "{\"step\": 6, \"points_threshold\": 4000 }" \
-H "Content-Type: application/json"

Create a new progression tier.

URL Structure

/admin/game/<game_id>/progressions/<progression_id>/tiers

Example Response

{
  "id": "01GJN2C57ZN503TNJ53T72B8BY",
  "step": 6,
  "points_threshold": 4000,
  "rewards": {
    "progression_points_rewards": [],
    "progression_reset_rewards": [],
    "asset_rewards": [],
    "currency_rewards": []
  }
}

URL Parts

Part Description
game_id ID of the game
progression_id ID of the progression

Available input fields

step is optional and if not sent, the tier will be added at the end. If the step is specified all the tiers that are above it will be bumped up a step. points_threshold is required.

Field Description
step Progression step being added, defaults to current max step + 1 if omitted
points_threshold Points threshold needed to reach this step in the progression

Update progression tier

curl -X PUT "https://api.lootlocker.io/admin/game/100/progressions/01GJ34969HM62X7DWTQ0QWEXVP/tiers/01GJN2C57ZN503TNJ53T72B8BY" \
-d "{\"points_threshold\": 5000 }" \
-H "Content-Type: application/json"

Update a progression tier.

URL Structure

/admin/game/<game_id>/progressions/<progression_id>/tiers/<progression_tier_id>

Example Response

{
  "id": "01GJN2C57ZN503TNJ53T72B8BY",
  "progression_id": "01GJ34969HM62X7DWTQ0QWEXVP",
  "step": 6,
  "points_threshold": 5000,
  "rewards": {
    "progression_points_rewards": [],
    "progression_reset_rewards": [],
    "asset_rewards": [],
    "currency_rewards": []
  }
}

URL Parts

Part Description
game_id ID of the game
progression_id ID of the progression
progression_tier_id ID of the progression tier

Available input fields

points_threshold is required.

Field Description
points_threshold Points threshold needed to reach this step in the progression

Update Progression Tier Rewards

curl -X PUT "https://api.lootlocker.io/admin/game/100/progressions/01GJ34969HM62X7DWTQ0QWEXVP/tiers/01GJN2C57ZN503TNJ53T72B8BY/rewards" \
-d "{ \"progression_points_rewards\": [{ \"progression_id\": \"01GJ34JX0VKJKM4P6X9JHZ8FDF\", \"amount\": 100 }], \"progression_reset_rewards\": [{ \"progression_id\": \"01GJ34K7QBEB124MVE8BCFPAMG\" }], \"asset_rewards\": [{ \"asset_id\": 2, \"asset_variation_id\": null, \"asset_rental_option_id\": null }], \"currency_rewards\": [{ \"currency_id\": \"01HEJHRJ85PB157YV2GMHP79W1\", \"amount\": 100 }]}" \
-H "Content-Type: application/json"

Update rewards for a progression tier.

URL Structure

/admin/game/<game_id>/progressions/<progression_id>/tiers/<progression_tier_id>/rewards

Example Response

{
  "progression_points_rewards": [
  {
    "progression_id": "01GJ34JX0VKJKM4P6X9JHZ8FDF",
    "progression_key": "fighter",
    "progression_name": "fighter",
    "amount": 100
  }
  ],
  "progression_reset_rewards": [
  {
    "progression_id": "01GJ34K7QBEB124MVE8BCFPAMG",
    "progression_key": "rogue",
    "progression_name": "rogue"
  }
  ],
  "asset_rewards": [
    {
      "asset_id": 2,
      "asset_variation_id": null,
      "asset_rental_option_id": null
    }
  ],
  "currency_rewards": [
    {
      "currency_id": "01HEJHRJ85PB157YV2GMHP79W1",
      "currency_name": "Gold",
      "currency_code": "GLD",
      "amount": "100"
    }
  ]
}

URL Parts

Part Description
game_id ID of the game
progression_id ID of the progression
progression_tier_id ID of the progression tier

Available input fields

Sending an empty list of rewards clears all rewards for that tier.

progression_points_rewards

Field Description
progression_id ID of the progression that should be awarded points when this tier is reached.
amount Amount of points that should be awarded points when this tier is reached.

progression_reset_rewards

Field Description
progression_id ID of the progression that should be reset when this tier is reached.

asset_rewards

Field Description
asset_id ID of the asset that should be awarded when this tier is reached.
asset_variation_id Optional asset variation.
asset_rental_option_id Optional asset rental option.

currency_rewards

Field Description
currency_id ID of the currency that should be awarded when this tier is reached.
amount Amount of currency that should be awarded points when this tier is reached.

Delete a progression tier

curl -X DELETE "https://api.lootlocker.io/admin/game/100/progressions/01GJ34969HM62X7DWTQ0QWEXVP/tiers/01GJN2C57ZN503TNJ53T72B8BY" \
-H "Content-Type: application/json"

Deletes a progression tier. All progression tiers after this tier will have their step decremented by 1.

URL Structure

/admin/game/<game_id>/progressions/<progression_id>/tiers/<progression_tier_id>

Example Response

This endpoint will not have a body, being a 204 No Content HTTP response.

URL Parts

Part Description
game_id ID of the game
progression_id ID of the progression
progression_tier_id ID of the progression tier

Get Diff

curl -X GET "https://api.lootlocker.io/admin/game/100/progressions/diff"

Get the diff tree for merging purposes.

URL Structure

/admin/game/<game_id>/progressions/diff

Example Response

{
  "fighter":{
    "id":"01GJ34JX0VKJKM4P6X9ND3G5X2",
    "entity_id":{
        "original":null,
        "new":"01GJ34JX0VKJKM4P6X9JHZ8FDF"
    },
    "operation":"Create progression",
    "values":[
        {
          "name":"key",
          "original":null,
          "new":"fighter"
        },
        {
          "name":"name",
          "original":null,
          "new":"fighter"
        },
        {
          "name":"active",
          "original":null,
          "new":true
        },
        {
          "name":"allow_game_writes",
          "original":null,
          "new":true
        },
        {
          "name":"allow_api_writes",
          "original":null,
          "new":true
        }
    ],
    "children":[
        {
          "id":null,
          "entity_id":{
              "original":null,
              "new":"01GJ34JX11FTAR4AFRDE38NFJ9"
          },
          "operation":"Create progression tier",
          "values":[
              {
                "name":"step",
                "original":null,
                "new":1
              },
              {
                "name":"points_threshold",
                "original":null,
                "new":0
              }
          ],
          "children":null
        }
    ]
  },
  "mage":{
    "id":"01GJ34969HM62X7DWTQ4QJXXQW",
    "entity_id":{
        "original":null,
        "new":"01GJ34969HM62X7DWTQ0QWEXVP"
    },
    "operation":"Create progression",
    "values":[
        {
          "name":"key",
          "original":null,
          "new":"mage"
        },
        {
          "name":"name",
          "original":null,
          "new":"mage"
        },
        {
          "name":"active",
          "original":null,
          "new":true
        },
        {
          "name":"allow_game_writes",
          "original":null,
          "new":true
        },
        {
          "name":"allow_api_writes",
          "original":null,
          "new":true
        }
    ],
    "children":[
        {
          "id":null,
          "entity_id":{
              "original":null,
              "new":"01GJ34H54CVVRXHX44C4VXSBCX"
          },
          "operation":"Create progression tier",
          "values":[
              {
                "name":"step",
                "original":null,
                "new":4
              },
              {
                "name":"points_threshold",
                "original":null,
                "new":2000
              }
          ],
          "children":null
        },
        {
          "id":null,
          "entity_id":{
              "original":null,
              "new":"01GJ34H686XFZDFR205BPXXZHH"
          },
          "operation":"Create progression tier",
          "values":[
              {
                "name":"step",
                "original":null,
                "new":5
              },
              {
                "name":"points_threshold",
                "original":null,
                "new":3000
              }
          ],
          "children":null
        },
        {
          "id":null,
          "entity_id":{
              "original":null,
              "new":"01GJN2C57ZN503TNJ53T72B8BY"
          },
          "operation":"Create progression tier",
          "values":[
              {
                "name":"step",
                "original":null,
                "new":6
              },
              {
                "name":"points_threshold",
                "original":null,
                "new":4000
              }
          ],
          "children":null
        },
        {
          "id":null,
          "entity_id":{
              "original":null,
              "new":"01GJ34969N84J32MG8WHTBYM84"
          },
          "operation":"Create progression tier",
          "values":[
              {
                "name":"step",
                "original":null,
                "new":1
              },
              {
                "name":"points_threshold",
                "original":null,
                "new":0
              }
          ],
          "children":null
        },
        {
          "id":null,
          "entity_id":{
              "original":null,
              "new":"01GJ34GY6XD0NGRHXV6HHVJYM9"
          },
          "operation":"Create progression tier",
          "values":[
              {
                "name":"step",
                "original":null,
                "new":2
              },
              {
                "name":"points_threshold",
                "original":null,
                "new":400
              }
          ],
          "children":[
              {
                "id":null,
                "entity_id":null,
                "operation":"Add progression points reward",
                "values":[
                    {
                      "name":"progression_name",
                      "original":null,
                      "new":"fighter"
                    },
                    {
                      "name":"points_amount",
                      "original":null,
                      "new":100
                    }
                ],
                "children":null
              },
              {
                "id":null,
                "entity_id":null,
                "operation":"Add progression reset reward",
                "values":[
                    {
                      "name":"progression_name",
                      "original":null,
                      "new":"rogue"
                    }
                ],
                "children":null
              },
              {
                "id":null,
                "entity_id":null,
                "operation":"Add asset reward",
                "values":[
                    {
                      "name":"asset_id",
                      "original":null,
                      "new":2
                    },
                    {
                      "name":"asset_variation_id",
                      "original":null,
                      "new":null
                    },
                    {
                      "name":"asset_rental_option_id",
                      "original":null,
                      "new":null
                    }
                ],
                "children":null
              }
          ]
        },
        {
          "id":null,
          "entity_id":{
              "original":null,
              "new":"01GJ34H31MKHQD09K12WFEEQ4A"
          },
          "operation":"Create progression tier",
          "values":[
              {
                "name":"step",
                "original":null,
                "new":3
              },
              {
                "name":"points_threshold",
                "original":null,
                "new":1000
              }
          ],
          "children":null
        }
    ]
  },
  "rogue":{
    "id":"01GJ34K7QBEB124MVE8F62BVNM",
    "entity_id":{
        "original":null,
        "new":"01GJ34K7QBEB124MVE8BCFPAMG"
    },
    "operation":"Create progression",
    "values":[
        {
          "name":"key",
          "original":null,
          "new":"rogue"
        },
        {
          "name":"name",
          "original":null,
          "new":"rogue"
        },
        {
          "name":"active",
          "original":null,
          "new":true
        },
        {
          "name":"allow_game_writes",
          "original":null,
          "new":true
        },
        {
          "name":"allow_api_writes",
          "original":null,
          "new":true
        }
    ],
    "children":[
        {
          "id":null,
          "entity_id":{
              "original":null,
              "new":"01GJ34K7QDB5QNCZQKE002076N"
          },
          "operation":"Create progression tier",
          "values":[
              {
                "name":"step",
                "original":null,
                "new":1
              },
              {
                "name":"points_threshold",
                "original":null,
                "new":0
              }
          ],
          "children":null
        }
    ]
  }
}

URL Parts

Part Description
game_id ID of the game

Merge Diff

curl -X POST "https://api.lootlocker.io/admin/game/100/progressions/diff/merge" \
-d "{\"ids\": [\"01GJ34JX0VKJKM4P6X9ND3G5X2\", \"01GJ34969HM62X7DWTQ4QJXXQW\"] }" \
-H "Content-Type: application/json"

Merges the diff based on ID's sent in the body.

URL Structure

/admin/game/<game_id>/progressions/diff/merge

Example Response

This endpoint will not have a body, being a 204 No Content HTTP response.

URL Parts

Part Description
game_id ID of the game

Available input fields

Field Description
ids List of Diff ID's that should be merged to live, obtained via GET /progressions/diff endpoint.

Bones

Bones are used to let the game client know how to attach assets to characters.

Get Bones To Game

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/bones" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will return a list of bones and their parameters.

Example Response

{
  "success": true,
  "bones": [
    {
      "bone": {
        "id": 50,
        "name": "snowmobile_ski_left"
      },
      "parameters": [
        {
          "name": "rotation",
          "value": "1,0,0,0",
          "type": "string"
        },
        {
          "name": "position",
          "value": "-0.53,0.93,-0.35",
          "type": "string"
        },
        {
          "name": "boneName",
          "value": "Bip01",
          "type": "string"
        },
        {
          "name": "type",
          "value": "CA_BONE",
          "type": "string"
        }
      ]
    }
  ],
  "types": [
    "boolean",
    "string",
    "number"
  ]
}

Update Bones

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/bones" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"bones\": [{\"bone\": {\"id\": 50, \"name\": \"snowmobile_ski_left\"}, \"parameters\": [{\"name\": \"rotation\", \"value\": \"1,0,0,0\", \"type\": \"string\"}]}]}"

When updating bones, you should send data in the same format as you get when you list bones to a game. Parameters are looked up by name on the backend, so supplying a new unique name, will create a new bone. You can set as many parameters as you want.

The response from this endpoint is the same as from Get Bones To Game.

Maps

Getting All Maps To A Game

curl -X GET "https://api.lootlocker.io/admin/v1/maps/game/{game_id}"
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will return all maps with all their spawnpoints. If you need more information about the map than is provided here, call the assets endpoint, which will contain the poster image, name and what else you might need.

Example response

{
    "success": true,
    "maps": [
        {
            "map_id": 1,
            "asset_id": 938,
            "spawnpoints": [
                {
                    "guid": "{ef7e9ca1-d3c8-47be-bc6a-b9d8556cab3b}",
                    "id": 1,
                    "asset_id": 939,
                    "position": "123585818123",
                    "rotation": "19588188841",
                    "cameras": [
                        {
                            "position": "1495986818281823",
                            "rotation": "1495986818281823"
                        }
                    ]
                },
                {
                    "guid": "{09ca78e6-1719-43bc-becc-2a04cae9715d}",
                    "id": 2,
                    "asset_id": 940,
                    "position": "868181824845",
                    "rotation": "868186810",
                    "cameras": [
                        {
                            "position": "868190040011",
                            "rotation": "96817767100108681"
                        }
                    ]
                }
            ]
        },
        {
            "map_id": 2,
            "asset_id": 950,
            "spawnpoints": [
                {
                    "guid": "{38070225-a4d8-4db3-a8c9-550e806c6216}",
                    "id": 7,
                    "asset_id": 951,
                    "position": "123585818123",
                    "rotation": "19588188841",
                    "cameras": [
                        {
                            "position": "1495986818281823",
                            "rotation": "1495986818281823"
                        }
                    ]
                },
                {
                    "guid": "{997b0abe-706f-49e9-9925-67d2454223e2}",
                    "id": 8,
                    "asset_id": 952,
                    "position": "868181824845",
                    "rotation": "868186810",
                    "cameras": [
                        {
                            "position": "868190040011",
                            "rotation": "96817767100108681"
                        }
                    ]
                }
            ]
        }
    ]
}

Creating Maps

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/maps"
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"
  -H "Content-Type: application/json"
  -d "{\"json\": \"goes here\"}"

When creating a map, you send a POST request with the payload data. This will create the map, an asset for it and spawn points with their own assets for each spawn point you've sent along.

On success, this endpoint will return the full list of maps as documented in Getting All Maps To A Game.

On error you will receive a response similar to the error example shown.

Request payload example

{
    "name": "Sialia",
    "game_id": 2,
    "spawn_points": [
        {
            "guid": "{997b0abe-706f-49e9-9925-67d2454223e2}",
            "position": "123551231",
            "rotation": "156516991",
            "name": "Eastwater Forest",
            "cameras": [
                {
                    "position": "12958181",
                    "rotation": "9591885818"
                }
            ]
        }
    ]
}
Property Description Required
game_id Id of the game the map should belong to Yes
name Name of the map Yes
asset_id The ID of an asset if you've created one and don't want this call to do it for you. No
spawn_points An array of spawn point objects. See below. No

Spawn Points

Spawn points have a few properties.

Property Description Required
position Coordinates for where the spawn point should be positioned Yes
rotation Coordinates for the rotation of the spawn point Yes
name Name of the spawn point Yes
guid A 38-character long unique identifier provided by you No
cameras An array of cameras for the spawn point. See below. No

Error response example

{
  "success": false,
  "error": "Required parameter on camera \"position\" missing."
}

Cameras

Cameras are simple as they have just 2 properties.

Property Description Required
position Coordinates for where the camera should be positioned Yes
rotation Coordinates for the rotation of the camera Yes

Updating Maps

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/maps/{map_id}"
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"
  -H "Content-Type: application/json"
  -d "{\"json\": \"goes here\"}"

Updating maps follow the same rules as creating them, with a few exceptions. The request type is PATCH instead of POST and the url having the map_id appended to it.

When updating a map, send along the id's for the spawn points. Otherwise the backend will create new ones. Any spawn points not sent will be deleted.

Always send the cameras for a spawn point, as default behaviour is to delete all, and then re-create from the input given by the call.

Events

Creating Missions

curl -X POST "https://api.lootlocker.io/admin/v1/missions/game/{game_id}"
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"
  -H "Content-Type: application/json"
  -d "{\"game_id\": 1, \"type\": 1, \"name\": \"Eastwater River\", \"goals\":{\"gold\": {\"goal\": \"00:20:00\", \"points\": 400, \"assets\": [{\"asset_id\": 24, \"asset_variation_id\": 43}]},\"silver\": {\"goal\": \"00:30:00\", \"points\": 200},\"bronze\": {\"goal\": \"00:35:00\", \"points\": 100}], \"checkpoints\": [{\"guid\": \"{f5bf1883-5192-4cd0-b251-8752d83c9bc2}\", \"index\": 1, \"x\": \"y\", \"foo\": \"bar\", \"baz\": \"foobar\"},{\"guid\": \"{54e54736-d290-4565-ae17-d19f90611c85}\", \"index\": 2, \"x\": \"y1\", \"foo\": \"bar1\", \"baz\": \"foobar1\"},{\"guid\": \"{ef7e9ca1-d3c8-47be-bc6a-b9d8556cab3b}\", \"index\": 3, \"x\": \"y2\", \"foo\": \"bar2\", \"baz\": \"foobar2\"}]}"

When creating a mission, you send a POST request with the payload data. This will create the mission and an asset for the mission, which you can later update with the update method.

You can set the following information:

Root level properties:

Property Description Required
name A name for the mission Yes
game_id The ID of the game to which this mission shall belong Yes
type An integer representing the type of mission you're creating Yes
map_id An integer representing the ID of the map this mission belongs to Yes
asset_id A reference to an asset you've created that you want to attach this mission to, if not supplied, one will be created automatically No
poster_path A string representing a path to a poster to display for this mission. No
rounds An integer representing the number of rounds in the mission No
round_length A string formatted as "00:00:000" for representing minutes, seconds and milliseconds No
completion_bonus A point based bonus for completing the mission, represented as an integer No
difficulty_name A string for representing the difficulty of the mission No
difficulty_multiplier A decimal number that will be multiplied with the point_reward from the medal field and completion_bonus from the mission No
time_score_multiplier An integer that will be multiplied with the amount of seconds that a player is faster than the round_length for mission of type 3 No
goals Array of objects, see Goals below No
checkpoints Array of objects, see Checkpoints below No
filters Array of objects, see Filters No

Types

Three different types of missions are currently supported.

Type Description
1 Time based and calculates based on time.
2 Score based and calculates based on score.
3 Time based, but calculates based on how many seconds faster the player was than round_length, and multiplies those seconds by time_score_multiplier

Checkpoints

Checkpoint example

[
  {
    "index": 1,
    "your_property": "your value",
    "your_second_property": "your second value"
  }
]

A mission can have an unlimited amount of checkpoints. For checkpoints you can add as many properties as you want, in a key/value style. There is a required index field which is used to set the order of the checkpoints.

Send your checkpoints in the format that you see in the example. You can send your values in any format, but they will always be treated and returned as strings.

Goals

Goals example

{
  "gold": {
    "goal": "5000",
    "points": 400,
    "assets": [
      {
        "asset_id": 24,
        "asset_variation_id": 43
      }
    ]
  },
  "silver": {
    "goal": "4500",
    "points": 350
  },
  "bronze": {
    "goal": "3000",
    "points": 200
  }
}

You can add as many goals to a mission as you want. The object name is the name of the goal, which can be anything that'll fit in a JSON object.

Property Description Required
goal A string, with either a time based goal, or points yes
points An integer representing the point that will be rewarded and multiplied by the difficulty_multiplier from the mission yes
assets An array of assets that will be granted the first time the player reaches the goal, if it's the highest they've reached no

Filters

Filters example

[
  {
    "name": "Mission Type",
    "value": "Freeride"
  }
]

You can add as many filters to a mission as you want. Both properties are required. These will be returned with assets later.

Keep in mind that these might be used to let users filter assets at a later point, so keep them human friendly.

Property Description
name A name for your filter, such as Mission Type
value A value for the filter, such as Freeride

Updating Missions

curl -X PATCH "https://api.lootlocker.io/admin/v1/missions/game/{game_id}/{mission_id}"
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"
  -H "Content-Type: application/json"
  -d "{\"asset_id\": 6718, \"game_id\": 1, \"type\": 1, \"name\": \"Eastwater River\", \"goals\":{"gold": {\"goal\": \"00:20:00\", \"points\": 400, \"assets\": [{\"asset_id\": 24, \"asset_variation_id\": 43}]}, "silver": {\"goal\": \"00:30:00\", \"points\": 200},"bronze": {\"goal\": \"00:35:00\", \"points\": 100}], \"checkpoints\": [{\"guid\": \"{f5bf1883-5192-4cd0-b251-8752d83c9bc2}\", \"index\": 1, \"x\": \"y\", \"foo\": \"bar\", \"baz\": \"foobar\"},{\"guid\": \"{54e54736-d290-4565-ae17-d19f90611c85}\", \"index\": 2, \"x\": \"y1\", \"foo\": \"bar1\", \"baz\": \"foobar1\"},{\"guid\": \"{ef7e9ca1-d3c8-47be-bc6a-b9d8556cab3b}\", \"index\": 3, \"x\": \"y2\", \"foo\": \"bar2\", \"baz\": \"foobar2\"}]}"

Updating a mission follows the same format as creating one with the exception that any checkpoints or goals that you do not supply in an update will be removed. If you do not wish to change them, simply omit them in the request. Any field is optional, and only changed if a new value is supplied. Also, notice the addition of the {mission_id} to the url.

If you want to make sure the name of the mission isn't changed, you can send along a GET style parameter called protect_name and set it to true.

Getting All Missionss

curl -X GET "https://api.lootlocker.io/admin/v1/missions/game/{game_id}"

When working with missions, you might want to get them all. Issuing a call to this endpoint with a valid game_id will get that for you. In the example you'll see a simple mission with 2 checkpoints, and 3 goals.

Example Response

{
    "success": true,
    "missions": [
        {
            "mission_id": 1,
            "asset_id": 912,
            "rounds": 0,
            "round_length": "0",
            "difficulty_name": null,
            "difficulty_multiplier": null,
            "goals": {
                "gold": {
                    "goal": "00:20:00",
                    "points": "400"
                },
                "silver": {
                    "goal": "00:30:00",
                    "points": "200"
                },
                "bronze": {
                    "goal": "00:35:00",
                    "points": "100"
                }
            },
            "checkpoints": [
              {
                "guid": "{54e54736-d290-4565-ae17-d19f90611c85}",
                "index": 1,
                "segment_time": 18510,
                "your_key": "your value",
                "your_second_key": "your second value"
              },{
                "guid": "{f5bf1883-5192-4cd0-b251-8752d83c9bc2}",
                "index": 2,
                "your_key": "your value",
                "your_second_key": "your second value"
              }
            ]
        }
    ]
}

Triggers

Triggers are a simple way to have game events perform actions on the backend, such as granting assets or awarding XP.

List Triggers

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/triggers" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will list all triggers, and their rewards.

The times property on a trigger denotes how many times this trigger can be triggered, and drop a reward to the player. Once the trigger has been triggered this number of times, any subsequent triggerings will not drop any rewards. If you wish to set a trigger to an unlimited amount of triggers, set the times property to null.

Example Response

{
  "success": true,
  "triggers": [
    {
      "id": 112,
      "name": "enterArea.SialiaSummit",
      "times": 1,
      "grant_all": false,
      "rewards": [
        {
          "trigger_reward_id": 1,
          "asset_id": 0,
          "asset_variation_id": null,
          "asset_image": null,
          "asset_name": "",
          "score": 100
        }
      ]
    },
    {
      "id": 113,
      "name": "enterArea.BluebirdRidge",
      "times": 1,
      "grant_all": false,
      "rewards": [
        {
          "trigger_reward_id": 2,
          "asset_id": 0,
          "asset_variation_id": null,
          "asset_image": null,
          "asset_name": "",
          "score": 100
        }
      ]
    }
  ]
}

Create Trigger

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/triggers" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"enterArea.SialiaBurgerBar\", \"times\": 10, \"grant_all\": false, \"rewards\": [{\"score\": 100}]}"

Creating a trigger requires sending data about said trigger in JSON form.

The name value is what will be called as a trigger from the Game API.

The times field is how many times this trigger should be called before the rewards will stop being granted to the player. Set to null for no limits.

The grant_all field is to let the backend know if it should reward all the rewards of this trigger, or select one at random.

The rewards field is an array of rewards. This can be either XP in the form of a score field, or an asset, in the form of asset_id and asset_variation_id fields.

The response from this endpoint will be the list of triggers.

Update Trigger

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/triggers/112" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"enterArea.SialiaSummit\", \"times\": 4, \"grant_all\": true, \"rewards\": [{\"trigger_reward_id\": 1, \"score\": 500}]}"

Updating a trigger follows the same format as creating one, with the exception that any existing rewards need to have a trigger_reward_id. If a trigger is sent without one, it will be treated as a new reward instead of changing the existing one.

The response from this endpoint will be the list of triggers.

Delete Trigger

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/triggers/112" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"enterArea.SialiaSummit\", \"times\": 4, \"grant_all\": true, \"rewards\": [{\"score\": 500}]}"

This endpoint deletes a trigger, and all progress players have made towards it.

The response from this endpoint will be the list of triggers.

Leveling

List Levels

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/levels" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will list the games levels, and their rewards.

The grant_all field references if players should be granted all assets, or just one at random when they reach a level.

The xp_threshold field denotes how much XP is necessary to reach this level.

Example Response

{
  "success": true,
  "levels": [
    {
      "id": 8,
      "level": 0,
      "xp_threshold": 0,
      "grant_all": false,
      "grants": []
    },
    {
      "id": 9,
      "level": 1,
      "xp_threshold": 1000,
      "grant_all": false,
      "grants": [
        {
          "id": 57,
          "level_id": 9,
          "asset_id": 1370,
          "asset_variation_id": 0,
          "asset_name": "100 Credits Reward",
          "asset_image": null,
          "grant_id": 57
        }
      ]
    }
  ]
}

Save Levels

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/levels" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "[{\"id\": 8, \"xp_threshold\": 1500, \"grant_all\": false}, {\"level\": 61, \"xp_threshold\": 160000, \"grant_all\": false}]"

You save levels by sending them all in an array to the API. If you supply the id field, it will update an existing level, if you don't you will have to supply the level property too, and it will use that to create a new level.

The response from this endpoint will be the same as from the List Levels endpoint.

Add Reward

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/levels/grant" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -d "level_id=8&asset_id=1405&asset_variation_id=1906"

To add a reward, you send a POST request with parameters identifying the level you wish to add a reward for using level_id, the asset_id, and asset_variation_id.

The response from this endpoint is the same as from List Levels.

Update Reward

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/levels/grant/57" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -d "level_id=9&asset_id=1405&asset_variation_id=1906"

To update a reward, you need to provide the id of the reward in the url. Other than that, it's identical to the Add Reward call.

The response from this endpoint is the same as from List Levels.

Delete Reward

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/levels/grant/57" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Deleting a reward is done by sending a delete request to the rewards endpoint.

The response from this endpoint is the same as from List Levels.

Collectables

Collectables are used to automatically reward players for collecting or completing something in your game. They are nested into three layers, each with their own set of rewards.

The Admin API is used for managing the collectables available to the game.

To read more about collectables in general you can read our Collectables Product Documentation.

Get Collectables

curl -X GET "https://api.lootlocker.io/admin/game/100/collectables"

Get list of collectables.

URL Structure

/admin/game/<game_id>/collectables

Example Response

{
  "success": true,
  "collectables": [
    {
      "id": 123,
      "name": "Some Collectable",
      "grant_all": false
    },
    {
      "id": 1234,
      "name": "Some Other Collectable",
      "grant_all": true
    },
    {
      "id": 321,
      "name": "Also a collectable",
      "grant_all": false
    }
  ]
}

URL Parts

Part Description
game_id ID of the game

Get Collectable Details

curl -X GET "https://api.lootlocker.io/admin/game/100/collectables/123"

Get collectable details. This response includes the entire collectable structure, with all groups, items and rewards.

URL Structure

/admin/game/<game_id>/collectables/<collectable_id>

Example Response

{
  "success": true,
  "collectable": {
    "live_collectable_id": 122,
    "dev_collectable_id": 123,
    "id": 123,
    "name": "Some Collectable",
    "grant_all": false,
    "rewards": [
      {
        "id": 1,
        "asset_id": 20,
        "asset_variation_id": 0,
        "asset_rental_option_id": 0
      }
    ],
    "groups": [
      {
        "id": 100,
        "name": "Collectable Group",
        "grant_all": false,
        "rewards": [
          {
            "id": 80,
            "asset_id": 6,
            "asset_variation_id": 0,
            "asset_rental_option_id": 0
          }
        ],
        "items": [
          {
            "id": 188,
            "name": "Collectable Group Item",
            "grant_all": false,
            "rewards": [
              {
                "id": 82,
                "asset_id": 8,
                "asset_variation_id": 0,
                "asset_rental_option_id": 0
              }
            ]
          },
          {
            "id": 190,
            "name": "Some Other Collectable Group Item",
            "grant_all": false,
            "rewards": []
          }
        ]
      }
    ]
  }
}

URL Parts

Part Description
game_id ID of the game
collectable_id ID of the collectable

Create Collectable

curl -X POST "https://api.lootlocker.io/admin/game/100/collectables" \
-d "{\"name\": \"Some Collectable\"}" \
-H "Content-Type: application/json"

Create a new collectable. The create endpoint only create the initial collectable, use the update endpoint to add additional data to the collectable.

URL Structure

/admin/game/<game_id>/collectables

Example Response

{
  "success": true,
  "collectable": {
    "id": 123,
    "name": "Some Collectable",
    "grant_all": false
  }
}

URL Parts

Part Description
game_id ID of the game

Available input fields

All fields are required.

Field Description
name Name of your collectable

Update Collectable

curl -X PUT "https://api.lootlocker.io/admin/game/100/collectables/123" \
-d '{"live_collectable_id":61,"dev_collectable_id":62,"id":62,"name":"Some collectable test","grant_all":true,"rewards":[{"asset_id":12,"asset_variation_id":null,"asset_rental_option_id":null}],"groups":[{"name":"Collectable Group","grant_all":false,"items":[{"name":"Some Item","grant_all":false,"rewards":[{"asset_id":2,"asset_variation_id":null,"asset_rental_option_id":null}],"expanded":true},{"name":"Some Other Item","grant_all":false,"rewards":[],"expanded":false}],"rewards":[{"asset_id":6,"asset_variation_id":null,"asset_rental_option_id":null}]}]}' \
-H "Content-Type: application/json"

URL Structure

/admin/game/<game_id>/collectables/<collectable_id>

Example Response

{
  "success": true,
  "collectable": {
    "live_collectable_id": 61,
    "dev_collectable_id": 62,
    "id": 62,
    "name": "Some collectable test",
    "grant_all": true,
    "rewards": [
      {
        "id": 96,
        "asset_id": 12,
        "asset_variation_id": 0,
        "asset_rental_option_id": 0
      }
    ],
    "groups": [
      {
        "id": 84,
        "name": "Collectable Group",
        "grant_all": false,
        "rewards": [
          {
            "id": 98,
            "asset_id": 6,
            "asset_variation_id": 0,
            "asset_rental_option_id": 0
          }
        ],
        "items": [
          {
            "id": 200,
            "name": "Some Item",
            "grant_all": false,
            "rewards": [
              {
                "id": 100,
                "asset_id": 2,
                "asset_variation_id": 0,
                "asset_rental_option_id": 0
              }
            ]
          },
          {
            "id": 202,
            "name": "Some Other Item",
            "grant_all": false,
            "rewards": []
          }
        ]
      }
    ]
  }
}

URL Parts

Part Description
game_id ID of the game
collectable_id ID of the collectable

Example Input JSON

Example Input

{
  "live_collectable_id": 61,
  "dev_collectable_id": 62,
  "id": 62,
  "name": "Some collectable test",
  "grant_all": true,
  "rewards": [
    {
      "id": 96,
      "asset_id": 12,
      "asset_variation_id": 0,
      "asset_rental_option_id": 0
    }
  ],
  "groups": [
    {
      "id": 84,
      "name": "Collectable Group",
      "grant_all": false,
      "rewards": [
        {
          "id": 98,
          "asset_id": 6,
          "asset_variation_id": 0,
          "asset_rental_option_id": 0
        }
      ],
      "items": [
        {
          "id": 200,
          "name": "Some Item",
          "grant_all": false,
          "rewards": [
            {
              "id": 100,
              "asset_id": 2,
              "asset_variation_id": 0,
              "asset_rental_option_id": 0
            }
          ]
        },
        {
          "id": 202,
          "name": "Some Other Item",
          "grant_all": false,
          "rewards": []
        }
      ]
    }
  ]
}

Here you can see the general structure of input for updating a collectable.

Delete Collectable

curl -X DELETE "https://api.lootlocker.io/admin/game/100/collectables/123"

Delete collectable.

URL Structure

/admin/game/<game_id>/collectables/<collectable_id>

{
  "success": true
}

URL Parts

Part Description
game_id ID of the game
collectable_id ID of the collectable

DLC

Please note that DLC migrations are currently only for Steam integrations. For PSN, use consumable entitlements instead. These will be checked on game start.

List DLCs To Game

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/dlc" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will list all DLC's for a game.

The dlc_identifier field is the app id steam provides for the DLC. These are 6 digits always.

The always_check boolean denotes if this DLC is checked every time the game starts. The purpose of this is to allow for migratory DLC's where people have bought a game with DLCs, before the game was hooked up to the backend. If they're only checked once, the backend will only check if the player owns them with steam the first time it sees the player. If always_check is set to true, the dlc_identifier value will be returned with the Game API session registration for the game to check if any of the DLC's are owned. See the Game API docs for how to handle this.

Example Response

{
  "success": true,
  "dlcs": [
    {
      "id": 1,
      "name": "Season Pass",
      "dlc_identifier": "257300",
      "always_check": false,
      "active": true,
      "created_at": "2015-03-01 00:00:00",
      "updated_at": "2015-05-26 14:01:20",
      "product_count": 6
    }
  ]
}

Create DLC To Game

curl -X POST "https://api.lootlocker.io/admin/game/{game_id}/dlc" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"Season Pass\"}"

To create a DLC package, you simply send a POST with a name of the package you wish to create.

Example Response

{
  "success": true,
  "dlc_id": 1
}

Get DLC Details

curl -X GET "https://api.lootlocker.io/admin/game/{game_id}/dlc/1" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

The DLC details endpoint will list details about a DLC package, including it's contents.

Example Response

{
  "success": true,
  "dlc": {
    "id": 21,
    "name": "Test",
    "dlc_identifier": "0",
    "always_check": "1",
    "active": "0",
    "created_at": "2016-08-19 10:43:22",
    "updated_at": "2016-08-19 10:43:22",
    "assets": [
      {
       "id": 62,
       "name": "Rival Pro",
       "image": "https://pm-game-files.s3.amazonaws.com/2/56f54a14b12e7.png",
       "variation_id": 131,
       "variation_name": "k2-13-rivalpro-green"
     },
     {
       "id": 1380,
       "name": "Source Z",
       "image": "https://pm-game-files.s3.amazonaws.com/2/56f67b5c8e33a.png",
       "variation_id": 1873,
       "variation_name": "black"
     }
   ]
  }
}

Update DLC Details

curl -X PATCH "https://api.lootlocker.io/admin/game/{game_id}/dlc/1" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"active\": true, \"assets\": [{\"id\": 62, \"variation_id\": 131}]}"

When updating a DLC package, all fields are optional. Only the ones passed in will be changed.

If assets is passed in, all assets not in the array will be removed. Any additional assets added will be added.

The response from this endpoint is the same as from Get DLC Details.

Messages

Messages are used to send news and promotions to your players.

Get Messages To Game

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/messages" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will return a list of messages for a game. It will include drafts (messages without a published_at date set), and the messages will be the full messages, with all content.

The example only includes one response for brevity.

Example Response

{
    "success": true,
    "messages": [
        {
            "id": 4,
            "live_player_message_id": 3,
            "dev_player_message_id": null,
            "title": "Message Title",
            "summary": "Message Summary",
            "message_body": "This is a rather lengthy body.\r\n\r\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean congue urna vitae venenatis mattis. Nunc volutpat finibus nisl ut imperdiet. Mauris sed orci at leo posuere tincidunt ut ut leo. In hac habitasse platea dictumst. Sed pulvinar, magna in pharetra finibus, neque nibh elementum nisl, at pulvinar mauris augue in felis. Cras accumsan nec purus in dapibus. Nullam rhoncus accumsan condimentum. Nullam consequat ipsum sit amet porttitor varius. Curabitur lacinia in tortor eget egestas.",
            "category": "Levels",
            "action": ":store\/levels\/new",
            "alert": true,
            "image_url": null,
            "image_name": null,
            "published_at": "2017-09-12 15:55:22",
            "created_at": "2017-09-12 08:39:48",
            "updated_at": "2017-09-13 08:19:18"
        }
    ]
}

Get Message

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/messages/4" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will return a single message.

Example Response

{
    "success": true,
    "message": {
      "id": 4,
      "live_player_message_id": 3,
      "dev_player_message_id": null,
      "title": "Message Title",
      "summary": "Message Summary",
      "message_body": "This is a rather lengthy body.\r\n\r\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean congue urna vitae venenatis mattis. Nunc volutpat finibus nisl ut imperdiet. Mauris sed orci at leo posuere tincidunt ut ut leo. In hac habitasse platea dictumst. Sed pulvinar, magna in pharetra finibus, neque nibh elementum nisl, at pulvinar mauris augue in felis. Cras accumsan nec purus in dapibus. Nullam rhoncus accumsan condimentum. Nullam consequat ipsum sit amet porttitor varius. Curabitur lacinia in tortor eget egestas.",
      "category": "Levels",
      "action": ":store\/levels\/new",
      "alert": true,
      "image_url": null,
      "image_name": null,
      "published_at": "2017-09-12 15:55:22",
      "created_at": "2017-09-12 08:39:48",
      "updated_at": "2017-09-13 08:19:18"
    }
}

Create Message

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/messages" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"title\": \"My fancy message title\"}"

Creating a message is simple. There are only one required field: title. Everything else is optional.

The title and summary fields have length settings on the game settings. They have sensible defaults, but you might want to change them for your game because of UI space etc.

Example Response

{
    "success": true,
    "message": {
      "id": 4,
      "live_player_message_id": 3,
      "dev_player_message_id": null,
      "title": "My fancy message title",
      "summary": "",
      "message_body": "",
      "category": "",
      "action": "",
      "alert": false,
      "image_url": null,
      "image_name": null,
      "published_at": null,
      "created_at": "2017-09-12 08:39:48",
      "updated_at": "2017-09-13 08:19:18"
    }
}

The optional fields are as follows:

Field Type Additional info
summary string This field can have a max length, set in the game settings. (Default: 140) New lines will be converted to \r\n on save.
message_body string This is the body of the message. New lines will be converted to \r\n on save.
category string A free text category for your message. (Max 255 characters)
action string A free text string that your game can parse to perform an action on the message. (Take to store etc)
alert boolean Used to let your game know if this message is an alert.
image_url string This can be a string or url to any image you want to show with your message.
image_name string This is only used in the admin API to help identify an image if it can't render on the platform the game is being managed from. (Eg. .dds in a browser)
published_at datetime Format: 2017-09-13 12:49:33 - The date for the message to be published.

Update Message

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/messages/4" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"title\": \"My fancier message title\", \"alert\": true}"

Updating a message functions exactly like creating one. The only difference is that the ID of the message goes in the URL and the request type is PATCH instead of POST. Refer to that part of the documentation for specifics.

Example Response

{
    "success": true,
    "message": {
      "id": 4,
      "live_player_message_id": 3,
      "dev_player_message_id": null,
      "title": "My fancier message title",
      "summary": "",
      "message_body": "",
      "category": "",
      "action": "",
      "alert": true,
      "image_url": null,
      "image_name": null,
      "published_at": null,
      "created_at": "2017-09-12 08:39:48",
      "updated_at": "2017-09-13 11:29:18"
    }
}

Delete Message

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/messages/4" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

The response from this endpoint will be identical to the one from Get Messages To Game.

Example Response

{
    "success": true,
    "messages": []
}

Files

Upload a file

curl -X POST 'https://api.lootlocker.io/admin/v1/upload' \
    -H 'x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39' \
    -F 'file=@path/to/your/file.bin' \
    -F 'asset_id=5129' \
    -F 'game_id=1234' \
    -F 'visibility=private' \
    -F 'tags=image;large;purpose:game_data'

This endpoint lets you upload a file and associate it with other LootLocker Game Systems, such as assets, asset instances (items) and players.

The field game_id is required for LootLocker to be able to attach the file to a specific game.

Files can also be tagged to help your game or editor to handle them better. When adding tags to a file while uploading it, they should be in a field called tags and be delimited with a semi-colon (;). If you'd like to include a purpose (a field visible in the admin), prepend a tag with purpose:, for example purpose:save_game.

The field visibility is optional and can be set to public-read or private. If not set, the default is public-read.

This table lists all possible Game Systems that a file can be associated with.

Example response

{
    "success": true,
    "url": "https://cdn.lootlocker.io/141/5f230b1e14614.txt",
    "id": 13,
    "size": 224,
    "name": "astley-paradox.txt",
    "tags": [
        "image",
        "large"
    ],
    "updated_at": "2020-07-31 09:28:10"
}
Game System Field name
Assets asset_id
Asset Instance item_id
Player player_id

Get files

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/files?filter=asset" \
    -H 'x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39'

Listing files can be done by issuing a call to this endpoint. See the example response for the structure. tags will be null if there are no tags.

attachment_type and attachment_id reference which Game System a file is attached to, holding the name in the type field and the id of said system resource in the id field. Eg attachment_type = asset and attachment_id = 1234 meaning that the file is attached to an asset with id 1234.

When listing files you can also filter them by attachment_type, to only get files matching the specified filter returned. Currently the following exists:

Attachment Type Filter Value
Assets asset
Asset Instance item
Player player

Example Response

{
    "success": true,
    "files": [
        {
            "url": "https://cdn.lootlocker.io/141/5f230b1e14614.txt",
            "id": 13,
            "attachment_type": "asset",
            "attachment_id": 1234,
            "size": 224,
            "name": "astley-paradox.txt",
            "tags": [
                "image",
                "large"
            ],
            "updated_at": "2020-07-31 09:28:10"
        }
    ]
}

Update file

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/files/{file_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -d "{\"tags\": [\"never\", \"gonna\", \"give\", \"you\", \"up\"]}"

Updating files lets you change your tags. Send them as an array of strings in an object with a key tags.

Example Response

{
    "success": true,
    "file": {
        "url": "https://cdn.lootlocker.io/141/5f230b1e14614.txt",
        "id": 13,
        "attachment_type": "asset",
        "attachment_id": 1234,
        "size": 224,
        "name": "astley-paradox.txt",
        "tags": [
            "never",
            "gonna",
            "give",
            "you",
            "up"
        ],
        "updated_at": "2020-07-31 09:28:10"
    }
}

Delete file

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/files/{file_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Deleting files can be done by issuing a call to this endpoint. Do note that files will be stored in LootLocker as long as there is a reference to them from the live game, so even though the reference is gone immediately, the actual file will not be removed until the change is merged to the live game.

Example response

{
    "success": true
}

Data Entities

LootLocker supports custom data blobs that can be attached to a number of Game Systems. We call them Data Entities.

Create Data Entity

curl -X POST "https://api.lootlocker.io/admin/v1/game/{game_id}/data" \
    -H "Content-Type: application/json" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -d "{\"name\": \"My custom data\", \"asset_id\": 1234, \"data\": \"your data here\"}"

When creating a Data Entity there are 2 required fields: data and a field to tie the Data Entity to a Game System, such as asset_id, used in the example here.

You can also assign a name to make it easier to identify the entity later. This name will not be returned through the Game API.

Example Response

{
    "success": true,
    "data_entity": {
        "id": 1234,
        "name": "My custom data",
        "data": "your data here",
        "updated_at": "2020-08-04 13:54:56"
    }
}

The below list shows which Game Systems we currently support, and what field name to use to attach to that system.

Game System Field
Assets asset_id
Player player_id
Trigger trigger_id
Event (Mission) Goal event_goal_id

Listing Data Entities

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/data/{type}/{type_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Listing Data Entities are done based on which Game System they are attached to, and is referred to in the url as type and type_id. The below table lists the types used and what id to use.

Example response

{
    "success": true,
    "data_entities": [
        {
            "id": 1234,
            "name": "My custom data",
            "data": "your data here",
            "updated_at": "2020-08-04 13:54:56"
        }
    ]
}
Game System Type ID
Assets asset Asset ID
Player player Player ID
Trigger trigger Trigger ID
Event (Mission) Goal eventgoal Event Goal ID

Get a single Data Entity

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/data/{data_entity_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Getting a single Data Entity is done by the ID of the entity.

Example response

{
    "success": true,
    "data_entity": {
        "id": 1234,
        "name": "My custom data",
        "data": "your data here",
        "updated_at": "2020-08-04 13:54:56"
    }
}

Update a Data Entity

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/data/{data_entity_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"My changed name\"}"

Updating a Data Entity is done by it's ID, as a PATCH request sending the fields to update along in a JSON payload.

The following fields can be updated: name, data.

Example response

{
    "success": true,
    "data_entity": {
        "id": 1234,
        "name": "My changed name",
        "data": "your data here",
        "updated_at": "2020-08-04 14:24:35"
    }
}

Delete a Data Entity

curl -X DELETE "https://api.lootlocker.io/admin/v1/game/{game_id}/data/{data_entity_id}" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Deleting a Data Entity is done by it's ID, as a DELETE request, having the ID in the URL.

Example response

{
    "success": true
}

Game Versions

Game Versions are primarily used for handling different versions of assets, in the capacity that they will not be sent to games with an lower version.

Getting Game Versions

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/version" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will list all versions that your game has.

Notice the string property at the end, which is handy for display purposes.

Example Output

{
  "success": true,
  "versions": [
    {
      "id": "2",
      "live_game_version_id": null,
      "game_id": "2",
      "major": "0",
      "minor": "5",
      "revision": "1",
      "build": "569095",
      "created_at": "2015-03-27 16:22:51",
      "updated_at": "2015-03-27 16:22:51",
      "deleted_at": null,
      "string": "0.5.1.569095"
    },
    {
      "id": "3",
      "live_game_version_id": null,
      "game_id": "2",
      "major": "0",
      "minor": "5",
      "revision": "2",
      "build": "571294",
      "created_at": "2015-03-30 15:06:43",
      "updated_at": "2015-03-30 15:06:43",
      "deleted_at": null,
      "string": "0.5.2.571294"
    }
  ]
}

Getting Game Versions to a Dev Game

curl -X GET "https://api.lootlocker.io/admin/v1/game/{game_id}/version/develop" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

In addition to using the above endpoint with the ID of a development version of a game, you can call this utility endpoint and get the same response, but for the games development version.

Feature Toggles and Settings

List Configured Feature Toggles and Settings

curl -X GET "https://api.lootlocker.io/admin/v1/game/1/features" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint lets you list all configured feature toggles and settings your game has.

Example Response

{
    "success": true,
    "feature_toggles": [
        {
            "feature": "ugc",
            "enabled": true,
            "toggled_at": "2020-12-11 15:17:32",
            "toggled_by": 2,
            "settings": {
                "player_max_entries": 6,
                "moderation_enabled": false
            }
        }
    ]
}

Get Feature Toggles and Settings by Name

curl -X GET "https://api.lootlocker.io/admin/v1/game/1/feature/ugc" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint lets you get a specific feature toggle with it's settings. Useful for enabling features in your UI.

Example Response

{
    "success": true,
    "is_enabled": true,
    "settings": {
        "player_max_entries": 6,
        "moderation_enabled": false
    }
}

Set Feature Toggles and Settings

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/1/feature" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -H "Content-Type: application/json" \
    -d "json payload here"

This endpoint lets you change the feature toggles and settings for your game. Use the table here to know what features can be toggled, and what settings they can have.

We have omitted the JSON payload in the example call as each feature have quite different payload options.

Disable Game API Endpoints

Disable Game API Endpoints Example Payload

{
    "feature": "disable_game_api_endpoints",
    "enabled": true,
    "settings": {
        "endpoints": [
            "GET_/game/v1/messages"
        ]
    }
}

This toggle allows you to disable any endpoint in the Game API so that requests will be rejected with a 403 Forbidden error code, and the error message "Endpoint disabled in Game API".

Setting Type Default Description
endpoints array empty An array of strings formatted with a concatenated version of the HTTP Verb and URL of the endpoint, eg: GET_/game/v1/messages.

User Generated Content

User Generated Content is a feature that can be completely turned off using the toggle. It also has the following settings.

User Generated Content Example Payload

{
    "feature": "ugc",
    "enabled": true,
    "settings": {
        "moderation_enabled": true
    }
}
Setting Type Default Description
moderation_enabled boolean false If set to false, UGC content will automatically be promoted to Assets once they are marked as done. If true, a moderation queue will be created.

Default Character Creation

By default the default character class is created for a player when they are seen the first time. To disable this functionality, set the auto_create toggle to false for the default_character feature.

Default Character Creation Example Payload

{
    "feature": "default_character",
    "enabled": true,
    "settings": {
        "auto_create": false
    }
}
Setting Type Default Description
auto_create boolean true If set to false, LootLocker will stop automatically creating a character when a new player is seen for the first time.

Character Loadouts

Setting Type Default Description
only_one_per_context boolean true If true, only one asset instance per context can be equipped at the same time.
item_limit integer 6 Limits the number of asset instances that can be equipped per context. Will be ignored if only_one_per_context is set to true.

Character Inventories Example Payload

{
    "feature": "character_inventories",
    "enabled": true,
    "settings": {
        "only_one_per_context": true,
        "item_limit": 6
    }
}

Character Inventories

Setting Type Default Description
grant_to_default_character boolean false If enabled, granted assets will also be scoped to the players default character.

Character Inventories Example Payload

{
    "feature": "character_inventories",
    "enabled": true,
    "settings": {
        "grant_to_default_character": true
    }
}

Heroes

Setting Type Default Description
unique_player_heroes boolean true If enabled, players can only have one instance of a specific hero at a time.

Heroes Example Payload

{
    "feature": "heroes",
    "enabled": true,
    "settings": {
        "unique_player_heroes": false
    }
}

Unique Character Types

Setting Type Default Description
unique_character_types boolean false If enabled, players can only have one instance of a specific character type at a time.

Unique Character Types Example Payload

{
    "feature": "character",
    "enabled": true,
    "settings": {
        "unique_character_types": true
    }
}

Inventories

Setting Type Default Description
remove_global_on_unequip boolean false If enabled, asset instances that were granted to the player while they were global will be removed from their inventories when unequipped. This setting affects Heroes, Characters and Players.

Inventories Example Payload

{
    "feature": "inventories",
    "enabled": true,
    "settings": {
        "remove_global_on_unequip": true
    }
}

Organisations

Get Users To An Organisation

curl -X GET "https://api.lootlocker.io/admin/v1/organisation/1/users" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This call will get you all users belonging to a specific organisation, if the user you're acting as has access to the organisation.

Invite A User To An Organisation

curl -X POST "https://api.lootlocker.io/admin/v1/organisation/1/users" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"Andreas Stokholm\", \"email\": \"andreas@lootlocker.io\"}"

This endpoint can be called to invite existing users to an organisation or create new users who will automatically be part of the organisation they're being invited to. This is agnostic to the API and is automatically handled.

Once this endpoint has been called, the user will receive an email, telling them that either an account have been created for them, or that they've been added to a new organisation.

Example Response

{
  "success": true
}

Get User To An Organisation

curl -X GET "https://api.lootlocker.io/admin/v1/organisation/1/users/1" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

The response from this endpoint will be details about the user.

Example Response

{
  "success": true,
  "user": {
    "id": 1,
    "name": "Andreas Stokholm",
    "email": "andreas@lootlocker.io",
    "uses_2fa": false,
    "last_login": null
  }
}

Remove Two-Factor Authentication For A User

curl -X DELETE "https://api.lootlocker.io/admin/v1/organisation/1/users/1/2fa" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Requesting this endpoint will remove Two-Factor Authentication from the user. They will get an email notifying them about it.

Example Response

{
  "success": true
}

Reset Password For A User

curl -X DELETE "https://api.lootlocker.io/admin/v1/organisation/1/users/1/password" \
  -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Requesting this endpoint will initiate the process of resetting the users password. This means they will get an email with a link to reset the password, just like if they requested it themselves at login.

Example Response

{
  "success": true
}

Users

Set Up Two-Factor Authentication

curl -X POST "https://api.lootlocker.io/admin/v1/user/2fa" \
  -H "x-auth-token: 4b711a8a40b678fbc9afdb2fc0a1492530002de8"

This endpoint will initiate the process of setting up Two-Factor Authentication. The response will have to be presented to the user, for them to set up their device.

The mfa_token_url is a base64 encoded png of a QR code the user can scan with their device.

Example QR Code:

Example QR Code

Example Response

{
  "success": true,
  "mfa_token_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFe0lEQVR4nO3dwa6cRhCG0djK+z+ylZ01i0vcPV0fw7XOWUZMg+1fpNQUxY9fv379A9N+fvoC+DsJFgnBIiFYJASLhGCRECwSgkVCsEgIFgnBIiFYJASLhGCRECwSgkVCsEj8+97Pfv6cT+RrL+vJ+is9sVfrn/TTvq558meZuoYp712POxYJwSIhWCTerLFe1TXBSr2yew0ra17VTCvH7P73qzWvrPx5P1uruWORECwSgkVioMZ6NVUf7K65Unud1Ge761+tOVULrpzrVfHv8oczDq4FvwkWCcEiMVxj1U7qs5N9o/oaVn57cg33c8ciIVgkBIvEQ2us3f2bqf6t3XVOznuy9/Z83/W6eTjBIiFYJIZrrKn9lZVaqqhvrhT9T7vPMev3AGa5Y5EQLBKCRWKgxvrUXstuj/nUOrv9T59a57N7YO5YJASLhGCR+PH8zp4ru71KU3tXJ/1VK+vs1ovP/Bd0xyIhWCQEi8SbNVZR30y9H3eyZrE3VpiaK7HCfCweRLBICBaJ4Rrr1dQ+UDFDa2quVTEP4sqdzwTPa0R3LBKCRUKwSLzZj7Xy//uTnqGTHvOpeaGFqf2/qb6uqeO/WOGN38AfCRYJwSIxsI9Vf7tmas/s6vjinb5P9aFP/T3Yx+KhBIuEYJEIe97rfay6N6tYp5gpv7L+yfH2sXgQwSIhWCQ+8E3o4juAU+vXcxZO6sLdnrA756l+sdrgWvCbYJEQLBJhz/uVomba9alnf9+xj94+Fg8iWCQEi8RAz/udPU9T7wOenPdK8dR1apbECvtYfAOCRUKwSITfK9x9hrVbT0zVW1fXsHLNJ6bml+6uufLsUs87DyVYJASLxHDP+9Tzr2JvbGqOaP19m7onbIUai4cSLBKCRWK4531qZtVJfXAyU+pT86iu1OfSj8U3I1gkBIvEcD9W0QO++9urY4rrKfbtijn193PHIiFYJASLxMA+1tR8gZM9m6ne+RNT+20n9WXxfPY97lgkBIuEYJEI+7FW3DmzoJ59ULz3V/Sr7R7vWSEPIlgkBItE+F5h3Uu0W2fc+V5hsbe0e80nzxbP97TcsUgIFgnBInFTz3vxTcCV817Z3eMpZn0VM7qujp+aYbFx9sPfw5cEi4RgkfjA7Iaid3vqOWOxxzN1/cUc1G62qjsWCcEiIVgkPtCPNTU7auUaPvV9npP9vN3jn/keojsWCcEiIVgkBr5XOFUf1L3t9Z7Z1TXUPe/FHpv5WDyUYJEQLBID87FeTe0hTfUMTc1TuHLn3PndbxN91hOvib+AYJEQLBID+1ivPvUcsN6/qee8P21/Ts87DyVYJASLxHCNtaKeP17vpdXPCu98J2D3vOvcsUgIFgnBIhE+K7w6vujTulPRzz41Q2F2jugJdywSgkVCsEg89L3Cqe8Grqj3q+p5EEVtd84di4RgkRAsEmE/1hO+SzM1X6qYibWy/uzs9f/nWSHfgGCRECwSw/tYU6aeeRXPLlc8be7o1Ld91rljkRAsEoJFYvhbOieuvl1TXENRc5zMVrhzDurKee1j8VCCRUKwSAx8E/qkPlipS1b6waf66J/wjmExL353fftYPJRgkRAsEgM11qt6z+aqPijqrZM9oZXrvDrXFTNIQbBoCBaJ4W/pFHOYTvZ1rs57pf7uct3DPtW37lkhDyVYJASLxPA+VmGqLjnpwdrdQ9qtS+588+CeGVruWCQEi4RgkRiusYre7anzvq5Zz5XYrefu3Ie7WnN2X80di4RgkRAsEgM11p39QCc94Hf2bO3WW8Xz06l3Bd7jjkVCsEgIFomHzsfiu3PHIiFYJASLhGCRECwSgkVCsEgIFgnBIiFYJASLhGCRECwSgkVCsEgIFgnBIvEfJJ6xkA2gXeUAAAAASUVORK5CYII="
}

Verify Two-Factor Authentication Setup

curl -X PATCH "https://api.lootlocker.io/admin/v1/user/2fa" \
  -H "x-auth-token: 4b711a8a40b678fbc9afdb2fc0a1492530002de8" \
  -H "Content-Type: application/json" \
  -d "{\"secret\": 2552663}"

To finalize the Two-Factor Authentication, the user have to provide the secret from their device, which will result in a recovery token being returned.

Example Response

{
  "success": true,
  "recover_token": "117248:951659:058195:576195"
}

Remove Two-Factor Authentication

curl -X DELETE "https://api.lootlocker.io/admin/v1/user/2fa" \
  -H "x-auth-token: 4b711a8a40b678fbc9afdb2fc0a1492530002de8" \
  -d "secret=123456"

To remove Two-Factor Authentication from the currently logged in user, send a DELETE request to this endpoint, supplied an Two-Factor Authentication token with it.

Example Response

{
  "success": true
}

Example Error Response

{
  "success": false,
  "error": "The provided Multi Factor Authentication token was invalid."
}

Update User Details

curl -X PATCH "https://api.lootlocker.io/admin/user" \
  -H "x-auth-token: 4b711a8a40b678fbc9afdb2fc0a1492530002de8" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"Loot Lockster\"}"

You can update certain information on a user by patching it this endpoint.

Field Type Value
name string The updated user's name

Example Response

{
  "success": true,
  "user": {
      "name": "Loot Lockster",
      "email": "loot@lootlocker.com",
      "verified_at": "2023-03-06T14:05:39Z"
  }
}

Platforms

Update Platforms

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/platforms" \
    -H "Content-Type: application/json" \
    -d "{\"platforms\": [{\"id\": 1, \"name\": \"steam\", \"enabled\": true, \"properties\": {\"steam_app_id\": \"1234567\"}}]}"

This endpoint will allow you to enable and disable platforms, as well as setting the properties for each of them. The valid platforms and their properties are listed in the tables below. All properties are string types.

Example Response

{
    "success": true,
    "platforms": [
        {
            "id": 1,
            "name": "steam",
            "friendly_name": "steam",
            "properties": {
                "steam_app_id": "1234567",
                "trade_restriction_days": "3",
                "publisher_key": "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",
                "asset_server_key": "abcdefghijklmnopqrstuvwxyz012345"
            },
            "enabled": true
        },
        {
            "id": 2,
            "name": "psn",
            "friendly_name": "playstation network",
            "properties": {
                "client_id": "",
                "client_secret": "",
                "service_label": {
                    "1": {
                        "region_id": 1,
                        "region": "Europe",
                        "value": ""
                    },
                    "2": {
                        "region_id": 2,
                        "region": "America",
                        "value": ""
                    }
                }
            },
            "enabled": false
        },
        {
            "id": 3,
            "name": "roblox",
            "friendly_name": null,
            "properties": null,
            "enabled": false
        },
        {
            "id": 4,
            "name": "apple_app_store",
            "friendly_name": "ios",
            "properties": {
                "app_shared_secret": ""
            },
            "enabled": false
        },
        {
            "id": 5,
            "name": "google_play_store",
            "friendly_name": "android",
            "properties": {
                "service_account": "",
                "package_name": ""
            },
            "enabled": false
        },
        {
            "id": 6,
            "name": "good_old_games",
            "friendly_name": "gog",
            "properties": null,
            "enabled": false
        },
        {
            "id": 7,
            "name": "epic_store",
            "friendly_name": "epic store",
            "properties": null,
            "enabled": false
        },
        {
            "id": 8,
            "name": "xbox",
            "friendly_name": "xbox",
            "properties": null,
            "enabled": false
        },
        {
            "id": 9,
            "name": "nintendo_switch",
            "friendly_name": "nintendo switch",
            "properties": null,
            "enabled": false
        }
    ]
}

Steam

Name parameter: steam ID parameter: 1

Property Key Property Value Example
steam_app_id 1234567
trade_restriction_days 3
publisher_key ABCDEFGHIJKLMNOPQRSTUVWXYZ012345
asset_server_key abcdefghijklmnopqrstuvwxyz012345

If you want to change the asset_server_key, set the value to rotate and it will be rotated for you, with the new key returned in the response.

PSN

Name parameter: psn ID parameter: 2

Property Key Property Value Example
client_id 1234567
client_secret 3
service_label ABCDEFGHIJKLMNOPQRSTUVWXYZ012345
service_label.N.value abcdefghijklmnopqrstuvwxyz012345

Google Play Store

Name parameter: google_play_store ID parameter: 5

Property Key Property Value Example
service_account long json object
package_name My Game

Apple App Store

Name parameter: apple_app_store ID parameter: 4

Property Key Property Value Example
app_shared_secret abcdefghijklmnopqrstuvwxyz012345

Roblox

Name parameter: roblox ID parameter: 3

Not yet supported. The toggle functions as a signal to LootLocker that the platform should be prioritized.

XBox

Name parameter: xbox ID parameter: 8

Not yet supported. The toggle functions as a signal to LootLocker that the platform should be prioritized.

Good Old Games

Name parameter: good_old_games ID parameter: 6

Not yet supported. The toggle functions as a signal to LootLocker that the platform should be prioritized.

Epic Store

Name parameter: epic_store ID parameter: 7

Not yet supported. The toggle functions as a signal to LootLocker that the platform should be prioritized.

Nintendo Switch

Name parameter: nintendo_switch ID parameter: 9

Not yet supported. The toggle functions as a signal to LootLocker that the platform should be prioritized.

List Platforms

curl -X PATCH "https://api.lootlocker.io/admin/v1/game/{game_id}/platforms"

This endpoint will return all platforms, and their current configuration state. See the above Update Platforms for explanation of properties.

Example Response

{
    "success": true,
    "platforms": [
        {
            "id": 1,
            "name": "steam",
            "friendly_name": "steam",
            "properties": {
                "steam_app_id": "1234567",
                "trade_restriction_days": "3",
                "publisher_key": "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",
                "asset_server_key": "abcdefghijklmnopqrstuvwxyz012345"
            },
            "enabled": true
        },
        {
            "id": 2,
            "name": "psn",
            "friendly_name": "playstation network",
            "properties": {
                "client_id": "",
                "client_secret": "",
                "service_label": {
                    "1": {
                        "region_id": 1,
                        "region": "Europe",
                        "value": ""
                    },
                    "2": {
                        "region_id": 2,
                        "region": "America",
                        "value": ""
                    }
                }
            },
            "enabled": false
        },
        {
            "id": 3,
            "name": "roblox",
            "friendly_name": null,
            "properties": null,
            "enabled": false
        },
        {
            "id": 4,
            "name": "apple_app_store",
            "friendly_name": "ios",
            "properties": {
                "app_shared_secret": ""
            },
            "enabled": false
        },
        {
            "id": 5,
            "name": "google_play_store",
            "friendly_name": "android",
            "properties": {
                "service_account": "",
                "package_name": ""
            },
            "enabled": false
        },
        {
            "id": 6,
            "name": "good_old_games",
            "friendly_name": "gog",
            "properties": null,
            "enabled": false
        },
        {
            "id": 7,
            "name": "epic_store",
            "friendly_name": "epic store",
            "properties": null,
            "enabled": false
        },
        {
            "id": 8,
            "name": "xbox",
            "friendly_name": "xbox",
            "properties": null,
            "enabled": false
        },
        {
            "id": 9,
            "name": "nintendo_switch",
            "friendly_name": "nintendo switch",
            "properties": null,
            "enabled": false
        }
    ]
}

White Label Login

Delete White Label Login User

curl -X DELETE "https://api.lootlocker.io/admin/game/1/whitelabel/user/123"

This deletes a White Label Login user from the system.

NOTE: This does not delete any player data in your game, only the user in the White Label Login system.

We also remove any sessions the user might have in the White Label Login System.

URL Structure

/admin/game/<game_id>/whitelabel/user/<player_id>

Example Response

This endpoint will return 204 No Content on success

URL Parts

Part Description
game_id ID of the game
player_id ID of the player in LootLocker

Currency

Create New Currency

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/currency' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Wood",
    "code": "WOO",
    "game_id": 23647,
    "initial_denomination_name": "Log"
}'
{
    "created_at": "2023-10-10T16:02:52Z",
    "id": "01HCD57AK0Y2NEJS17E0P1ZK0Z",
    "name": "Wood",
    "code": "woo",
    "game_id": 23647,
    "game_api_writes_enabled": false
}

This endpoint creates a new currency for the game.

HTTP Request

POST https://api.lootlocker.io/admin/game/{game_id}/currency

Parameters

Parameter Type Description Example Notes
name string The name of the currency Wood
code string The code of the currency WOO Exactly 3 characters, per ISO 4217
game_id number The id of the game 23647
initial_denomination_name string The name of the initial denomination Log

Create New Denomination For Currency

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/denominations' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "name": "some denomination",
    "value": 10
}'

Response

{
    "created_at": "2023-10-10T16:22:32Z",
    "id": "01HCD6BAQEP60E9GNXG2TS1P4Q",
    "currency": "01GQHF38EWBC2H70MF3JBRHQ7J",   
    "name": "some denomination",
    "value": 10
}

HTTP Request

POST https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/denominations

Parameters

Parameter Type Description Example
currency_id number The id of the currency 01HCB096VGSAQBTJAGS1X9B4RG

Enable Game API Writes

curl --location --request PATCH 'https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/enable-game-writes' \
--header 'x-auth-token: {auth_token}' \

Response

{
    "success": true
}

HTTP Request

PATCH https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/enable-game-writes

Parameters

Parameter Type Description Example
currency_id number The id of the currency 01HCB096VGSAQBTJAGS1X9B4RG

Disable Game API Writes

curl --location --request PATCH 'https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/disable-game-writes' \
--header 'x-auth-token: {auth_token}'

Response

{
    "success": true
}

HTTP Request

PATCH https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/disable-game-writes

Parameters

Parameter Type Description Example
currency_id number The id of the currency 01HCB096VGSAQBTJAGS1X9B4RG

Delete Currency

curl --location --request DELETE 'https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}' \
--header 'x-auth-token: {auth_token}'

Response

{
    "message": "currency deleted",
    "success": true
}

HTTP Request

DELETE https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}

Parameters

Parameter Type Description Example
currency_id number The id of the currency 01HCB096VGSAQBTJAGS1X9B4RG

Delete Denomination

curl --location --request DELETE 'https://api.lootlocker.io/admin/game/{game_id}/denominations/{denomination_id}' \
--header 'x-auth-token: {auth_token}'

Response

{
    "message": "denomination deleted",
    "success": true
}

HTTP Request

DELETE https://api.lootlocker.io/admin/denominations/{denomination_id}

Parameters

Parameter Type Description Example
denomination_id number The id of the denomination 01HCB096VGSAQBTJAGS1X9B4RG

Get Currency By Game & Code

Parameter Type Description Example
game_id number The id of the game 123
currency_code string The code of the currency 01HCAZM4B3P3KPQ6S80RM57RKQ
curl --location 'https://api.lootlocker.io/admin/currency/game/{game_id}/code/{currency_code}' \
--header 'x-auth-token: {auth_token}' \

Get Dependents For Currency

Parameter Type Description Example
currency_id number The id of the currency 01HCB096VGSAQBTJAGS1X9B4RG
curl --location 'https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/dependents' \
--header 'x-auth-token: {auth_token}'

List Currencies By Game

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/currencies/game/{game_id}' \
--header 'x-auth-token: {auth_token}'

Response

{
    "currencies": [
        {
            "created_at": "2023-10-10T16:02:52Z",
            "id": "01HCD57AK0Y2NEJS17E0P1ZK0Z",
            "name": "Wood",
            "code": "woo",
            "game_id": 23647,
            "game_api_writes_enabled": true
        }
    ]
}

HTTP Request

GET https://api.lootlocker.io/admin/game/{game_id}/currencies/game/{game_id}

Parameters

Parameter Type Description Example
game_id number The id of the game 123

List Denominations By Currency

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/denominations' \
--header 'x-auth-token: {auth_token}'

Response

{
    "denominations": [
        {
            "created_at": "2023-10-10T16:22:32Z",
            "id": "01HCD6BAQEP60E9GNXG2TS1P4Q",
            "currency": "01GQHF38EWBC2H70MF3JBRHQ7J",
            "name": "some denomination",
            "value": 10
        }
    ]
}

HTTP Request

GET https://api.lootlocker.io/admin/game/{game_id}/currency/{currency_id}/denominations

Parameters

Parameter Type Description Example
currency_id number The id of the currency 01HCB096VGSAQBTJAGS1X9B4RG

Balances

Create Wallet

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/wallet' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "holder_id": "01HAPTTKA2B9KG1PSF12HDS4G4",
    "holder_type": "player"
}'

Response

{
    "wallet_id": "01HCEZ12V17PPP8QKZ4PG20KJJ"
}

HTTP Request

POST /admin/wallet

Parameters

Parameter Type Description
holder_id string ID of the holder
holder_type string Type of the holder (player or character)

List Balances

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/balances/wallet/{wallet_id}' \
--header 'x-auth-token: {auth_token}'

Response

{
    "balances": [
        {
            "created_at": "2023-05-10T09:27:00Z",
            "amount": "4184768942",
            "holder_type": "player",
            "currency": {
                "code": "woo",
                "name": "Wood",
                "id": "01H00MTAPTE4VRPRZJZMT5RTBH"
            },
            "holder_id": 2422917
        }
    ]
}

HTTP Request

GET /admin/balances/wallet/{wallet_id}

Parameters

Parameter Type Description
wallet_id string ID of the wallet

Credit Balance

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/balances/credit' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "amount": "1000",
    "wallet_id": "01H52M0RVAWP8AD5WE2JB3KTS9",
    "currency_id": "01H4NR864V9J4YJ90A6ATA85Z8"
}'

Response

{
    "balance": {
        "amount": "1000",
        "created_at": "2023-05-09T16:17:14Z",
        "currency_id": "01H00MTAPTE4VRPRZJZMT5RTBH",
        "holder_id": 123,
        "holder_type": "player"
    }
}

HTTP Request

POST /admin/balances/credit

Parameters

Parameter Type Description
amount string Amount to credit, in minor currency units (smallest increment)
wallet_id string ID of the wallet
currency_id string ID of the currency

Debit Balance

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/balances/debit' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "amount": "100",
    "wallet_id": "01H52M0RVAWP8AD5WE2JB3KTS9",
    "currency_id": "01H4NR864V9J4YJ90A6ATA85Z8"
}'

Response

{
    "balance": {
        "amount": "900",
        "created_at": "2023-05-10T09:27:00Z",
        "currency_id": "01H00MTAPTE4VRPRZJZMT5RTBH",
        "holder_id": 2422917,
        "holder_type": "player"
    }
}

Insufficient funds

{
    "message": "Insufficient funds for from player 2422917: held amount: 900, requested debit: 1000",
    "request_id": "132e392b-5a75-4ecb-99b4-e30610d1a8fe",
    "trace_id": "7c55f99f086390a7731a8430233cb158"
}

HTTP Request

POST /admin/balances/debit

Parameters

Parameter Type Description
amount string Amount to debit, in minor currency units (smallest increment)
wallet_id string ID of the wallet
currency_id string ID of the currency

Get Wallet

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/wallet/{wallet_id}' \
--header 'x-auth-token: {auth_token}'

Response

{
    "holder_id": "01HCCQS1H0217TSM8QXQXKQVXS",
    "id": "01HCCQZS8DQR1VFK73W9K6P29X",
    "type": "player"
}

Use this request if you have a wallet and want to find additional details about it.

HTTP Request

GET /admin/wallets/{wallet_id}

Parameters

Parameter Type Description
wallet_id string ID of the wallet

Get Wallet for Holder

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/wallet/holder/{holder_id}' \
--header 'x-auth-token: {auth_token}'

Response

{
    "holder_id": "01HCCQS1H0217TSM8QXQXKQVXS",
    "id": "01HCCQZS8DQR1VFK73W9K6P29X",
    "type": "player"
}

Use this request if you have a holder and want to find additional details about its wallet.

HTTP Request

GET /admin/wallet/holder/{holder_id}

Parameters

Parameter Type Description
holder_id string ID of the holder

Catalogs

Create Catalog

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "name": "crafting",
    "key": "crafting",
    "game_id": 30129
}'

Response

{
    "created_at": "2023-10-11T11:05:21Z",
    "name": "crafting",
    "key": "crafting",
    "game_id": 30129,
    "id": "01HCF6K8DG12KTY98A9P2MDF0X"
}

Create a new catalog for your game.
Note that the key must be unique for your game.

HTTP Request

POST https://api.lootlocker.io/admin/game/{game_id}/catalog

Parameters

Parameter Type Description
game_id integer Required. The id of the game you want to create the catalog for.
name string Required. The name of the catalog.
key string Required. The key of the catalog.

Delete Catalog

curl --location --request DELETE 'https://api.lootlocker.io/admin/game/{game_id}/catalog/{catalog_id}' \
--header 'x-auth-token: {auth_token}'

Response

{
    "message": "catalog deleted",
    "success": true
}

HTTP Request

DELETE https://api.lootlocker.io/admin/game/{game_id}/catalog/{catalog_id}

Parameters

Parameter Type Description
catalog_id string Required. The id of the catalog you want to delete.

List Catalogs For Game

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog/{catalog_id}' \
--header 'x-auth-token: {auth_token}'

Response

{
    "catalogs": [
        {
            "created_at": "2023-10-11T09:47:55Z",
            "name": "Some Catalog",
            "key": "some_catalog",
            "game_id": 23647,
            "id": "01HCF25FGQDM09MYWA6YBN8AX6",
            "deleted_at": null
        }
    ]
}

HTTP Request

GET https://api.lootlocker.io/admin/game/{game_id}/catalogs/

Parameters

Parameter Type Description
game_id integer Required. The id of the game you want to retrieve the catalogs for.

List Catalog Items

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog/{catalog_id}/prices?cursor={next_cursor}&per_page={per_page}' \
--header 'x-auth-token: auth_token'

Response

{
    "catalog": {
        "id": "01HCF25FGQDM09MYWA6YBN8AX6",
        "name": "Some Catalog",
        "key": "some_catalog"
    },
    "entries": [
        {
            "created_at": "2023-10-11T11:19:35Z",
            "entity_kind": "asset",
            "entity_name": "Sword",
            "prices": [
                {
                    "amount": "100",
                    "display_amount": "100 WOO",
                    "currency_code": "woo",
                    "currency_name": "Wood",
                    "price_id": "01HCF7DAZX31BS757PCB5P5H1X",
                    "currency_id": "01HCD57AK0Y2NEJS17E0P1ZK0Z"
                }
            ],
            "entity_id": "01HAM2XM04TMAGAYA8KTKT6QTE",
            "catalog_listing_id": "01HCF7DAZYBXTS70H9SABJF604",
            "purchasable": false
        }
    ],
    "assets_details": [
        {
            "name": "Sword",
            "variation_id": null,
            "rental_option_id": null,
            "legacy_id": 298778,
            "id": "01HAM2XM04TMAGAYA8KTKT6QTE",
            "catalog_listing_id": "01HCF7DAZYBXTS70H9SABJF604",
            "thumbnail": null
        }
    ],
    "progression_points_details": [],
    "progression_resets_details": [],
    "currency_details": [],
    "pagination": {
        "previous_cursor": null,
        "next_cursor": "01HCF7DAZRG74V2T3F7KZJ2KVN",
        "total": 2
    }
}

HTTP Request

GET https://api.lootlocker.io/admin/game/{game_id}/catalog/{catalog_id}/prices

URL Parameters

Parameter Type Description
catalog_id string Required. The id of the catalog you want to retrieve the items for.

Query Parameters

Parameter Type Description
cursor string Optional. The cursor to use for pagination.
per_page integer Optional. The amount of items to retrieve per page. Defaults to 10.

Update Catalog Name

curl --location --request PUT 'https://api.lootlocker.io/admin/game/{game_id}/catalog/{catalog_id}' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "id": "01HCF25FGQDM09MYWA6YBN8AX6",
    "name": "Online Store 3"
}'

Response

{
    "name": "Online Store 3",
    "key": "some_catalog",
    "id": "01HCF25FGQDM09MYWA6YBN8AX6"
}

Update the name of a catalog.
Note: The key of a catalog cannot be changed.

HTTP Request

PUT https://api.lootlocker.io/admin/game/{game_id}/catalog/{catalog_id}

Parameters

Parameter Type Description
catalog_id string Required. The id of the catalog you want to update.
name string Required. The new name of the catalog.

Create A Price For An Asset

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog/price' \
--header 'x-auth-token: dac49695d7ceff25f91a19e24c3d8a5c30c01a8c' \
--header 'Content-Type: application/json' \
--data '{
    "game_id": 23647,
    "catalog_id": "01HCF25FGQDM09MYWA6YBN8AX6",
    "entity_id": "",
    "entity_kind": "asset",
    "currency_id": "01HCD57AK0Y2NEJS17E0P1ZK0Z",
    "amount": "1000"
}'

Asset Variation

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog/price' \
--header 'x-auth-token: dac49695d7ceff25f91a19e24c3d8a5c30c01a8c' \
--header 'Content-Type: application/json' \
--data '{
    "game_id": 23651,
    "catalog_id": "01HCHS8HC409BJ25F7F3FA83DA",
    "entity_id": "01HCHYNNP1ZNCJMDJZYNARPQY1",
    "entity_kind": "asset",
    "currency_id": "01HBDGJAV5X82FZSKCGN7RD0KK",
    "amount": "123",
    "metadata": [
        {
            "key": "asset_variation_id",
            "value": "6"
        }
    ]
}'

Rental Assets

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog/price' \
--header 'x-auth-token: dac49695d7ceff25f91a19e24c3d8a5c30c01a8c' \
--header 'Content-Type: application/json' \
--data '{
    "game_id": 23651,
    "catalog_id": "01HCHS8HC409BJ25F7F3FA83DA",
    "entity_id": "01HCHYPNPWW8RC33HBV68WQ5JP",
    "entity_kind": "asset",
    "currency_id": "01HBDGJAV5X82FZSKCGN7RD0KK",
    "amount": "123",
    "metadata": [
        {
            "key": "asset_rental_option_id",
            "value": "2"
        }
    ]
}'

Optional Field

"catalog_listing_id": "{catalog_listing_id}"

Response

{
    "amount": "1000",
    "kind": "asset",
    "id": "01GV1D4N8F0QKSMHMT8K4V6J3A",
    "catalog_id": "01GV0YGM96AJS0WVTHGW9QXQPP",
    "reward_id": "01GV1D4N8CX5RR88P1ZWJD7912",
    "currency_id": "01GTEJHZJMCMVGHYP9KQP6F7EF",
    "purchasable": false
}

Those two prices will require two separate requests, one for each currency.
In order to group these two prices into a single listing, you will need to provide the optional "catalog_listing_id" field in any subsequent requests for the same listing.

The value of this field should be the value of the "id" field returned in the response of the first request.

HTTP Request

POST https://api.lootlocker.io/admin/game/{game_id}/catalog/price

Parameters

Parameter Type Description
game_id integer Required. The id of the game you want to create the price for.
catalog_id string Required. The id of the catalog you want to create the price for.
entity_id string Required. The id of the entity you want to create the price for.
entity_kind string Required. The kind of entity you want to create the price for. Can be asset, currency, progression_points, progression_reset.
currency_id string Required. The id of the currency you want to create the price for.
amount string Required. The amount of the price.
catalog_listing_id string Optional. The id of the catalog listing you want to add the price to. This is used to group multiple prices into a single listing.

Create A Price For Progression Points

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog/price' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "game_id": 30129,
    "catalog_id": "01H52F71WJZA6XA2YN9NK0P1KQ",
    "entity_id": "01H52F4NQ42R8NSNNSB08RQH3P",
    "entity_kind": "progression_points",
    "currency_id": "01H4NR864V9J4YJ90A6ATA85Z8",
    "amount": "619",
    "metadata": [
        {
            "key": "progression_points_amount",
            "value": "1000"
        }
    ]
}'

Response

{
    "amount": "123",
    "kind": "progression_points",
    "id": "01HCVR51EY4NPMBPG7BQ82Q5VG",
    "catalog_id": "01HCVR415T7MXMQHE4JP8KFK1D",
    "reward_id": "01HCVR51ETMY26Z159FGYWCFB4",
    "currency_id": "01HCVR4JQS4S58B73Q19GSA6ZK",
    "catalog_item_id": "01HCVR51F03ESCWGP0MR6KKRBD"
}

HTTP Request

POST https://api.lootlocker.io/admin/game/{game_id}/catalog/price

Parameters

Parameter Type Description
game_id integer Required. The id of the game you want to create the price for.
catalog_id string Required. The id of the catalog you want to create the price for.
entity_id string Required. The id of the entity you want to create the price for.
entity_kind string Required. The kind of entity you want to create the price for. Can be asset, currency, progression_points, progression_reset.
currency_id string Required. The id of the currency you want to create the price for.
amount string Required. The amount of the price.
metadata array Required. The metadata of the price. This should contain a single key-value pair with the key being progression_points_amount and the value being the amount of progression points the player will receive when purchasing this price.

Create A Price For Progression Resets

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog/price' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
    "game_id": 30129,
    "catalog_id": "01HCVRBQ39MD16Z30FEXHPAGN9",
    "entity_id": "01HCVRC0K17KEBSAPX55ZBX8PE",
    "entity_kind": "progression_reset",
    "currency_id": "01HCVRCBA8CMZ18JX0274SAHJ2",
    "amount": "480"
}'

Response

{
    "amount": "480",
    "kind": "progression_reset",
    "id": "01HCVRDG3YEXBRZBJ77ENH08AF",
    "catalog_id": "01HCVR415T7MXMQHE4JP8KFK1D",
    "reward_id": "01HCVRDG3FGECFKG9EQ7A89NEX",
    "currency_id": "01HCVR4JQS4S58B73Q19GSA6ZK",
    "catalog_item_id": "01HCVRDG3Z271VNE26419TN1W6"
}

HTTP Request

POST https://api.lootlocker.io/admin/game/{game_id}/catalog/price

Parameters

Parameter Type Description
game_id integer Required. The id of the game you want to create the price for.
catalog_id string Required. The id of the catalog you want to create the price for.
entity_id string Required. The id of the entity you want to create the price for.
entity_kind string Required. The kind of entity you want to create the price for. Can be asset, currency, progression_points, progression_reset.
currency_id string Required. The id of the currency you want to create the price for.
amount string Required. The amount of the price.

Create A Price For A Currency

curl --location 'https://api.lootlocker.io/admin/game/{game_id}/catalog/price' \
--header 'x-auth-token: {auth_token}' \
--header 'Content-Type: application/json' \
--data '{
 "game_id": 30129,
 "catalog_id": 01HCVRBQ39MD16Z30FEXHPAGN9,
 "entity_id": "01HCVRHK56F9Z1CBM7XJ2YS18F",
 "entity_kind": "currency",
 "currency_id": "01GV5C24KGJ3706MX02PJVQX3F",
 "amount": "453",
    "metadata": [
        {
            "key": "purchased_amount",
            "value": "100000"
        }
    ]
}'

Response

{
    "amount": "480",
    "kind": "currency",
    "id": "01HCVRDG3YEXBRZBJ77ENH08AF",
    "catalog_id": "01HCVR415T7MXMQHE4JP8KFK1D",
    "reward_id": "01HCVRDG3FGECFKG9EQ7A89NEX",
    "currency_id": "01HCVR4JQS4S58B73Q19GSA6ZK",
    "catalog_item_id": "01HCVRDG3Z271VNE26419TN1W6"
}

HTTP Request

POST https://api.lootlocker.io/admin/game/{game_id}/catalog/price

Parameters

Parameter Type Description
game_id integer Required. The id of the game you want to create the price for.
catalog_id string Required. The id of the catalog you want to create the price for.
entity_id string Required. The id of the entity you want to create the price for.
entity_kind string Required. The kind of entity you want to create the price for. Can be asset, currency, progression_points, progression_reset.
currency_id string Required. The id of the currency you want to create the price for.
amount string Required. The amount of the price.
metadata array Required. The metadata of the price. This should contain a single key-value pair with the key being purchased_amount and the value being the amount of currency the player will receive when purchasing this price.

Player Operations

In some cases, operations made by a player are recorded by the server.

Those actions can then be reviewed in the Console, or queried using the API.

Get Player Operations

curl --location 'https://api.lootlocker.io/admin/playerops/player/{player_ulid}?limit=100' \
--header 'x-auth-token: {auth_token}'

Response

{
 "operations": [
  {
   "created_at": "2023-10-16T08:17:21.96879Z",
   "event_code": "balance_credit",
   "human_description": "Balance credited",
   "metadata": [
    {
     "key": "amount",
     "val": "123"
    },
    {
     "key": "currency",
     "val": "gld"
    },
    {
     "key": "wallet_id",
     "val": "01HCVRYVHHXMYSE88DVXMRNKX5"
    },
    {
     "key": "player_id",
     "val": "01HCHRKVX4W7KSBN7HMYDM3BQQ"
    },
    {
     "key": "source",
     "val": "admin_api"
    },
    {
     "key": "action_perfomed_by_user",
     "val": "10197"
    }
   ],
   "player_id": "01HCHRKVX4W7KSBN7HMYDM3BQQ",
   "game_id": 23647,
   "id": "01HCVRZ8HFFR77FDVEYCPV96T3"
  }
 ]
}

HTTP Request

GET https://api.lootlocker.io/admin/playerops/player/{player_ulid}?limit=100

URL Parameters

Parameter Type Description
player_ulid string Required. The ULID of the player.
limit integer Optional. The maximum number of operations to return. Defaults to 100.

LootLocker Subscriptions

These subscriptions are for subscribing your games to LootLocker plans, and getting the status of a games subscription status.

Get Subscription Status

curl -X GET "https://api.lootlocker.io/admin/subscriptions/:game_id" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

Example response for a subscribed game

{
    "plan": "Pro",
    "cadence": "yearly",
    "usage": 117002,
    "subscription_billing_date": "2024-05-05T00:00:00+02:00",
    "usage_billing_date": "2023-07-05T00:00:00+02:00",
    "included_mau": 10000,
    "expiring": false
}

The subscription_billing_date is the date that the next subscription payment will be taken. The usage_billing_date is the date that the next usage payment will be taken. The usage in the response is the total number of monthly active users for the game, and resets at the start of each month. The included_mau is the number of monthly active users that are included in the plan.

The expiring property will be true if the subscription is set to expire at the end of the current billing cycle.

Example response for a game that isn't subscribed

{
    "plan": "Free",
    "cadence": "",
    "usage": 0,
    "subscription_billing_date": "0001-01-01T00:00:00Z",
    "usage_billing_date": "2023-07-05T00:00:00+02:00",
    "included_mau": 1000,
    "expiring": false
}

Subscribe to a Plan

curl -X POST "https://api.lootlocker.io/admin/subscriptions/:game_id" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39" \
    -H "Content-Type: application/json" \
    -d "{\"plan\": \"pro-monthly\"}"

This endpoint will allow you to subscribe a game to a plan. The response will contain a link to Stripe which you should redirect the user to, for them to complete the checkout. Once done they will be redirected to the configured success or cancel url, depending on how the checkout went on Stripes side.

The valid plans are as follows:

Name Cacence Plan parameter
Hobby N/A hobby
Plus Monthly plus-monthly
Plus Yearly plus-yearly
Pro Monthly pro-monthly
Pro Yearly pro-yearly

Example response

{
    "checkout_url": "https://checkout.stripe.com/c/pay/...."
}

Example response for a game that is already subscribed

{
    "error": "Bad Request",
    "message": "game is already subscribed",
    "request_id": "04b61ae5-e3b4-4b0c-a982-82b8a158a6a9",
    "trace_id": "70cade8f2976785e3d53ff8f4c55756a"
}

Unsubscribe from a Plan

curl -X DELETE "https://api.lootlocker.io/admin/subscriptions/:game_id" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint can be used to cancel a games subscription to LootLocker. This will cause the subscription to expire at the end of the current billing period, at which point the game will be billed for the remaining usage on the account.

The endpoint returns a 204 No Content response if the game was successfully unsubscribed.

Example failure response

{
    "error": "Bad Request",
    "message": "game is not subscribed",
    "request_id": "04b61ae5-e3b4-4b0c-a982-82b8a158a6a9",
    "trace_id": "70cade8f2976785e3d53ff8f4c55756a"
}

Manage a Subscription

curl -X GET "https://api.lootlocker.io/admin/subscriptions/:game_id/external-manage" \
    -H "x-auth-token: 778e544ecb28ebf74cbe37855c92c5b4108fad39"

This endpoint will give you a link to an authorized session with Stripe which the user can use to manage their subscription. This is useful if they want to change their payment method, or cancel their subscription. You should not call this endpoint until the users initiates the action to start a Stripe management session. After the session has been generated, a URL will be returned that you should redirect the user to.

Example response

{
    "url": "https://manage.stripe.com/..."
}

Example response for a game that is not subscribed

{
    "error": "Bad Request",
    "message": "game is not subscribed",
    "request_id": "04b61ae5-e3b4-4b0c-a982-82b8a158a6a9",
    "trace_id": "70cade8f2976785e3d53ff8f4c55756a"
}

Errors

Errors are hinted with HTTP Status codes. 200 is OK, the rest that we're using is listed below here. You should be able to handle all of these in your integration.

Error Code Meaning
400 Bad Request -- Your request has an error
403 Forbidden -- You are not authorised
404 Not Found
405 Method Not Allowed
409 Conflict -- Your state is most likely not aligned with the servers.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.