API updates August 4th

about 3 hours ago

VAELINN

571 Total Respect

VAELINN

571 Respect

about 3 hours ago

API update — new selections & better polling

We've shipped a round of community API improvements aimed at script and tool authors. Full field-level docs are on the in-game API page — this post is the short version of what's new.

User API

  • money (Limited+) — live wallet snapshot: cash on hand, bank, vault, and points. Prefer this when you only need current balances instead of walking graph history.
  • activities (Limited+) — your active job, in-progress expeditions, and owned production lines (with timers / progress fields).
  • advanced additions —
    • hospitalReason — why the player is in hospital (null when they aren't).
    • reviveChance — your key owner's rounded % chance to revive that target (null when not in hospital, revives disabled, self, or you don't have enough revive skill). Chance is computed for the requesting key owner, not a global value.

Inventory API

  • Inventory stacks now include useId — the stack GUID used by the Use flow (/Inventory/Use?id=…). This is distinct from itemId (catalog template id).

Cartel API

New own-cartel selections (other cartel ids stay forbidden):

  • perks (Limited+ + Access API) — perk tree state, current/max level, and next-level cost/name.
  • armoury / armory (Limited+ + Access API) — aggregated armoury stock by catalog item (quantity summed, not one row per unit).
  • applications (Full + Invite permission) — pending join applications. Invite is required here, not only Access API.

Empty perks / armoury / applications lists return an empty array (unlike some older list selections that return 400 when there's no data).

Rate limits & conditional requests

  • Responses include IETF draft-7 RateLimit / RateLimit-Policy headers. On 429, respect Retry-After.
  • Limits remain keyed per player (not per key): 200/min general, 3/min for chat.
  • Single-type list selections (user: attacks, events, graph; cartel: members, attacks, events) now support weak ETags. Send If-None-Match to get 304 Not Modified when nothing changed. ETags are not applied when you request multiple type values together. Note: 304s still count against the rate limit.

Permission reminder

Private cartel types still require the right key level and cartel role flags. Capos can access everything; Access API covers members / perks / armoury; applications additionally need Invite. Keys can only see private data for the key owner / their own cartel.

If you're building (or updating) a tool and something looks wrong vs the docs, ping Diablo in-game or on Discord — happy to help iterate on the next round.