GET /items/{player_identifier}
端点: GET /v1/pdapi/items/<player_identifier>
认证: Bearer 令牌
权限: REST.Items.Read
用途
列出目标玩家的物品。响应中的物品标识可在 paldeck.cc/items 查询。
路径参数
player_identifier: 目标玩家的UserId或PlayerUID。
查询参数
无。
请求体
无请求体。
响应结构
200 response schema
| Field | Type | Description |
|---|---|---|
Meta |
object | Target player metadata. |
Inventory |
object | Inventory containers for the target player. |
Meta object schema:
| Field | Type | Description |
|---|---|---|
PlayerUID |
string | Player UID used by Palworld save data. |
Player |
string | Player identifier supplied in the request path. |
Inventory object schema:
| Field | Type | Description |
|---|---|---|
Items |
object | Common inventory container. |
KeyItems |
object | Key item inventory container. |
Weapons |
object | Weapon loadout inventory container. |
Armor |
object | Armor inventory container. |
Food |
object | Food inventory container. |
DropSlot |
object | Drop slot inventory container. |
Inventory container object schema:
| Field | Type | Description |
|---|---|---|
Available |
boolean | Whether the container was available. |
ContainerID |
string | Palworld container ID, or an empty string when unavailable. |
UsedSlots |
integer | Number of occupied slots. |
MaxSlots |
integer | Total slot count. |
FreeSlots |
integer | Number of free slots. |
Slots |
object | Occupied slots keyed by slot index. |
Slots item schema:
| Field | Type | Description |
|---|---|---|
ItemID |
string | Palworld item identifier. |
Count |
integer | Stack count in the slot. |
错误响应
错误响应使用以下格式:
| HTTP | 错误代码 | 发生条件 |
|---|---|---|
401 |
INVALID_TOKEN |
Authorization 头缺失、格式错误,或与配置的 Bearer 令牌不匹配。 |
403 |
MISSING_PERMISSION |
令牌有效,但不包含此端点权限。 |
400 |
INVALID_JSON |
提供了请求体,但无法解析为 JSON。 |
400 |
REQUEST_FAILED |
无法解析目标玩家、玩家状态、背包数据或通用背包容器。 |
500 |
REQUEST_TIMEOUT |
内部游戏线程回调未在 5 秒内完成。 |
示例
Read inventory for a Steam player
Read inventory for a GDK player
使用场景
- Check inventory before giving compensation.
- Confirm an
ItemIDbefore using POST /give/items. - Troubleshoot reports about missing items.