API:2/account/materials

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

/v2/account/materials

HTTP method
GET
Format
json
API version
version 2
Release date
2015-06-26
Scope
account
inventories
Optional
none

This resource returns the materials stored in a player's vault. 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 a material that can be stored in the vault. Every material will be returned, even if they have a count of 0.

Each object contains the following:

  • id (number) – The item ID of the material.
  • category (number) – The material category the item belongs to. Can be resolved against /v2/materials.
  • binding (string, optional) – The binding of the material. Either Account or omitted.
  • count (number) – The number of the material that is stored in the account vault.

Example

Request

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

Response

[
  {
    "id": 12134,
    "category": 5,
    "count": 64
  },
  {
    "id": 24876,
    "category": 30,
    "count": 12
  }
]