Skip to content

TFT Team Planner API

dysolix edited this page Dec 18, 2024 · 3 revisions

TFT Team Planner API Documentation

Overview

The TFT Team Planner endpoints enable developers to interact with the Teamfight Tactics (TFT) Team Planner feature. These endpoints allow adding, removing, and managing units in the planner, as well as generating and retrieving team codes.


Endpoints

Add or Remove Champion to/from Planner

Endpoint:

POST or DELETE /lol-tft-team-planner/v1/sets/{set}/teams/{team}/champions/{championId}/{index}

Description: Adds or removes the specified unit/champion ID to/from the planner at the selected index.

  • Method: POST or DELETE
  • Path Parameters:
    • {set}: Set ID, e.g., TFTSet13
    • {team}: Team ID, e.g., 5ccc5aff-dfb1-4cb2-bb9a-e2ef995cfb5c
    • {championId}: Champion ID, e.g., TFT13_Akali
    • {index} (optional): Index position in the planner. If omitted, the unit will be created in the first available spot.

Example Request:

await client.request("post", "/lol-tft-team-planner/v1/sets/{set}/teams/{team}/champions/{championId}/{index}", {
    path: {
        set: "TFTSet13",
        team: "5ccc5aff-dfb1-4cb2-bb9a-e2ef995cfb5c",
        championId: "TFT13_Akali",
        index: "2"
    }
})

Import Team

Endpoint:

POST /lol-tft-team-planner/v1/sets/{set}/teams/{team}/import

Description: Accepts an array of TFT champion IDs to create or overwrite a team in the planner. Overwriting existing teams like this leads to visual bugs in the client.

  • Method: POST

  • Path Parameters:

    • {set}: Set ID, e.g., TFTSet13
    • {team}: Team ID. This can be a new or existing team ID. If the team does not exist, a new team will be created with the specified ID.
  • Request Body:

    • An array of champion ids, e.g. ["TFT13_Akali", "TFT13_Lux"]

Example Request:

POST /lol-tft-team-planner/v1/sets/TFTSet13/teams/123456/import

Body:
[
  "TFT13_Akali",
  "TFT13_Lux",
  "TFT13_Draven"
]

Retrieve Clipboard Team Code Information

Endpoint:

POST /lol-tft-team-planner/v1/team-code/clipboard/{set}

Description: Returns information about the team code copied to the clipboard for the specified set.

  • Method: POST
  • Path Parameters:
    • {set}: Set ID, e.g., TFTSet13

Example Request:

POST /lol-tft-team-planner/v1/team-code/clipboard/TFTSet13

Example Response:

{
    "teamCode": "010102030405060708090ATFTSet13",
    "teamPlan": [
        {
            "championId": "TFT13_Akali",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Akali/HUD/TFT13_Akali_Square.TFT_Set13.jpg",
            "price": 2
        },
        {
            "championId": "TFT13_Ambessa",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Ambessa/HUD/TFT13_Ambessa_Square.TFT_Set13.jpg",
            "price": 4
        },
        {
            "championId": "TFT13_Amumu",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Amumu/HUD/TFT13_Amumu_Square.TFT_Set13.jpg",
            "price": 1
        },
        {
            "championId": "TFT13_Beardy",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Beardy/HUD/TFT13_Beardy_Square.TFT_Set13.jpg",
            "price": 3
        },
        {
            "championId": "TFT13_Blitzcrank",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Blitzcrank/HUD/TFT13_Blitzcrank_Square.TFT_Set13.jpg",
            "price": 3
        },
        {
            "championId": "TFT13_Blue",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Blue/HUD/TFT13_Blue_Square.TFT_Set13.jpg",
            "price": 1
        },
        {
            "championId": "TFT13_Caitlyn",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Caitlyn/HUD/TFT13_Caitlyn_Square.TFT_Set13.jpg",
            "price": 5
        },
        {
            "championId": "TFT13_Camille",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Camille/HUD/TFT13_Camille_Square.TFT_Set13.jpg",
            "price": 2
        },
        {
            "championId": "TFT13_Cassiopeia",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Cassiopeia/HUD/TFT13_Cassiopeia_Square.TFT_Set13.jpg",
            "price": 3
        },
        {
            "championId": "TFT13_Chainsaw",
            "icon": "/lol-game-data/assets/ASSETS/Characters/TFT13_Chainsaw/HUD/TFT13_Chainsaw_Square.TFT_Set13.jpg",
            "price": 3
        }
    ]
}

Generate Team Code

Endpoint:

POST /lol-tft-team-planner/v1/sets/{set}/team-code/{team}

Description: Generates a team code for the specified team.

  • Method: POST
  • Path Parameters:
    • {set}: Set ID, e.g., TFTSet13
    • {team}: Team ID, e.g., 5ccc5aff-dfb1-4cb2-bb9a-e2ef995cfb5c

Example Request:

POST /lol-tft-team-planner/v1/sets/TFTSet13/team-code/49998fb8-7fb8-4f9c-af2c-2c45b8d0b0e3

Example Response:

"0120000000000000000000TFTSet13"