MarvelRivalsAPI.com
Swagger DocsDiscord
  • Introduction
    • Documentation Overview
  • Errors
  • Rate Limits
  • Endpoints
    • Achievements
      • All Achievements
      • Achievement
    • Battlepass
    • Heroes
      • All Heroes
      • Hero
      • Hero Stats
      • Hero Leaderboard
      • Costumes
        • All Costumes
        • Costume
    • Items
      • All Items
      • Item
    • Maps
      • All Maps
    • Patch Notes
      • All Balances
        • Balance
      • All Dev Diaries
        • Dev Diray
      • All Patch Notes
        • Patch Note
      • Game Versions
      • Seasons
    • Player Stats
      • Find Player
      • Player
      • Update Player
    • Match Stats
      • Match History v1
      • Match
      • Match History v2
Powered by GitBook
On this page

Was this helpful?

  1. Endpoints

Battlepass

GET https://marvelrivalsapi.com/api/v1/battlepass

This endpoint retrieves the battlepass data for a given season, including season details and the list of items available for the selected season.

Headers

Name
Value

Content-Type

application/json

x-api-key*

YOUR API KEY

Query Parameters

Name
Type
Required
Description

season

integer

❌

The season number to fetch the battlepass data for. Defaults to season 1.5 if not provided.

Example Requests

curl -X GET "https://marvelrivalsapi.com/api/v1/battlepass?season=1.5"
     -H "x-api-key: YOUR_API_KEY"
const axios = require("axios");

try {
    const response = await axios.get("https://marvelrivalsapi.com/api/v1/battlepass?season=1.5", {
        headers: {
            "x-api-key": "YOUR_API_KEY"
        }
    });
    console.log(response.data);
} catch (error) {
    console.error("Error fetching balances:", error.response ? error.response.data : error.message);
}
import requests

url = "https://marvelrivalsapi.com/api/v1/battlepass?season=1.5"
headers = {
    "x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    print(response.json())
else:
    print(f"Error {response.status_code}: {response.text}")
import java.net.http.*;
import java.net.URI;
import java.io.IOException;

public class ApiClient {
    public static void main(String[] args) {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://marvelrivalsapi.com/api/v1/battlepass?season=1.5"))
            .header("x-api-key", "YOUR_API_KEY")
            .GET()
            .build();

        try {
            HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
            System.out.println(response.body());
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}

Response

{
  "season": 1,
  "season_name": "Rivals Season 1",
  "items": [
    {
      "name": "All-Butcher",
      "image": "/battlepass/1/all-butcher.jpg",
      "cost": "Unlock To Claim",
      "isLuxury": true
    }
  ]
}
{
  "error": true,
  "message": "Invalid season query parameter. The specified season is not available or invalid.",
  "status": 400
}
{
  "error": true,
  "message": "Invalid or missing API key.",
  "status": 401
}
{
  "error": true,
  "message": "Battlepass for the selected season not found",
  "status": 404
}
{
  "error": true,
  "message": "An error occurred while fetching data.",
  "status": 500
}

Response Field Descriptions

Field
Type
Description

season

Number

The season number (e.g., 1).

season_name

String

The name of the season (e.g., "Rivals Season 1").

items

Array

A list of items in the battle pass season. Each item has the following fields:

name

String

Name of the item (e.g., "All-Butcher").

image

String

Path to the item's image (e.g., "/battlepass/1/all-butcher.jpg").

cost

String

The cost to unlock the item (e.g., "Unlock To Claim").

isLuxury

Boolean

Whether the item is a luxury item (e.g., true).

PreviousAchievementNextHeroes

Last updated 2 months ago

Was this helpful?