API:2/achievements/categories

From Guild Wars 2 Wiki
Jump to navigationJump to search

/v2/achievements/categories

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

This resource returns all the categories for achievements.

Parameters

  • lang (optional) – The language to query for.

Response

If the root endpoint (/v2/achievements/categories) is accessed without specifying an id, a list of all ids is returned. When multiple ids are requested using the ids parameter, a list of response objects is returned.

For each requested category id, an object with the following properties is returned:

  • id (number) - The category's ID.
  • name (string) – The category name.
  • description (string) – The category description.
  • order (number) – A number describing where to sort this category among other the other categories in its group. Lowest numbers go first, highest numbers go last.
  • icon (string) – A URL to an image for the icon of the category.
  • achievements (array of numbers) – An array containing a number of achievement IDs that this category contains. (See /v2/achievements.)

On schema version 2022-03-23T19:00:00.000Z or later, the following addition/changes to the values above are made:

  • achievements (array of objects) - A list of achievement details.
    • id (number) - The ID of an achievement. (See /v2/achievements.)
    • required_access (object, optional) - Describes if a daily requires a Guild Wars 2 campaign or not.
      • product (string) - A Guild Wars 2 campaign. Can either be HeartOfThorns or PathOfFire.
      • condition (string) - The condition if a account can or cannot see this daily achievement. Can either be HasAccess or NoAccess.
    • flags (array of strings, optional) - The type of daily achievement.
      • PvE
      • PvP
      • WvW
      • SpecialEvent
    • level (array of two numbers, optional) - The inclusive level range for a daily achievement. Available on achievements that are level locked.
  • tomorrow (array of objects, optional) - A list of achievements that will be active tomorrow. This is only available on some daily categories.
    • id (number) - The ID of an achievement. (See /v2/achievements.)
    • required_access (object, optional) - Describes if a daily requires a Guild Wars 2 campaign or not.
      • product (string) - A Guild Wars 2 campaign. Can either be HeartOfThorns or PathOfFire.
      • condition (string) - The condition if a account can or cannot see this daily achievement. Can either be HasAccess or NoAccess.
    • flags (array of strings, optional) - The type of daily achievement.
      • PvE
      • PvP
      • WvW
      • SpecialEvent
    • level (array of two numbers, optional) - The inclusive level range for a daily achievement. Available on achievements that are level locked.

Example

https://api.guildwars2.com/v2/achievements/categories/1
{
  "id": 1,
  "name": "Slayer",
  "description": "",
  "order": 30,
  "icon": "https://render.guildwars2.com/file/E00460A2CAD85D47406EAB4213D1010B3E80C9B0/42675.png",
  "achievements": [1, 5, 4, 6, ...] 
}
https://api.guildwars2.com/v2/achievements/categories/1?v=2022-03-23T19:00:00.000Z
{
  "id": 97,
  "name": "Daily",
  "description": "",
  "order": 0,
  "icon": "https://render.guildwars2.com/file/483E3939D1A7010BDEA2970FB27703CAAD5FBB0F/42684.png",
  "achievements": [
    {
      "id": 500,
      "flags": [
        "PvE"
      ],
      "level": [
        11,
        80
      ]
    },
    {
      "id": 1844,
      "flags": [
        "WvW"
      ],
      "level": [
        11,
        80
      ]
    }, ...
  ],
  "tomorrow": [
    {
      "id": 1959,
      "required_access": {
        "product": "PathOfFire",
        "condition": "NoAccess"
      },
      "flags": [
        "PvE"
      ],
      "level": [
        80,
        80
      ]
    },
    {
      "id": 1973,
      "flags": [
        "PvE"
      ]
    }, ...
  ]
}

Notes

Festival achievements are available in the Historical group when the respective festival is ingame, but vanish from the categories completely when the festival is inactive ingame. (ref)