API:2/account/inventory

From Guild Wars 2 Wiki
< API:2‎ | account
Jump to navigationJump to search

/v2/account/inventory

HTTP method
GET
Format
json
API version
version 2
Release date
2016-02-12
Scope
account
inventories
Optional
none

This resource returns the shared inventory slots in an account. This endpoint is only accessible with a valid API key.

Parameters

  • access_token (optional) – Can be used to specify an API key for the request if it is not given in the request header.

Response

The endpoint returns an array of objects, each representing an item slot in the shared inventory. If a slot is empty, it will return null. The amount of slots is implied by the length of the array.

Each object contains the following:

  • id (number) – The item's ID.
  • count (number) – The amount of items in the item stack.
  • charges (number, optional) – The amount of charges remaining on the item.
  • skin (number, optional) – The skin applied to the item, if it is different from its original. Can be resolved against /v2/skins.
  • upgrades (array, optional) – An array of item IDs for each rune or signet applied to the item.
  • infusions (array, optional) – An array of item IDs for each infusion applied to the item.
  • binding (string, optional) – The current binding of the item. If present, the only possible value is Account.

Example

Request

https://api.guildwars2.com/v2/account/inventory
Authorization: Bearer <API key>

Response

[
  {
    "id": 44602,
    "count": 1,
    "binding": "Account"
  },
  {
    "id": 20321,
    "count": 1,
    "binding": "Account"
  }
]