跳转至

GET /pals/{player_identifier}

端点: GET /v1/pdapi/pals/<player_identifier>

认证: Bearer 令牌

权限: REST.Pals.Read

用途

列出目标玩家的帕鲁。响应中的帕鲁标识可在 paldeck.cc/pals 查询。

路径参数

  • player_identifier: 目标玩家的 UserIdPlayerUID

查询参数

无。

请求体

无请求体。

响应结构

200 response schema

Field Type Description
Meta object Target player metadata and Pal counts.
Pals object Team, Palbox, and base camp Pals 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.
TeamCount integer Number of Pals in the player team.
PalboxCount integer Number of Pals in the player Palbox.
BaseCampCount integer Number of base camps included.

Pals object schema:

Field Type Description
Team object Team Pals keyed by Pal instance ID.
Palbox object Palbox Pals keyed by Pal instance ID.
BaseCamps object[] Guild base camps and their assigned worker Pals.

Pal object schema:

Field Type Description
PalID string Pal species identifier.
UniqueNPCID string Unique NPC ID, when present.
Nickname string Custom Pal nickname, or an empty string.
SkinId string Skin ID, or an empty string.
Gender string Pal gender.
Level integer Pal level.
Exp integer Pal EXP.
Shiny boolean Whether this is a rare Pal.
PartnerSkillLevel integer Partner skill rank.
CondensedPals integer Condense rank progress.
UnusedStatusPoints integer Unused Pal status points.
FriendshipPoints integer Friendship point value.
PhysicalHealth string Physical health state.
WorkerSick string Worker sickness state.
ImportedCharacter boolean Whether this is marked as imported.
HP number Current HP.
MP number Current MP, when present.
SP number Current stamina, when present.
Shield number Current shield value, when present.
Hunger number Current hunger value.
MaxHunger number Maximum hunger value.
SAN number Sanity value.
Support integer Support value.
CraftSpeed integer Craft speed value.
PalSouls object Pal soul ranks with Health, Attack, Defense, and CraftSpeed.
IVs object IV values with Health, AttackMelee, AttackShot, and Defense.
ActiveSkills string[] Equipped active skills.
LearntSkills string[] Learned skills.
Passives string[] Passive skill IDs.
ExtraWorkSuitabilities object Additional work suitability ranks keyed by suitability ID.
DisableWorkPreferences string[] Disabled work preference IDs.
team_slot_index integer Team slot index, only on Team Pals.
page integer Palbox page index, only on Palbox Pals.
slot integer Palbox slot index, only on Palbox Pals.
base_camp_slot_index integer Base camp worker slot index, only on base camp Pals.

BaseCamps[] item schema:

Field Type Description
id string Base camp GUID.
level integer Base camp level.
world_pos object Base camp world coordinates.
map_pos object Converted map coordinates.
state string Current base camp state.
pals object Base camp worker Pals keyed by Pal instance ID.

Coordinate object schema:

Field Type Description
x number X coordinate.
y number Y coordinate.
z number Z coordinate.

错误响应

错误响应使用以下格式:

{
    "Error": {
        "Code": "ERROR_CODE",
        "Message": "人类可读的消息",
        "详情": {}
    }
}
HTTP 错误代码 发生条件
401 INVALID_TOKEN Authorization 头缺失、格式错误,或与配置的 Bearer 令牌不匹配。
403 MISSING_PERMISSION 令牌有效,但不包含此端点权限。
400 INVALID_JSON 提供了请求体,但无法解析为 JSON。
400 REQUEST_FAILED 游戏线程回调抛出异常,或共享玩家/资源解析器失败。
500 REQUEST_TIMEOUT 内部游戏线程回调未在 5 秒内完成。
404 PLAYER_NOT_FOUND No online player matched the supplied player_identifier.
404 PLAYER_STATE_NOT_FOUND 玩家存在,但其 APalPlayerState 不可用。

示例

Read Pals for a PS5 player

GET /v1/pdapi/pals/ps5_0f4b8c2d91aa34ef

Read Pals by PlayerUID

GET /v1/pdapi/pals/6d2e8b40-73ef-4f11-9bb8-2e91a36e2f09

使用场景