curl -X GET "https://gachabe-staging.fly.dev/api/v1/players/550e8400-e29b-41d4-a716-446655440000/chests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/vnd.api+json"
{
  "data": [
    {
      "type": "chest",
      "id": "chest_001",
      "attributes": {
        "name": "Dragon Treasure Chest",
        "description": "A mystical chest containing rare dragon-themed collectibles with guaranteed legendary drops",
        "images": [
          "https://example.com/images/dragon-chest-closed.png",
          "https://example.com/images/dragon-chest-preview.png"
        ]
      },
      "relationships": {}
    },
    {
      "type": "chest",
      "id": "chest_002",
      "attributes": {
        "name": "Mystic Gem Chest",
        "description": "Filled with magical gems and crystals from the elemental planes",
        "images": [
          "https://example.com/images/gem-chest-closed.png"
        ]
      },
      "relationships": {}
    },
    {
      "type": "chest",
      "id": "welcome_chest_550e8400",
      "attributes": {
        "name": "Welcome Chest",
        "description": "A special starter chest for new players with guaranteed common and rare items",
        "images": [
          "https://example.com/images/welcome-chest.png"
        ]
      },
      "relationships": {}
    }
  ],
  "included": [],
  "meta": {
    "player_id": "550e8400-e29b-41d4-a716-446655440000",
    "total_chests": 3,
    "chest_types": {
      "purchased": 2,
      "earned": 0,
      "welcome": 1,
      "special": 0
    },
    "estimated_value": {
      "coins": 5000,
      "gems": 250
    },
    "inventory_status": {
      "capacity": 50,
      "used": 3,
      "available": 47
    }
  }
}
Retrieve all chests owned by a specific player. This endpoint provides access to a player’s chest inventory, showing unopened chests available for interaction.
Only chests that haven’t been opened are returned. Once a chest is opened, it’s consumed and no longer appears in the player’s inventory.

Path Parameters

id
string
required
Unique identifier (UUID) of the player whose chests you want to retrieve.

Query Parameters

include
string
Include related data in the response.Currently no relationships are available for this endpoint.
fields
object
Limit response fields to only those specified.
curl -X GET "https://gachabe-staging.fly.dev/api/v1/players/550e8400-e29b-41d4-a716-446655440000/chests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/vnd.api+json"
{
  "data": [
    {
      "type": "chest",
      "id": "chest_001",
      "attributes": {
        "name": "Dragon Treasure Chest",
        "description": "A mystical chest containing rare dragon-themed collectibles with guaranteed legendary drops",
        "images": [
          "https://example.com/images/dragon-chest-closed.png",
          "https://example.com/images/dragon-chest-preview.png"
        ]
      },
      "relationships": {}
    },
    {
      "type": "chest",
      "id": "chest_002",
      "attributes": {
        "name": "Mystic Gem Chest",
        "description": "Filled with magical gems and crystals from the elemental planes",
        "images": [
          "https://example.com/images/gem-chest-closed.png"
        ]
      },
      "relationships": {}
    },
    {
      "type": "chest",
      "id": "welcome_chest_550e8400",
      "attributes": {
        "name": "Welcome Chest",
        "description": "A special starter chest for new players with guaranteed common and rare items",
        "images": [
          "https://example.com/images/welcome-chest.png"
        ]
      },
      "relationships": {}
    }
  ],
  "included": [],
  "meta": {
    "player_id": "550e8400-e29b-41d4-a716-446655440000",
    "total_chests": 3,
    "chest_types": {
      "purchased": 2,
      "earned": 0,
      "welcome": 1,
      "special": 0
    },
    "estimated_value": {
      "coins": 5000,
      "gems": 250
    },
    "inventory_status": {
      "capacity": 50,
      "used": 3,
      "available": 47
    }
  }
}

Response Fields

data
array
required
Array of chest resource objects owned by the player
meta
object
required
Inventory statistics and management information

Access Control

Own Inventory: Players can always access their own chest inventory using their player ID.Other Players: Access depends on the target player’s privacy settings:
  • Public profiles: Show chest counts and types (not specific chests)
  • Private profiles: Deny access entirely
  • Friend-only: Show limited information to confirmed friends
Guest Players: Can view their own chests but cannot view other players’ inventories.

Common Use Cases

curl -X GET "https://gachabe-staging.fly.dev/api/v1/players/me" \
  -H "Authorization: Bearer YOUR_API_KEY"
Most commonly, players check their own inventory. Use the /players/me endpoint with include=chests for this.

Inventory Management

1

Check inventory capacity

Monitor the inventory_status to ensure players don’t exceed chest limits.
Players may not be able to purchase new chests if inventory is full.
2

Display chest variety

Use the chest_types breakdown to show inventory composition.
Highlight special or limited-time chests to encourage opening.
3

Show estimated value

Display the total estimated value to help players prioritize which chests to open.
This helps players understand the value of their collection.

Error Handling

This endpoint only shows unopened chests. Once a chest is opened using the Open Chest endpoint, it’s consumed and no longer appears in the inventory.
Chest inventory can change rapidly as players purchase and open chests. Avoid caching this data for extended periods.