Character Reputations API

I’ll be using the Character Reputations API for one of my projects but can’t understand the structure of the response.

    {
      "faction": {
        "key": {
          "href": "https://eu.api.blizzard.com/data/wow/reputation-faction/911?namespace=static-10.0.2_46479-eu"
        },
        "name": "Silvermoon City",
        "id": 911
      },
      "standing": {
        "raw": 11374,
        "value": 2374,
        "max": 12000,
        "tier": 5,
        "name": "Honored"
      }
    },

So what’s the use of raw value here? How do I calculate the current total reputation of the character and needed points for next tier?

current total reputation of the character

That’s the “raw” value. Here are the tiers the raw values map to:

-42000 to -6001 hated
-6000 to -3001 hostile
-3000 to -1 unfriendly
0 to 2999 neutral
3000 to 8999 friendly
9000 to 20999 honored
21000 to 41999 revered
42000 to 51999 exalted

needed points for next tier

that’s “max” minus “value”. Your example says they need 9626 rep to reach revered.

one more question.
wowhead (Court of Farondis - Faction - World of Warcraft) marks reputation tiers as:

  • |1|Hated|0|36000|
  • |2|Hostile|36000|3000|
  • |3|Unfriendly|39000|3000|
  • |4|Neutral|42000|3000|
  • |5|Friendly|45000|6000|
  • |6|Honored|51000|12000|
  • |7|Revered|63000|21000|
  • |8|Exalted|84000||

but api is marking the honored as tier 5?

        "tier": 5,
        "name": "Honored"

I guess Blizzard is using index 0 for hated, 1 for hostile, etc.