API:2/characters/:id/inventory
From Guild Wars 2 Wiki
< API:2 | characters
Jump to navigationJump to search
/v2/characters/:id/inventory
- HTTP method
- GET
- Format
- json
- API version
- version 2
- Release date
- 2015-05-22
- Scope
- account
characters
inventories - Optional
- none
This resource returns information about the inventory of a character attached to a specific account.
Parameters
access_token- (optional) If the API key is not specified in the request header, it can be specified here.
Response
bags(array) - Contains one object structure per bag in the character's inventoryid(integer) - The bag's item id which can be resolved against /v2/itemssize(integer) - The amount of slots available with this bag.inventory(array) - Contains one object structure per item, object isnullif no item is in the given bag slot.id(integer) - The item id which can be resolved against /v2/itemscount(integer) - Amount of item in the stack. Minium of 1, maximum of 250.charges(integer) (optional) - The number of charges on an item.infusions(array) (optional) - returns an array of infusion itemidswhich can be resolved against /v2/itemsupgrades(array) (optional) - returns an array of upgrade component itemidswhich can be resolved against /v2/itemsskin(integer) (optional) - Skin id for the given equipment piece. Can be resolved against /v2/skinsstats(object) (optional) - Contains information on the stats chosen if the item offers an option for stats/prefix.id(integer) - The itemstat id, can be resolved against /v2/itemstats.attributes(object) - Contains a summary of the stats on the item.Power(integer) (optional) - Shows the amount of power givenPrecision(integer) (optional) - Shows the amount of Precision givenToughness(integer) (optional) - Shows the amount of Toughness givenVitality(integer) (optional) - Shows the amount of Vitality givenCondition Damage(integer) (optional) - Shows the amount of Condition Damage givenCondition Duration(integer) (optional) - Shows the amount of Condition Duration givenHealing(integer) (optional) - Shows the amount of Healing Power givenBoonDuration(integer) (optional) - Shows the amount of Boon Duration given
dyes(array of numbers) (optional) - Array of selected dyes for the equipment piece. Values default tonullif no dye is selected. Colors can be resolved againstv2/colorsbinding(string) (optional) - describes which kind of binding the item has. Possible values:CharacterAccount
bound_to(string) (optional, only if character bound) - Name of the character the item is bound to.
Example
Request
https://api.guildwars2.com/v2/characters/<character name>/inventory Authorization: Bearer <API key> https://api.guildwars2.com/v2/characters/<character name>/inventory?access_token=<API key>
Response
{
"bags": [
{
"id": 87225,
"size": 32,
"inventory": [
{
"id": 42877,
"count": 4,
"binding": "Account"
},
{
"id": 8469,
"count": 1,
"binding": "Account"
},
{
"id": 71836,
"count": 1,
"skin": 746,
"upgrades": [
71425
],
"dyes": [
6,
315,
453,
1
],
"binding": "Character",
"bound_to": "Chieftain Alex"
},
...
{
"id": 46735,
"count": 250,
"binding": "Account"
}
]
},
{
"id": 8932,
"size": 20,
"inventory": [
{
"id": 46735,
"count": 250,
"binding": "Account"
},
{
"id": 46735,
"count": 180,
"binding": "Account"
},
{
"id": 77656,
"count": 1,
"binding": "Account"
},
null,
null,
...
null,
null
]
}
]
}