### Install Node.js Wrapper Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Config Install the fortnite-api-com package using npm. ```bash npm i fortnite-api-com --save ``` -------------------------------- ### Install NodeJS Wrapper Source: https://github.com/fortnite-api/nodejs-wrapper/blob/master/README.md Install the Fortnite API NodeJS wrapper using npm. This command is used to add the package to your project dependencies. ```bash npm install fnapicom ``` -------------------------------- ### CreatorCode Method Response Example Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/CreatorCode This is an example of the JSON response structure you can expect when successfully retrieving creator code information. ```JSON { "status":200, "data":{ "id":"239593b6bbaf41f28475685f5d0b72d8", "slug":"example", "displayName":"ΕXΑMPLΕ", "status":"ACTIVE", "verified":false } } ``` -------------------------------- ### Initialize Client and Fetch AES Keys Source: https://github.com/fortnite-api/nodejs-wrapper/blob/master/README.md Initialize the Fortnite API client with your API key and preferred language. This example demonstrates fetching AES keys from the API. ```javascript const { Client, Language } = require('fnapicom'); const client = new Client({ language: Language.English, apiKey: 'your-api-key', }); client.aesKeys() .then(console.log); ``` -------------------------------- ### Example Cosmetics Search Result Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\search This is an example of the JSON response structure when searching for a cosmetic item. It includes details such as ID, type, rarity, name, description, and image URLs. ```json { "status":200, "data":{ "id":"eid_dab", "type":"emote", "backendType":"AthenaDance", "rarity":"rare", "displayRarity":"Rare", "backendRarity":"EFortRarity::Rare", "name":"Dab", "shortDescription":"Emote", "description":"Express yourself on the battlefield.", "set":null, "setText":null, "series":null, "backendSeries":null, "images":{ "smallIcon":{ "hash":"92531318b60145d8991c493e68189f74", "url":"https://fortnite-api.com/image/eid_dab/smallicon.png" }, "icon":{ "hash":"9d5f8f6f396737ac94b360c796f662a8", "url":"https://fortnite-api.com/image/eid_dab/icon.png" }, "featured":null, "background":null, "coverArt":null, "decal":null }, "variants":null, "gameplayTags":[ "Cosmetics.EmoteType.Dance", "Cosmetics.Source.ItemShop", "Cosmetics.Filter.Season.1" ], "displayAssetPath":null, "definition":null, "requiredItemId":null, "builtInEmoteId":null, "path":"FortniteGame/Content/Athena/Items/Cosmetics/Dances/EID_Dab", "lastUpdate":"2019-11-20T12:49:45Z", "added":"2019-11-20T12:49:45Z" } } ``` -------------------------------- ### Example API Response Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/API Illustrates a sample JSON response from the Fortnite API, typically containing URLs or data structures. ```JSON https://fortnite-api.com/ ``` -------------------------------- ### Fetch All Cosmetics Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\all Use this method to get a list of all available cosmetics. It requires a language code as a parameter. Handle potential errors using `.catch()`. ```JavaScript Fortnite.CosmeticsList("en") .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Cosmetics Search IDs Result Example Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\search\ids This is an example of the JSON response structure when searching for cosmetic items by their IDs. It includes details such as ID, type, rarity, name, and description for each item found. ```json { "status":200, "data":[ { "id":"eid_dab", "type":"emote", "backendType":"AthenaDance", "rarity":"rare", "displayRarity":"Rare", "backendRarity":"EFortRarity::Rare", "name":"Dab", "shortDescription":"Emote", "description":"Express yourself on the battlefield.", "set":null, "setText":null, "series":null, "backendSeries":null, "images":[ "Object" ], "variants":null, "gameplayTags":[ "Array" ], "displayAssetPath":null, "definition":null, "requiredItemId":null, "builtInEmoteId":null, "path":"FortniteGame/Content/Athena/Items/Cosmetics/Dances/EID_Dab", "lastUpdate":"2019-11-20T12:49:45Z", "added":"2019-11-20T12:49:45Z" }, { "id":"eid_deepdab", "type":"emote", "backendType":"AthenaDance", "rarity":"uncommon", "displayRarity":"Uncommon", "backendRarity":"EFortRarity::Uncommon", "name":"Deep Dab", "shortDescription":"Emote", "description":"Bring 'em down to your level.", "set":null, "setText":null, "series":null, "backendSeries":null, "images":[ "Object" ], "variants":null, "gameplayTags":[ "Array" ], "displayAssetPath":null, "definition":null, "requiredItemId":null, "builtInEmoteId":null, "path":"FortniteGame/Content/Athena/Items/Cosmetics/Dances/EID_DeepDab", "lastUpdate":"2019-11-20T12:49:45Z", "added":"2019-11-20T12:49:45Z" }, { "id":"cid_398_athena_commando_m_treasurehunterfashion", "type":"outfit", "backendType":"AthenaCharacter", "rarity":"uncommon", "displayRarity":"Uncommon", "backendRarity":"EFortRarity::Uncommon", "name":"Guild", "shortDescription":"Outfit", "description":"On the path to riches.", "set":null, "setText":null, "series":null, "backendSeries":null, "images":[ "Object" ], "variants":null, "gameplayTags":[ "Array" ], "displayAssetPath":"FortniteGame/Content/Catalog/DisplayAssets/DA_Featured_CID_398_Athena_Commando_M_TreasureHunterFashion", "definition":"hid_398_athena_commando_m_treasurehunterfashion", "requiredItemId":null, "builtInEmoteId":null, "path":"FortniteGame/Content/Athena/Items/Cosmetics/Characters/CID_398_Athena_Commando_M_TreasureHunterFashion", "lastUpdate":"2019-11-20T12:50:01Z", "added":"2019-11-20T12:50:01Z" }, { "id":"cid_397_athena_commando_f_treasurehunterfashion", "type":"outfit", "backendType":"AthenaCharacter", "rarity":"uncommon", "displayRarity":"Uncommon", "backendRarity":"EFortRarity::Uncommon", "name":"Aura", "shortDescription":"Outfit", "description":"Get the goods in style.", "set":null, "setText":null, "series":null, "backendSeries":null, "images":[ "Object" ], "variants":null, "gameplayTags":[ "Array" ], "displayAssetPath":"FortniteGame/Content/Catalog/DisplayAssets/DA_Featured_CID_397_Athena_Commando_F_TreasureHunterFashion", "definition":"hid_397_athena_commando_f_treasurehunterfashion", "requiredItemId":null, "builtInEmoteId":null, "path":"FortniteGame/Content/Athena/Items/Cosmetics/Characters/CID_397_Athena_Commando_F_TreasureHunterFashion", "lastUpdate":"2019-11-20T12:50:02Z", "added":"2019-11-20T12:50:02Z" } ] } ``` -------------------------------- ### Make an API Call Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Config Example of making an API call to the AES endpoint and handling the response or errors. This demonstrates basic usage after client initialization. ```javascript Fortnite.AES() .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Example JSON Response for Creator Code Search Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/CreatorCode\search\all This is an example of the JSON response structure you can expect when searching for creator codes. It includes details like id, slug, displayName, status, and verified. ```JSON { "status":200, "data":[ { "id":"239593b6bbaf41f28475685f5d0b72d8", "slug":"example", "displayName":"ΕXΑMPLΕ", "status":"ACTIVE", "verified":false }, { "id":"b68f9802737c44ffa7ddc8039b5de1d0", "slug":"example000", "displayName":"Example000", "status":"ACTIVE", "verified":false }, { "id":"1734148676bb49a680f4ee8164a31592", "slug":"example2901", "displayName":"ExamPle2901", "status":"ACTIVE", "verified":false }, { "id":"21da6eef47bb40cabc6894573d544e31", "slug":"examplefn", "displayName":"ExampleFN", "status":"ACTIVE", "verified":false }, { "id":"7d44be7d03554dce8449b091f34258de", "slug":"example_titis", "displayName":"EXAMPLE_Titis", "status":"ACTIVE", "verified":false }, { "id":"168d0324349045dd83fa80445825a1ce", "slug":"example_tm", "displayName":"Example_TM", "status":"ACTIVE", "verified":false } ] } ``` -------------------------------- ### Fetch AES Key Information Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/AES Use this JavaScript snippet to call the Fortnite.AES() method and log the response or any errors. Ensure you have the nodejs-wrapper library installed. ```JavaScript Fortnite.AES() .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Shop Bundle Data Example Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Shop\Combined This snippet illustrates the structure of a shop bundle, including pricing, banner information, giftability, refund status, categories, and the items included within the bundle. It's useful for understanding how items are packaged and sold in the Fortnite Item Shop. ```json { "regularPrice": 2000, "finalPrice": 2000, "bundle": null, "banner": { "value": "Pickaxe Included!", "backendValue": "PickaxeIncluded" }, "giftable": true, "refundable": true, "sortPriority": -1, "categories": ["Panel 1"], "devName": "[VIRTUAL]1 x Captain America, 1 x Proto-Adamantium Shield, 1 x Proto-Adamantium Shield for 2000 MtxCurrency", "offerId": "v2:/5c87c543d74ffa7b7e02058387908f5285afe87a1540c94bf9e5b2157fc0640b", "displayAssetPath": "FortniteGame/Content/Catalog/DisplayAssets/DA_Featured_CID_807_Athena_Commando_M_CandyApple_B1U7X", "items": [ { "id": "CID_807_Athena_Commando_M_CandyApple_B1U7X", "name": "Captain America", "description": "Super soldier Steve Rogers stands as an enduring sentinel of liberty.", "type": { "value": "outfit", "displayValue": "Outfit", "backendValue": "AthenaCharacter" }, "rarity": { "value": "marvel", "displayValue": "MARVEL SERIES", "backendValue": "EFortRarity::Epic" }, "series": { "value": "MARVEL SERIES", "image": null, "backendValue": "MarvelSeries" }, "set": { "value": "Avengers", "text": "Part of the Avengers set.", "backendValue": "AshtonBoardwalk" }, "introduction": { "chapter": "2", "season": "3", ``` -------------------------------- ### Cosmetic Item Data Example Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Shop\Combined This snippet shows the structure of a cosmetic item's data, including its ID, name, description, type, rarity, series, set, introduction details, images, variants, gameplay tags, and shop history. It's useful for understanding the full details available for each item. ```json { "id": "CID_799_Athena_Commando_F_CupidDark", "name": "Cupid Dark", "description": "Love is in the air... and it's deadly.", "type": { "value": "outfit", "displayValue": "Outfit", "backendValue": "AthenaCharacter" }, "rarity": { "value": "dark", "displayValue": "DARK SERIES", "backendValue": "EFortRarity::Epic" }, "series": { "value": "DARK SERIES", "image": "https://fortnite-api.com/images/cosmetics/br/series/cubeseries.png", "backendValue": "CUBESeries" }, "set": { "value": "Team Heartbreak", "text": "Part of the Team Heartbreak set.", "backendValue": "GroupAgony" }, "introduction": { "chapter": "2", "season": "3", "text": "Introduced in Chapter 2, Season 3.", "backendValue": 13 }, "images": { "smallIcon": "https://fortnite-api.com/images/cosmetics/br/cid_799_athena_commando_f_cupiddark/smallicon.png", "icon": "https://fortnite-api.com/images/cosmetics/br/cid_799_athena_commando_f_cupiddark/icon.png", "featured": null, "other": null }, "variants": null, "gameplayTags": ["Cosmetics.Source.ItemShop", "Cosmetics.Filter.Season.13", "Cosmetics.Set.GroupAgony"], "showcaseVideo": "7YRXZl1CHTE", "displayAssetPath": "FortniteGame/Content/Catalog/DisplayAssets/DA_Featured_CID_799_Athena_Commando_F_CupidDark", "definitionPath": "FortniteGame/Content/Athena/Heroes/HID_799_Athena_Commando_F_CupidDark", "path": "FortniteGame/Content/Athena/Items/Cosmetics/Characters/CID_799_Athena_Commando_F_CupidDark", "added": "2020-06-30T06:09:08Z", "shopHistory": ["2020-07-11T00:00:00Z", "2020-07-12T00:00:00Z"] }, { "id": "BID_551_CupidDarkFemale", "name": "Heartless Wings", "description": "Heartbreakingly flappy.", "type": { "value": "backpack", "displayValue": "Back Bling", "backendValue": "AthenaBackpack" }, "rarity": { "value": "dark", "displayValue": "DARK SERIES", "backendValue": "EFortRarity::Epic" }, "series": { "value": "DARK SERIES", "image": "https://fortnite-api.com/images/cosmetics/br/series/cubeseries.png", "backendValue": "CUBESeries" }, "set": { "value": "Team Heartbreak", "text": "Part of the Team Heartbreak set.", "backendValue": "GroupAgony" }, "introduction": { "chapter": "2", "season": "3", "text": "Introduced in Chapter 2, Season 3.", "backendValue": 13 }, "images": { "smallIcon": "https://fortnite-api.com/images/cosmetics/br/bid_551_cupiddarkfemale/smallicon.png", "icon": "https://fortnite-api.com/images/cosmetics/br/bid_551_cupiddarkfemale/icon.png", "featured": null, "other": null }, "variants": null, "gameplayTags": ["Cosmetics.Source.ItemShop", "Cosmetics.Filter.Season.13", "Cosmetics.Set.GroupAgony"], "showcaseVideo": null, "displayAssetPath": null, "definitionPath": null, "path": "FortniteGame/Content/Athena/Items/Cosmetics/Backpacks/BID_551_CupidDarkFemale", "added": "2020-06-30T06:09:08Z", "shopHistory": ["2020-07-11T00:00:00Z", "2020-07-12T00:00:00Z"] }] } ``` -------------------------------- ### Cosmetics List Response Structure Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\all This is an example of the JSON response received when fetching the cosmetics list. It contains status information and an array of cosmetic items, each with detailed properties. ```JSON { "status": 200, "data": [ { "id": "bannertoken_001_cattus", "type": "banner", "backendType": "FortBanner", "rarity": "uncommon", "displayRarity": "Uncommon", "backendRarity": "EFortRarity::Uncommon", "name": "Monster Team Banner", "shortDescription": "Banner", "description": "A new icon for your banner. Assign it in the Locker.", "set": "Final Showdown", "setText": "Part of the Final Showdown set.", "series": null, "backendSeries": null, "images": { "smallIcon": { "hash": "e91c744a39cbe7f886b015b0ad880d01", "url": "https://fortnite-api.com/image/bannertoken_001_cattus/smallicon.png" }, "icon": { "hash": "552968f5afd7cb19f94f3f1b4ab159ec", "url": "https://fortnite-api.com/image/bannertoken_001_cattus/icon.png" }, "featured": { "hash": "2e1b6e73ae5f15d86dfd4605b1150697", "url": "https://fortnite-api.com/image/bannertoken_001_cattus/featured.png" }, "background": null, "coverArt": null, "decal": null }, "variants": null, "gameplayTags": [ "Cosmetics.Set.TeamShowdown", "Cosmetics.Source.ItemShop" ], "displayAssetPath": "FortniteGame/Content/Catalog/DisplayAssets/DA_Featured_BannerToken_001_Cattus", "definition": null, "requiredItemId": null, "builtInEmoteId": null, "path": "FortniteGame/Content/Athena/Items/BannerToken/BannerToken_001_Cattus", "lastUpdate": "2019-11-20T12:48:18Z", "added": "2019-11-20T12:48:18Z" }, ... 2585 more items ] } ``` -------------------------------- ### Fortnite Item Shop Data Structure Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Shop Example of the JSON structure representing an item in the Fortnite shop, including its showcase video, display asset path, definition path, item path, and addition date. ```json { "showcaseVideo": "etjLD9eNQXU", "displayAssetPath": "FortniteGame/Content/Catalog/DisplayAssets/DA_Featured_Pickaxe_ID_418_CupidDarkFemale1H", "definitionPath": "FortniteGame/Content/Athena/Items/Weapons/WID_Harvest_Pickaxe_CupidDarkFemale1H", "path": "FortniteGame/Content/Athena/Items/Cosmetics/Pickaxes/Pickaxe_ID_418_CupidDarkFemale1H", "added": "2020-06-30T06:09:08Z", "shopHistory": ["2020-07-11T00:00:00Z", "2020-07-12T00:00:00Z"] } ``` -------------------------------- ### Example AES Response Structure Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/AES This JSON structure represents a successful response from the Fortnite.AES() method, containing the AES key, build version, and last update timestamp. ```JSON { "status": 200, "data": { "aes": "7f851d7e72c27cb0bfd76878e249801373dec3c40707af9a0c93fd7fc5153dbf", "build": "++Fortnite+Release-13.20-CL-13777676-Windows", "lastUpdate": "2020-06-30T06:09:01Z" } } ``` -------------------------------- ### FortniteAPI() Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Functions Initializes the Fortnite API client with configuration. ```APIDOC ## FortniteAPI() ### Description Initializes the Fortnite API client with the provided configuration. ### Method FortniteAPI ### Parameters None ### Request Example ```javascript Fortnite.FortniteAPI() .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` ### Response #### Success Response (200) - **res** (object) - API response data. #### Response Example ```json { "example": "response data" } ``` ``` -------------------------------- ### Initialize Fortnite API Wrapper Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/API Demonstrates how to initialize the Fortnite API wrapper and handle successful responses or errors. ```JavaScript Fortnite.FortniteAPI() .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Initialize Fortnite API Wrapper Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Functions Initializes the Fortnite API wrapper with configuration options including API key, language, and debug mode. This is the first step before making any API calls. ```JavaScript const FortniteAPI = require('fortnite-api-com'); const config = { apikey: "API-Key", language: "en", debug: true }; var Fortnite = new FortniteAPI(config); ``` -------------------------------- ### Fortnite Cosmetic Search by ID Result Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\search\id This is an example of the JSON response received when successfully searching for a Fortnite cosmetic by its ID. ```JSON { "status": 200, "data": { "id": "CID_416_Athena_Commando_M_AssassinSuit", "name": "John Wick", "description": "Every action has consequences.", "type": { "value": "outfit", "displayValue": "Outfit", "backendValue": "AthenaCharacter" }, "rarity": { "value": "legendary", "displayValue": "Legendary", "backendValue": "EFortRarity::Legendary" }, "series": null, "set": { "value": "John Wick", "text": "Part of the John Wick set.", "backendValue": "AssassinSuit" }, "introduction": { "chapter": "1", "season": "9", "text": "Introduced in Chapter 1, Season 9.", "backendValue": 9 }, "images": { "smallIcon": "https://fortnite-api.com/images/cosmetics/br/cid_416_athena_commando_m_assassinsuit/smallicon.png", "icon": "https://fortnite-api.com/images/cosmetics/br/cid_416_athena_commando_m_assassinsuit/icon.png", "featured": "https://fortnite-api.com/images/cosmetics/br/cid_416_athena_commando_m_assassinsuit/featured.png", "other": null }, "variants": [ { "channel": "Parts", "type": "STYLE", "options": [ { "tag": "Stage1", "name": "DEFAULT", "image": "https://fortnite-api.com/images/cosmetics/br/cid_416_athena_commando_m_assassinsuit/variants/parts/stage1.png" }, { "tag": "Stage2", "name": "DAMAGED", "image": "https://fortnite-api.com/images/cosmetics/br/cid_416_athena_commando_m_assassinsuit/variants/parts/stage2.png" } ] } ], "gameplayTags": ["Cosmetics.UserFacingFlags.HasVariants", "Cosmetics.Source.ItemShop", "Cosmetics.Set.AssassinSuit", "Cosmetics.Filter.Season.9"], "showcaseVideo": "xkhEc3cl454", "displayAssetPath": "FortniteGame/Content/Catalog/DisplayAssets/DA_Featured_CID_416_Athena_Commando_M_AssassinSuit", "definitionPath": "FortniteGame/Content/Athena/Heroes/HID_416_Athena_Commando_M_AssassinSuit", "path": "FortniteGame/Content/Athena/Items/Cosmetics/Characters/CID_416_Athena_Commando_M_AssassinSuit", "added": "2019-11-20T12:50:00Z", "shopHistory": ["2019-05-16T00:00:00Z", "2019-05-17T00:00:00Z", "2019-05-18T00:00:00Z", "2019-05-19T00:00:00Z", "2019-05-20T00:00:00Z", "2019-05-21T00:00:00Z", "2019-06-28T00:00:00Z", "2019-06-29T00:00:00Z", "2019-12-27T00:00:00Z", "2019-12-28T00:00:00Z"] } } ``` -------------------------------- ### Initialize Fortnite API Client Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Config Initialize the FortniteAPI client with your API key and desired language. The debug option can be set to true for verbose logging. ```javascript const FortniteAPI = require('fortnite-api-com'); const config = { apikey: "API-Key", language: "en", debug: true }; var Fortnite = new FortniteAPI(config); ``` -------------------------------- ### Search All Creator Codes by Slug Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/CreatorCode\search\all Use this method to search for all creator codes associated with a given slug. Ensure you have the NodeJS wrapper installed and imported. ```JavaScript Fortnite.CreatorCodeSearchAll("example") .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Cosmetic Details JSON Response Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\id This is an example of the JSON response structure returned when successfully querying for cosmetic details by ID. It contains comprehensive data about the cosmetic item. ```JSON { "status":200, "data":{ "id":"cid_398_athena_commando_m_treasurehunterfashion", "type":"outfit", "backendType":"AthenaCharacter", "rarity":"uncommon", "displayRarity":"Uncommon", "backendRarity":"EFortRarity::Uncommon", "name":"Guild", "shortDescription":"Outfit", "description":"On the path to riches.", "set":null, "setText":null, "series":null, "backendSeries":null, "images":{ "smallIcon":{ "hash":"f90c17a213382a10e76dd5d3ef6976d8", "url":"https://fortnite-api.com/image/cid_398_athena_commando_m_treasurehunterfashion/smallicon.png" }, "icon":{ "hash":"d7a4da01225e2c42fe8ff34878efc192", "url":"https://fortnite-api.com/image/cid_398_athena_commando_m_treasurehunterfashion/icon.png" }, "featured":{ "hash":"da471a0eb3f517279336216b91058ef9", "url":"https://fortnite-api.com/image/cid_398_athena_commando_m_treasurehunterfashion/featured.png" }, "background":null, "coverArt":null, "decal":null }, "variants":null, "gameplayTags":[ "Cosmetics.Source.ItemShop", "Cosmetics.Filter.Season.8" ], "displayAssetPath":"FortniteGame/Content/Catalog/DisplayAssets/DA_Featured_CID_398_Athena_Commando_M_TreasureHunterFashion", "definition":"hid_398_athena_commando_m_treasurehunterfashion", "requiredItemId":null, "builtInEmoteId":null, "path":"FortniteGame/Content/Athena/Items/Cosmetics/Characters/CID_398_Athena_Commando_M_TreasureHunterFashion", "lastUpdate":"2019-11-20T12:50:01Z", "added":"2019-11-20T12:50:01Z" } } ``` -------------------------------- ### BRShop(language) Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Functions Fetches the current Battle Royale item shop. ```APIDOC ## BRShop(language) ### Description Retrieves the current items available in the Battle Royale item shop. ### Method BRShop ### Parameters #### Path Parameters - **language** (string) - Required - The language code for the response (e.g., 'en'). ### Request Example ```javascript Fortnite.BRShop("en") .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` ### Response #### Success Response (200) - **res** (object) - An object containing the item shop data. #### Response Example ```json { "example": "item shop data" } ``` ``` -------------------------------- ### CosmeticsNew(language) Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Functions Fetches newly added cosmetics. ```APIDOC ## CosmeticsNew(language) ### Description Retrieves a list of the most recently added cosmetic items to the game. ### Method CosmeticsNew ### Parameters #### Path Parameters - **language** (string) - Required - The language code for the response (e.g., 'en'). ### Request Example ```javascript Fortnite.CosmeticsNew("en") .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` ### Response #### Success Response (200) - **res** (object) - An object containing new cosmetic items. #### Response Example ```json { "example": "new cosmetics data" } ``` ``` -------------------------------- ### Get Fortnite Banner Colors Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Banners\Colors Use this method to retrieve a list of all available banner colors. The response includes the color ID, hex code, category, and sub-category group. ```JavaScript Fortnite.BannersColors() .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Get Supported Languages Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Language Use this method to retrieve a list of all language codes supported by the Fortnite API. It returns a promise that resolves with an array of language strings or rejects with an error. ```JavaScript Fortnite.Language() .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` ```JSON [ "ar", "de", "en", "es", "es-419", "fr", "it", "ja", "ko", "pl", "pt-BR", "ru", "tr", "zh-CN", "zh-Hant" ] ``` -------------------------------- ### Get Save the World News Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/News\stw Fetches news for Fortnite's Save the World mode. Requires a language code as a string argument. Handles potential errors with a catch block. ```JavaScript Fortnite.NewsSTW("en") .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### AES() Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Functions Fetches AES keys, likely for decryption purposes. ```APIDOC ## AES() ### Description Fetches the latest AES keys used for encrypting/decrypting game data. ### Method AES ### Parameters None ### Request Example ```javascript Fortnite.AES() .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` ### Response #### Success Response (200) - **res** (object) - An object containing AES keys. #### Response Example ```json { "example": "AES keys data" } ``` ``` -------------------------------- ### Search for Cosmetics by Query Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\search Use this method to search for cosmetics by providing a query object. The query object can specify matching methods, names, and languages. It returns a promise that resolves with the search results or rejects with an error. ```javascript var query = { matchMethod: "contains", name: "Dab", language:"en" }; Fortnite.CosmeticsSearch(query) .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Save the World News Response Structure Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/News\stw Example JSON response structure for the NewsSTW method, detailing status, data, language, title, last modified date, and a list of news messages with their associated details. ```JSON { "status":200, "data":{ "language":"en-US", "title":"SaveTheWorldNews", "lastModified":"2019-11-21T21:35:22.028Z", "messages":[ { "image":"https://cdn2.unrealengine.com/Fortnite/fortnite-game/savetheworldnews/1120/dungeon-1024x512-ae580dde4ecc377b4dcc21b5a89e266c3f6d4278.jpg", "hidden":false, "messageType":null, "type":"CommonUI Simple Message Base", "adspace":"NEW!", "spotlight":false, "title":"Dungeons", "body":"Fight monsters, dodge traps and gear up. Descend into the depths and confront a sinister monster." }, { "image":"https://cdn2.unrealengine.com/Fortnite/fortnite-game/savetheworldnews/1120/mythicsk-1024x512-92e039fbd366538394442aaac5d4bb8eb27e1007.jpg", "hidden":false, "messageType":null, "type":"CommonUI Simple Message Base", "adspace":"NEW!", "spotlight":false, "title":"Mythic Storm King", "body":"Squad up Commanders! If you manage to defeat the Mythic Storm King you'll be rewarded with weapons harnessing the power of the King of the Monsters." }, { "image":"https://cdn2.unrealengine.com/Fortnite/fortnite-game/savetheworldnews/1120/razor-1024x512-5b2dfae9d3664c5255a44dddfe74452e1800a423.jpg", "hidden":false, "messageType":null, "type":"CommonUI Simple Message Base", "adspace":"BATTLE BREAKERS!", "spotlight":false, "title":"A new Ninja is coming to Homebase!", "body":"Reach level 20 in Battle Breakers and unlock Razor! Download now on the Epic Games Store, the Epic Games App or on iOS." } ] } } ``` -------------------------------- ### Search All Cosmetics Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\search\all Use this method to search for all cosmetics that match the provided query parameters. Ensure the query object is correctly formatted with required fields like 'matchMethod', 'name', and 'language'. ```JavaScript var query = { matchMethod: "contains", name: "Dab", language:"en" }; Fortnite.CosmeticsSearchAll(query) .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Get Cosmetic Details by ID Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Cosmetics\id Use this method to retrieve all available details for a cosmetic item by providing its unique ID and an optional language code. The response includes information such as rarity, name, description, and image URLs. ```JavaScript Fortnite.CosmeticsId("CID_398_Athena_Commando_M_TreasureHunterFashion","en") .then(res => { console.log(res); }).catch(err => { console.log(err); }); ``` -------------------------------- ### Fortnite.BRShop(lang) Source: https://github.com/fortnite-api/nodejs-wrapper/wiki/Shop Retrieves the featured items from the Fortnite Item Shop for a specified language. It returns a promise that resolves with the shop data or rejects with an error. ```APIDOC ## GET /shop ### Description Retrieves the featured items from the Fortnite Item Shop. ### Method GET ### Endpoint /shop ### Parameters #### Query Parameters - **lang** (String) - Required - The language code for the shop data (e.g., "en"). ### Request Example ```javascript Fortnite.BRShop("en") ``` ### Response #### Success Response (200) - **status** (Number) - The HTTP status code of the response. - **data** (Object) - An object containing the shop data. - **hash** (String) - A hash of the shop data. - **date** (String) - The date the shop data was generated. - **featured** (Object) - An object containing featured items. - **name** (String) - The name of the featured section. - **entries** (Array) - An array of featured item entries. - **regularPrice** (Number) - The regular price of the item. - **finalPrice** (Number) - The final price of the item. - **bundle** (Object|null) - Information about the bundle if the item is part of one. - **banner** (Object) - Information about any applicable banner for the item. - **giftable** (Boolean) - Whether the item is giftable. - **refundable** (Boolean) - Whether the item is refundable. - **sortPriority** (Number) - The sorting priority of the item. - **categories** (Array) - An array of categories the item belongs to. - **devName** (String) - The developer-facing name of the item. - **offerId** (String) - The unique ID of the offer. - **displayAssetPath** (String) - The path to the display asset. - **items** (Array) - An array of item details. - **id** (String) - The unique ID of the item. - **name** (String) - The name of the item. - **description** (String) - The description of the item. - **type** (Object) - The type of the item. - **rarity** (Object) - The rarity of the item. - **series** (Object|null) - Information about the item series. - **set** (Object) - Information about the item set. - **introduction** (Object) - Information about when the item was introduced. - **images** (Object) - URLs for different sizes of the item's image. - **variants** (Array) - Available variants for the item. - **gameplayTags** (Array) - Gameplay tags associated with the item. - **showcaseVideo** (String) - The ID of the showcase video for the item. - **definitionPath** (String) - The path to the item's definition. - **path** (String) - The path to the item's asset. - **added** (String) - The date the item was added. - **shopHistory** (Array) - An array of dates the item has appeared in the shop. #### Error Response (400 or 500) - **status** (Number) - The HTTP status code of the error. - **error** (String) - A message describing the error. ```