API/Nation

From RetroMC
Jump to navigation Jump to search

Back to API

This API page describes the endpoints under api.retromc.org/api/v1/nation.

GET api.retromc.org/api/v1/nation/getNationList

Description

This endpoint retrieves a list of nations along with their owner information and village count.

HTTP Method

GET

Request Parameters

None.

Response Format

  • nation (array): A list of nations. Each nationobject contains:
    • owner (string): The UUID of the natio nowner.
    • name (string): The name of the nation.
    • uuid (string): The UUID of the nation.
    • villages (int): Amount of villages that are in the nation.

Example Response

{
  "nations": [
    {
      "owner": "aadac75e-12a4-4114-b2b5-a406b0669bfd",
      "villages": 4,
      "name": "Feline Republic",
      "uuid": "0257085d-5816-4016-9cd1-bf1c29894ab4"
    },
    {
      "owner": "5be9065e-0aef-4fd7-8801-51f1b9f1ddbc",
      "villages": 25,
      "name": "NorthernEmpires",
      "uuid": "790c77f7-fd62-4760-be16-97a4b45e9971"
    },
    {
      "owner": "05c9120d-41d2-49a9-b6c0-2564201de99e",
      "villages": 14,
      "name": "United Steves of America",
      "uuid": "8b6822ef-4fde-441e-9d8e-89ae2cd7d3a8"
    }
  ],
  "error": false
}

GET api.retromc.org/api/v1/nation/getNation

Description

Retrieves detailed information about a specific nation by its UUID, including owner, assistants, members, spawn location, balance, creation time, flags, and the total number of claims.

HTTP Method

GET

Request Parameters

  • uuid (required, string): The UUID of the nation to retrieve information about.

Response Format

  • owner (string): The UUID of the nationowner.
  • found (boolean): Indicates if the nationwas found.
  • creationTime (int): Unix timestamp of when the nationwas created.
  • balance (int): The current balance of the nation.
  • villages (array): Villages contained inside of this nation. Each village object contains:
    • uuid (string): The UUID of the village.
    • name (string): The name of the village.
    • activityCurrentWeek (double): Activity the village gained this week.
  • name (string): The name of the nation.
  • error (boolean): Indicates whether there was an error processing the request.
  • uuid (string): The UUID of the nation.

Example Response

{
  "owner": "05c9120d-41d2-49a9-b6c0-2564201de99e",
  "found": true,
  "creationTime": 1786088588,
  "balance": 451.89,
  "activity": {
    "currentWeekScore": 14704.380000013505,
    "weeks": {
      "2026-W35": 7956.980000008381,
      "2026-W36": 14704.380000013505
    },
    "lifetime": 22661.360000027325,
    "previousWeekScore": 7956.980000008381,
    "currentWeek": "2026-W36"
  },
  "villages": [
    {
      "name": "WoolStreet",
      "activityCurrentWeek": 9.539999999999885,
      "uuid": "8f15cfc1-a36c-4fc4-a167-24127191d6f1"
    },
    {
      "name": "Cradle",
      "activityCurrentWeek": 42.53000000000104,
      "uuid": "a99cefec-f895-4f60-af1e-9688adc26c93"
    },
    {
      "name": "Mineville",
      "activityCurrentWeek": 9051.860000015033,
      "uuid": "ecf09b1c-0e59-4be9-b8a5-8752a1589fe8"
    },
  ],
  "payments": {
    "weeks": {
      "2026-W35": 278.77
    },
    "lifetime": 278.77,
    "lastPaidAmount": 278.77,
    "lastPaidWeek": "2026-W35"
  },
  "name": "United Steves of America",
  "error": false,
  "uuid": "8b6822ef-4fde-441e-9d8e-89ae2cd7d3a8",
  "notice": null
}