API:2/guild/:id/treasury
From Guild Wars 2 Wiki
Jump to navigationJump to search
/v2/guild/:id/treasury
- HTTP method
- GET
- Format
- json
- API version
- version 2
- Release date
- 2016-01-21
- Scope
- account
guilds - Optional
- none
This resource returns information about the items in a guild's treasury. The endpoint requires the scope guilds
, and will only work if the API key is from the guild leader's account.
Response
The endpoint must be requested with :id
replaced with a valid guild ID. The endpoint will return an array of objects, each describing an item in the treasury. Each object has the following properties:
item_id
(number) - The item's ID.count
(number) - How many of the item are currently in the treasury.needed_by
(array) - An array of objects describing which currently in-progress upgrades are needing this item. Each object has the following properties:upgrade_id
(number) - The ID of the upgrade needing this item.count
(number) - The total amount the upgrade needs for this item.
Example
https://api.guildwars2.com/v2/guild/4BBB52AA-D768-4FC6-8EDE-C299F2822F0F/treasury
[ { item_id: 12138, count: 200, needed_by: [ { upgrade_id: 42, count: 1000 } ] }, { item_id: 19684, count: 3493, needed_by: [ { upgrade_id: 42, count: 3000 }, { upgrade_id: 43, count: 3000 } ] } ]